Skip to contentSkip to conversation

Linux 2.6.9-rc4

DISCUSSION J.A. Magallon 3 participants 3 messages Oct 11, 2004 – Oct 12, 2004

lore
Share & tools
lore
#0 lore raw

Hi...

Lets polish it... I get this warnings on build:

CC fs/binfmt_elf.o
fs/binfmt_elf.c: In function `padzero':
fs/binfmt_elf.c:113: warning: ignoring return value of clear_user', declared with attribute warn_unused_result include/asm/uaccess.h: In function create_elf_tables':
fs/binfmt_elf.c:175: warning: ignoring return value of __copy_to_user', declared with attribute warn_unused_result fs/binfmt_elf.c:273: warning: ignoring return value of copy_to_user', declared with attribute warn_unused_result fs/binfmt_elf.c: In function `load_elf_binary':
fs/binfmt_elf.c:758: warning: ignoring return value of clear_user', declared with attribute warn_unused_result fs/binfmt_elf.c: In function fill_psinfo':
fs/binfmt_elf.c:1226: warning: ignoring return value of `copy_from_user', declared with attribute warn_unused_result

CC [M] drivers/ieee1394/raw1394.o
include/asm/uaccess.h: In function `raw1394_read':
drivers/ieee1394/raw1394.c:446: warning: ignoring return value of `__copy_to_user', declared with attribute warn_unused_result

CC drivers/pci/msi.o
drivers/pci/msi.c: In function `msi_set_mask_bit':
drivers/pci/msi.c:80: warning: passing arg 2 of writel' makes pointer from integer without a cast drivers/pci/msi.c: In function set_msi_affinity':
drivers/pci/msi.c:121: warning: passing arg 1 of readl' makes pointer from integer without a cast drivers/pci/msi.c:126: warning: passing arg 2 of writel' makes pointer from integer without a cast drivers/pci/msi.c: In function `msi_free_vector':
drivers/pci/msi.c:838: warning: passing arg 2 of writel' makes pointer from integer without a cast drivers/pci/msi.c: In function reroute_msix_table':
drivers/pci/msi.c:901: warning: passing arg 1 of readl' makes pointer from integer without a cast drivers/pci/msi.c:903: warning: passing arg 2 of writel' makes pointer from integer without a cast drivers/pci/msi.c:905: warning: passing arg 1 of readl' makes pointer from integer without a cast drivers/pci/msi.c:907: warning: passing arg 2 of writel' makes pointer from integer without a cast drivers/pci/msi.c:909: warning: passing arg 1 of readl' makes pointer from integer without a cast drivers/pci/msi.c:911: warning: passing arg 2 of writel' makes pointer from integer without a cast

CC drivers/scsi/aic7xxx/aic7xxx_osm.o
drivers/scsi/aic7xxx/aic7xxx_osm.c:440: warning: 'aic7xxx' defined but not used drivers/scsi/aic7xxx/aic7xxx_osm.c:446: warning: 'dummy_buffer' defined but not used

CC [M] net/ipv4/netfilter/ip_tables.o
net/ipv4/netfilter/ip_tables.c: In function `do_replace':
net/ipv4/netfilter/ip_tables.c:1133: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result

--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandrakelinux release 10.1 (Community) for i586
Linux 2.6.9-rc4-mm1 (gcc 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)) #1

#1 lore raw
Quoted 4 lines · J.A. Magallon

Hi...

Lets polish it... I get this warnings on build:

Quoted 16 lines

CC fs/binfmt_elf.o
fs/binfmt_elf.c: In function `padzero':
fs/binfmt_elf.c:113: warning: ignoring return value of `clear_user', declared with attribute warn_unused_result
include/asm/uaccess.h: In function `create_elf_tables':
fs/binfmt_elf.c:175: warning: ignoring return value of `__copy_to_user', declared with attribute warn_unused_result
fs/binfmt_elf.c:273: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result
fs/binfmt_elf.c: In function `load_elf_binary':
fs/binfmt_elf.c:758: warning: ignoring return value of `clear_user', declared with attribute warn_unused_result
fs/binfmt_elf.c: In function `fill_psinfo':
fs/binfmt_elf.c:1226: warning: ignoring return value of `copy_from_user', declared with attribute warn_unused_result

I've submitted a patch for review for the above (which seems to have fallen into a black hole). Search the archives for "[PATCH][Please review] fix various missing return value checks in binfmt_elf" I see there's another proposed patch by "ramsez" - mail with topic "[FIX]:
fs/binfmt_elf.c compilation warns"

I've also submitted a fix for the last one of those binfmt_elf warnings as a sepperate patch - search for
"[PATCH] small binfmt_elf warning fix (copy_from_user return value checking)"

Quoted 5 lines

CC [M] drivers/ieee1394/raw1394.o
include/asm/uaccess.h: In function `raw1394_read':
drivers/ieee1394/raw1394.c:446: warning: ignoring return value of `__copy_to_user', declared with attribute warn_unused_result

This one I recently posted a patch for. Search for the thread with subject "[PATCH] check copy_to_user return value in raw1394"

I'll try submitting them again post 2.6.9 final, I've been re-reading them and I guess they could be done better. But if the warnings bug you too much, then they are in the archives and it certainly wouldn't hurt that they got some testing :)

--
Jesper Juhl

#2 lore raw
In reply to J.A. Magallon
Quoted 21 lines · J.A. Magallon

Hi...

Lets polish it... I get this warnings on build:

CC drivers/pci/msi.o
drivers/pci/msi.c: In function `msi_set_mask_bit':
drivers/pci/msi.c:80: warning: passing arg 2 of `writel' makes pointer from integer without a cast
drivers/pci/msi.c: In function `set_msi_affinity':
drivers/pci/msi.c:121: warning: passing arg 1 of `readl' makes pointer from integer without a cast
drivers/pci/msi.c:126: warning: passing arg 2 of `writel' makes pointer from integer without a cast
drivers/pci/msi.c: In function `msi_free_vector':
drivers/pci/msi.c:838: warning: passing arg 2 of `writel' makes pointer from integer without a cast
drivers/pci/msi.c: In function `reroute_msix_table':
drivers/pci/msi.c:901: warning: passing arg 1 of `readl' makes pointer from integer without a cast
drivers/pci/msi.c:903: warning: passing arg 2 of `writel' makes pointer from integer without a cast

Quoted 8 lines

drivers/pci/msi.c:905: warning: passing arg 1 of `readl' makes pointer from integer without a cast
drivers/pci/msi.c:907: warning: passing arg 2 of `writel' makes pointer from integer without a cast
drivers/pci/msi.c:909: warning: passing arg 1 of `readl' makes pointer from integer without a cast
drivers/pci/msi.c:911: warning: passing arg 2 of `writel' makes pointer from integer without a cast

These are fixed in the -mm tree, and do not constitute a "bug fix" that would cause them to make it into 2.6.9-rc4 right now.

thanks,

greg k-h