isdn hisax gcc 4.1 warning fix
PATCH 1/1 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 <[email protected]>
drivers/isdn/hisax/config.c +6 -4
@@ -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);