public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Yixun Lan <dlan@gentoo.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Chen Wang <unicorn_wang@outlook.com>,
	Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>,
	Meng Zhang <zhangmeng.kevin@linux.spacemit.com>,
	linux-gpio@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-kernel@vger.kernel.org, Conor Dooley <conor@kernel.org>,
	Yangyu Chen <cyy@cyyself.name>,
	devicetree@vger.kernel.org, Palmer Dabbelt <palmer@dabbelt.com>,
	Jesse Taube <mr.bossman075@gmail.com>,
	Jisheng Zhang <jszhang@kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Inochi Amaoto <inochiama@outlook.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	spacemit@lists.linux.dev, linux-riscv@lists.infradead.org
Subject: Re: [PATCH v5 3/5] gpio: spacemit: add support for K1 SoC
Date: Fri, 21 Feb 2025 12:21:25 +0000	[thread overview]
Message-ID: <20250221122125-GYA35549@gentoo> (raw)
In-Reply-To: <CAMRc=MdX6KiGk1zBRK3bZpN3iM16-8mDq40sTez6YO2kJEq0zQ@mail.gmail.com>

Hi Bartosz Golaszewski:

On 09:37 Fri 21 Feb     , Bartosz Golaszewski wrote:
> On Fri, Feb 21, 2025 at 12:36 AM Chen Wang <unicorn_wang@outlook.com> wrote:
> >
> >
> > On 2025/2/20 21:34, Bartosz Golaszewski wrote:
> > > On Mon, Feb 17, 2025 at 1:58 PM Yixun Lan <dlan@gentoo.org> wrote:
> > [......]
> > >> +#define to_spacemit_gpio_bank(x) container_of((x), struct spacemit_gpio_bank, gc)
> > >> +
> > >> +struct spacemit_gpio;
> > >> +
> > >> +struct spacemit_gpio_bank {
> > >> +       struct gpio_chip                gc;
> > >> +       struct spacemit_gpio            *sg;
> > >> +       void __iomem                    *base;
> > >> +       u32                             index;
> > >> +       u32                             irq_mask;
> > >> +       u32                             irq_rising_edge;
> > >> +       u32                             irq_falling_edge;
> > >> +};
> > >> +
> > >> +struct spacemit_gpio {
> > >> +       struct  device                  *dev;
> > >> +       struct  spacemit_gpio_bank      sgb[NR_BANKS];
> > >> +};
> > > Please don't use tabs in struct definitions.
> >
> > Why not?I see
> > https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#struct-declarations-and-initializers
> >
> 
> This is for the tip tree, not treewide.
> 
> It's my personal maintainer preference. We do use both under
> drivers/gpio/ but I prefer no-tabs in new code.
> 

thanks for this explanation..

my intention was trying to keep struct members aligned
if tabs is a no-go, would using multi blank spaces to align be acceptable?

something like:

struct spacemit_gpio_bank {
	struct gpio_chip       gc;
	struct spacemit_gpio   *sg;
	void   __iomem         *base;
       ...
}

> Bart

-- 
Yixun Lan (dlan)
Gentoo Linux Developer
GPG Key ID AABEFD55

  reply	other threads:[~2025-02-21 12:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-17 12:57 [PATCH v5 0/5] riscv: spacemit: add gpio support for K1 SoC Yixun Lan
2025-02-17 12:57 ` [PATCH v5 1/5] gpio: of: support to add custom add pin range function Yixun Lan
2025-02-20 10:22   ` Bartosz Golaszewski
2025-02-22 13:23     ` Yixun Lan
2025-02-17 12:57 ` [PATCH v5 2/5] dt-bindings: gpio: spacemit: add support for K1 SoC Yixun Lan
2025-02-18 13:09   ` Linus Walleij
2025-02-17 12:57 ` [PATCH v5 3/5] " Yixun Lan
2025-02-20 13:34   ` Bartosz Golaszewski
2025-02-20 23:35     ` Chen Wang
2025-02-21  8:37       ` Bartosz Golaszewski
2025-02-21 12:21         ` Yixun Lan [this message]
2025-02-21 12:33           ` Bartosz Golaszewski
2025-02-21 17:27   ` Alex Elder
2025-02-23  3:09     ` Yixun Lan
2025-02-17 12:57 ` [PATCH v5 4/5] riscv: dts: spacemit: add gpio " Yixun Lan
2025-02-17 12:57 ` [PATCH v5 5/5] riscv: dts: spacemit: add gpio LED for system heartbeat Yixun Lan

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=20250221122125-GYA35549@gentoo \
    --to=dlan@gentoo.org \
    --cc=brgl@bgdev.pl \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=cyy@cyyself.name \
    --cc=devicetree@vger.kernel.org \
    --cc=inochiama@outlook.com \
    --cc=jszhang@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mr.bossman075@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=unicorn_wang@outlook.com \
    --cc=zhangmeng.kevin@linux.spacemit.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox