On Tue, Aug 06, 2019 at 02:15:54PM -0700, Joe Perches wrote:
> On Tue, 2019-08-06 at 21:27 +0200, Rikard Falkeborn wrote:
> > On Wed, Aug 07, 2019 at 12:19:36AM +0900, Masahiro Yamada wrote:
> > > How about this?
> > > #define GENMASK_INPUT_CHECK(high, low) \
> > >BUILD_BUG_ON_ZERO(__builti
On Tue, 2019-08-06 at 21:27 +0200, Rikard Falkeborn wrote:
> On Wed, Aug 07, 2019 at 12:19:36AM +0900, Masahiro Yamada wrote:
> > How about this?
> > #define GENMASK_INPUT_CHECK(high, low) \
> >BUILD_BUG_ON_ZERO(__builtin_choose_expr( \
> > __builtin_constant_p((low) > (high))
Hi Masahiro,
On Wed, Aug 07, 2019 at 12:19:36AM +0900, Masahiro Yamada wrote:
> Hi Rikard,
>
>
> On Tue, Aug 6, 2019 at 4:55 AM Rikard Falkeborn
> wrote:
> >
> > On Sun, Aug 04, 2019 at 03:45:16PM +0900, Masahiro Yamada wrote:
> > > On Sun, Aug 4, 2019 at 3:36 AM Rikard Falkeborn
> > > wrote:
Hi Rikard,
On Tue, Aug 6, 2019 at 4:55 AM Rikard Falkeborn
wrote:
>
> On Sun, Aug 04, 2019 at 03:45:16PM +0900, Masahiro Yamada wrote:
> > On Sun, Aug 4, 2019 at 3:36 AM Rikard Falkeborn
> > wrote:
> > >
> > > On Sat, Aug 03, 2019 at 12:12:46PM +0900, Masahiro Yamada wrote:
> > > > On Sat, Aug
On Sun, Aug 04, 2019 at 03:45:16PM +0900, Masahiro Yamada wrote:
> On Sun, Aug 4, 2019 at 3:36 AM Rikard Falkeborn
> wrote:
> >
> > On Sat, Aug 03, 2019 at 12:12:46PM +0900, Masahiro Yamada wrote:
> > > On Sat, Aug 3, 2019 at 12:03 PM Masahiro Yamada
> > > wrote:
> > >
> > > >
> > > > BTW, v2 is
On Sun, Aug 4, 2019 at 3:36 AM Rikard Falkeborn
wrote:
>
> On Sat, Aug 03, 2019 at 12:12:46PM +0900, Masahiro Yamada wrote:
> > On Sat, Aug 3, 2019 at 12:03 PM Masahiro Yamada
> > wrote:
> >
> > >
> > > BTW, v2 is already inconsistent.
> > > If you wanted GENMASK_INPUT_CHECK() to return 'unsigned
On Sat, Aug 03, 2019 at 12:12:46PM +0900, Masahiro Yamada wrote:
> On Sat, Aug 3, 2019 at 12:03 PM Masahiro Yamada
> wrote:
>
> >
> > BTW, v2 is already inconsistent.
> > If you wanted GENMASK_INPUT_CHECK() to return 'unsigned long',,
> > you would have to cast (low) > (high) as well:
> >
> >
On Sat, Aug 3, 2019 at 12:03 PM Masahiro Yamada
wrote:
>
> BTW, v2 is already inconsistent.
> If you wanted GENMASK_INPUT_CHECK() to return 'unsigned long',,
> you would have to cast (low) > (high) as well:
>
>(unsigned long)((low) > (high)), UL(0
>
> This is totally redundant
On Sat, Aug 3, 2019 at 3:19 AM Rikard Falkeborn
wrote:
>
> On Fri, Aug 02, 2019 at 12:25:06PM +0900, Masahiro Yamada wrote:
> > On Fri, Aug 2, 2019 at 12:14 PM Joe Perches wrote:
> > >
> > > On Fri, 2019-08-02 at 10:40 +0900, Masahiro Yamada wrote:
> > > > On Thu, Aug 1, 2019 at 4:27 AM Joe Perch
On Fri, Aug 02, 2019 at 12:25:06PM +0900, Masahiro Yamada wrote:
> On Fri, Aug 2, 2019 at 12:14 PM Joe Perches wrote:
> >
> > On Fri, 2019-08-02 at 10:40 +0900, Masahiro Yamada wrote:
> > > On Thu, Aug 1, 2019 at 4:27 AM Joe Perches wrote:
> > > > On Wed, 2019-07-31 at 21:03 +0200, Rikard Falkebo
On Fri, Aug 2, 2019 at 12:14 PM Joe Perches wrote:
>
> On Fri, 2019-08-02 at 10:40 +0900, Masahiro Yamada wrote:
> > On Thu, Aug 1, 2019 at 4:27 AM Joe Perches wrote:
> > > On Wed, 2019-07-31 at 21:03 +0200, Rikard Falkeborn wrote:
> > > > GENMASK() and GENMASK_ULL() are supposed to be called wit
On Fri, 2019-08-02 at 10:40 +0900, Masahiro Yamada wrote:
> On Thu, Aug 1, 2019 at 4:27 AM Joe Perches wrote:
> > On Wed, 2019-07-31 at 21:03 +0200, Rikard Falkeborn wrote:
> > > GENMASK() and GENMASK_ULL() are supposed to be called with the high bit
> > > as the first argument and the low bit as
On Thu, Aug 1, 2019 at 4:27 AM Joe Perches wrote:
>
> On Wed, 2019-07-31 at 21:03 +0200, Rikard Falkeborn wrote:
> > GENMASK() and GENMASK_ULL() are supposed to be called with the high bit
> > as the first argument and the low bit as the second argument. Mixing
> > them will return a mask with zer
On Wed, Jul 31, 2019 at 07:57:48PM -0700, Joe Perches wrote:
> On Thu, 2019-08-01 at 11:50 +0900, Masahiro Yamada wrote:
> > On Thu, Aug 1, 2019 at 4:04 AM Rikard Falkeborn
> > wrote:
> > > GENMASK() and GENMASK_ULL() are supposed to be called with the high bit
> > > as the first argument and the
On Wed, Jul 31, 2019 at 12:27:38PM -0700, Joe Perches wrote:
> On Wed, 2019-07-31 at 21:03 +0200, Rikard Falkeborn wrote:
> > GENMASK() and GENMASK_ULL() are supposed to be called with the high bit
> > as the first argument and the low bit as the second argument. Mixing
> > them will return a mask
On Thu, 2019-08-01 at 11:50 +0900, Masahiro Yamada wrote:
> On Thu, Aug 1, 2019 at 4:04 AM Rikard Falkeborn
> wrote:
> > GENMASK() and GENMASK_ULL() are supposed to be called with the high bit
> > as the first argument and the low bit as the second argument. Mixing
> > them will return a mask with
On Thu, Aug 1, 2019 at 4:04 AM Rikard Falkeborn
wrote:
>
> GENMASK() and GENMASK_ULL() are supposed to be called with the high bit
> as the first argument and the low bit as the second argument. Mixing
> them will return a mask with zero bits set.
>
> Recent commits show getting this wrong is not
On Wed, 2019-07-31 at 21:03 +0200, Rikard Falkeborn wrote:
> GENMASK() and GENMASK_ULL() are supposed to be called with the high bit
> as the first argument and the low bit as the second argument. Mixing
> them will return a mask with zero bits set.
>
> Recent commits show getting this wrong is no
GENMASK() and GENMASK_ULL() are supposed to be called with the high bit
as the first argument and the low bit as the second argument. Mixing
them will return a mask with zero bits set.
Recent commits show getting this wrong is not uncommon, see e.g.
commit aa4c0c9091b0 ("net: stmmac: Fix misuses o
19 matches
Mail list logo