linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Dmitry Osipenko <digetx@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Boris Brezillon <bbrezillon@kernel.org>,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Richard Weinberger <richard@nod.at>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Stefan Agner <stefan@agner.ch>,
	Marek Vasut <marek.vasut@gmail.com>,
	Paul Burton <paul.burton@mips.com>,
	MTD Maling List <linux-mtd@lists.infradead.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Piotr Sroka <piotrs@cadence.com>
Subject: Re: [v3 1/2] mtd: nand: Add Cadence NAND controller driver
Date: Tue, 25 Jun 2019 17:23:01 +0200	[thread overview]
Message-ID: <CAMuHMdXJ=DQgNzvwXiZd2-Xm=GwO0gFywOxpuX+xwHc3J7q+3g@mail.gmail.com> (raw)
In-Reply-To: <20110899-d456-8403-f9be-663be5fcd07e@gmail.com>

On Tue, Jun 25, 2019 at 4:45 PM Dmitry Osipenko <digetx@gmail.com> wrote:
> 25.06.2019 16:02, Piotr Sroka пишет:
> > The 06/16/2019 16:42, Dmitry Osipenko wrote:
> >> 14.06.2019 18:09, Piotr Sroka пишет:
> >>> +/* Cadnence NAND flash controller capabilities get from driver data. */
> >>> +struct cadence_nand_dt_devdata {
> >>> +    /* Skew value of the output signals of the NAND Flash interface. */
> >>> +    u32 if_skew;
> >>> +    /* It informs if aging feature in the DLL PHY supported. */
> >>> +    u8 phy_dll_aging;
> >>> +    /*
> >>> +     * It informs if per bit deskew for read and write path in
> >>> +     * the PHY is supported.
> >>> +     */
> >>> +    u8 phy_per_bit_deskew;
> >>> +    /* It informs if slave DMA interface is connected to DMA engine. */
> >>> +    u8 has_dma;
> >>
> >> There is no needed to dedicate 8 bits to a variable if you only care about a single
> >> bit. You may write this as:
> >>
> >> bool has_dma : 1;
> > I modified it locally but it looks that checkpatch does not like such
> > notation
> > "WARNING: Avoid using bool as bitfield.  Prefer bool bitfields as
> > unsigned int or u<8|16|32>"
> > So maybe I will leave it as is.
>
> You may also use the "u8 : 1" form then, to satisfy the checkpatch. Probably
> "unsigned int : 1" will be the best in this case, it's up to you.

Exactly. The compiler will allocate the sufficient amount of space to store the
bitfield.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      reply	other threads:[~2019-06-25 15:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14 15:06 [v3 0/2] mtd: nand: Add Cadence NAND controller driver Piotr Sroka
2019-06-14 15:09 ` [v3 1/2] " Piotr Sroka
2019-06-14 15:13   ` [v3 2/2] dt-bindings: " Piotr Sroka
2019-07-09 14:48     ` Rob Herring
2019-07-17 10:58       ` Piotr Sroka
2019-06-16 13:42   ` [v3 1/2] mtd: " Dmitry Osipenko
2019-06-25 13:02     ` Piotr Sroka
2019-06-25 14:45       ` Dmitry Osipenko
2019-06-25 15:23         ` Geert Uytterhoeven [this message]

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='CAMuHMdXJ=DQgNzvwXiZd2-Xm=GwO0gFywOxpuX+xwHc3J7q+3g@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=arnd@arndb.de \
    --cc=bbrezillon@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=digetx@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marcel.ziswiler@toradex.com \
    --cc=marek.vasut@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=paul.burton@mips.com \
    --cc=piotrs@cadence.com \
    --cc=richard@nod.at \
    --cc=stefan@agner.ch \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).