From: Kent Gibson <warthog618@gmail.com>
To: Bartosz Golaszewski <brgl@kernel.org>
Cc: Adrian Ambrozewicz <aambrozewicz@nvidia.com>, linux-gpio@vger.kernel.org
Subject: Re: [PATCH] gpiolib: cdev: don't record a line direction the driver refused
Date: Mon, 19 Oct 2026 22:26:26 +0800 [thread overview]
Message-ID: <20261019142626.GA61014@rigel> (raw)
In-Reply-To: <CAMRc=Mc41umcA5ujMD_YOZUZpfJEvtuE4eBwX0g9nPOAJd7GmA@mail.gmail.com>
On Mon, Oct 19, 2026 at 10:11:06AM -0400, Bartosz Golaszewski wrote:
> On Sun, 18 Oct 2026 06:25:46 +0200, Kent Gibson <warthog618@gmail.com> said:
> > On Fri, Oct 16, 2026 at 05:14:20PM +0800, Kent Gibson wrote:
> >> On Fri, Oct 16, 2026 at 03:23:24AM -0500, Bartosz Golaszewski wrote:
> >> > On Thu, 15 Oct 2026 17:37:14 +0200, Kent Gibson <warthog618@gmail.com> said:
> >
> > Not sure how kosher this is from a kernel perspective, but that is what I was
> > thinking.
> >
>
> There are some instances of casting an int to atomic_t but given the "aligned"
> attribute in its type definition, I'm not sure if this is fine either. There
> are roughly 100 places where desc->flags is dereferenced under drivers/gpio/.
> All of them would require inspection and rework.
>
I did try changing the flags to atomic_long_t, but that made all the existing
atomic bitops complain about the type. :(.
Could we add an alignment attribute to the desc flags to match the atcomic_t
so the cast will be robust?
Alternatively if bitops could be made to work seemlessly with atomic_t...
Cheers,
Kent.
next prev parent reply other threads:[~2026-10-19 14:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 13:49 [PATCH] gpiolib: cdev: don't record a line direction the driver refused Adrian Ambrozewicz
2026-10-12 14:04 ` sashiko-bot
2026-10-14 4:36 ` Kent Gibson
2026-10-15 13:36 ` Bartosz Golaszewski
2026-10-15 15:37 ` Kent Gibson
2026-10-16 7:46 ` Adrian Ambrozewicz
2026-10-16 8:37 ` Kent Gibson
2026-10-16 8:57 ` Bartosz Golaszewski
2026-10-16 9:19 ` Adrian Ambrozewicz
2026-10-16 8:23 ` Bartosz Golaszewski
2026-10-16 9:14 ` Kent Gibson
2026-10-18 4:25 ` Kent Gibson
2026-10-19 14:11 ` Bartosz Golaszewski
2026-10-19 14:26 ` Kent Gibson [this message]
2026-10-19 14:51 ` Bartosz Golaszewski
2026-10-14 4:56 ` Kent Gibson
2026-10-16 7:46 ` Adrian Ambrozewicz
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=20261019142626.GA61014@rigel \
--to=warthog618@gmail.com \
--cc=aambrozewicz@nvidia.com \
--cc=brgl@kernel.org \
--cc=linux-gpio@vger.kernel.org \
/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.