Skip to content

Commit 8014bcc

Browse files
bwhacksDavid Vrabel
authored andcommitted
xen-pciback: Add name prefix to global 'permissive' variable
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 <ben@decadent.org.uk> Fixes: af6fc85 ("xen-pciback: limit guest control of command register") Signed-off-by: David Vrabel <david.vrabel@citrix.com>
1 parent 2b953a5 commit 8014bcc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

drivers/xen/xen-pciback/conf_space.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
#include "conf_space.h"
1717
#include "conf_space_quirks.h"
1818

19-
bool permissive;
20-
module_param(permissive, bool, 0644);
19+
bool xen_pcibk_permissive;
20+
module_param_named(permissive, xen_pcibk_permissive, bool, 0644);
2121

2222
/* This is where xen_pcibk_read_config_byte, xen_pcibk_read_config_word,
2323
* xen_pcibk_write_config_word, and xen_pcibk_write_config_byte are created. */
@@ -262,7 +262,7 @@ int xen_pcibk_config_write(struct pci_dev *dev, int offset, int size, u32 value)
262262
* This means that some fields may still be read-only because
263263
* they have entries in the config_field list that intercept
264264
* the write and do nothing. */
265-
if (dev_data->permissive || permissive) {
265+
if (dev_data->permissive || xen_pcibk_permissive) {
266266
switch (size) {
267267
case 1:
268268
err = pci_write_config_byte(dev, offset,

drivers/xen/xen-pciback/conf_space.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ struct config_field_entry {
6464
void *data;
6565
};
6666

67-
extern bool permissive;
67+
extern bool xen_pcibk_permissive;
6868

6969
#define OFFSET(cfg_entry) ((cfg_entry)->base_offset+(cfg_entry)->field->offset)
7070

drivers/xen/xen-pciback/conf_space_header.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static int command_write(struct pci_dev *dev, int offset, u16 value, void *data)
118118

119119
cmd->val = value;
120120

121-
if (!permissive && (!dev_data || !dev_data->permissive))
121+
if (!xen_pcibk_permissive && (!dev_data || !dev_data->permissive))
122122
return 0;
123123

124124
/* Only allow the guest to control certain bits. */

0 commit comments

Comments
 (0)