Skip to contentSkip to conversation

2.4.25-pre8: 126 warnings 0 errors

Compile Regression In review Xose Vazquez Perez 7 participants 59 messages Jan 30, 2004 – Feb 4, 2004 1 message not in the archive

Subsystems (15)
lore
Share & tools
lore
#0 lore raw

hi,

kernel: 2.4.25-pre8

distribution : RHL 9
gcc: 3.2.2

[...]

Kernel build of original configuration:
Making bzImage (oldconfig): 15 warnings, 0 errors Making modules (oldconfig): 126 warnings, 0 errors

Warning Summary (individual module builds):

drivers/atm: 1 warnings, 0 errors
drivers/char: 10 warnings, 0 errors
drivers/ide: 2 warnings, 0 errors
drivers/ieee1394: 1 warnings, 0 errors
drivers/isdn: 25 warnings, 0 errors
drivers/media: 1 warnings, 0 errors
drivers/mtd: 10 warnings, 0 errors
drivers/net: 10 warnings, 0 errors
drivers/net: 2 warnings, 0 errors
drivers/pcmcia: 2 warnings, 0 errors
drivers/scsi: 14 warnings, 0 errors
drivers/scsi/aacraid: 2 warnings, 0 errors
drivers/scsi/pcmcia: 2 warnings, 0 errors
drivers/sound: 5 warnings, 0 errors
drivers/telephony: 2 warnings, 0 errors
drivers/usb: 6 warnings, 0 errors
drivers/video: 9 warnings, 0 errors
drivers/video/matrox: 5 warnings, 0 errors
drivers/video/riva: 1 warnings, 0 errors
fs/befs: 4 warnings, 0 errors
fs/hfs: 2 warnings, 0 errors
fs/intermezzo: 1 warnings, 0 errors
fs/nfs: 2 warnings, 0 errors
fs/xfs: 1 warnings, 0 errors
net: 7 warnings, 0 errors

Warning List:

aachba.c:1682: warning: cast to pointer from integer of different size
aachba.c:1744: warning: cast to pointer from integer of different size
ac97_plugin_ad1980.c:92: warning: initialization from incompatible pointer type
ad1889.c:361: warning: unsigned int format, different type arg (arg 4)
agpgart_be.c:5647:17: warning: extra tokens at end of #undef directive
../aha152x.c:853: warning: `do_setup' defined but not used
aha1542.c:114: warning: `setup_str' defined but not used
ali5455.c:2939: warning: `addr2' might be used uninitialized in this function
ali5455.c:2939: warning: `data' might be used uninitialized in this function
amd74xx.c:389: warning: `ata66_amd74xx' defined but not used
amd76x_pm.c:483: warning: `activate_amd76x_SLP' defined but not used
amd76xrom.c:181: warning: label `err_out_none' defined but not used
amd7930_fn.h:35: warning: `initAMD' defined but not used
applicom.c:268:2: warning: #warning "LEAK"
applicom.c:532:2: warning: #warning "Je suis stupide. DW. - copy*user in cli"
aty128fb.c:1066: warning: `aty128_set_crt_enable' defined but not used
aty128fb.c:1076: warning: `aty128_set_lcd_enable' defined but not used
aty128fb.c:2485: warning: unused variable `fb'
aty128fb.c:2486: warning: unused variable `value'
aty128fb.c:2487: warning: unused variable `rc'
cardbus.c:239: warning: assignment makes pointer from integer without a cast
cardbus.c:239: warning: implicit declaration of function `pci_scan_device_Rsmp_aceae718' cfi_cmdset_0001.c:1135: warning: unsigned int format, different type arg (arg 2) cfi_cmdset_0001.c:1165: warning: unsigned int format, different type arg (arg 2) cfi_cmdset_0001.c:826: warning: unsigned int format, different type arg (arg 2) cfi_cmdset_0020.c:1137: warning: unsigned int format, different type arg (arg 3) cfi_cmdset_0020.c:1286: warning: unsigned int format, different type arg (arg 3) cfi_cmdset_0020.c:491: warning: unsigned int format, different type arg (arg 3) cfi_cmdset_0020.c:851: warning: unsigned int format, different type arg (arg 3)
cmdlinepart.c:345: warning: `mtdpart_setup' defined but not used
cpqfcTSi2c.c:62: warning: i2c_delay' declared static' but never defined
crc32.c:91: warning: static declaration for `fn_calc_memory_chunk_crc32' follows non-static csr.c:120: warning: long unsigned int format, int arg (arg 3) /datos/kernel/linux/include/asm/smpboot.h:126: warning: deprecated use of label at end of compound statement /datos/kernel/linux/include/linux/autoconf.h:2070:1: warning: "CONFIG_SERIAL_SHARE_IRQ" redefined /datos/kernel/linux/include/linux/ixjuser.h:45: warning: `ixjuser_h_rcsid' defined but not used /datos/kernel/linux/include/linux/kdev_t.h:81:1: warning: this is the location of the previous definition /datos/kernel/linux/include/linux/modules/sunrpc_syms.ver:38:1: warning: this is the location of the previous definition doc1000.c:85:2: warning: #warning This is definitely not SMP safe. Lock the paging mechanism. dtc.c:182: warning: `dtc_setup' defined but not used
fbcon.c:2138: warning: unused variable `line'
fbcon.c:2141: warning: unused variable `dst'
fbcon.c:2141: warning: unused variable `src'
fbcon.c:2142: warning: unused variable `x1'
fbcon.c:2142: warning: unused variable `y1'
fbdev.c:2224: warning: label `err_out_kfree' defined but not used
../fdomain.c:565: warning: `fdomain_setup' defined but not used
file.c:64: warning: `rc' might be used uninitialized in this function
gamma_dma.c:608:18: warning: #warning list_entry() is needed here
g_NCR5380.c:212: warning: `do_NCR5380_setup' defined but not used
g_NCR5380.c:230: warning: `do_NCR53C400_setup' defined but not used
g_NCR5380.c:248: warning: `do_NCR53C400A_setup' defined but not used
g_NCR5380.c:266: warning: `do_DTC3181E_setup' defined but not used
hc_sl811_rh.c:171: warning: duplicate `const'
hc_sl811_rh.c:416: warning: duplicate `const'
hc_sl811_rh.c:421: warning: duplicate `const'
hid-core.c:879: warning: implicit declaration of function `hiddev_report_event'
i2o_block.c:510: warning: `i2ob_flush' defined but not used
i2o_pci.c:393:1: warning: no newline at end of file
idt77252.c:669: warning: unsigned int format, different type arg (arg 5)
interrupt.c:201: warning: unsigned int format, different type arg (arg 4)
ip_conntrack_core.c:1161: warning: passing arg 1 of `unhelp' discards qualifiers from pointer target type ircomm_param.c:202: warning: concatenation of string literals with __FUNCTION__ is deprecated irlmp.c:1244: warning: concatenation of string literals with __FUNCTION__ is deprecated irlmp.c:1258: warning: concatenation of string literals with __FUNCTION__ is deprecated irlmp.c:1277: warning: concatenation of string literals with __FUNCTION__ is deprecated irlmp.c:1284: warning: concatenation of string literals with __FUNCTION__ is deprecated it8181fb.c:162: warning: `fontname' defined but not used
ixj.h:41: warning: `ixj_h_rcsid' defined but not used
kaweth.c:738: warning: assignment from incompatible pointer type
linuxvfs.c:682: warning: `befs_listxattr' defined but not used
linuxvfs.c:690: warning: `befs_getxattr' defined but not used
linuxvfs.c:697: warning: `befs_setxattr' defined but not used
linuxvfs.c:703: warning: `befs_removexattr' defined but not used
ma600.c:51:22: warning: extra tokens at end of #undef directive
main.c:236:2: warning: #warning "Initialisation order race. Must register after usable"
make[1]: warning: jobserver unavailable: using -j1. Add +' to parent make rule. matroxfb_g450.c:134: warning: duplicate const'
matroxfb_g450.c:135: warning: duplicate `const'
matroxfb_g450.c:561: warning: unused variable `minfo'
matroxfb_maven.c:359: warning: duplicate `const'
matroxfb_maven.c:360: warning: duplicate `const'
meye.c:212: warning: passing arg 3 of `dma_alloc_coherent' from incompatible pointer type
mpc.c:330: warning: `mpoa_device_type_string' defined but not used
mptbase.c:2906: warning: `pCached' might be used uninitialized in this function
NCR5380.c:402: warning: `NCR5380_print' defined but not used
NCR5380.c:458: warning: `NCR5380_print_phase' defined but not used
NCR5380.c:684: warning: `NCR5380_probe_irq' defined but not used
NCR5380.c:738: warning: `NCR5380_print_options' defined but not used
nfs3proc.c:48:1: warning: "rpc_call_sync" redefined
ns83820.c:1708: warning: `ns83820_probe_phy' defined but not used
pc300_tty.c:706: warning: passing arg 2 of pointer to function discards qualifiers from pointer target type pci-pc.c:180:1: warning: "PCI_CONF1_ADDRESS" redefined
pci-pc.c:58:1: warning: this is the location of the previous definition
pm3fb.c:3835: warning: passing arg 2 of __release_region_Rsmp_d49501d4' makes integer from pointer without a cast pm3fb.c:3838: warning: passing arg 2 of __release_region_Rsmp_d49501d4' makes integer from pointer without a cast r128_cce.c:357: warning: unsigned int format, different type arg (arg 3)
radeon_cp.c:908: warning: unsigned int format, different type arg (arg 3)
radeon_mem.c:135: warning: `print_heap' defined but not used
scsi_merge.c:104: warning: long unsigned int format, different type arg (arg 4)
sddr09.c:448: warning: `sddr09_request_sense' defined but not used
siimage.c:65: warning: control reaches end of non-void function
sstfb.c:971: warning: unused variable `i'
st5481_b.c:122: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_b.c:176: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_b.c:367: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_d.c:362: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_d.c:386: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_d.c:419: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_d.c:453: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_d.c:602: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:134: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:188: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:244: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:253: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:263: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:360: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:474: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:504: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:510: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:512: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:514: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:51: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:522: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:609: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:612: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:67: warning: concatenation of string literals with __FUNCTION__ is deprecated sundance.c:1678: warning: unsigned int format, different type arg (arg 3)
sundance.c:994: warning: unsigned int format, different type arg (arg 3)
super.c:164: warning: `fork' might be used uninitialized in this function
super.c:164: warning: `names' might be used uninitialized in this function
tipar.c:76:1: warning: "minor" redefined
tms380tr.c:1449: warning: long unsigned int format, different type arg (arg 3)
vac-serial.c:13:1: warning: this is the location of the previous definition
vesafb.c:93: warning: `fbcon_cmap' defined but not used
wd7000.c:832: warning: `p' might be used uninitialized in this function
xfs_log_recover.c:1534: warning: `flags' might be used uninitialized in this function yellowfin.c:1282: warning: unsigned int format, different type arg (arg 2)
yellowfin.c:1294: warning: unsigned int format, different type arg (arg 2)

# EOT

#1 lore raw
Quoted 6 lines · Xose Vazquez Perez

kernel: 2.4.25-pre8

distribution : RHL 9
gcc: 3.2.2

[...]

and as usual:
if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.4.25-pre8; fi

depmod: *** Unresolved symbols in /lib/modules/2.4.25-pre8/kernel/drivers/ide/ide-core.o
depmod:         init_cmd640_vlb
depmod: *** Unresolved symbols in /lib/modules/2.4.25-pre8/kernel/fs/binfmt_elf.o
depmod:         smp_num_siblings
depmod:         put_files_struct
depmod:         steal_locks

--
Software is like sex, it's better when it's bug free.

#2 lore raw
In reply to Xose Vazquez Perez

This is a shame. These warnings piled up during time.

It is very likely that all of them are harmless,
but they need to be fixed.

Will find to look into some of them. Help is appreciated.

Quoted 40 lines · Xose Vazquez Perez

hi,

kernel: 2.4.25-pre8

distribution : RHL 9
gcc: 3.2.2

[...]

Kernel build of original configuration:
Making bzImage (oldconfig): 15 warnings, 0 errors Making modules (oldconfig): 126 warnings, 0 errors

Warning Summary (individual module builds):

drivers/atm: 1 warnings, 0 errors
drivers/char: 10 warnings, 0 errors
drivers/ide: 2 warnings, 0 errors
drivers/ieee1394: 1 warnings, 0 errors
drivers/isdn: 25 warnings, 0 errors
drivers/media: 1 warnings, 0 errors
drivers/mtd: 10 warnings, 0 errors
drivers/net: 10 warnings, 0 errors
drivers/net: 2 warnings, 0 errors
drivers/pcmcia: 2 warnings, 0 errors
drivers/scsi: 14 warnings, 0 errors
drivers/scsi/aacraid: 2 warnings, 0 errors
drivers/scsi/pcmcia: 2 warnings, 0 errors
drivers/sound: 5 warnings, 0 errors
drivers/telephony: 2 warnings, 0 errors
drivers/usb: 6 warnings, 0 errors
drivers/video: 9 warnings, 0 errors
drivers/video/matrox: 5 warnings, 0 errors
drivers/video/riva: 1 warnings, 0 errors
fs/befs: 4 warnings, 0 errors
fs/hfs: 2 warnings, 0 errors
fs/intermezzo: 1 warnings, 0 errors
fs/nfs: 2 warnings, 0 errors
fs/xfs: 1 warnings, 0 errors
net: 7 warnings, 0 errors

#3 lore raw

Marcelo Tosatti <[email protected]> ha scritto:

Quoted 6 lines

This is a shame. These warnings piled up during time.

It is very likely that all of them are harmless,
but they need to be fixed.

Will find to look into some of them. Help is appreciated.

If you want I can work on them in the weekend.

Luca

Signature · 5 lines
Home: http://kronoz.cjb.net
"La teoria e` quando sappiamo come funzionano le cose ma non funzionano.
 La pratica e` quando le cose funzionano ma non sappiamo perche`.
 Abbiamo unito la teoria e la pratica: le cose non funzionano piu` e non
 sappiamo il perche`." -- A. Einstein

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

Il Fri, Jan 30, 2004 at 06:57:03PM -0200, Marcelo Tosatti ha scritto:

Quoted 7 lines · Kronos
Quoted 6 lines

Marcelo Tosatti <[email protected]> ha scritto:

Quoted 5 lines

This is a shame. These warnings piled up during time.

It is very likely that all of them are harmless,
but they need to be fixed.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Will find to look into some of them. Help is appreciated.

If you want I can work on them in the weekend.

If you feel like it, sure :)

I want only "obvious" fixes for 2.4.25, the rest during 2.4.26-pre.

Done. Allmost all of them seem obvious. I'm splitting diffs right now, I'll send patches in reply to this mail. Below is a summary:

Warning List:

aachba.c:1682: warning: cast to pointer from integer of different size aachba.c:1744: warning: cast to pointer from integer of different size

There is a comment that says that they are ok.

ac97_plugin_ad1980.c:92: warning: initialization from incompatible pointer type

Fixed.

ad1889.c:361: warning: unsigned int format, different type arg (arg 4)

It happens only with CONFIG_HIGHMEM64G=y as dma_addr_t becomes u64. Fixed by casting dma_addr_t to dma64_addr_t.

agpgart_be.c:5647:17: warning: extra tokens at end of #undef directive

Trivial fix.

../aha152x.c:853: warning: `do_setup' defined but not used

Hum, cannot reproduce. do_setup is defined and _used_ if !defined(MODULE).

aha1542.c:114: warning: `setup_str' defined but not used

Fixed.

ali5455.c:2939: warning: addr2' might be used uninitialized in this function ali5455.c:2939: warning: data' might be used uninitialized in this function

Not sure. They are initialized in a if-branch in a for loop. I suppose that sooner or later the branch will be taken.

amd74xx.c:389: warning: `ata66_amd74xx' defined but not used

Yes, this is really unused.

amd76x_pm.c:483: warning: `activate_amd76x_SLP' defined but not used

Fixed.

amd76xrom.c:181: warning: label `err_out_none' defined but not used

This is called by code enclosed in #if 0. Should I remove the label?

amd7930_fn.h:35: warning: `initAMD' defined but not used

There is a static array in a header file. I moved it in the c file.

applicom.c:268:2: warning: #warning "LEAK"
applicom.c:532:2: warning: #warning "Je suis stupide. DW. - copy*user in cli"

Ask the author...

aty128fb.c:1066: warning: aty128_set_crt_enable' defined but not used aty128fb.c:1076: warning: aty128_set_lcd_enable' defined but not used aty128fb.c:2485: warning: unused variable fb' aty128fb.c:2486: warning: unused variable value' aty128fb.c:2487: warning: unused variable `rc'

Fixed.

cardbus.c:239: warning: assignment makes pointer from integer without a cast cardbus.c:239: warning: implicit declaration of function `pci_scan_device_Rsmp_aceae718'

This can be a real bug. cardbus.c is calling pci_scan_device which is marked as __devinit. Also pci_scan_device prototype isn't exported. Who is cardbus maintainer? I founded only a comment by Linus saying that the file will be removed (dated 2000...).

cfi_cmdset_0001.c:1135: warning: unsigned int format, different type arg (arg 2) cfi_cmdset_0001.c:1165: warning: unsigned int format, different type arg (arg 2) cfi_cmdset_0001.c:826: warning: unsigned int format, different type arg (arg 2) cfi_cmdset_0020.c:1137: warning: unsigned int format, different type arg (arg 3) cfi_cmdset_0020.c:1286: warning: unsigned int format, different type arg (arg 3) cfi_cmdset_0020.c:491: warning: unsigned int format, different type arg (arg 3) cfi_cmdset_0020.c:851: warning: unsigned int format, different type arg (arg 3)

cfi_word can be either 64 or 32 bit wide. Should I cast it to u64 in the kprintf?

cmdlinepart.c:345: warning: `mtdpart_setup' defined but not used

Fixed.

cpqfcTSi2c.c:62: warning: i2c_delay' declared static' but never defined

Fixed.

crc32.c:91: warning: static declaration for `fn_calc_memory_chunk_crc32' follows non-static

Fixed. Btw, while fixing it I found 3 crc32.c:

kronos@notebook:~/src/linux-2.4$ find -name crc32.c
./lib/crc32.c
./arch/mips/lasat/crc32.c
(This one under mips is usign a lookup table to compute the crc)
./drivers/net/wan/8253x/crc32.c

Maybe two of them can be removed...

csr.c:120: warning: long unsigned int format, int arg (arg 3)

Fixed.

/datos/kernel/linux/include/asm/smpboot.h:126: warning: deprecated use of label at end of compound statement

Fixed, seems trivial.

/datos/kernel/linux/include/linux/ixjuser.h:45: warning: `ixjuser_h_rcsid' defined but not used

It is used in drivers/telephony/ixj.c but it seems to me quite useless.

/datos/kernel/linux/include/linux/kdev_t.h:81:1: warning: this is the location of the previous definition

Minor is redefined in drivers/char/tipar.c. Fixed.

/datos/kernel/linux/include/linux/modules/sunrpc_syms.ver:38:1: warning: this is the location of the previous definition

Don't know :)

doc1000.c:85:2: warning: #warning This is definitely not SMP safe. Lock the paging mechanism.

Can't fix.

dtc.c:182: warning: `dtc_setup' defined but not used

Fixed.

fbcon.c:2138: warning: unused variable `line'
fbcon.c:2141: warning: unused variable `dst'
fbcon.c:2141: warning: unused variable `src'
fbcon.c:2142: warning: unused variable `x1'
fbcon.c:2142: warning: unused variable `y1'

They are used under several #defines, I don't think that it's worth moving them around.

fbdev.c:2224: warning: label `err_out_kfree' defined but not used

Fixed.

../fdomain.c:565: warning: `fdomain_setup' defined but not used

Done.

file.c:64: warning: `rc' might be used uninitialized in this function

(under fs/intermezzo) I think it's ok:

static int presto_open_upcall(int minor, struct dentry *de)

{
        int rc;
	struct presto_dentry_data *dd = presto_d2d(de);
	...
	if (dd->remote_ino == 0) {
		rc = presto_get_fileid(minor, fset, de);
	}
	...
	if (dd->remote_ino > 0) {
		...
	} else
		CPRINTF("blabla", rc);

remote_ino is unsigned so rc won't be used without initialization.

gamma_dma.c:608:18: warning: #warning list_entry() is needed here

Yup, the same thing should be done in drmP.h...done.

g_NCR5380.c:212: warning: do_NCR5380_setup' defined but not used g_NCR5380.c:230: warning: do_NCR53C400_setup' defined but not used g_NCR5380.c:248: warning: do_NCR53C400A_setup' defined but not used g_NCR5380.c:266: warning: do_DTC3181E_setup' defined but not used

Fixed.

hc_sl811_rh.c:171: warning: duplicate `const'
hc_sl811_rh.c:416: warning: duplicate `const'
hc_sl811_rh.c:421: warning: duplicate `const'

I doesn't even compile if not build as module... fixed. Warnings comes from nested min(), gcc 3.3.2 doesn't whine.

hid-core.c:879: warning: implicit declaration of function `hiddev_report_event'

Missing prototype in include/linux/hiddev.h, fixed

i2o_block.c:510: warning: `i2ob_flush' defined but not used

Wrapped with #if 0

i2o_pci.c:393:1: warning: no newline at end of file

Not true :)

idt77252.c:669: warning: unsigned int format, different type arg (arg 5)

dma_addr_t...

interrupt.c:201: warning: unsigned int format, different type arg (arg 4)

dma_addr_t again. Maybe we need a special printf conversion specifier.

ip_conntrack_core.c:1161: warning: passing arg 1 of `unhelp' discards qualifiers from pointer target type

LIST_FIND_W cast to const the first element that gets passed to the helper function (unhelp). I see no easy way to fix this (I'm not familiar with netfilter code) because unhelp modifies its first arg.

ircomm_param.c:202: warning: concatenation of string literals with __FUNCTION__ is deprecated

Fixed (btw somebody half-fixed this...)

irlmp.c:1244: warning: concatenation of string literals with __FUNCTION__ is deprecated irlmp.c:1258: warning: concatenation of string literals with __FUNCTION__ is deprecated irlmp.c:1277: warning: concatenation of string literals with __FUNCTION__ is deprecated irlmp.c:1284: warning: concatenation of string literals with __FUNCTION__ is deprecated

Fixed

it8181fb.c:162: warning: `fontname' defined but not used

Fixed + plus removal of unneeded initialization to zero.

ixj.h:41: warning: `ixj_h_rcsid' defined but not used

Shut up! Don't know why it complains. ixj_h_rcsid seems used.

kaweth.c:738: warning: assignment from incompatible pointer type

Fixed.

linuxvfs.c:682: warning: befs_listxattr' defined but not used linuxvfs.c:690: warning: befs_getxattr' defined but not used linuxvfs.c:697: warning: befs_setxattr' defined but not used linuxvfs.c:703: warning: befs_removexattr' defined but not used

Extended attribute not implemented yet. Wrapped with #if 0 + comment.

ma600.c:51:22: warning: extra tokens at end of #undef directive

Trivial.

main.c:236:2: warning: #warning "Initialisation order race. Must register after usable"

This is /drivers/sound/emu10k1/main.c. Don't know how to fix.

make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.

Uh?

matroxfb_g450.c:134: warning: duplicate const' matroxfb_g450.c:135: warning: duplicate const' matroxfb_g450.c:561: warning: unused variable minfo' matroxfb_maven.c:359: warning: duplicate const' matroxfb_maven.c:360: warning: duplicate `const'

Fixed.

meye.c:212: warning: passing arg 3 of `dma_alloc_coherent' from incompatible pointer type

Fixed, but be carefull with this. The driver consider dma_addr_t == u32 which is not always true even on i386 (CONFIG_HIGHMEM64G). I replaced u32 with dma_addr_t where appropriate, but I don't think that the driver is 64 bit clean anyway.

mpc.c:330: warning: `mpoa_device_type_string' defined but not used

It's marked as unused. Maybe the OP is using an older gcc.

mptbase.c:2906: warning: `pCached' might be used uninitialized in this function

Fixed.

NCR5380.c:402: warning: NCR5380_print' defined but not used NCR5380.c:458: warning: NCR5380_print_phase' defined but not used NCR5380.c:684: warning: NCR5380_probe_irq' defined but not used NCR5380.c:738: warning: NCR5380_print_options' defined but not used

Not sure. Comments says that NCR5380_probe_irq is defined under
AUTOPROBE_IRQ but it's not. It's also stated that NCR5380_print_options must be called in the init code (but again it's not). You'd better ask the maintainer.

nfs3proc.c:48:1: warning: "rpc_call_sync" redefined

Hum, here the function rpc_call_sync is overridded with a macro. At least this is unclean.

ns83820.c:1708: warning: `ns83820_probe_phy' defined but not used

Fixed.

pc300_tty.c:706: warning: passing arg 2 of pointer to function discards qualifiers from pointer target type

We are losing a volatile and I don't see why it's used. Also there a lot of "volatile" all over the driver. Not touched.

pci-pc.c:180:1: warning: "PCI_CONF1_ADDRESS" redefined pci-pc.c:58:1: warning: this is the location of the previous definition

PCI_CONF1_ADDRESS is defined on line 58 #if CONFIG_MULTIQUAD. It's redefined on line 180 (outside #if CONFIG_MULTIQUAD). I added an #undef right before the end of the CONFIG_MULTIQUAD block

pm3fb.c:3835: warning: passing arg 2 of __release_region_Rsmp_d49501d4' makes integer from pointer without a cast pm3fb.c:3838: warning: passing arg 2 of __release_region_Rsmp_d49501d4' makes integer from pointer without a cast

The author didn't understand how to use ioremap ;) I think that it's ok on i386 though, I can add a cast to shut up gcc.

r128_cce.c:357: warning: unsigned int format, different type arg (arg 3)

dma_addr_t

radeon_cp.c:908: warning: unsigned int format, different type arg (arg 3)

idem

radeon_mem.c:135: warning: `print_heap' defined but not used

Gone.

scsi_merge.c:104: warning: long unsigned int format, different type arg (arg 4)

page_to_phys returns a u64 if CONFIG_HIGHMEM64G is defined.

sddr09.c:448: warning: `sddr09_request_sense' defined but not used

-EWONTFIX ;) sddr09_request_sense is called by the init function, which is wrapped by a #if 0.

siimage.c:65: warning: control reaches end of non-void function

The last statement before the end is BUG(), but I added a return to silence the warning.

sstfb.c:971: warning: unused variable `i'

Fixed.

st5481_b.c:122: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_b.c:176: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_b.c:367: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_d.c:362: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_d.c:386: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_d.c:419: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_d.c:453: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_d.c:602: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:134: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:188: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:244: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:253: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:263: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:360: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:474: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:504: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:510: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:512: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:514: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:51: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:522: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:609: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:612: warning: concatenation of string literals with __FUNCTION__ is deprecated st5481_usb.c:67: warning: concatenation of string literals with __FUNCTION__ is deprecated

Fixed.

sundance.c:1678: warning: unsigned int format, different type arg (arg 3) sundance.c:994: warning: unsigned int format, different type arg (arg 3)

dma_addr_t

super.c:164: warning: fork' might be used uninitialized in this function super.c:164: warning: names' might be used uninitialized in this function

This may be real. Don't know how to fix.

tipar.c:76:1: warning: "minor" redefined

Fixed, see above.

tms380tr.c:1449: warning: long unsigned int format, different type arg (arg 3)

Bad cast, fixed.

/datos/kernel/linux/include/linux/autoconf.h:2070:1: warning: "CONFIG_SERIAL_SHARE_IRQ" redefined vac-serial.c:13:1: warning: this is the location of the previous definition

Fixed. But why vac-serial.c and serial.c defines CONFIG_SERIAL_SHARE_IRQ? It should be defined by the build system (if user configured it...)

vesafb.c:93: warning: `fbcon_cmap' defined but not used

It's used if CONFIG_FBCON_CFB16 or CONFIG_FBCON_CFB32 are defined.

wd7000.c:832: warning: `p' might be used uninitialized in this function

Can't happen. needed is always >= 1 so p will be initialized. gcc is not smart enough ;)

xfs_log_recover.c:1534: warning: `flags' might be used uninitialized in this function

Fixed by Nathan Scott

yellowfin.c:1282: warning: unsigned int format, different type arg (arg 2) yellowfin.c:1294: warning: unsigned int format, different type arg (arg 2)

Fixed.

ciao,
Luca

Signature · 3 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Se non puoi convincerli, confondili.
#6 lore raw

PATCH 1/42 [Compile Regression in 2.4.25-pre8][PATCH 1/42]

ac97_plugin_ad1980.c:92: warning: initialization from incompatible pointer type

Fixed. Use correct prototype for ad1980_remove.

drivers/sound/ac97_plugin_ad1980.c +1 -1
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/sound/ac97_plugin_ad1980.c linux-2.4/drivers/sound/ac97_plugin_ad1980.c
@@ -45,7 +45,7 @@
  *	use of the codec after the probe function.
  */
  
-static void ad1980_remove(struct ac97_codec *codec)
+static void ad1980_remove(struct ac97_codec *codec, struct ac97_driver *driver)
 {
 	/* Nothing to do in the simple example */
 }
Signature · 5 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Collect some stars to shine for you
And start today 'cause there's only a few
A sign of times my friend
#7 lore raw

PATCH 2/42 [Compile Regression in 2.4.25-pre8][PATCH 2/42]

In reply to Kronos

ad1889.c:361: warning: unsigned int format, different type arg (arg 4)

It happens only with CONFIG_HIGHMEM64G=y as dma_addr_t becomes u64. Fixed by casting dma_addr_t to dma64_addr_t in the printk.

drivers/sound/ad1889.c +2 -2
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/sound/ad1889.c linux-2.4/drivers/sound/ad1889.c
@@ -356,9 +356,9 @@
 	for (i = 0; i < AD_MAX_STATES; i++) {
 		out += sprintf(out, "DMA status for %s:\n", 
 			(i == AD_WAV_STATE ? "WAV" : "ADC")); 
-		out += sprintf(out, "\t\t0x%p (IOVA: 0x%u)\n", 
+		out += sprintf(out, "\t\t0x%p (IOVA: 0x%Lu)\n", 
 			dev->state[i].dmabuf.rawbuf,
-			dev->state[i].dmabuf.dma_handle);
+			(dma64_addr_t)dev->state[i].dmabuf.dma_handle);
 
 		out += sprintf(out, "\tread ptr: offset %u\n", 
 			(unsigned int)dev->state[i].dmabuf.rd_ptr);
Signature · 3 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
No matter what you choose, you're still a luser.
#8 lore raw

PATCH 3/42 [Compile Regression in 2.4.25-pre8][PATCH 3/42]

In reply to Kronos

agpgart_be.c:5647:17: warning: extra tokens at end of #undef directive

Fix is trivial.

drivers/char/agp/agpgart_be.c +1 -1
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/char/agp/agpgart_be.c linux-2.4/drivers/char/agp/agpgart_be.c
@@ -5644,7 +5644,7 @@
 #define GET_PAGE_DIR_IDX(addr) (GET_PAGE_DIR_OFF(addr) - \
 	GET_PAGE_DIR_OFF(agp_bridge.gart_bus_addr))
 #define GET_GATT_OFF(addr) ((addr & 0x003ff000) >> 12)
-#undef  GET_GATT(addr)
+#undef  GET_GATT
 #define GET_GATT(addr) (ati_generic_private.gatt_pages[\
 	GET_PAGE_DIR_IDX(addr)]->remapped)
 
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Dicono che  il cane sia  il miglior  amico dell'uomo. Secondo me  non e`
vero. Quanti dei vostri amici avete fatto castrare, recentemente?
#9 lore raw

PATCH 4/42 [Compile Regression in 2.4.25-pre8][PATCH 4/42]

In reply to Kronos

aha1542.c:114: warning: `setup_str' defined but not used

Move setup_str inside #ifndef MODULE. The string in not used when the driver is compiled statically.

drivers/scsi/aha1542.c +1 -2
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/scsi/aha1542.c linux-2.4/drivers/scsi/aha1542.c
@@ -111,8 +111,6 @@
 static int setup_busoff[MAXBOARDS];
 static int setup_dmaspeed[MAXBOARDS] __initdata = { -1, -1, -1, -1 };
 
-static char *setup_str[MAXBOARDS] __initdata;
-
 /*
  * LILO/Module params:  aha1542=<PORTBASE>[,<BUSON>,<BUSOFF>[,<DMASPEED>]]
  *
@@ -960,6 +958,7 @@
 
 #ifndef MODULE
 static int setup_idx = 0;
+static char *setup_str[MAXBOARDS] __initdata;
 
 void __init aha1542_setup(char *str, int *ints)
 {
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Il piu` bel momento dell'amore e` quando ci si illude che duri per 
sempre; il piu` brutto, quando ci si accorge che dura da troppo.
#10 lore raw

PATCH 5/42 [Compile Regression in 2.4.25-pre8][PATCH 5/42]

In reply to Kronos

amd7930_fn.h:35: warning: `initAMD' defined but not used

There is a static array in a header file. I moved it in the c file.

drivers/isdn/hisax/amd7930_fn.c +34 -0
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/isdn/hisax/amd7930_fn.c linux-2.4/drivers/isdn/hisax/amd7930_fn.c
@@ -61,6 +61,40 @@
 #include <linux/interrupt.h>
 #include <linux/init.h>
 
+static WORD initAMD[] __devinit = {
+	0x0100,
+
+	0x00A5, 3, 0x01, 0x40, 0x58,				// LPR, LMR1, LMR2
+	0x0086, 1, 0x0B,					// DMR1 (D-Buffer TH-Interrupts on)
+	0x0087, 1, 0xFF,					// DMR2
+	0x0092, 1, 0x03,					// EFCR (extended mode d-channel-fifo on)
+	0x0090, 4, 0xFE, 0xFF, 0x02, 0x0F,			// FRAR4, SRAR4, DMR3, DMR4 (address recognition )
+	0x0084, 2, 0x80, 0x00,					// DRLR
+	0x00C0, 1, 0x47,					// PPCR1
+	0x00C8, 1, 0x01,					// PPCR2
+
+	0x0102,
+	0x0107,
+	0x01A1, 1,
+	0x0121, 1,
+	0x0189, 2,
+
+	0x0045, 4, 0x61, 0x72, 0x00, 0x00,			// MCR1, MCR2, MCR3, MCR4
+	0x0063, 2, 0x08, 0x08,					// GX
+	0x0064, 2, 0x08, 0x08,					// GR
+	0x0065, 2, 0x99, 0x00,					// GER
+	0x0066, 2, 0x7C, 0x8B,					// STG
+	0x0067, 2, 0x00, 0x00,					// FTGR1, FTGR2
+	0x0068, 2, 0x20, 0x20,					// ATGR1, ATGR2
+	0x0069, 1, 0x4F,					// MMR1
+	0x006A, 1, 0x00,					// MMR2
+	0x006C, 1, 0x40,					// MMR3
+	0x0021, 1, 0x02,					// INIT
+	0x00A3, 1, 0x40,					// LMR1
+
+	0xFFFF};
+
+
 static void Amd7930_new_ph(struct IsdnCardState *cs);
 
 
drivers/isdn/hisax/amd7930_fn.h +0 -33
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/isdn/hisax/amd7930_fn.h linux-2.4/drivers/isdn/hisax/amd7930_fn.h
@@ -32,38 +32,5 @@
 
 #define DBUSY_TIMER_VALUE 80
 
-static WORD initAMD[] = {
-	0x0100,
-
-	0x00A5, 3, 0x01, 0x40, 0x58,				// LPR, LMR1, LMR2
-	0x0086, 1, 0x0B,					// DMR1 (D-Buffer TH-Interrupts on)
-	0x0087, 1, 0xFF,					// DMR2
-	0x0092, 1, 0x03,					// EFCR (extended mode d-channel-fifo on)
-	0x0090, 4, 0xFE, 0xFF, 0x02, 0x0F,			// FRAR4, SRAR4, DMR3, DMR4 (address recognition )
-	0x0084, 2, 0x80, 0x00,					// DRLR
-	0x00C0, 1, 0x47,					// PPCR1
-	0x00C8, 1, 0x01,					// PPCR2
-
-	0x0102,
-	0x0107,
-	0x01A1, 1,
-	0x0121, 1,
-	0x0189, 2,
-
-	0x0045, 4, 0x61, 0x72, 0x00, 0x00,			// MCR1, MCR2, MCR3, MCR4
-	0x0063, 2, 0x08, 0x08,					// GX
-	0x0064, 2, 0x08, 0x08,					// GR
-	0x0065, 2, 0x99, 0x00,					// GER
-	0x0066, 2, 0x7C, 0x8B,					// STG
-	0x0067, 2, 0x00, 0x00,					// FTGR1, FTGR2
-	0x0068, 2, 0x20, 0x20,					// ATGR1, ATGR2
-	0x0069, 1, 0x4F,					// MMR1
-	0x006A, 1, 0x00,					// MMR2
-	0x006C, 1, 0x40,					// MMR3
-	0x0021, 1, 0x02,					// INIT
-	0x00A3, 1, 0x40,					// LMR1
-
-	0xFFFF};
-
 extern void Amd7930_interrupt(struct IsdnCardState *cs, unsigned char irflags);
 extern void Amd7930_init(struct IsdnCardState *cs);
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Alcuni pensano che io sia una persona orribile, ma non vero. Ho il
cuore di un ragazzino - in un vaso sulla scrivania.
#11 lore raw

PATCH 6/42 [Compile Regression in 2.4.25-pre8][PATCH 6/42]

In reply to Kronos

aty128fb.c:1066: warning: aty128_set_crt_enable' defined but not used aty128fb.c:1076: warning: aty128_set_lcd_enable' defined but not used aty128fb.c:2485: warning: unused variable fb' aty128fb.c:2486: warning: unused variable value' aty128fb.c:2487: warning: unused variable `rc'

aty128_set_crt_enable and aty128_set_lcd_enable and the vars are used only when CONFIG_PMAC_PBOOK is defined.

font and mode are used only when the driver is modular.

nomttr is used only when CONFIG_MTRR is defined.

drivers/video/aty128fb.c +9 -3
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/video/aty128fb.c linux-2.4/drivers/video/aty128fb.c
@@ -227,9 +227,10 @@
 static char fontname[40] __initdata = { 0 };
 
 static int  noaccel __initdata = 0;
+#ifdef MODULE
 static char *font __initdata = NULL;
 static char *mode __initdata = NULL;
-static int  nomtrr __initdata = 0;
+#endif
 
 static char *mode_option __initdata = NULL;
 
@@ -244,6 +245,7 @@
 #endif
 
 #ifdef CONFIG_MTRR
+static int nomtrr __initdata = 0;
 static int mtrr = 1;
 #endif
 
@@ -1061,6 +1063,7 @@
     return 0;
 }
 
+#ifdef CONFIG_PMAC_PBOOK
 static void
 aty128_set_crt_enable(struct fb_info_aty128 *info, int on)
 {
@@ -1096,6 +1099,7 @@
 	aty_st_le32(LVDS_GEN_CNTL, reg);
     }
 }
+#endif /* CONFIG_PMAC_PBOOK */
 
 static void
 aty128_set_pll(struct aty128_pll *pll, const struct fb_info_aty128 *info)
@@ -2482,12 +2486,12 @@
 static int aty128fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
 		       u_long arg, int con, struct fb_info *info)
 {
+#ifdef CONFIG_PMAC_PBOOK
     struct fb_info_aty128 *fb = (struct fb_info_aty128 *)info;
     u32 value;
     int rc;
     
     switch (cmd) {
-#ifdef CONFIG_PMAC_PBOOK
     case FBIO_ATY128_SET_MIRROR:
     	if (fb->chip_gen != rage_M3)
     		return -EINVAL;
@@ -2506,11 +2510,13 @@
     		return -EINVAL;
 	value = (fb->crt_on << 1) | fb->lcd_on;
     	return put_user(value, (__u32*)arg);
-#endif
     default:
 	return -EINVAL;
     }
     return 0;
+#else
+    return -EINVAL;
+#endif
 }
 
 #ifdef CONFIG_PMAC_BACKLIGHT
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Dicono che  il cane sia  il miglior  amico dell'uomo. Secondo me  non e`
vero. Quanti dei vostri amici avete fatto castrare, recentemente?
#12 lore raw

PATCH 7/42 [Compile Regression in 2.4.25-pre8][PATCH 7/42]

In reply to Kronos

cmdlinepart.c:345: warning: `mtdpart_setup' defined but not used

Function is not used when driver is modular.

drivers/mtd/cmdlinepart.c +2 -1
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/mtd/cmdlinepart.c linux-2.4/drivers/mtd/cmdlinepart.c
@@ -335,7 +335,7 @@
 	return -EINVAL;
 }
 
-
+#ifndef MODULE
 /* 
  * This is the handler for our kernel parameter, called from 
  * main.c::checksetup(). Note that we can not yet kmalloc() anything,
@@ -348,6 +348,7 @@
 }
 
 __setup("mtdparts=", mtdpart_setup);
+#endif
 
 EXPORT_SYMBOL(parse_cmdline_partitions);
 
Signature · 7 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
"I've seen things you people wouldn't believe...
 Attack Ships on fire off the shores of Orion.
 I've watched C-beams glitter in the dark off of Tanhauser Gate.
 All those moments will be lost in time...like tears, in rain.
 Time to die." -- Roy Batty (played by Rutger Hauer)
#13 lore raw

PATCH 8/42 [Compile Regression in 2.4.25-pre8][PATCH 8/42]

In reply to Kronos

cpqfcTSi2c.c:62: warning: i2c_delay' declared static' but never defined

i2c_delay isn't defined, remove useless prototype.

drivers/scsi/cpqfcTSi2c.c +0 -1
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/scsi/cpqfcTSi2c.c linux-2.4/drivers/scsi/cpqfcTSi2c.c
@@ -59,7 +59,6 @@
 #define SLAVE_WRITE_ADDRESS	0xA0
 
 
-static void i2c_delay(u32 mstime);
 static void tl_i2c_clock_pulse(u8, void *GPIOout);
 static u8 tl_read_i2c_data(void *);
 
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
You and me baby ain't nothin' but mammals
So let's do it like they do on the Discovery Channel
#14 lore raw

PATCH 9/42 [Compile Regression in 2.4.25-pre8][PATCH 9/42]

In reply to Kronos

crc32.c:91: warning: static declaration for `fn_calc_memory_chunk_crc32' follows non-static

fn_calc_memory_chunk_crc32 is declared static in drivers/net/wan/8253x/crc32.c. Remove the prototype from the header.

drivers/net/wan/8253x/crc32dcl.h +0 -1
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/net/wan/8253x/crc32dcl.h linux-2.4/drivers/net/wan/8253x/crc32dcl.h
@@ -29,7 +29,6 @@
 /****************************************************/
 
 extern void	fn_init_crc_table(void);
-extern unsigned int	fn_calc_memory_chunk_crc32(void *p, unsigned int n_bytes, unsigned int crc);
 extern unsigned int	fn_calc_memory_crc32(void *p, unsigned int n_bytes);
 extern unsigned int	fn_check_memory_crc32(void *p, unsigned int n_bytes, unsigned int crc);
 
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
"In linea di principio sarei indifferente al natale, se solo il natale
 ricambiasse la cortesia e mi lasciasse in pace." -- Marco d'Itri
#15 lore raw

PATCH 10/42 [Compile Regression in 2.4.25-pre8][PATCH 10/42]

In reply to Kronos

csr.c:120: warning: long unsigned int format, int arg (arg 3)

HZ is int, not unsigned long.

drivers/ieee1394/csr.c +1 -1
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/ieee1394/csr.c linux-2.4/drivers/ieee1394/csr.c
@@ -117,7 +117,7 @@
 	/* Just to keep from rounding low */
 	csr->expire++;
 
-	HPSB_VERBOSE("CSR: setting expire to %lu, HZ=%lu", csr->expire, HZ);
+	HPSB_VERBOSE("CSR: setting expire to %lu, HZ=%d", csr->expire, HZ);
 }
 
 
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
"Sei l'unica donna della mia vita".
(Adamo)
#16 lore raw

PATCH 11/42 [Compile Regression in 2.4.25-pre8][PATCH 11/42]

In reply to Kronos

include/asm/smpboot.h:126: warning: deprecated use of label at end of compound statement

Move the return statement under 'default' label to suppress the warning.

include/asm-i386/smpboot.h +1 -1
diff -Nru -X dontdiff linux-2.4-vanilla/include/asm-i386/smpboot.h linux-2.4/include/asm-i386/smpboot.h
@@ -123,8 +123,8 @@
 			cpu = (cpu+1)%smp_num_cpus;
 			return cpu_to_physical_apicid(cpu);
 		default:
+			return cpu_online_map;
 	}
-	return cpu_online_map;
 }
 #else
 #define target_cpus() (cpu_online_map)
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Ci sono due cose che l'uomo non puo` nascondere:
essere ubriaco ed essere innamorato.
#17 lore raw

Re: [Compile Regression in 2.4.25-pre8][PATCH 11/42]

Quoted 10 lines · Kronos

include/asm/smpboot.h:126: warning: deprecated use of label at end of compound statement

Move the return statement under 'default' label to suppress the warning.

diff -Nru -X dontdiff linux-2.4-vanilla/include/asm-i386/smpboot.h linux-2.4/include/asm-i386/smpboot.h

include/asm-i386/smpboot.h line 130

Quoted 9 lines
include/asm-i386/smpboot.h +1 -1
@@ -123,8 +123,8 @@
 			cpu = (cpu+1)%smp_num_cpus;
 			return cpu_to_physical_apicid(cpu);
 		default:
+			return cpu_online_map;
 	}
-	return cpu_online_map;
 }
 #else
 #define target_cpus() (cpu_online_map)

Not correct. This removes the main-line return of a value. You just need a ';' after the default to suppress the error (or a break; ). Neither will make any additional code.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.

#18 lore raw

Re: [Compile Regression in 2.4.25-pre8][PATCH 11/42]

Il Mon, Feb 02, 2004 at 04:25:55PM -0500, Richard B. Johnson ha scritto:

Quoted 7 lines · Kronos
Quoted 6 lines

include/asm/smpboot.h:126: warning: deprecated use of label at end of compound statement

Move the return statement under 'default' label to suppress the warning.

Quoted 16 lines
Quoted 5 lines

diff -Nru -X dontdiff linux-2.4-vanilla/include/asm-i386/smpboot.h linux-2.4/include/asm-i386/smpboot.h

include/asm-i386/smpboot.h line 130

Quoted 9 lines
include/asm-i386/smpboot.h +1 -1
@@ -123,8 +123,8 @@
 			cpu = (cpu+1)%smp_num_cpus;
 			return cpu_to_physical_apicid(cpu);
 		default:
+			return cpu_online_map;
 	}
-	return cpu_online_map;
 }
 #else
 #define target_cpus() (cpu_online_map)

Not correct. This removes the main-line return of a value.

Since the original code is this:

        switch(clustered_apic_mode){
                case CLUSTERED_APIC_NUMAQ:
                        /* Broadcast intrs to local quad only. */
                        return APIC_BROADCAST_ID_APIC;
                case CLUSTERED_APIC_XAPIC:
                        /*round robin the interrupts*/
                        cpu = (cpu+1)%smp_num_cpus;
                        return cpu_to_physical_apicid(cpu);
                default:
        }
        return cpu_online_map;

my patch doesn't change anything. It may be a bit unclean though. What about this one:

include/asm-i386/smpboot.h +1 -0
diff -Nru -X dontdiff linux-2.4-vanilla/include/asm-i386/smpboot.h linux-2.4/include/asm-i386/smpboot.h
@@ -123,6 +123,7 @@
 			cpu = (cpu+1)%smp_num_cpus;
 			return cpu_to_physical_apicid(cpu);
 		default:
+			break;
 	}
 	return cpu_online_map;
 }

Luca

Signature · 6 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
I went to God just to see
And I was looking at me
Saw heaven and hell were lies
When I'm God everyone dies
#19 lore raw

Re: [Compile Regression in 2.4.25-pre8][PATCH 11/42]

Quoted 56 lines · Kronos

Il Mon, Feb 02, 2004 at 04:25:55PM -0500, Richard B. Johnson ha scritto:

Quoted 7 lines · Kronos
Quoted 6 lines

include/asm/smpboot.h:126: warning: deprecated use of label at end of compound statement

Move the return statement under 'default' label to suppress the warning.

Quoted 16 lines
Quoted 5 lines

diff -Nru -X dontdiff linux-2.4-vanilla/include/asm-i386/smpboot.h linux-2.4/include/asm-i386/smpboot.h

include/asm-i386/smpboot.h line 130

Quoted 9 lines
include/asm-i386/smpboot.h +1 -1
@@ -123,8 +123,8 @@
 			cpu = (cpu+1)%smp_num_cpus;
 			return cpu_to_physical_apicid(cpu);
 		default:
+			return cpu_online_map;
 	}
-	return cpu_online_map;
 }
 #else
 #define target_cpus() (cpu_online_map)

Not correct. This removes the main-line return of a value.

Since the original code is this:

        switch(clustered_apic_mode){
                case CLUSTERED_APIC_NUMAQ:
                        /* Broadcast intrs to local quad only. */
                        return APIC_BROADCAST_ID_APIC;
                case CLUSTERED_APIC_XAPIC:
                        /*round robin the interrupts*/
                        cpu = (cpu+1)%smp_num_cpus;
                        return cpu_to_physical_apicid(cpu);
                default:
        }
        return cpu_online_map;

my patch doesn't change anything. It may be a bit unclean though. What about this one:

diff -Nru -X dontdiff linux-2.4-vanilla/include/asm-i386/smpboot.h linux-2.4/include/asm-i386/smpboot.h

include/asm-i386/smpboot.h +1 -0
@@ -123,6 +123,7 @@
 			cpu = (cpu+1)%smp_num_cpus;
 			return cpu_to_physical_apicid(cpu);
 		default:
+			break;
 	}
 	return cpu_online_map;
 }
Quoted 1 line

Luca

Yep. Either a single ';' or the 'break ;' works fine. This is because 'default:' is a label. I think the rule is dumb, but it's a rule, just like keeping right in a corridor!

Cheers,
Dick Johnson

Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.

#20 lore raw

PATCH 12/42 [Compile Regression in 2.4.25-pre8][PATCH 12/42]

In reply to Kronos

include/linux/autoconf.h:2070:1: warning: "CONFIG_SERIAL_SHARE_IRQ" redefined vac-serial.c:13:1: warning: this is the location of the previous definition

Don't define CONFIG_SERIAL_SHARE_IRQ if it's already defined by the build system.

drivers/char/vac-serial.c +2 -0
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/char/vac-serial.c linux-2.4/drivers/char/vac-serial.c
@@ -10,7 +10,9 @@
 #define CONFIG_SERIAL_NOPAUSE_IO
 #define SERIAL_DO_RESTART
 
+#ifndef CONFIG_SERIAL_SHARE_IRQ
 #define CONFIG_SERIAL_SHARE_IRQ
+#endif
 
 /* Set of debugging defines */
 
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
"Sei l'unica donna della mia vita".
(Adamo)
#21 lore raw

PATCH 13/42 [Compile Regression in 2.4.25-pre8][PATCH 13/42]

In reply to Kronos

tipar.c:76:1: warning: "minor" redefined
include/linux/kdev_t.h:81:1: warning: this is the location of the previous definition

Don't redefine 'minor' macro.

drivers/char/tipar.c +3 -1
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/char/tipar.c linux-2.4/drivers/char/tipar.c
@@ -73,7 +73,9 @@
 
 #define VERSION(ver,rel,seq) (((ver)<<16) | ((rel)<<8) | (seq))
 #if LINUX_VERSION_CODE < VERSION(2,5,0)
-# define minor(x) MINOR(x)
+# ifndef minor
+#  define minor(x) MINOR(x)
+# endif
 # define need_resched() (current->need_resched)
 #endif
 
Signature · 6 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
"L'abilita` politica e` l'abilita` di prevedere quello che
 accadra` domani, la prossima settimana, il prossimo mese e
 l'anno prossimo. E di essere cosi` abili, piu` tardi,
 da spiegare  perche' non e` accaduto."
#22 lore raw

PATCH 14/42 [Compile Regression in 2.4.25-pre8][PATCH 14/42]

In reply to Kronos

dtc.c:182: warning: `dtc_setup' defined but not used

dtc_setup isn't used when the driver is modular.

drivers/scsi/dtc.c +2 -0
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/scsi/dtc.c linux-2.4/drivers/scsi/dtc.c
@@ -172,6 +172,7 @@
 
 #define NO_SIGNATURES (sizeof (signatures) /  sizeof (struct signature))
 
+#ifndef MODULE
 /**
  *	dtc_setup	-	option setup for dtc3x80
  *
@@ -202,6 +203,7 @@
 }
 
 __setup("dtc=", dtc_setup);
+#endif
 
 /**
  *	dtc_detect	-	detect DTC 3x80 controllers
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Alcuni pensano che io sia una persona orribile, ma non vero. Ho il
cuore di un ragazzino - in un vaso sulla scrivania.
#23 lore raw

PATCH 15/42 [Compile Regression in 2.4.25-pre8][PATCH 15/42]

In reply to Kronos

../fdomain.c:565: warning: `fdomain_setup' defined but not used

fdomain_setup isn't used when the driver is modular.

drivers/scsi/fdomain.c +2 -0
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/scsi/fdomain.c linux-2.4/drivers/scsi/fdomain.c
@@ -561,6 +561,7 @@
    printk( "\n" );
 }
 
+#ifndef MODULE
 static int __init fdomain_setup( char *str )
 {
 	int ints[4];
@@ -584,6 +585,7 @@
 }
 
 __setup("fdomain=", fdomain_setup);
+#endif
 
 
 static void do_pause( unsigned amount )	/* Pause for amount*10 milliseconds */
Signature · 5 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Windows NT crashed.
I'm the Blue Screen of Death.
No one hears your screams.
#24 lore raw

Re: [Compile Regression in 2.4.25-pre8][PATCH 15/42]

Quoted 17 lines · Kronos

../fdomain.c:565: warning: `fdomain_setup' defined but not used

fdomain_setup isn't used when the driver is modular.

diff -Nru -X dontdiff linux-2.4-vanilla/drivers/scsi/fdomain.c linux-2.4/drivers/scsi/fdomain.c

drivers/scsi/fdomain.c +1 -0
@@ -561,6 +561,7 @@
    printk( "\n" );
 }
 
+#ifndef MODULE
 static int __init fdomain_setup( char *str )
 {
 	int ints[4];

drivers/scsi/fdomain.c line 591

Quoted 7 lines
drivers/scsi/fdomain.c +1 -0
@@ -584,6 +585,7 @@
 }
 
 __setup("fdomain=", fdomain_setup);
+#endif
 
 
 static void do_pause( unsigned amount )	/* Pause for amount*10 milliseconds */

What?

from fdomain.c:

#ifdef MODULE
        if (fdomain)
                fdomain_setup(fdomain);

#endif

#25 lore raw

Re: [Compile Regression in 2.4.25-pre8][PATCH 15/42]

Il Wed, Feb 04, 2004 at 02:46:01PM -0200, Marcelo Tosatti ha scritto:

Quoted 26 lines
Quoted 16 lines

../fdomain.c:565: warning: `fdomain_setup' defined but not used

fdomain_setup isn't used when the driver is modular.

diff -Nru -X dontdiff linux-2.4-vanilla/drivers/scsi/fdomain.c linux-2.4/drivers/scsi/fdomain.c

drivers/scsi/fdomain.c +1 -0
@@ -561,6 +561,7 @@
    printk( "\n" );
 }
 
+#ifndef MODULE
 static int __init fdomain_setup( char *str )
 {
 	int ints[4];

drivers/scsi/fdomain.c line 591

Quoted 7 lines
drivers/scsi/fdomain.c +1 -0
@@ -584,6 +585,7 @@
 }
 
 __setup("fdomain=", fdomain_setup);
+#endif
 
 
 static void do_pause( unsigned amount )	/* Pause for amount*10 milliseconds */

What?

Quoted 6 lines

from fdomain.c:

#ifdef MODULE
        if (fdomain)
                fdomain_setup(fdomain);

#endif

Sorry, I misread the #ifdef. Drop the patch.

Luca

Signature · 5 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
"La mia teoria scientifica preferita e` quella secondo la quale gli 
 anelli di Saturno sarebbero interamente composti dai bagagli andati 
 persi nei viaggi aerei." -- Mark Russel
#26 lore raw

PATCH 16/42 [Compile Regression in 2.4.25-pre8][PATCH 16/42]

In reply to Kronos

gamma_dma.c:608:18: warning: #warning list_entry() is needed here

Use list entry to get the container struct. Same thing applies to drmP.h.

drivers/char/drm/drmP.h +1 -1
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/char/drm/drmP.h linux-2.4/drivers/char/drm/drmP.h
@@ -344,7 +344,7 @@
 do {									\
 	struct list_head *_list;					\
 	list_for_each( _list, &dev->maplist->head ) {			\
-		drm_map_list_t *_entry = (drm_map_list_t *)_list;	\
+		drm_map_list_t *_entry = list_entry(_list, drm_map_list_t, head);	\
 		if ( _entry->map &&					\
 		     _entry->map->offset == (_o) ) {			\
 			(_map) = _entry->map;				\
drivers/char/drm/gamma_dma.c +1 -2
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/char/drm/gamma_dma.c linux-2.4/drivers/char/drm/gamma_dma.c
@@ -605,8 +605,7 @@
 	memset( dev_priv, 0, sizeof(drm_gamma_private_t) );
 
 	list_for_each(list, &dev->maplist->head) {
-		#warning list_entry() is needed here
-		drm_map_list_t *r_list = (drm_map_list_t *)list;
+		drm_map_list_t *r_list = list_entry(list, drm_map_list_t, head);
 		if( r_list->map &&
 		    r_list->map->type == _DRM_SHM &&
 		    r_list->map->flags & _DRM_CONTAINS_LOCK ) {
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Il coraggio non mi manca.
E` la paura che mi frega...
#28 lore raw

PATCH 17/42 [Compile Regression in 2.4.25-pre8][PATCH 17/42]

In reply to Kronos

g_NCR5380.c:212: warning: do_NCR5380_setup' defined but not used g_NCR5380.c:230: warning: do_NCR53C400_setup' defined but not used g_NCR5380.c:248: warning: do_NCR53C400A_setup' defined but not used g_NCR5380.c:266: warning: do_DTC3181E_setup' defined but not used

These functions are used to handle boot params and are useless when the driver is modular.

drivers/scsi/g_NCR5380.c +2 -0
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/scsi/g_NCR5380.c linux-2.4/drivers/scsi/g_NCR5380.c
@@ -146,6 +146,7 @@
 
 #define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override))
 
+#ifndef MODULE
 /**
  *	internal_setup		-	handle lilo command string override
  *	@board:	BOARD_* identifier for the board
@@ -270,6 +271,7 @@
 	internal_setup(BOARD_DTC3181E, str, ints);
 	return 1;
 }
+#endif
 
 /**
  * 	generic_NCR5380_detect	-	look for NCR5380 controllers
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
"Su cio` di cui non si puo` parlare e` bene tacere".
 Ludwig Wittgenstein
#29 lore raw

PATCH 18/42 [Compile Regression in 2.4.25-pre8][PATCH 18/42]

In reply to Kronos

Fix compilation when compiled as module.

include/asm-i386/hc_sl811-hw.h +2 -2
diff -Nru -X dontdiff linux-2.4-vanilla/include/asm-i386/hc_sl811-hw.h linux-2.4/include/asm-i386/hc_sl811-hw.h
@@ -20,11 +20,11 @@
 
 */
 
-#ifdef MODULE
-
 #define MAX_CONTROLERS	2	/* Max number of SL811 controllers per module */
 static int io_base	= 0x220;
 static int irq	= 12;
+
+#ifdef MODULE
 
 MODULE_PARM(io_base,"i");
 MODULE_PARM_DESC(io_base,"sl811 base address 0x220");
Signature · 6 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
I went to God just to see
And I was looking at me
Saw heaven and hell were lies
When I'm God everyone dies
#30 lore raw

PATCH 19/42 [Compile Regression in 2.4.25-pre8][PATCH 19/42]

In reply to Kronos

hid-core.c:879: warning: implicit declaration of function `hiddev_report_event'

Add missing prototype in include/linux/hiddev.h

include/linux/hiddev.h +1 -0
diff -Nru -X dontdiff linux-2.4-vanilla/include/linux/hiddev.h linux-2.4/include/linux/hiddev.h
@@ -204,6 +204,7 @@
 void hiddev_disconnect(struct hid_device *);
 void hiddev_hid_event(struct hid_device *hid, struct hid_field *field,
 		      struct hid_usage *usage, __s32 value);
+void hiddev_report_event(struct hid_device *hid, struct hid_report *report);
 int __init hiddev_init(void);
 void __exit hiddev_exit(void);
 #else
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Let me make your mind, leave yourself behind
Be not afraid
#31 lore raw

PATCH 20/42 [Compile Regression in 2.4.25-pre8][PATCH 20/42]

In reply to Kronos

i2o_block.c:510: warning: `i2ob_flush' defined but not used

i2ob_flush is unused: wrap it with #if 0

drivers/message/i2o/i2o_block.c +2 -0
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/message/i2o/i2o_block.c linux-2.4/drivers/message/i2o/i2o_block.c
@@ -506,6 +506,7 @@
 	return 1;
 }
 
+#if 0 /* Currently unused */
 static int i2ob_flush(struct i2o_controller *c, struct i2ob_device *d, int unit)
 {
 	unsigned long msg;
@@ -531,6 +532,7 @@
 	i2o_post_message(c,m);
 	return 0;
 }
+#endif
 			
 /*
  *	OSM reply handler. This gets all the message replies
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Quando un uomo porta dei fiori a sua moglie senza motivo, 
un motivo c'e`.
#32 lore raw

PATCH 21/42 [Compile Regression in 2.4.25-pre8][PATCH 21/42]

In reply to Kronos

idt77252.c:669: warning: unsigned int format, different type arg (arg 5)

dma_addr_t can be 64 bit long even on x86 (when CONFIG_HIGHMEM64G is defined). Cast to dma64_addr_t in the printk.

drivers/atm/idt77252.c +2 -2
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/atm/idt77252.c linux-2.4/drivers/atm/idt77252.c
@@ -665,8 +665,8 @@
 	skb_queue_head_init(&scq->transmit);
 	skb_queue_head_init(&scq->pending);
 
-	TXPRINTK("idt77252: SCQ: base 0x%p, next 0x%p, last 0x%p, paddr %08x\n",
-		 scq->base, scq->next, scq->last, scq->paddr);
+	TXPRINTK("idt77252: SCQ: base 0x%p, next 0x%p, last 0x%p, paddr %08Lx\n",
+		 scq->base, scq->next, scq->last, (dma64_addr_t)scq->paddr);
 
 	return scq;
 }
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Tentare e` il primo passo verso il fallimento.
Homer J. Simpson
#33 lore raw

PATCH 22/42 [Compile Regression in 2.4.25-pre8][PATCH 22/42]

In reply to Kronos

interrupt.c:201: warning: unsigned int format, different type arg (arg 4)

dma_addr_t can be 64 bit long even on x86 (when CONFIG_HIGHMEM64G is defined). Cast to dma64_addr_t in the printk.

drivers/net/tulip/interrupt.c +2 -2
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/net/tulip/interrupt.c linux-2.4/drivers/net/tulip/interrupt.c
@@ -194,10 +194,10 @@
 				if (tp->rx_buffers[entry].mapping !=
 				    le32_to_cpu(tp->rx_ring[entry].buffer1)) {
 					printk(KERN_ERR "%s: Internal fault: The skbuff addresses "
-					       "do not match in tulip_rx: %08x vs. %08x %p / %p.\n",
+					       "do not match in tulip_rx: %08x vs. %08Lx %p / %p.\n",
 					       dev->name,
 					       le32_to_cpu(tp->rx_ring[entry].buffer1),
-					       tp->rx_buffers[entry].mapping,
+					       (dma64_addr_t)tp->rx_buffers[entry].mapping,
 					       skb->head, temp);
 				}
 #endif
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Non ho ancora capito se il mio cane e` maschio o femmina:
quando fa la pipi` si chiude in bagno
#34 lore raw

PATCH 23/42 [Compile Regression in 2.4.25-pre8][PATCH 23/42]

In reply to Kronos

ircomm_param.c:202: warning: concatenation of string literals with __FUNCTION__ is deprecated

Fix IRDA_DEBUG.

net/irda/ircomm/ircomm_param.c +1 -1
diff -Nru -X dontdiff linux-2.4-vanilla/net/irda/ircomm/ircomm_param.c linux-2.4/net/irda/ircomm/ircomm_param.c
@@ -198,7 +198,7 @@
 		IRDA_DEBUG(2, "%s(), No common service type to use!\n", __FUNCTION__);
 		return -1;
 	}
-	IRDA_DEBUG(0, __FUNCTION__ "%s(), services in common=%02x\n", __FUNCTION__,
+	IRDA_DEBUG(0, "%s(), services in common=%02x\n", __FUNCTION__,
 		   service_type);
 
 	/*
Signature · 6 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Windows /win'dohz/ n. : thirty-two  bit extension and graphical shell to
a sixteen  bit patch to an  eight bit operating system  originally coded
for a  four bit microprocessor  which was  written by a  two-bit company
that can't stand a bit of competition.
#35 lore raw

PATCH 24/42 [Compile Regression in 2.4.25-pre8][PATCH 24/42]

In reply to Kronos

irlmp.c:1244: warning: concatenation of string literals with __FUNCTION__ is deprecated irlmp.c:1258: warning: concatenation of string literals with __FUNCTION__ is deprecated irlmp.c:1277: warning: concatenation of string literals with __FUNCTION__ is deprecated irlmp.c:1284: warning: concatenation of string literals with __FUNCTION__ is deprecated

Fix IRDA_DEBUG: __FUNCTION__ shouldn't be concatenated with other literals.

net/irda/irlmp.c +4 -4
diff -Nru -X dontdiff linux-2.4-vanilla/net/irda/irlmp.c linux-2.4/net/irda/irlmp.c
@@ -1241,7 +1241,7 @@
 	/* Get the number of lsap. That's the only safe way to know
 	 * that we have looped around... - Jean II */
 	lsap_todo = HASHBIN_GET_SIZE(self->lsaps);
-	IRDA_DEBUG(4, __FUNCTION__ "() : %d lsaps to scan\n", lsap_todo);
+	IRDA_DEBUG(4, "%s() : %d lsaps to scan\n", __FUNCTION__, lsap_todo);
 
 	/* Poll lsap in order until the queue is full or until we
 	 * tried them all.
@@ -1255,7 +1255,7 @@
 			/* Note that if there is only one LSAP on the LAP
 			 * (most common case), self->flow_next is always NULL,
 			 * so we always avoid this loop. - Jean II */
-			IRDA_DEBUG(4, __FUNCTION__ "() : searching my LSAP\n");
+			IRDA_DEBUG(4, "%s() : searching my LSAP\n", __FUNCTION__);
 
 			/* We look again in hashbins, because the lsap
 			 * might have gone away... - Jean II */
@@ -1274,14 +1274,14 @@
 
 		/* Next time, we will get the next one (or the first one) */
 		self->flow_next = (struct lsap_cb *) hashbin_get_next(self->lsaps);
-		IRDA_DEBUG(4, __FUNCTION__ "() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n", curr, next, self->flow_next, lsap_todo, IRLAP_GET_TX_QUEUE_LEN(self->irlap));
+		IRDA_DEBUG(4, "() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n", __FUNCTION__, curr, next, self->flow_next, lsap_todo, IRLAP_GET_TX_QUEUE_LEN(self->irlap));
 
 		/* Inform lsap user that it can send one more packet. */
 		if (curr->notify.flow_indication != NULL)
 			curr->notify.flow_indication(curr->notify.instance, 
 						     curr, flow);
 		else
-			IRDA_DEBUG(1, __FUNCTION__ "(), no handler\n");
+			IRDA_DEBUG(1, "%s(), no handler\n", __FUNCTION__);
 	}
 }
 
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Tentare e` il primo passo verso il fallimento.
Homer J. Simpson
#36 lore raw

PATCH 25/42 [Compile Regression in 2.4.25-pre8][PATCH 25/42]

In reply to Kronos

it8181fb.c:162: warning: `fontname' defined but not used

fontname is used only when the driver is modular. The initializer is useless since the variable is static.

drivers/video/it8181fb.c +3 -1
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/video/it8181fb.c linux-2.4/drivers/video/it8181fb.c
@@ -159,7 +159,9 @@
 #define DEFAULT_CONFIG_OFFSET	0
 
 static const char default_mode[] = "800x600-70";
-static char __initdata fontname[40] = { 0 };
+#ifndef MODULE
+static char __initdata fontname[40];
+#endif
 static const char *mode_option __initdata = NULL;
 static int default_bpp __initdata = DEFAULT_BPP;
 static int default_res __initdata = DEFAULT_RES;
Signature · 3 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
No matter what you choose, you're still a luser.
#37 lore raw

PATCH 26/42 [Compile Regression in 2.4.25-pre8][PATCH 26/42]

In reply to Kronos

kaweth.c:738: warning: assignment from incompatible pointer type

Add explicit cast to suppress gcc warning.

drivers/usb/kaweth.c +1 -1
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/usb/kaweth.c linux-2.4/drivers/usb/kaweth.c
@@ -735,7 +735,7 @@
 		}
 	}
 
-	private_header = __skb_push(skb, 2);
+	private_header = (u16*)__skb_push(skb, 2);
 	*private_header = cpu_to_le16(skb->len-2);
 	kaweth->tx_skb = skb;
 
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Dicono che  il cane sia  il miglior  amico dell'uomo. Secondo me  non e`
vero. Quanti dei vostri amici avete fatto castrare, recentemente?
#38 lore raw

PATCH 27/42 [Compile Regression in 2.4.25-pre8][PATCH 27/42]

In reply to Kronos

linuxvfs.c:682: warning: befs_listxattr' defined but not used linuxvfs.c:690: warning: befs_getxattr' defined but not used linuxvfs.c:697: warning: befs_setxattr' defined but not used linuxvfs.c:703: warning: befs_removexattr' defined but not used

Extended attribute not implemented yet. Wrapped with #if 0 + comment.

fs/befs/linuxvfs.c +6 -0
diff -Nru -X dontdiff linux-2.4-vanilla/fs/befs/linuxvfs.c linux-2.4/fs/befs/linuxvfs.c
@@ -55,12 +55,15 @@
 static int befs_statfs(struct super_block *, struct statfs *);
 static int parse_options(char *, befs_mount_options *);
 
+/* Extended attributes aren't implemented yet */
+#if 0
 static ssize_t befs_listxattr(struct dentry *dentry, char *buffer, size_t size);
 static ssize_t befs_getxattr(struct dentry *dentry, const char *name,
 			     void *buffer, size_t size);
 static int befs_setxattr(struct dentry *dentry, const char *name, void *value,
 			 size_t size, int flags);
 static int befs_removexattr(struct dentry *dentry, const char *name);
+#endif
 
 /* slab cache for befs_inode_info objects */
 static kmem_cache_t *befs_inode_cachep;
@@ -677,6 +680,8 @@
 
 /****Xattr****/
 
+/* Extended attributes aren't implemented yet */
+#if 0
 static ssize_t
 befs_listxattr(struct dentry *dentry, char *buffer, size_t size)
 {
@@ -703,6 +708,7 @@
 {
 	return 0;
 }
+#endif
 
 /****Superblock****/
 
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Dicono che  il cane sia  il miglior  amico dell'uomo. Secondo me  non e`
vero. Quanti dei vostri amici avete fatto castrare, recentemente?
#39 lore raw

PATCH 28/42 [Compile Regression in 2.4.25-pre8][PATCH 28/42]

In reply to Kronos

ma600.c:51:22: warning: extra tokens at end of #undef directive

Remove extra tokens after ASSERT.

drivers/net/irda/ma600.c +1 -1
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/net/irda/ma600.c linux-2.4/drivers/net/irda/ma600.c
@@ -48,7 +48,7 @@
 	#undef IRDA_DEBUG
 	#define IRDA_DEBUG(n, args...) (printk(KERN_DEBUG args))
 
-	#undef ASSERT(expr, func)
+	#undef ASSERT
 	#define ASSERT(expr, func) \
 	if(!(expr)) { \
 		printk( "Assertion failed! %s,%s,%s,line=%d\n",\
Signature · 3 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Carpe diem, quam minimum credula postero. (Q. Horatius Flaccus)
#40 lore raw

PATCH 29/42 [Compile Regression in 2.4.25-pre8][PATCH 29/42]

In reply to Kronos

matroxfb_g450.c:134: warning: duplicate const' matroxfb_g450.c:135: warning: duplicate const' matroxfb_g450.c:561: warning: unused variable minfo' matroxfb_maven.c:359: warning: duplicate const' matroxfb_maven.c:360: warning: duplicate `const'

Remove const qualifier, it's useless.
Remove unused variable.

drivers/video/matrox/matroxfb_g450.c +2 -4
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/video/matrox/matroxfb_g450.c linux-2.4/drivers/video/matrox/matroxfb_g450.c
@@ -128,8 +128,8 @@
 }
 
 static void g450_compute_bwlevel(CPMINFO int *bl, int *wl) {
-	const int b = ACCESS_FBINFO(altout.tvo_params.brightness) + BLMIN;
-	const int c = ACCESS_FBINFO(altout.tvo_params.contrast);
+	int b = ACCESS_FBINFO(altout.tvo_params.brightness) + BLMIN;
+	int c = ACCESS_FBINFO(altout.tvo_params.contrast);
 
 	*bl = max(b - c, BLMIN);
 	*wl = min(b + c, WLMAX);
@@ -558,8 +558,6 @@
 }
 
 static int matroxfb_g450_verify_mode(void* md, u_int32_t arg) {
-	MINFO_FROM(md);
-	
 	switch (arg) {
 		case MATROXFB_OUTPUT_MODE_PAL:
 		case MATROXFB_OUTPUT_MODE_NTSC:
drivers/video/matrox/matroxfb_maven.c +2 -2
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/video/matrox/matroxfb_maven.c linux-2.4/drivers/video/matrox/matroxfb_maven.c
@@ -353,8 +353,8 @@
 
 static void maven_compute_bwlevel (const struct maven_data* md,
 				   int *bl, int *wl) {
-	const int b = md->primary_head->altout.tvo_params.brightness + BLMIN;
-	const int c = md->primary_head->altout.tvo_params.contrast;
+	int b = md->primary_head->altout.tvo_params.brightness + BLMIN;
+	int c = md->primary_head->altout.tvo_params.contrast;
 
 	*bl = max(b - c, BLMIN);
 	*wl = min(b + c, WLMAX);
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Una donna sposa un uomo sperando che cambi, e lui non cambiera`. Un
uomo sposa una donna sperando che non cambi, e lei cambiera`.
#41 lore raw

PATCH 30/42 [Compile Regression in 2.4.25-pre8][PATCH 30/42]

In reply to Kronos

meye.c:212: warning: passing arg 3 of `dma_alloc_coherent' from incompatible pointer type

dma_addr_t is not u32!

drivers/media/video/meye.c +5 -5
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/media/video/meye.c linux-2.4/drivers/media/video/meye.c
@@ -190,7 +190,7 @@
 
 /* return a page table pointing to N pages of locked memory */
 static int ptable_alloc(void) {
-	u32 *pt;
+	dma_addr_t *pt;
 	int i;
 
 	memset(meye.mchip_ptable, 0, sizeof(meye.mchip_ptable));
@@ -204,7 +204,7 @@
 		return -1;
 	}
 
-	pt = (u32 *)meye.mchip_ptable[MCHIP_NB_PAGES];
+	pt = (dma_addr_t *)meye.mchip_ptable[MCHIP_NB_PAGES];
 	for (i = 0; i < MCHIP_NB_PAGES; i++) {
 		meye.mchip_ptable[i] = dma_alloc_coherent(meye.mchip_dev, 
 							  PAGE_SIZE,
@@ -212,7 +212,7 @@
 							  GFP_KERNEL);
 		if (!meye.mchip_ptable[i]) {
 			int j;
-			pt = (u32 *)meye.mchip_ptable[MCHIP_NB_PAGES];
+			pt = (dma_addr_t *)meye.mchip_ptable[MCHIP_NB_PAGES];
 			for (j = 0; j < i; ++j) {
 				dma_free_coherent(meye.mchip_dev,
 						  PAGE_SIZE,
@@ -228,10 +228,10 @@
 }
 
 static void ptable_free(void) {
-	u32 *pt;
+	dma_addr_t *pt;
 	int i;
 
-	pt = (u32 *)meye.mchip_ptable[MCHIP_NB_PAGES];
+	pt = (dma_addr_t *)meye.mchip_ptable[MCHIP_NB_PAGES];
 	for (i = 0; i < MCHIP_NB_PAGES; i++) {
 		if (meye.mchip_ptable[i])
 			dma_free_coherent(meye.mchip_dev, 
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Il dottore mi ha detto di smettere di fare cene intime per quattro.
A meno che non ci siamo altre tre persone.
#42 lore raw

PATCH 31/42 [Compile Regression in 2.4.25-pre8][PATCH 31/42]

In reply to Kronos

mptbase.c:2906: warning: `pCached' might be used uninitialized in this function

Initialize pCached to NULL.
Avoid printing if pCached is NULL.

drivers/message/fusion/mptbase.c +4 -4
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/message/fusion/mptbase.c linux-2.4/drivers/message/fusion/mptbase.c
@@ -2903,7 +2903,7 @@
 {
 	MpiFwHeader_t		*FwHdr;
 	MpiExtImageHeader_t 	*ExtHdr;
-	fw_image_t		**pCached;
+	fw_image_t		**pCached = NULL;
 	int			 fw_sz;
 	u32			 diag0val;
 #ifdef MPT_DEBUG
@@ -2944,11 +2944,11 @@
 		pCached = (fw_image_t **)ioc->cached_fw;
 	else if (ioc->alt_ioc && (ioc->alt_ioc->cached_fw != NULL))
 		pCached = (fw_image_t **)ioc->alt_ioc->cached_fw;
-
-	ddlprintk((MYIOC_s_INFO_FMT "DbGb2: FW Image @ %p\n",
-			ioc->name, pCached));
 	if (!pCached)
 		return -2;
+	
+	ddlprintk((MYIOC_s_INFO_FMT "DbGb2: FW Image @ %p\n",
+			ioc->name, pCached));
 
 	/* Write magic sequence to WriteSequence register
 	 * until enter diagnostic mode
Signature · 3 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Runtime error 6D at f000:a12f : user incompetente
#43 lore raw

PATCH 32/42 [Compile Regression in 2.4.25-pre8][PATCH 32/42]

In reply to Kronos

ns83820.c:1708: warning: `ns83820_probe_phy' defined but not used

ns83820_probe_phy is still incomplete. Wrap it with #ifdef PHY_CODE_IS_FINISHED as in other part of the driver.

drivers/net/ns83820.c +2 -0
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/net/ns83820.c linux-2.4/drivers/net/ns83820.c
@@ -1704,6 +1704,7 @@
 	return data;
 }
 
+#ifdef PHY_CODE_IS_FINISHED
 static void ns83820_probe_phy(struct ns83820 *dev)
 {
 	static int first;
@@ -1757,6 +1758,7 @@
 		dprintk("version: 0x%04x 0x%04x\n", a, b);
 	}
 }
+#endif
 
 static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_device_id *id)
 {
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
It can't rain forever,
but you can die before seeing the sun again.
#44 lore raw

PATCH 33/42 [Compile Regression in 2.4.25-pre8][PATCH 33/42]

In reply to Kronos

pci-pc.c:180:1: warning: "PCI_CONF1_ADDRESS" redefined pci-pc.c:58:1: warning: this is the location of the previous definition

PCI_CONF1_ADDRESS is defined on line 58 #if CONFIG_MULTIQUAD. It's redefined on line 180 (outside #if CONFIG_MULTIQUAD). I added an #undef right before the end of the CONFIG_MULTIQUAD block.

arch/i386/kernel/pci-pc.c +1 -0
diff -Nru -X dontdiff linux-2.4-vanilla/arch/i386/kernel/pci-pc.c linux-2.4/arch/i386/kernel/pci-pc.c
@@ -175,6 +175,7 @@
 	pci_conf1_write_mq_config_word,
 	pci_conf1_write_mq_config_dword
 };
+#undef PCI_CONF1_ADDRESS
 
 #endif /* !CONFIG_MULTIQUAD */
 #define PCI_CONF1_ADDRESS(bus, dev, fn, reg) \
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
"Fare l'amore con dieci donne e` fantastico, soprattutto perche` ti
 presentano un sacco di amiche." -- Fabio Di Iorio
#45 lore raw

PATCH 34/42 [Compile Regression in 2.4.25-pre8][PATCH 34/42]

In reply to Kronos

r128_cce.c:357: warning: unsigned int format, different type arg (arg 3) radeon_cp.c:908: warning: unsigned int format, different type arg (arg 3)

dma_addr_t can be 64 bit long even on x86 (when CONFIG_HIGHMEM64G is defined). Cast to dma64_addr_t in the printk.

drivers/char/drm/r128_cce.c +2 -2
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/char/drm/r128_cce.c linux-2.4/drivers/char/drm/r128_cce.c
@@ -352,8 +352,8 @@
 
 		R128_WRITE( R128_PM4_BUFFER_DL_RPTR_ADDR,
      			    entry->busaddr[page_ofs]);
-		DRM_DEBUG( "ring rptr: offset=0x%08x handle=0x%08lx\n",
-			   entry->busaddr[page_ofs],
+		DRM_DEBUG( "ring rptr: offset=0x%08Lx handle=0x%08lx\n",
+			   (dma64_addr_t)entry->busaddr[page_ofs],
      			   entry->handle + tmp_ofs );
 	}
 
drivers/char/drm/radeon_cp.c +2 -2
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/char/drm/radeon_cp.c linux-2.4/drivers/char/drm/radeon_cp.c
@@ -903,8 +903,8 @@
 
 		RADEON_WRITE( RADEON_CP_RB_RPTR_ADDR,
 			     entry->busaddr[page_ofs]);
-		DRM_DEBUG( "ring rptr: offset=0x%08x handle=0x%08lx\n",
-			   entry->busaddr[page_ofs],
+		DRM_DEBUG( "ring rptr: offset=0x%08Lx handle=0x%08lx\n",
+			   (dma64_addr_t)entry->busaddr[page_ofs],
 			   entry->handle + tmp_ofs );
 	}
 
Signature · 3 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Carpe diem, quam minimum credula postero. (Q. Horatius Flaccus)
#46 lore raw

PATCH 35/42 [Compile Regression in 2.4.25-pre8][PATCH 35/42]

In reply to Kronos

radeon_mem.c:135: warning: `print_heap' defined but not used

Remove unused function.

drivers/char/drm/radeon_mem.c +0 -10
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/char/drm/radeon_mem.c linux-2.4/drivers/char/drm/radeon_mem.c
@@ -131,16 +131,6 @@
 	}
 }
 
-static void print_heap( struct mem_block *heap )
-{
-	struct mem_block *p;
-
-	for (p = heap->next ; p != heap ; p = p->next) 
-		DRM_DEBUG("0x%x..0x%x (0x%x) -- owner %d\n",
-			  p->start, p->start + p->size,
-			  p->size, p->pid);
-}
-
 /* Initialize.  How to check for an uninitialized heap?
  */
 static int init_heap(struct mem_block **heap, int start, int size)
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Non sempre quello che viene dopo e` progresso.
Alessandro Manzoni
#47 lore raw

PATCH 36/42 [Compile Regression in 2.4.25-pre8][PATCH 36/42]

In reply to Kronos

scsi_merge.c:104: warning: long unsigned int format, different type arg (arg 4)

page_to_phys returns a u64 if CONFIG_HIGHMEM64G is defined.

drivers/scsi/scsi_merge.c +2 -2
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/scsi/scsi_merge.c linux-2.4/drivers/scsi/scsi_merge.c
@@ -98,10 +98,10 @@
 	printk("Flags %d %d\n", use_clustering, dma_host);
 	for (bh = req->bh; bh->b_reqnext != NULL; bh = bh->b_reqnext) 
 	{
-		printk("Segment 0x%p, blocks %d, addr 0x%lx\n",
+		printk("Segment 0x%p, blocks %d, addr 0x%Lx\n",
 		       bh,
 		       bh->b_size >> 9,
-		       bh_phys(bh) - 1);
+		       (u64)bh_phys(bh) - 1);
 	}
 	panic("Ththththaats all folks.  Too dangerous to continue.\n");
 }
Signature · 3 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
No matter what you choose, you're still a luser.
#48 lore raw

PATCH 37/42 [Compile Regression in 2.4.25-pre8][PATCH 37/42]

In reply to Kronos

siimage.c:65: warning: control reaches end of non-void function

The last statement before the end is BUG(), but I added a return to silence the warning.

drivers/ide/pci/siimage.c +3 -0
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/ide/pci/siimage.c linux-2.4/drivers/ide/pci/siimage.c
@@ -62,6 +62,9 @@
 			return 0;
 	}
 	BUG();
+
+	/* gcc will complain */
+	return 0;
 }
  
 /**
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
You and me baby ain't nothin' but mammals
So let's do it like they do on the Discovery Channel
#49 lore raw

Re: [Compile Regression in 2.4.25-pre8][PATCH 37/42]

Quoted 9 lines · Kronos

siimage.c:65: warning: control reaches end of non-void function

The last statement before the end is BUG(), but I added a return to silence the warning.

diff -Nru -X dontdiff linux-2.4-vanilla/drivers/ide/pci/siimage.c linux-2.4/drivers/ide/pci/siimage.c

drivers/ide/pci/siimage.c line 68

Quoted 7 lines
drivers/ide/pci/siimage.c +3 -0
@@ -62,6 +62,9 @@
 			return 0;
 	}
 	BUG();
+
+	/* gcc will complain */
+	return 0;
 }

What about adding `attribute ((noreturn))' to the declaration of BUG() instead?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#50 lore raw

Re: [Compile Regression in 2.4.25-pre8][PATCH 37/42]

Il Mon, Feb 02, 2004 at 10:08:48PM +0100, Geert Uytterhoeven ha scritto:

Quoted 6 lines · Kronos
Quoted 5 lines

siimage.c:65: warning: control reaches end of non-void function

The last statement before the end is BUG(), but I added a return to silence the warning.

Quoted 13 lines

drivers/ide/pci/siimage.c line 68

Quoted 11 lines

diff -Nru -X dontdiff linux-2.4-vanilla/drivers/ide/pci/siimage.c linux-2.4/drivers/ide/pci/siimage.c

drivers/ide/pci/siimage.c +3 -0
@@ -62,6 +62,9 @@
 			return 0;
 	}
 	BUG();
+
+	/* gcc will complain */
+	return 0;
 }

What about adding `attribute ((noreturn))' to the declaration of BUG() instead?

BUG() is a macro, it won't work.

Luca

Signature · 5 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
#include <stdio.h> 
int main(void) {printf("\t\t\b\b\b\b\b\b");
printf("\t\t\b\b\b\b\b\b");return 0;}
#51 lore raw

Re: [Compile Regression in 2.4.25-pre8][PATCH 37/42]

In reply to Geert Uytterhoeven

Il Mon, Feb 02, 2004 at 10:08:48PM +0100, Geert Uytterhoeven ha scritto:

Quoted 6 lines · Kronos
Quoted 5 lines

siimage.c:65: warning: control reaches end of non-void function

The last statement before the end is BUG(), but I added a return to silence the warning.

Quoted 13 lines

drivers/ide/pci/siimage.c line 68

Quoted 11 lines

diff -Nru -X dontdiff linux-2.4-vanilla/drivers/ide/pci/siimage.c linux-2.4/drivers/ide/pci/siimage.c

drivers/ide/pci/siimage.c +3 -0
@@ -62,6 +62,9 @@
 			return 0;
 	}
 	BUG();
+
+	/* gcc will complain */
+	return 0;
 }

What about adding `attribute ((noreturn))' to the declaration of BUG() instead?

Ok, I cooked up this patch. BUG() is a function marked as noreturn that is always inlined. Unfortunately, gcc prior to 3.x does not support __always_inline__ attribute, so I had to revert to the old macro with older compiler.

The patch fixes warnings with newer compiler, but not with older ones. Note that the while(1) is needed, otherwise gcc will say that the function marked as noreturn does actually return.

Comments?

include/asm-i386/page.h +23 -0
diff -Nru -X dontdiff linux-2.4-vanilla/include/asm-i386/page.h linux-2.4/include/asm-i386/page.h
@@ -10,6 +10,7 @@
 #ifndef __ASSEMBLY__
 
 #include <linux/config.h>
+#include <linux/compiler.h>
 
 #ifdef CONFIG_X86_USE_3DNOW
 
@@ -94,6 +95,26 @@
  * The offending file and line are encoded after the "officially
  * undefined" opcode for parsing in the trap handler.
  */
+#ifdef __bug
+#if 1	/* Set to zero for a slightly smaller kernel */
+__bug void __bugfn(void) {
+	while(1) {
+		 __asm__ __volatile__(	"ud2\n"
+					"\t.word %c0\n"
+					"\t.long %c1\n"
+					: : "i" (__LINE__), "i" (__FILE__));
+ 	}
+}
+#else
+__bug void __bugfn(void) {
+	while(1) {
+		__asm__ __volatile__("ud2\n");
+	}
+}
+#endif
+#define BUG() __bugfn()
+
+#else /* __bug */
 
 #if 1	/* Set to zero for a slightly smaller kernel */
 #define BUG()				\
@@ -104,6 +125,8 @@
 #else
 #define BUG() __asm__ __volatile__("ud2\n")
 #endif
+
+#endif /* __bug */
 
 #define PAGE_BUG(page) do { \
 	BUG(); \
include/linux/compiler.h +7 -0
diff -Nru -X dontdiff linux-2.4-vanilla/include/linux/compiler.h linux-2.4/include/linux/compiler.h
@@ -13,4 +13,11 @@
 #define likely(x)	__builtin_expect((x),1)
 #define unlikely(x)	__builtin_expect((x),0)
 
+#if __GNUC__ >= 3
+/* __noreturn__ is implemented since gcc 2.5. 
+ * __always_inline__ is not present in 2.9x
+ */
+#define __bug __attribute__((__noreturn__, __always_inline__))
+#endif
+
 #endif /* __LINUX_COMPILER_H */

Luca
PS: I wrote the patch early this morning, on train. It may be a huge pile of crap ;)

Signature · 5 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
The trouble with computers is that they do what you tell them, 
not what you want.
D. Cohen
#52 lore raw

Re: [Compile Regression in 2.4.25-pre8][PATCH 37/42]

Quoted 26 lines · Kronos

Ok, I cooked up this patch. BUG() is a function marked as noreturn that is always inlined. Unfortunately, gcc prior to 3.x does not support __always_inline__ attribute, so I had to revert to the old macro with older compiler.

The patch fixes warnings with newer compiler, but not with older ones. Note that the while(1) is needed, otherwise gcc will say that the function marked as noreturn does actually return.

Comments?

diff -Nru -X dontdiff linux-2.4-vanilla/include/asm-i386/page.h linux-2.4/include/asm-i386/page.h

include/asm-i386/page.h +1 -0
@@ -10,6 +10,7 @@
 #ifndef __ASSEMBLY__
 
 #include <linux/config.h>
+#include <linux/compiler.h>
 
 #ifdef CONFIG_X86_USE_3DNOW
 
@@ -94,6 +95,26 @@
  * The offending file and line are encoded after the "officially
  * undefined" opcode for parsing in the trap handler.
  */

include/asm-i386/page.h line 107

Quoted 10 lines
include/asm-i386/page.h +10 -0
+#ifdef __bug
+#if 1	/* Set to zero for a slightly smaller kernel */
+__bug void __bugfn(void) {
+	while(1) {
+		 __asm__ __volatile__(	"ud2\n"
+					"\t.word %c0\n"
+					"\t.long %c1\n"
+					: : "i" (__LINE__), "i" (__FILE__));
+ 	}
+}

You must pass __LINE__ and __FILE__ as parameter to this function.

regards,
Philippe Elie

#53 lore raw

Re: [Compile Regression in 2.4.25-pre8][PATCH 37/42]

Il Tue, Feb 03, 2004 at 11:14:21PM +0000, Philippe Elie ha scritto:

Quoted 11 lines
Quoted 11 lines

diff -Nru -X dontdiff linux-2.4-vanilla/include/asm-i386/page.h linux-2.4/include/asm-i386/page.h

include/asm-i386/page.h +1 -0
@@ -10,6 +10,7 @@
 #ifndef __ASSEMBLY__
 
 #include <linux/config.h>
+#include <linux/compiler.h>
 
 #ifdef CONFIG_X86_USE_3DNOW
 
Quoted 16 lines
Quoted 4 lines
include/asm-i386/page.h +0 -0
@@ -94,6 +95,26 @@
  * The offending file and line are encoded after the "officially
  * undefined" opcode for parsing in the trap handler.
  */

include/asm-i386/page.h line 107

Quoted 10 lines
include/asm-i386/page.h +10 -0
+#ifdef __bug
+#if 1	/* Set to zero for a slightly smaller kernel */
+__bug void __bugfn(void) {
+	while(1) {
+		 __asm__ __volatile__(	"ud2\n"
+					"\t.word %c0\n"
+					"\t.long %c1\n"
+					: : "i" (__LINE__), "i" (__FILE__));
+ 	}
+}

You must pass __LINE__ and __FILE__ as parameter to this function.

Good point. It's not that easy though ;)
BUG() places file name and line number after the invalid opcode (ud2) and the kernel trap handler decodes these information when printing a BUG(). In order to do that you need immediate values to pass to assembler.

I think that the following patch will work. This is a BUG() from a dummy module which calls BUG() in the init function:

kernel BUG at /tmp/mod3.c:22!

invalid operand: 0000 [#3]
CPU:    0
EIP:    0060:[<e09ed003>]    Tainted: PF
EFLAGS: 00010202

EIP is at modinit+0x3/0x20 [mod3]
eax: e09ed000 ebx: cdf9a000 ecx: c036de78 edx: 00000000
esi: e09ed180 edi: c036de78 ebp: cdf9bfa4 esp: cdf9bfa4
ds: 007b es: 007b ss: 0068
Process insmod (pid: 1960, threadinfo=cdf9a000 task=dd7546b0)

Stack: cdf9bfbc c01345d8 0804b018 080486dd 4009199b c036de5c cdf9a000 c0109067
       0804b018 0000055c 0804b008 080486dd 4009199b bffffb28 00000080 0000007b
       0000007b 00000080 400fb4ce 00000073 00000246 bffffae0 0000007b
Call Trace:
 [<c01345d8>] sys_init_module+0x118/0x240
 [<c0109067>] syscall_call+0x7/0xb

Code: 0f 0b 16 00 25 d0 9e e0 90 8d 74 26 00 eb fe 8d b4 26 00 00
 Segmentation fault

It seems ok to me (kernel is tainted because I forgot MODULE_LICENSE...). Comments on the patch?

include/asm-i386/page.h +20 -6
diff -Nru -X dontdiff linux-2.4-vanilla/include/asm-i386/page.h linux-2.4/include/asm-i386/page.h
@@ -95,14 +95,28 @@
  * undefined" opcode for parsing in the trap handler.
  */
 
+#ifdef __bug
+static inline void __dummy_noreturn(void) __bug;
+static inline void __dummy_noreturn(void) {
+	while(1) {}
+}
+#else
+#define __dummy_noreturn() do {} while(0)
+#endif
+
 #if 1	/* Set to zero for a slightly smaller kernel */
-#define BUG()				\
- __asm__ __volatile__(	"ud2\n"		\
-			"\t.word %c0\n"	\
-			"\t.long %c1\n"	\
-			 : : "i" (__LINE__), "i" (__FILE__))
+#define BUG() do {						\
+		__asm__ __volatile__(	"ud2\n"			\
+			"\t.word %c0\n"				\
+			"\t.long %c1\n"				\
+			 : : "i" (__LINE__), "i" (__FILE__));	\
+		__dummy_noreturn();				\
+	} while(0)
 #else
-#define BUG() __asm__ __volatile__("ud2\n")
+#define BUG() do {						\
+		__asm__ __volatile__("ud2\n");			\
+		__dummy_noreturn();				\
+	} while(0)
 #endif
 
 #define PAGE_BUG(page) do { \
include/linux/compiler.h +7 -0
diff -Nru -X dontdiff linux-2.4-vanilla/include/linux/compiler.h linux-2.4/include/linux/compiler.h
@@ -13,4 +13,11 @@
 #define likely(x)	__builtin_expect((x),1)
 #define unlikely(x)	__builtin_expect((x),0)
 
+#if __GNUC__ >= 3
+/* __noreturn__ is implemented since gcc 2.5. 
+ * __always_inline__ is not present in 2.9x
+ */
+#define __bug __attribute__((__noreturn__, __always_inline__))
+#endif
+
 #endif /* __LINUX_COMPILER_H */

Luca

Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
"L'ottimista pensa che questo sia il migliore dei mondi possibili. 
 Il pessimista sa che e` vero" -- J. Robert Oppenheimer
#54 lore raw

PATCH 38/42 [Compile Regression in 2.4.25-pre8][PATCH 38/42]

In reply to Kronos

sstfb.c:971: warning: unused variable `i'

The var is used only for debugging.

drivers/video/sstfb.c +2 -0
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/video/sstfb.c linux-2.4/drivers/video/sstfb.c
@@ -968,7 +968,9 @@
                        struct fb_info *info)
 {
 #define sst_info	((struct sstfb_info *) info)
+#if (SST_DEBUG_VAR >0)
 	int i;
+#endif
 	u_long p;
 	u32 tmp, val;
 	u32 fbiinit0;
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Recursion n.:
        See Recursion.
#55 lore raw

PATCH 39/42 [Compile Regression in 2.4.25-pre8][PATCH 39/42]

In reply to Kronos

st5481_b.c:122: warning: concatenation of string literals with __FUNCTION__ is deprecated [etc]
st5481_usb.c:134: warning: concatenation of string literals with __FUNCTION__ is deprecated [etc]

__FUNCTION__ shouldn't be concatenated with other literals.

drivers/isdn/hisax/st5481.h +3 -3
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/isdn/hisax/st5481.h linux-2.4/drivers/isdn/hisax/st5481.h
@@ -219,13 +219,13 @@
 #define L1_EVENT_COUNT (EV_TIMER3 + 1)
 
 #define ERR(format, arg...) \
-printk(KERN_ERR __FILE__ ": " __FUNCTION__ ": " format "\n" , ## arg)
+printk(KERN_ERR __FILE__ ": %s: " format "\n" , __FUNCTION__ , ## arg)
 
 #define WARN(format, arg...) \
-printk(KERN_WARNING __FILE__ ": " __FUNCTION__ ": " format "\n" , ## arg)
+printk(KERN_WARNING __FILE__ ": %s: " format "\n" , __FUNCTION__ , ## arg)
 
 #define INFO(format, arg...) \
-printk(KERN_INFO __FILE__ ": " __FUNCTION__ ": " format "\n" , ## arg)
+printk(KERN_INFO __FILE__ ": %s: " format "\n" , __FUNCTION__ , ## arg)
 
 #include "isdnhdlc.h"
 #include "fsm.h"
Signature · 3 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Do, or do not. There is no try.
#56 lore raw

PATCH 40/42 [Compile Regression in 2.4.25-pre8][PATCH 40/42]

In reply to Kronos

sundance.c:1678: warning: unsigned int format, different type arg (arg 3) sundance.c:994: warning: unsigned int format, different type arg (arg 3)

dma_addr_t can be 64 bit long even on x86 (when CONFIG_HIGHMEM64G is defined). Cast to dma64_addr_t in the printk.

drivers/net/sundance.c +4 -4
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/net/sundance.c linux-2.4/drivers/net/sundance.c
@@ -985,8 +985,8 @@
 	{
 		int i;
 		for (i=0; i<TX_RING_SIZE; i++) {
-			printk(KERN_DEBUG "%02x %08x %08x %08x(%02x) %08x %08x\n", i,
-				np->tx_ring_dma + i*sizeof(*np->tx_ring),	
+			printk(KERN_DEBUG "%02x %08Lx %08x %08x(%02x) %08x %08x\n", i,
+				(dma64_addr_t)np->tx_ring_dma + i*sizeof(*np->tx_ring),	
 				le32_to_cpu(np->tx_ring[i].next_desc),
 				le32_to_cpu(np->tx_ring[i].status),
 				(le32_to_cpu(np->tx_ring[i].status) >> 2) & 0xff,
@@ -1668,8 +1668,8 @@
 	switch (cmd) {
 		case SIOCDEVPRIVATE:
 		for (i=0; i<TX_RING_SIZE; i++) {
-			printk(KERN_DEBUG "%02x %08x %08x %08x(%02x) %08x %08x\n", i,
-				np->tx_ring_dma + i*sizeof(*np->tx_ring),	
+			printk(KERN_DEBUG "%02x %08Lx %08x %08x(%02x) %08x %08x\n", i,
+				(dma64_addr_t)np->tx_ring_dma + i*sizeof(*np->tx_ring),	
 				le32_to_cpu(np->tx_ring[i].next_desc),
 				le32_to_cpu(np->tx_ring[i].status),
 				(le32_to_cpu(np->tx_ring[i].status) >> 2) 
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
K.R.O.N.O.S
Kinetic Replicant Optimized for Nocturnal Observation and Sabotage
#57 lore raw

PATCH 41/42 [Compile Regression in 2.4.25-pre8][PATCH 41/42]

In reply to Kronos

tms380tr.c:1449: warning: long unsigned int format, different type arg (arg 3)

Bad cast, fixed.

drivers/net/tokenring/tms380tr.c +1 -1
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/net/tokenring/tms380tr.c linux-2.4/drivers/net/tokenring/tms380tr.c
@@ -1446,7 +1446,7 @@
 	if(tms380tr_debug > 3)
 	{
 		printk(KERN_INFO "%s: buffer (real): %lx\n", dev->name, (long) &tp->scb);
-		printk(KERN_INFO "%s: buffer (virt): %lx\n", dev->name, (long) ((char *)&tp->scb - (char *)tp) + tp->dmabuffer);
+		printk(KERN_INFO "%s: buffer (virt): %lx\n", dev->name, (unsigned long) ((char *)&tp->scb - (char *)tp) + tp->dmabuffer);
 		printk(KERN_INFO "%s: buffer (DMA) : %lx\n", dev->name, (long) tp->dmabuffer);
 		printk(KERN_INFO "%s: buffer (tp)  : %lx\n", dev->name, (long) tp);
 	}
Signature · 3 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
This message will self distruct in 5 seconds.
#58 lore raw

PATCH 42/42 [Compile Regression in 2.4.25-pre8][PATCH 42/42]

In reply to Kronos

yellowfin.c:1282: warning: unsigned int format, different type arg (arg 2) yellowfin.c:1294: warning: unsigned int format, different type arg (arg 2)

dma_addr_t can be 64 bit long even on x86 (when CONFIG_HIGHMEM64G is defined). Cast to dma64_addr_t in the printk.

drivers/net/yellowfin.c +2 -2
diff -Nru -X dontdiff linux-2.4-vanilla/drivers/net/yellowfin.c linux-2.4/drivers/net/yellowfin.c
@@ -1279,7 +1279,7 @@
 
 #if defined(__i386__)
 	if (yellowfin_debug > 2) {
-		printk("\n"KERN_DEBUG"  Tx ring at %8.8x:\n", yp->tx_ring_dma);
+		printk("\n"KERN_DEBUG"  Tx ring at %8.8Lx:\n", (dma64_addr_r)yp->tx_ring_dma);
 		for (i = 0; i < TX_RING_SIZE*2; i++)
 			printk(" %c #%d desc. %8.8x %8.8x %8.8x %8.8x.\n",
 				   inl(ioaddr + TxPtr) == (long)&yp->tx_ring[i] ? '>' : ' ',
@@ -1291,7 +1291,7 @@
 				   i, yp->tx_status[i].tx_cnt, yp->tx_status[i].tx_errs,
 				   yp->tx_status[i].total_tx_cnt, yp->tx_status[i].paused);
 
-		printk("\n"KERN_DEBUG "  Rx ring %8.8x:\n", yp->rx_ring_dma);
+		printk("\n"KERN_DEBUG "  Rx ring %8.8Lx:\n", (dma64_addr_t)yp->rx_ring_dma);
 		for (i = 0; i < RX_RING_SIZE; i++) {
 			printk(KERN_DEBUG " %c #%d desc. %8.8x %8.8x %8.8x\n",
 				   inl(ioaddr + RxPtr) == (long)&yp->rx_ring[i] ? '>' : ' ',
Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
"It is more complicated than you think"
                -- The Eighth Networking Truth from RFC 1925
#59 lore raw
In reply to Marcelo Tosatti
Quoted 9 lines · Marcelo Tosatti

This is a shame. These warnings piled up during time.

It is very likely that all of them are harmless,
but they need to be fixed.

Will find to look into some of them. Help is appreciated.

Quoted 1 line

fs/xfs: 1 warnings, 0 errors

I have a fix for this one in a bk tree with a couple of other pending XFS fixups - I'll send it along soon. The warning is completely benign.

cheers.

Signature · 1 line
Nathan