All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Andi Shyti <andi.shyti@kernel.org>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] i2c: dev: clean up registration
Date: Tue, 10 Nov 2026 13:42:29 +0100	[thread overview]
Message-ID: <avMRNeDGriRh6D1N@hovoldconsulting.com> (raw)
In-Reply-To: <avMFCwqx2X6pl4hP@shikoro>

On Tue, Nov 10, 2026 at 12:50:35PM +0100, Wolfram Sang wrote:
> On Thu, Aug 27, 2026 at 12:20:43PM +0200, Johan Hovold wrote:
> > Drop the get_free_i2c_dev() and put_i2c_dev() helpers and do all setup
> > and teardown directly in i2cdev_attach_adapter() and
> > i2cdev_detach_adapter() for consistency and to make the logic clearer.
> > 
> > Note that the device list is only used at detach so the i2c-dev can be
> > added after registering the class device.
> 
> Can we have the last sentence as a comment in the code, too, please?

Sure.
 
> > Signed-off-by: Johan Hovold <johan@kernel.org>
> 
> Other than that, I think this patch is an improvement. The logic is more
> explicit. I didn't like 'put_i2c_dev' having a bool parameter, for
> example.
> 
> So, only patch 1 needs a bigger update, it seems. Rest is looking good
> to me.

I had rejected that Sashiko finding as being too outlandish for us to
have to worry about. As I just in a reply to Bartosz:

	If a malicious actor has physical access to the machine, we have
	bigger problems than worrying about them going out of their way
	to cause a USB hub worker thread to hang. :)

Limiting the critical section can possibly be done as a follow-up, but
it may not even be worth the effort doing that.

Johan

  reply	other threads:[~2026-11-10 12:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27 10:20 [PATCH v2 0/3] i2c: dev: fix blocked adapter deregistration Johan Hovold
2026-08-27 10:20 ` [PATCH v2 1/3] " Johan Hovold
2026-11-09 15:08   ` Bartosz Golaszewski
2026-11-10 12:34     ` Johan Hovold
2026-11-12 11:07   ` Wolfram Sang
2026-08-27 10:20 ` [PATCH v2 2/3] i2c: dev: drop unnecessary sysfs device lookup Johan Hovold
2026-11-09 14:59   ` Bartosz Golaszewski
2026-11-10 11:46   ` Wolfram Sang
2026-11-12 11:07   ` Wolfram Sang
2026-08-27 10:20 ` [PATCH v2 3/3] i2c: dev: clean up registration Johan Hovold
2026-11-09 15:01   ` Bartosz Golaszewski
2026-11-10 11:50   ` Wolfram Sang
2026-11-10 12:42     ` Johan Hovold [this message]
2026-11-10 12:54       ` Bartosz Golaszewski
2026-11-10 13:07         ` Johan Hovold
2026-11-10 20:06           ` Wolfram Sang
2026-11-12 11:08   ` Wolfram Sang
2026-11-04 19:42 ` [PATCH v2 0/3] i2c: dev: fix blocked adapter deregistration Wolfram Sang
2026-11-05  8:18   ` 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=avMRNeDGriRh6D1N@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=andi.shyti@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.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.