Some Warning from gcc-3.4-cvs for 2.5.65

Some Warning from gcc-3.4-cvs for 2.5.65

Post by Norbert Wol » Sat, 22 Mar 2003 15:20:10



Hi !

Here are some Warning got when compiling Linux 2.6.65 (devfs not configured)
with the latest gcc-3.4 CVS :

include/linux/devfs_fs_kernel.h: In function `devfs_remove':
include/linux/devfs_fs_kernel.h:101: warning: varargs function cannot be
                inline

Possible Fix :

        Replace inline-func with macro

--- devfs_fs_kernel.h.orig      2003-03-21 13:28:24.000000000 +0000

 {
     return NULL;
 }
-static inline void devfs_remove(const char *fmt, ...)
-{
-}
+
+#define devfs_remove(x, ...) do { ; } while (0)
+
 static inline int devfs_generate_path (devfs_handle_t de, char *path,
                                       int buflen)
 {

---

include/linux/kallsyms.h: In function `__check_printsym_format':
include/linux/kallsyms.h:38: warning: varargs function cannot be inline

Quote:> /* This macro allows us to keep printk typechecking */
> static void __check_printsym_format(const char *fmt, ...)
>__attribute__((format(printf,1,2)));
> static inline void __check_printsym_format(const char *fmt, ...)
> {
> }

I think the inline-attribute should be simply removed to quiet this Warning.

---

arch/i386/kernel/ptrace.c: In function `sys_ptrace':
warning: `__pu_err' might be used uninitialized in this function

This comes from include/asm-i386

Quote:> #define __put_user_nocheck(x,ptr,size)                             \
> ({                                                         \
>    long __pu_err;                                          \
>    __put_user_size((x),(ptr),(size),__pu_err,-EFAULT);     \
>    __pu_err;                                               \
> })

__pu_err is shurely not initialized, but migth this be intentionally ?

---

kernel/fork.c: In function `copy_fs':
kernel/fork.c:569: warning: function cannot be inline
kernel/fork.c: In function `copy_process':
kernel/fork.c:569: warning: can't inline call to `copy_fs'
kernel/fork.c:882: warning: called from here

        I dont understand WHY copy_fs cannont be inlined ...

kernel/posix-timers.c: In function `unlock_timer':
kernel/posix-timers.c:564: warning: function cannot be inline

        ditto
---

kernel/suspend.c: In function `freeze_processes':
kernel/suspend.c:228: warning: comparison of distinct pointer types lacks a
        cast

---

drivers/char/vt.c:2457: warning: `return' with a value, in function
        returning void
drivers/char/vt.c:2497: warning: initialization from incompatible pointer
        type

I think these Warnings appear as con_init is declared as
        static void __init con_init(void);
but typedef int (*initcall_t)(void);
suggests that it migth better be static int __init con_init(void) ??

Regards,

        Norbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Some Warning from gcc-3.4-cvs for 2.5.65

Post by J?rn Enge » Sat, 22 Mar 2003 15:40:14



> Here are some Warning got when compiling Linux 2.6.65 (devfs not configured)
> with the latest gcc-3.4 CVS :

> include/linux/devfs_fs_kernel.h: In function `devfs_remove':
> include/linux/devfs_fs_kernel.h:101: warning: varargs function cannot be
>            inline

> Possible Fix :

>    Replace inline-func with macro

> --- devfs_fs_kernel.h.orig 2003-03-21 13:28:24.000000000 +0000
> +++ devfs_fs_kernel.h      2003-03-21 13:30:28.000000000 +0000

>  {
>      return NULL;
>  }
> -static inline void devfs_remove(const char *fmt, ...)
> -{
> -}
> +
> +#define devfs_remove(x, ...) do { ; } while (0)
> +
>  static inline int devfs_generate_path (devfs_handle_t de, char *path,
>                                   int buflen)
>  {

> ---

> include/linux/kallsyms.h: In function `__check_printsym_format':
> include/linux/kallsyms.h:38: warning: varargs function cannot be inline

> > /* This macro allows us to keep printk typechecking */
> > static void __check_printsym_format(const char *fmt, ...)
> >__attribute__((format(printf,1,2)));
> > static inline void __check_printsym_format(const char *fmt, ...)
> > {
> > }

> I think the inline-attribute should be simply removed to quiet this Warning.

Quiting a warning is not a good reason for patches. If the warning is
bogus, the compiler should get fixed, not the kernel.
In this case the compiler should, inlined or not, optimize the call to
an empty function into nothing and shut up.

J?rn

--
Good warriors cause others to come to them and do not go to others.
-- Sun Tzu
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. ide kernel panic: 2.5.64-ac3 2.5.65-ac1 2.5.65-mm4

AMD K6/2 with VIA chipset has this panic at boot:

Kernel panic: ide: default attach failed

Panic on 2.5.64-ac3, 2.5.65-ac[13], 2.5.65-mm4, 2.5.65-bk4.

No panic on 2.5.61-ac1, 2.5.65-mm3, 2.5.65, 2.4.21-pre5, 2.4.21-pre5-ac3.

No modules.

egrep '^C.*IDE|^C.*VIA' /usr/src/linux-2.5.65-ac1/.config
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_BLK_DEV_VIA82CXXX=y
CONFIG_IDEDMA_AUTO=y
CONFIG_BLK_DEV_IDE_MODES=y

Boot message on 2.5.65-ac1:

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 00:07.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt82c586b (rev 47) IDE UDMA33 controller on pci00:07.1
    ide0: BM-DMA at 0xe000-0xe007, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xe008-0xe00f, BIOS settings: hdc:DMA, hdd:DMA
hda: Maxtor 51536U3, ATA DISK drive
hdb: ATAPI CDROM, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: Maxtor 52049U4, ATA DISK drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: host protected area => 1
hda: 30015216 sectors (15368 MB) w/2048KiB Cache, CHS=29777/16/63, UDMA(33)
 hda: [PTBL] [1868/255/63] hda1 hda2 hda3
hdc: host protected area => 1
hdc: 40020624 sectors (20491 MB) w/2048KiB Cache, CHS=39703/16/63, UDMA(33)
 hdc: hdc1 hdc2 hdc3
ide-disk: hdc: Failed to register the driver with ide.c
ide-default: hdc: Failed to register the driver with ide.c
Kernel panic: ide: default attach failed

lspci -vvv for IDE interface

IDE interface: VIA Technologies, Inc. Bus Master IDE (rev 06) (prog-if 8a [Master SecP PriP])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64
Region 4: I/O ports at e000 [size=16]

lspci
00:00.0 Host bridge: VIA Technologies, Inc. VT82C598 [Apollo MVP3] (rev 04)
00:01.0 PCI bridge: VIA Technologies, Inc. VT82C598/694x [Apollo MVP3/Pro133x AGP]
00:07.0 ISA bridge: VIA Technologies, Inc. VT82C586/A/B PCI-to-ISA [Apollo VP] (rev 47)
00:07.1 IDE interface: VIA Technologies, Inc. Bus Master IDE (rev 06)
00:07.3 Host bridge: VIA Technologies, Inc. VT82C586B ACPI (rev 10)
00:13.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C (rev 10)
01:00.0 VGA compatible controller: nVidia Corporation NV6 [Vanta] (rev 15)

--
Randy Hron
http://home.earthlink.net/~rwhron/kernel/bigbox.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. leafnode

3. [2.5.65] kexec for 2.5.65 available

4. Need source code for PS command

5. 2.5.65 fix jiffies compile warning in alpha/kernel/smp.c

6. kmalloc_percpu: interface change.

7. 2.5.65: 3C905 driver doesn't work.

8. date and Y2K question

9. fix pppoatm compile in 2.5.65

10. 2.5.65 RCU oops.

11. conntrack related slab corruption in 2.5.65

12. Issues in 2.5.65-ac4

13. Yet more i2c driver changes for 2.5.65