[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d7ytkx4ncytkup7pxu4kjxhbh75szwoeafyxg2prem7vfjausj@5ea2nebshemg>
Date: Fri, 25 Oct 2024 16:17:04 +0200
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-pwm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/1] pwm: core: use device_match_name() instead of
strcmp(dev_name(...
Hello Andy,
On Fri, Oct 25, 2024 at 04:04:19PM +0300, Andy Shevchenko wrote:
> On Thu, Oct 24, 2024 at 10:55:36PM +0200, Uwe Kleine-König wrote:
> > On Thu, Oct 24, 2024 at 06:19:05PM +0300, Andy Shevchenko wrote:
>
> ...
>
> > > idr_for_each_entry_ul(&pwm_chips, chip, tmp, id) {
> > > - const char *chip_name = dev_name(pwmchip_parent(chip));
> > > -
> > > - if (chip_name && strcmp(chip_name, name) == 0)
> > > + if (device_match_name(pwmchip_parent(chip), name))
> >
> > This theoretically changes behaviour in a few cases. For example if
> > dev_name(pwmchip_parent(chip)) is NULL the new code would crash. Can
> > this happen?
>
> Please, tell me how
> (looking at the of device_add() and kobject_set_name_vargs() implementations)?
This is unfair, I intended to let you do the work and you just give it
back to me :-)
... a bit later ...
ok, willing to merge if you update the commit log to mention that the
theoretical changes (no check for NULL, more lax check (trailing \n))
don't matter.
Best regards
Uwe
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists