All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	Al Viro <viro@zeniv.linux.org.uk>,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: Re: [v6,(resend),1/3] bitfield: fix *_encode_bits()
Date: Wed, 27 Jun 2018 16:00:09 +0000 (UTC)	[thread overview]
Message-ID: <20180627160009.7F9BC606FA@smtp.codeaurora.org> (raw)
In-Reply-To: <20180620065830.6612-2-johannes@sipsolutions.net>

Johannes Berg <johannes@sipsolutions.net> wrote:

> There's a bug in *_encode_bits() in using ~field_multiplier() for
> the check whether or not the constant value fits into the field,
> this is wrong and clearly ~field_mask() was intended. This was
> triggering for me for both constant and non-constant values.
> 
> Additionally, make this case actually into an compile error.
> Declaring the extern function that will never exist with just a
> warning is pointless as then later we'll just get a link error.
> 
> While at it, also fix the indentation in those lines I'm touching.
> 
> Finally, as suggested by Andy Shevchenko, add some tests and for
> that introduce also u8 helpers. The tests don't compile without
> the fix, showing that it's necessary.
> 
> Fixes: 00b0c9b82663 ("Add primitives for manipulating bitfields both in host- and fixed-endian.")
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

3 patches applied to wireless-drivers-next.git, thanks.

e7d4a95da86e bitfield: fix *_encode_bits()
37a3862e1238 bitfield: add u8 helpers
0e2dc70e3d0d bitfield: add tests

-- 
https://patchwork.kernel.org/patch/10476545/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2018-06-27 16:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20  6:58 [PATCH v6 (resend) 0/3] bitfield fixes and tests Johannes Berg
2018-06-20  6:58 ` [PATCH v6 (resend) 1/3] bitfield: fix *_encode_bits() Johannes Berg
2018-06-27 16:00   ` Kalle Valo [this message]
2018-06-20  6:58 ` [PATCH v6 (resend) 2/3] bitfield: add u8 helpers Johannes Berg
2018-06-20  6:58 ` [PATCH v6 (resend) 3/3] bitfield: add tests Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180627160009.7F9BC606FA@smtp.codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.