* [PATCH -next] netxen: fix builds for SYSFS=n or MODULES=n [not found] <20091026172104.205f15af.sfr@canb.auug.org.au> @ 2009-10-26 22:09 ` Randy Dunlap 2009-10-27 22:09 ` Dhananjay Phadke 2009-10-28 9:36 ` David Miller 0 siblings, 2 replies; 4+ messages in thread From: Randy Dunlap @ 2009-10-26 22:09 UTC (permalink / raw) To: Stephen Rothwell, netdev; +Cc: linux-next, LKML, davem, Dhananjay Phadke From: Randy Dunlap <randy.dunlap@oracle.com> When CONFIG_MODULES=n: drivers/net/netxen/netxen_nic_main.c:2751: error: dereferencing pointer to incomplete type drivers/net/netxen/netxen_nic_main.c:2764: error: dereferencing pointer to incomplete type Also needs addition of <linux/sysfs.h> for sysfs function prototypes or stubs when CONFIG_SYSFS=n. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> --- drivers/net/netxen/netxen_nic_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- linux-next-20091026.orig/drivers/net/netxen/netxen_nic_main.c +++ linux-next-20091026/drivers/net/netxen/netxen_nic_main.c @@ -34,6 +34,7 @@ #include <net/ip.h> #include <linux/ipv6.h> #include <linux/inetdevice.h> +#include <linux/sysfs.h> MODULE_DESCRIPTION("NetXen Multi port (1/10) Gigabit Network Driver"); MODULE_LICENSE("GPL"); @@ -2500,6 +2501,7 @@ static struct bin_attribute bin_attr_mem .write = netxen_sysfs_write_mem, }; +#ifdef CONFIG_MODULES static ssize_t netxen_store_auto_fw_reset(struct module_attribute *mattr, struct module *mod, const char *buf, size_t count) @@ -2534,6 +2536,7 @@ static struct module_attribute mod_attr_ .show = netxen_show_auto_fw_reset, .store = netxen_store_auto_fw_reset, }; +#endif static void netxen_create_sysfs_entries(struct netxen_adapter *adapter) @@ -2739,7 +2742,9 @@ static struct pci_driver netxen_driver = static int __init netxen_init_module(void) { +#ifdef CONFIG_MODULES struct module *mod = THIS_MODULE; +#endif printk(KERN_INFO "%s\n", netxen_nic_driver_string); @@ -2748,9 +2753,11 @@ static int __init netxen_init_module(voi register_inetaddr_notifier(&netxen_inetaddr_cb); #endif +#ifdef CONFIG_MODULES if (sysfs_create_file(&mod->mkobj.kobj, &mod_attr_fw_reset.attr)) printk(KERN_ERR "%s: Failed to create auto_fw_reset " "sysfs entry.", netxen_nic_driver_name); +#endif return pci_register_driver(&netxen_driver); } @@ -2759,9 +2766,11 @@ module_init(netxen_init_module); static void __exit netxen_exit_module(void) { +#ifdef CONFIG_MODULES struct module *mod = THIS_MODULE; sysfs_remove_file(&mod->mkobj.kobj, &mod_attr_fw_reset.attr); +#endif pci_unregister_driver(&netxen_driver); ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH -next] netxen: fix builds for SYSFS=n or MODULES=n 2009-10-26 22:09 ` [PATCH -next] netxen: fix builds for SYSFS=n or MODULES=n Randy Dunlap @ 2009-10-27 22:09 ` Dhananjay Phadke 2009-10-28 9:34 ` David Miller 2009-10-28 9:36 ` David Miller 1 sibling, 1 reply; 4+ messages in thread From: Dhananjay Phadke @ 2009-10-27 22:09 UTC (permalink / raw) To: Randy Dunlap, Stephen Rothwell, netdev Cc: linux-next@vger.kernel.org, LKML, davem@davemloft.net Sorry, seems like I am keeping you busy with the build errors. Thanks for fixing it again (may be I need to setup all different build configs). Acked-by: Dhananjay Phadke <dhananjay@netxen.com> -----Original Message----- From: Randy Dunlap [mailto:randy.dunlap@oracle.com] Sent: Monday, October 26, 2009 3:10 PM To: Stephen Rothwell; netdev Cc: linux-next@vger.kernel.org; LKML; davem@davemloft.net; Dhananjay Phadke Subject: [PATCH -next] netxen: fix builds for SYSFS=n or MODULES=n From: Randy Dunlap <randy.dunlap@oracle.com> When CONFIG_MODULES=n: drivers/net/netxen/netxen_nic_main.c:2751: error: dereferencing pointer to incomplete type drivers/net/netxen/netxen_nic_main.c:2764: error: dereferencing pointer to incomplete type Also needs addition of <linux/sysfs.h> for sysfs function prototypes or stubs when CONFIG_SYSFS=n. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> --- drivers/net/netxen/netxen_nic_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- linux-next-20091026.orig/drivers/net/netxen/netxen_nic_main.c +++ linux-next-20091026/drivers/net/netxen/netxen_nic_main.c @@ -34,6 +34,7 @@ #include <net/ip.h> #include <linux/ipv6.h> #include <linux/inetdevice.h> +#include <linux/sysfs.h> MODULE_DESCRIPTION("NetXen Multi port (1/10) Gigabit Network Driver"); MODULE_LICENSE("GPL"); @@ -2500,6 +2501,7 @@ static struct bin_attribute bin_attr_mem .write = netxen_sysfs_write_mem, }; +#ifdef CONFIG_MODULES static ssize_t netxen_store_auto_fw_reset(struct module_attribute *mattr, struct module *mod, const char *buf, size_t count) @@ -2534,6 +2536,7 @@ static struct module_attribute mod_attr_ .show = netxen_show_auto_fw_reset, .store = netxen_store_auto_fw_reset, }; +#endif static void netxen_create_sysfs_entries(struct netxen_adapter *adapter) @@ -2739,7 +2742,9 @@ static struct pci_driver netxen_driver = static int __init netxen_init_module(void) { +#ifdef CONFIG_MODULES struct module *mod = THIS_MODULE; +#endif printk(KERN_INFO "%s\n", netxen_nic_driver_string); @@ -2748,9 +2753,11 @@ static int __init netxen_init_module(voi register_inetaddr_notifier(&netxen_inetaddr_cb); #endif +#ifdef CONFIG_MODULES if (sysfs_create_file(&mod->mkobj.kobj, &mod_attr_fw_reset.attr)) printk(KERN_ERR "%s: Failed to create auto_fw_reset " "sysfs entry.", netxen_nic_driver_name); +#endif return pci_register_driver(&netxen_driver); } @@ -2759,9 +2766,11 @@ module_init(netxen_init_module); static void __exit netxen_exit_module(void) { +#ifdef CONFIG_MODULES struct module *mod = THIS_MODULE; sysfs_remove_file(&mod->mkobj.kobj, &mod_attr_fw_reset.attr); +#endif pci_unregister_driver(&netxen_driver); ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] netxen: fix builds for SYSFS=n or MODULES=n 2009-10-27 22:09 ` Dhananjay Phadke @ 2009-10-28 9:34 ` David Miller 0 siblings, 0 replies; 4+ messages in thread From: David Miller @ 2009-10-28 9:34 UTC (permalink / raw) To: dhananjay.phadke; +Cc: randy.dunlap, sfr, netdev, linux-next, linux-kernel From: Dhananjay Phadke <dhananjay.phadke@qlogic.com> Date: Tue, 27 Oct 2009 15:09:24 -0700 > Sorry, seems like I am keeping you busy with the build errors. > Thanks for fixing it again (may be I need to setup all different build configs). > > Acked-by: Dhananjay Phadke <dhananjay@netxen.com> Please adhere to the following netiquette when replying to patches: 1) DO NOT TOP POST. You can feel free to continue doing this, but I am warning you that soon a day will come when replying to postings in a top-post manner will have your posting completely rejected from the list. This is absolutely the largest pet peeve amongst kernel developers. Quote only the relevant parts of the message, nothing more, and then afterwards you place your comments. Do not add comments before the quoted material. People need to read the quoted part to gain the context necessary to understand your reply, not the other way around. 2) Do not quote the patch when just adding your ACK or signoff. That makes the patch appear twice in patchwork, making more work for me and confusion for the patch submitted. Thank you. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] netxen: fix builds for SYSFS=n or MODULES=n 2009-10-26 22:09 ` [PATCH -next] netxen: fix builds for SYSFS=n or MODULES=n Randy Dunlap 2009-10-27 22:09 ` Dhananjay Phadke @ 2009-10-28 9:36 ` David Miller 1 sibling, 0 replies; 4+ messages in thread From: David Miller @ 2009-10-28 9:36 UTC (permalink / raw) To: randy.dunlap; +Cc: sfr, netdev, linux-next, linux-kernel, dhananjay From: Randy Dunlap <randy.dunlap@oracle.com> Date: Mon, 26 Oct 2009 15:09:45 -0700 > From: Randy Dunlap <randy.dunlap@oracle.com> > > When CONFIG_MODULES=n: > drivers/net/netxen/netxen_nic_main.c:2751: error: dereferencing pointer to incomplete type > drivers/net/netxen/netxen_nic_main.c:2764: error: dereferencing pointer to incomplete type > > Also needs addition of <linux/sysfs.h> for sysfs function prototypes or > stubs when CONFIG_SYSFS=n. > > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Applied, thanks Randy. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-28 9:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20091026172104.205f15af.sfr@canb.auug.org.au>
2009-10-26 22:09 ` [PATCH -next] netxen: fix builds for SYSFS=n or MODULES=n Randy Dunlap
2009-10-27 22:09 ` Dhananjay Phadke
2009-10-28 9:34 ` David Miller
2009-10-28 9:36 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox