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: <292158977.4HS03to08B@wuerfel>
Date:	Wed, 16 Mar 2016 21:52:30 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Hartley Sweeten <HartleyS@...ionengravers.com>
Cc:	Ian Abbott <abbotti@....co.uk>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Amitoj Kaur Chawla <amitoj1606@...il.com>,
	Bhaktipriya Shridhar <bhaktipriya96@...il.com>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging/comedi/dt282x: avoid integer overflow warning

On Wednesday 16 March 2016 17:04:15 Hartley Sweeten wrote:
> > #define DT2821_SUPCSR_DS_AD_TRIG       (3 << 10)
> 
> Use a helper macro for those bits:
> 
> #define DT2821_SUPCSR_DS(x)             (((x) & 0x3) << 10)
> #define DT2821_SUPCSR_DS_PIO            DT2821_SUPCSR_DS(0)
> #define DT2821_SUPCSR_DS_AD_CLK         DT2821_SUPCSR_DS(1)
> #define DT2821_SUPCSR_DS_DA_CLK         DT2821_SUPCSR_DS(2)
> #define DT2821_SUPCSR_DS_AD_TRIG                DT2821_SUPCSR_DS(3)
> 
> > I considered using BIT() but decided against it for consistency.
> 
> Your change may fix the gcc-6 issue but it doesn't fix the 28 checkpatch.pl
> issues:
> CHECK: Prefer using the BIT macro

I sent a new version now, and found a better solution that avoids
using BIT().

	Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ