]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.drivers/fcoe-fix-incorrect-use-of-struct-module.diff
Revert "Move xen patchset to new version's subdir."
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.drivers / fcoe-fix-incorrect-use-of-struct-module.diff
CommitLineData
8f69975d
BS
1From: James Bottomley <James.Bottomley@HansenPartnership.com>
2Subject: fcoe: fix incorrect use of struct module
3Patch-mainline: 9296e519538b77b5070d49f2f9d66032733c76d4
4References: bnc #468051
5
6This structure may not be defined if CONFIG_MODULE=n, so never deref it. Change
7uses of module->name to module_name(module) and corrects some dyslexic printks
8and docbook comments.
9
10Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
11Cc: Robert Love <robert.w.love@intel.com>
12Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
13Acked-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 }