[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <020FA2C7-F92E-49F9-BF52-CFFCAAB7C82F@intel.com>
Date: Sat, 23 Jan 2016 00:11:48 +0000
From: "Rustad, Mark D" <mark.d.rustad@...el.com>
To: Marek Vasut <marex@...x.de>
CC: Marc Kleine-Budde <mkl@...gutronix.de>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Oliver Hartkopp <socketcan@...tkopp.net>,
"Mark Rutland" <mark.rutland@....com>,
Wolfgang Grandegger <wg@...ndegger.com>
Subject: Re: [PATCH V2 5/5] net: can: ifi: Add IFI CANFD IP support
Marek Vasut <marex@...x.de> wrote:
> I see, so adding u32 also here works. I'm starting to wonder if the BIT
> macro is really that nice and if I shouldn't just use (1 << n) as usual.
Actually, (1 << n) is not so good either when n is 31 - it can trigger
overflow warnings since it will be presumed to be a signed value. (1U << n)
should avoid that problem. Unfortunately, BIT() uses 1UL which produces
64-bit values on 64-bit arches. The bit ops are kind of a mess in that way.
It would be nicer if BIT was restricted to int-size values and a new BIT_UL
or something would produce the long values.
--
Mark Rustad, Networking Division, Intel Corporation
Download attachment "signature.asc" of type "application/pgp-signature" (842 bytes)
Powered by blists - more mailing lists