]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.drivers/fcoe-fix-incorrect-use-of-struct-module.diff
Revert "Disable build of xen kernel."
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.drivers / fcoe-fix-incorrect-use-of-struct-module.diff
1 From: James Bottomley <James.Bottomley@HansenPartnership.com>
2 Subject: fcoe: fix incorrect use of struct module
3 Patch-mainline: 9296e519538b77b5070d49f2f9d66032733c76d4
4 References: bnc #468051
5
6 This structure may not be defined if CONFIG_MODULE=n, so never deref it. Change
7 uses of module->name to module_name(module) and corrects some dyslexic printks
8 and docbook comments.
9
10 Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
11 Cc: Robert Love <robert.w.love@intel.com>
12 Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
13 Acked-by: Bernhard Walle <bwalle@suse.de>
14
15 ---
16 drivers/scsi/fcoe/libfcoe.c | 10 +++++-----
17 1 file changed, 5 insertions(+), 5 deletions(-)
18
19 --- a/drivers/scsi/fcoe/libfcoe.c
20 +++ b/drivers/scsi/fcoe/libfcoe.c
21 @@ -167,7 +167,7 @@ static int fcoe_cpu_callback(struct noti
22 #endif /* CONFIG_HOTPLUG_CPU */
23
24 /**
25 - * foce_rcv - this is the fcoe receive function called by NET_RX_SOFTIRQ
26 + * fcoe_rcv - this is the fcoe receive function called by NET_RX_SOFTIRQ
27 * @skb: the receive skb
28 * @dev: associated net device
29 * @ptype: context
30 @@ -992,8 +992,8 @@ static int fcoe_ethdrv_get(const struct
31
32 owner = fcoe_netdev_to_module_owner(netdev);
33 if (owner) {
34 - printk(KERN_DEBUG "foce:hold driver module %s for %s\n",
35 - owner->name, netdev->name);
36 + printk(KERN_DEBUG "fcoe:hold driver module %s for %s\n",
37 + module_name(owner), netdev->name);
38 return try_module_get(owner);
39 }
40 return -ENODEV;
41 @@ -1012,8 +1012,8 @@ static int fcoe_ethdrv_put(const struct
42
43 owner = fcoe_netdev_to_module_owner(netdev);
44 if (owner) {
45 - printk(KERN_DEBUG "foce:release driver module %s for %s\n",
46 - owner->name, netdev->name);
47 + printk(KERN_DEBUG "fcoe:release driver module %s for %s\n",
48 + module_name(owner), netdev->name);
49 module_put(owner);
50 return 0;
51 }