All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Shreeya Patel <shreeya.patel23498@gmail.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Jane Wan <Jane.Wan@nokia.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Marek Vasut <marek.vasut@gmail.com>,
	ties.bos@nokia.com, prabhakar.kushwaha@nxp.com,
	"open list:MEMORY TECHNOLOGY..." <linux-mtd@lists.infradead.org>,
	jagdish.gediya@nxp.com, Richard Weinberger <richard@nod.at>,
	Shawn Guo <shawnguo@kernel.org>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH v5 2/2] mtd: rawnand: use bit-wise majority to recover the contents of ONFI parameter
Date: Tue, 15 May 2018 09:35:25 +0200	[thread overview]
Message-ID: <20180515093525.051856dd@bbrezillon> (raw)
In-Reply-To: <CAHp75VcET7PZYfeRkmiP=n_xCnDzEFYS98ZLjszc1fHjdfDF2A@mail.gmail.com>

On Mon, 14 May 2018 20:54:36 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Thu, May 10, 2018 at 3:03 PM, Boris Brezillon
> <boris.brezillon@bootlin.com> wrote:
> 
> >> +#define GET_BIT(bit, val)   (((val) >> (bit)) & 0x01)  
> >
> > Not sure we need that macro, see below.  
> 
> +1. We have too many nice helpers for bit manipulations
> (for_each_set_bit() as an example).
> 
> 
> >                         for (k = 0; k < nbufs; k++) {
> >                                 const u8 *srcbuf = srcbufs[j];
> >
> >                                 if (srcbuf[i] & BIT(k))
> >                                         m++;
> >                         }  
> 
> ...which is effectively hweightXX().

No it's not.

  reply	other threads:[~2018-05-15  7:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10  2:46 [PATCH v5 2/2] mtd: rawnand: use bit-wise majority to recover the contents of ONFI parameter Jane Wan
2018-05-10 12:03 ` Boris Brezillon
2018-05-10 21:37   ` Wan, Jane (Nokia - US/Sunnyvale)
2018-05-14 17:54   ` Andy Shevchenko
2018-05-15  7:35     ` Boris Brezillon [this message]
2018-05-15  7:46       ` Andy Shevchenko
2018-05-15  8:03         ` Boris Brezillon
2018-05-15 20:23           ` Andy Shevchenko
2018-05-15 20:35             ` Boris Brezillon
2018-05-15 21:02               ` Andy Shevchenko

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=20180515093525.051856dd@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=Jane.Wan@nokia.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=jagdish.gediya@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=prabhakar.kushwaha@nxp.com \
    --cc=richard@nod.at \
    --cc=shawnguo@kernel.org \
    --cc=shreeya.patel23498@gmail.com \
    --cc=ties.bos@nokia.com \
    --cc=yamada.masahiro@socionext.com \
    /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.