Messages in this thread Patch in this message | | | Date | Tue, 9 May 2006 19:55:58 -0700 | From | Daniel Walker <> | Subject | [PATCH -mm] isdn hisax gcc 4.1 warning fix |
| |
Fixes the following warnings,
drivers/isdn/hisax/config.c: In function 'HiSax_readstatus': drivers/isdn/hisax/config.c:635: warning: ignoring return value of 'copy_to_user', declared with attribute warn_unused_result drivers/isdn/hisax/config.c:646: warning: ignoring return value of 'copy_to_user', declared with attribute warn_unused_result drivers/isdn/hisax/config.c: At top level: drivers/isdn/hisax/config.c:1879: warning: 'hisax_pci_tbl' defined but not used
Signed-Off-By: Daniel Walker <dwalker@mvista.com>
Index: linux-2.6.16/drivers/isdn/hisax/config.c =================================================================== --- linux-2.6.16.orig/drivers/isdn/hisax/config.c +++ linux-2.6.16/drivers/isdn/hisax/config.c @@ -632,7 +632,8 @@ static int HiSax_readstatus(u_char __use count = cs->status_end - cs->status_read + 1; if (count >= len) count = len; - copy_to_user(p, cs->status_read, count); + if (copy_to_user(p, cs->status_read, count)) + return -EFAULT; cs->status_read += count; if (cs->status_read > cs->status_end) cs->status_read = cs->status_buf; @@ -643,7 +644,8 @@ static int HiSax_readstatus(u_char __use cnt = HISAX_STATUS_BUFSIZE; else cnt = count; - copy_to_user(p, cs->status_read, cnt); + if (copy_to_user(p, cs->status_read, cnt)) + return -EFAULT; p += cnt; cs->status_read += cnt % HISAX_STATUS_BUFSIZE; count -= cnt; @@ -1873,7 +1875,7 @@ static void EChannel_proc_rcv(struct his } } -#ifdef CONFIG_PCI +#if defined(CONFIG_PCI) && defined(MODULE) #include <linux/pci.h> static struct pci_device_id hisax_pci_tbl[] __initdata = { @@ -1945,7 +1947,7 @@ static struct pci_device_id hisax_pci_tb }; MODULE_DEVICE_TABLE(pci, hisax_pci_tbl); -#endif /* CONFIG_PCI */ +#endif /* CONFIG_PCI && MODULE */ module_init(HiSax_init); module_exit(HiSax_exit); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |