From: Ben Hutchings Subject: [PATCH] xen-pciback: Add name prefix to global 'permissive' variable Date: Mon, 13 Apr 2015 00:26:35 +0100 Message-ID: <1428881195.29665.56.camel@decadent.org.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5474570774210014884==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YhRH8-0002PM-HO for xen-devel@lists.xenproject.org; Sun, 12 Apr 2015 23:26:50 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Jan Beulich List-Id: xen-devel@lists.xenproject.org --===============5474570774210014884== Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-WrSYbfmsrXoEygAFjFr3" --=-WrSYbfmsrXoEygAFjFr3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The variable for the 'permissive' module parameter used to be static but was recently changed to be extern. This puts it in the kernel global namespace if the driver is built-in, so its name should begin with a prefix identifying the driver. Signed-off-by: Ben Hutchings Fixes: af6fc858a35b ("xen-pciback: limit guest control of command register"= ) --- drivers/xen/xen-pciback/conf_space.c | 6 +++--- drivers/xen/xen-pciback/conf_space.h | 2 +- drivers/xen/xen-pciback/conf_space_header.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/xen/xen-pciback/conf_space.c b/drivers/xen/xen-pciback= /conf_space.c index 75fe3d4..9c23420 100644 --- a/drivers/xen/xen-pciback/conf_space.c +++ b/drivers/xen/xen-pciback/conf_space.c @@ -16,8 +16,8 @@ #include "conf_space.h" #include "conf_space_quirks.h" =20 -bool permissive; -module_param(permissive, bool, 0644); +bool xen_pcibk_permissive; +module_param_named(permissive, xen_pcibk_permissive, bool, 0644); =20 /* This is where xen_pcibk_read_config_byte, xen_pcibk_read_config_word, * xen_pcibk_write_config_word, and xen_pcibk_write_config_byte are create= d. */ @@ -262,7 +262,7 @@ int xen_pcibk_config_write(struct pci_dev *dev, int off= set, int size, u32 value) * This means that some fields may still be read-only because * they have entries in the config_field list that intercept * the write and do nothing. */ - if (dev_data->permissive || permissive) { + if (dev_data->permissive || xen_pcibk_permissive) { switch (size) { case 1: err =3D pci_write_config_byte(dev, offset, diff --git a/drivers/xen/xen-pciback/conf_space.h b/drivers/xen/xen-pciback= /conf_space.h index 2e1d73d..62461a8 100644 --- a/drivers/xen/xen-pciback/conf_space.h +++ b/drivers/xen/xen-pciback/conf_space.h @@ -64,7 +64,7 @@ struct config_field_entry { void *data; }; =20 -extern bool permissive; +extern bool xen_pcibk_permissive; =20 #define OFFSET(cfg_entry) ((cfg_entry)->base_offset+(cfg_entry)->field->of= fset) =20 diff --git a/drivers/xen/xen-pciback/conf_space_header.c b/drivers/xen/xen-= pciback/conf_space_header.c index 2d73693..f8baf46 100644 --- a/drivers/xen/xen-pciback/conf_space_header.c +++ b/drivers/xen/xen-pciback/conf_space_header.c @@ -105,7 +105,7 @@ static int command_write(struct pci_dev *dev, int offse= t, u16 value, void *data) =20 cmd->val =3D value; =20 - if (!permissive && (!dev_data || !dev_data->permissive)) + if (!xen_pcibk_permissive && (!dev_data || !dev_data->permissive)) return 0; =20 /* Only allow the guest to control certain bits. */ --=20 Ben Hutchings Everything should be made as simple as possible, but not simpler. - Albert Einstei= n --=-WrSYbfmsrXoEygAFjFr3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIVAwUAVSr/Mee/yOyVhhEJAQoVwRAAsPVhw+fwzKBNyY5ykMftqxYPsgGmlqxG BGCbIKJp+LCYWqs5t74edb1/R12Ocek39s7d7eo8plQ5gupG6dtoXgFAjfy0tm3a ixt9QuSWfGhYrL+lEqqlu9FhIAI5k4vLpWHBjf+Z3r5hUBhgyJeBrm9eGOyY6tx2 WelKnKK+Cy8g6VZrdmYu5hLMdZjBmtMeAEbNTaybEmLJo0TxQlkr/ialywv6nBvR ToLQ3pCLwNte85MJFBvdfTgtDnCUfCRLBAiTQoDMRTD8z5JHH4mVWhv5ZHDS391c 3eiUBilOEEduvMgT1iO5EBQT+f73jDZBC3emHcfKIXbs5BZAJsn+H8iEWEAm4UqX MePi+oPlsPHr2zQrlHJRHOBB10T/J/aKtKhpo8XrNJ7gbGLuCJ0VHvgKWhxLJKNb O1vFZ5J1or/SZjls3pr2whP/7v7dcbbYqxwzN/ym7Hqu7D34CemkLgTUpFHFjJ+J 8mxSH9R5/6HRX8hfMQM1H/WRvojcM0Ez2+izNRaD8tysWgiwfMBvjhEP/QZpCQ1t /V/7sjRV4ahAmgmv2cBnOMocaQNHRO8uUf0O32yifE8eIu+ObBf6gGP2JbgUp1uX pzQ+ueOm8lqBP0VnVgA+JGRY8aetAnBblGcgt4+fjIzbMTnR9bsFP/c4s3bg8ezB //+q4CWZmGI= =xquS -----END PGP SIGNATURE----- --=-WrSYbfmsrXoEygAFjFr3-- --===============5474570774210014884== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============5474570774210014884==--