lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <80049144.V4PLGzs4dk@amdc3058>
Date:   Mon, 12 Mar 2018 15:26:32 +0100
From:   Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Thomas Winischhofer <thomas@...ischhofer.net>,
        Nicolas Pitre <nico@...aro.org>,
        Andi Kleen <ak@...ux.intel.com>,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] video: fbdev: sis: avoid mismatched prototypes

On Friday, February 02, 2018 04:00:48 PM Arnd Bergmann wrote:
> Building with LTO enabled reveals some functions whose prototypes
> in the header are different from the definition:
> 
> drivers/video/fbdev/sis/sis_main.h:765:0: error: type of 'SiS_SetCH70xxANDOR' does not match original declaration [-Werror=lto-type-mismatch]
>  extern void  SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg,
> 
> drivers/video/fbdev/sis/init301.c:8937:0: note: type mismatch in parameter 4
>  SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg,
> 
> drivers/video/fbdev/sis/init301.c:8937:0: note: type 'short unsigned int' should match type 'unsigned char'
> drivers/video/fbdev/sis/init301.c:8937:0: note: 'SiS_SetCH70xxANDOR' was previously declared here
> 
> The root cause appears to be the way that header files are used in this
> driver, where they contain both static variable and declarations for
> symbols in other files.
> 
> To clean that up, I'm changing all mixed headers to only contain
> declarations the way we normally do in C, or contain only static
> variables, and move the rest to a more appropriate place.  Once that
> is done, the headers can be included in the other files as well, and
> guarantee that the prototypes match.
> 
> There are a few headers that now only contain static variables, and
> I'm leaving those alone here as the patch is already too big. These
> could be trivially moved into the respective .c files.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Patch queued for 4.17, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ