From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Schspa Shi <schspa@gmail.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
"fancer.lancer@gmail.com" <fancer.lancer@gmail.com>,
"hoan@os.amperecomputing.com" <hoan@os.amperecomputing.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"opendmb@gmail.com" <opendmb@gmail.com>
Subject: Re: [PATCH] gpio: use raw spinlock for gpio chip shadowed data
Date: Mon, 18 Apr 2022 21:01:35 +0200 [thread overview]
Message-ID: <CAMRc=Meo4TbdxQzynb7paDgC7J19Tc6hhKU7du4mZvgP0mynTQ@mail.gmail.com> (raw)
In-Reply-To: <CAMA88TruFbCZbvq84ep5NbSdxDgi-mPX2iXWk4c2qA-etMA8QQ@mail.gmail.com>
On Mon, Apr 18, 2022 at 5:43 PM Schspa Shi <schspa@gmail.com> wrote:
>
> Andy Shevchenko <andy.shevchenko@gmail.com> writes:
>
> > On Mon, Apr 18, 2022 at 2:38 PM Andy Shevchenko
> > <andy.shevchenko@gmail.com> wrote:
> >> On Mon, Apr 18, 2022 at 6:07 AM Schspa Shi <schspa@gmail.com> wrote:
> >> > Andy Shevchenko <andy.shevchenko@gmail.com> writes:
> >>
> >> ...
> >>
> >> > > drivers/gpio/gpio-mmio.c | 22 +++++++++++-----------
> >> > > include/linux/gpio/driver.h | 2 +-
> >> > >
> >> > > You can’t do it for one driver only. As I told it will require too much of additional churn to make this to be series.
> >> > >
> >> >
> >> > It seems I have misunderstood your "too much of additional churn". Can
> >> > you explain it?
> >> > The gpio-mmio.c and driver.h here are the basics of other gpio
> >> > drivers. In my opinion, these two files
> >> > belong to the basic code of gpio, and functions such as bgpio_init are
> >> > declared in
> >> > include/linux/gpio/driver.h and implemented in
> >> > drivers/gpio/gpio-mmio.c. So there is no churn.
> >>
> >> When you change the member of the data structure, you have to change
> >> all its users. You can't change only one at a time because it will be
> >> a (compile-time) bisectability issue.
>
>
> Yes, I understand and will take for bisectability use case for the next time.
>
> >
> > Answering your question here, it will require moving to union with an
> > additional member and corresponding core changes, convert all drivers
> > one-by-one, and remove the old type. It's not worth doing it, but as I
> > said let maintainers decide.
>
> Okay, sorry for my misunderstanding, I thought you were saying it's
> bad to modify too many different files in one patch, so I split the
> patch into a series of patchsets.
>
> So, let Linus Walleij or Bartosz Golaszewski to decide for it ?
> I have the same options as you, it's a small change, and no need to
> trouble everyone for it.
>
I prefer a single patch in this case, we can apply it closer to the
next merge window.
Bart
> Because this structure will be used as the same instance in multiple
> files, even if we change this variable to union first, it can be
> compiled, but the program will still not work properly. This is
> because bgpio_init is initialized with the type of raw_spinlock_t,
> but is still accessed as spinlock_t in other drivers, which is a
> serious abnormal initialization.
next prev parent reply other threads:[~2022-04-18 19:02 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-15 16:55 [PATCH] gpio: use raw spinlock for gpio chip shadowed data Schspa Shi
2022-04-16 8:30 ` Andy Shevchenko
2022-04-17 16:51 ` [PATCH v2 01/15] " Schspa Shi
2022-04-17 16:51 ` [PATCH v2 02/15] pinctrl: nuvoton: npcm7xx: use raw_spin_lock_irqsave for bgpio_lock Schspa Shi
2022-04-17 16:51 ` [PATCH v2 03/15] gpio: tb10x: use raw lock " Schspa Shi
2022-04-17 16:51 ` [PATCH v2 04/15] gpio: sifive: " Schspa Shi
2022-04-17 16:51 ` [PATCH v2 05/15] gpio: mlxbf2: " Schspa Shi
2022-04-17 16:51 ` [PATCH v2 06/15] gpio: menz127: " Schspa Shi
2022-04-17 16:52 ` [PATCH v2 07/15] gpio: loongson1: " Schspa Shi
2022-04-17 16:52 ` [PATCH v2 08/15] gpio: ixp4xx: " Schspa Shi
2022-04-17 16:52 ` [PATCH v2 09/15] gpio: idt3243x: " Schspa Shi
2022-04-17 16:52 ` [PATCH v2 10/15] gpio: hlwd: " Schspa Shi
2022-04-17 16:52 ` [PATCH v2 11/15] gpio: grgpio: " Schspa Shi
2022-04-17 16:52 ` [PATCH v2 12/15] gpio: dwapb: " Schspa Shi
2022-04-17 16:52 ` [PATCH v2 13/15] gpio: cadence: " Schspa Shi
2022-04-17 16:52 ` [PATCH v2 14/15] gpio: brcmstb: " Schspa Shi
2022-04-17 16:52 ` [PATCH v2 15/15] gpio: amdpt: " Schspa Shi
[not found] ` <CAHp75Vc8HwheQVOpcn_Lxk-bOOMLybr=m6OdO7mJ-vE9xywBLg@mail.gmail.com>
2022-04-18 3:07 ` [PATCH] gpio: use raw spinlock for gpio chip shadowed data Schspa Shi
2022-04-18 11:38 ` Andy Shevchenko
2022-04-18 11:39 ` Andy Shevchenko
2022-04-18 15:43 ` Schspa Shi
2022-04-18 19:01 ` Bartosz Golaszewski [this message]
2022-04-19 1:28 ` [PATCH v3] " Schspa Shi
2022-04-19 8:22 ` Andy Shevchenko
2022-04-19 21:57 ` Linus Walleij
2022-04-19 22:30 ` Doug Berger
2022-04-20 9:37 ` Serge Semin
2022-04-25 10:15 ` Bartosz Golaszewski
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='CAMRc=Meo4TbdxQzynb7paDgC7J19Tc6hhKU7du4mZvgP0mynTQ@mail.gmail.com' \
--to=brgl@bgdev.pl \
--cc=andy.shevchenko@gmail.com \
--cc=f.fainelli@gmail.com \
--cc=fancer.lancer@gmail.com \
--cc=hoan@os.amperecomputing.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=schspa@gmail.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;
as well as URLs for NNTP newsgroup(s).