mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Compile Regression] 2.4.25-pre8: 126 warnings 0 errors
@ 2004-01-30 18:15 Xose Vazquez Perez
  2004-01-30 18:40 ` Xose Vazquez Perez
  2004-01-30 19:11 ` Marcelo Tosatti
  0 siblings, 2 replies; 60+ messages in thread
From: Xose Vazquez Perez @ 2004-01-30 18:15 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] 60+ messages in thread
* Re: [Compile Regression in 2.4.25-pre8][PATCH 37/42]
@ 2004-02-08  0:12 Jon Foster
  0 siblings, 0 replies; 60+ messages in thread
From: Jon Foster @ 2004-02-08  0:12 UTC (permalink / raw)
  To: kronos, linux-kernel

Hi,

Kronos wrote:
> Comments on the patch?
> 
> diff -Nru -X dontdiff linux-2.4-vanilla/include/asm-i386/page.h linux-2.4/include/asm-i386/page.h
> --- linux-2.4-vanilla/include/asm-i386/page.h	Tue Nov 11 18:05:52 2003
> +++ linux-2.4/include/asm-i386/page.h	Wed Feb  4 14:43:00 2004
> @@ -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) {}
> +}

My first thought was "this obviously makes the kernel bigger".  GCC will
actually compile this loop - it's only a single jump instruction, possibly
with a nop for branch target alignment, but it's duplicated for every
call to BUG().

On the other hand, marking BUG() as noreturn means that GCC won't have
to generate the code following the BUG().  Even if that code is just
a jump, it's a similar size to the code that this patch adds.  So it's
not as obvious as I first thought, and does need measuring.

Tested with Linux 2.4.22-gentoo-r5 & my normal kernel config, by
measuring total uncompressed size of vmlinux:

Without patch:   3,475,213 bytes
With patch:      3,475,149 bytes
This patch saves:       64 bytes

OK, that saving is lost in the noise, but it seems that this patch
isn't going to change the kernel size much (if at all).  And it is
good to let the compiler know about BUG(), so it doesn't emit
spurious warnings and can catch unused code.  So I like this patch.

Obviously, the most elegent (and space-saving) solution would be
if GCC allowed you to mark a block of inline assembly as noreturn.
Any GCC folks out there able to help?

Kind regards,

Jon


> +#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 { \
> diff -Nru -X dontdiff linux-2.4-vanilla/include/linux/compiler.h linux-2.4/include/linux/compiler.h
> --- linux-2.4-vanilla/include/linux/compiler.h Tue Sep 18 23:12:45 2001
> +++ linux-2.4/include/linux/compiler.h Tue Feb 3 18:29:56 2004
> @@ -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 */



^ permalink raw reply	[flat|nested] 60+ messages in thread

end of thread, other threads:[~2004-02-08  0:12 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-30 18:15 [Compile Regression] 2.4.25-pre8: 126 warnings 0 errors Xose Vazquez Perez
2004-01-30 18:40 ` Xose Vazquez Perez
2004-01-30 19:11 ` Marcelo Tosatti
2004-01-30 20:49   ` Kronos
     [not found]     ` <Pine.LNX.4.58L.0401301855410.3140@logos.cnet>
2004-02-02 18:09       ` Kronos
2004-02-02 18:19         ` [Compile Regression in 2.4.25-pre8][PATCH 1/42] Kronos
2004-02-02 18:20         ` [Compile Regression in 2.4.25-pre8][PATCH 2/42] Kronos
2004-02-02 18:21         ` [Compile Regression in 2.4.25-pre8][PATCH 3/42] Kronos
2004-02-02 18:21         ` [Compile Regression in 2.4.25-pre8][PATCH 4/42] Kronos
2004-02-02 18:26         ` [Compile Regression in 2.4.25-pre8][PATCH 5/42] Kronos
2004-02-02 18:43         ` [Compile Regression in 2.4.25-pre8][PATCH 6/42] Kronos
2004-02-02 19:42         ` [Compile Regression in 2.4.25-pre8][PATCH 7/42] Kronos
2004-02-02 19:42         ` [Compile Regression in 2.4.25-pre8][PATCH 8/42] Kronos
2004-02-02 19:43         ` [Compile Regression in 2.4.25-pre8][PATCH 9/42] Kronos
2004-02-02 19:44         ` [Compile Regression in 2.4.25-pre8][PATCH 10/42] Kronos
2004-02-02 19:44         ` [Compile Regression in 2.4.25-pre8][PATCH 11/42] Kronos
2004-02-02 21:25           ` Richard B. Johnson
2004-02-03 21:04             ` Kronos
2004-02-04 12:27               ` Richard B. Johnson
2004-02-02 19:45         ` [Compile Regression in 2.4.25-pre8][PATCH 12/42] Kronos
2004-02-02 19:45         ` [Compile Regression in 2.4.25-pre8][PATCH 13/42] Kronos
2004-02-02 19:46         ` [Compile Regression in 2.4.25-pre8][PATCH 14/42] Kronos
2004-02-02 19:46         ` [Compile Regression in 2.4.25-pre8][PATCH 15/42] Kronos
2004-02-04 16:46           ` Marcelo Tosatti
2004-02-04 20:19             ` Kronos
2004-02-02 19:46         ` [Compile Regression in 2.4.25-pre8][PATCH 16/42] Kronos
2004-02-02 21:51           ` Marcelo Tosatti
2004-02-02 19:47         ` [Compile Regression in 2.4.25-pre8][PATCH 17/42] Kronos
2004-02-02 19:47         ` [Compile Regression in 2.4.25-pre8][PATCH 18/42] Kronos
2004-02-02 19:48         ` [Compile Regression in 2.4.25-pre8][PATCH 19/42] Kronos
2004-02-02 19:48         ` [Compile Regression in 2.4.25-pre8][PATCH 20/42] Kronos
2004-02-02 19:48         ` [Compile Regression in 2.4.25-pre8][PATCH 21/42] Kronos
2004-02-02 19:56         ` [Compile Regression in 2.4.25-pre8][PATCH 22/42] Kronos
2004-02-02 19:57         ` [Compile Regression in 2.4.25-pre8][PATCH 23/42] Kronos
2004-02-02 19:57         ` [Compile Regression in 2.4.25-pre8][PATCH 24/42] Kronos
2004-02-02 19:57         ` [Compile Regression in 2.4.25-pre8][PATCH 25/42] Kronos
2004-02-02 19:58         ` [Compile Regression in 2.4.25-pre8][PATCH 26/42] Kronos
2004-02-02 19:58         ` [Compile Regression in 2.4.25-pre8][PATCH 27/42] Kronos
2004-02-02 19:58         ` [Compile Regression in 2.4.25-pre8][PATCH 28/42] Kronos
2004-02-02 19:58         ` [Compile Regression in 2.4.25-pre8][PATCH 29/42] Kronos
2004-02-02 19:59         ` [Compile Regression in 2.4.25-pre8][PATCH 30/42] Kronos
2004-02-02 20:00         ` [Compile Regression in 2.4.25-pre8][PATCH 31/42] Kronos
2004-02-02 20:01         ` [Compile Regression in 2.4.25-pre8][PATCH 32/42] Kronos
2004-02-02 20:01         ` [Compile Regression in 2.4.25-pre8][PATCH 33/42] Kronos
2004-02-02 20:02         ` [Compile Regression in 2.4.25-pre8][PATCH 34/42] Kronos
2004-02-02 20:03         ` [Compile Regression in 2.4.25-pre8][PATCH 35/42] Kronos
2004-02-02 20:03         ` [Compile Regression in 2.4.25-pre8][PATCH 36/42] Kronos
2004-02-02 20:03         ` [Compile Regression in 2.4.25-pre8][PATCH 37/42] Kronos
2004-02-02 21:08           ` Geert Uytterhoeven
2004-02-02 21:25             ` Kronos
2004-02-03 21:07             ` Kronos
2004-02-03 23:14               ` Philippe Elie
2004-02-04 20:22                 ` Kronos
2004-02-02 20:04         ` [Compile Regression in 2.4.25-pre8][PATCH 38/42] Kronos
2004-02-02 20:04         ` [Compile Regression in 2.4.25-pre8][PATCH 39/42] Kronos
2004-02-02 20:05         ` [Compile Regression in 2.4.25-pre8][PATCH 40/42] Kronos
2004-02-02 20:05         ` [Compile Regression in 2.4.25-pre8][PATCH 41/42] Kronos
2004-02-02 20:06         ` [Compile Regression in 2.4.25-pre8][PATCH 42/42] Kronos
2004-01-30 22:18   ` [Compile Regression] 2.4.25-pre8: 126 warnings 0 errors Nathan Scott
2004-02-08  0:12 [Compile Regression in 2.4.25-pre8][PATCH 37/42] Jon Foster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®