From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Ruhl, Michael J" <michael.j.ruhl@intel.com>
Cc: "linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] clkdev: Update clkdev id usage to allow for longer names
Date: Fri, 23 Feb 2024 18:19:44 +0200 [thread overview]
Message-ID: <ZdjFoLP6uqi7JsYy@smile.fi.intel.com> (raw)
In-Reply-To: <DS0PR11MB64245B3F3AB02C32B53F3F64C1552@DS0PR11MB6424.namprd11.prod.outlook.com>
On Fri, Feb 23, 2024 at 04:09:03PM +0000, Ruhl, Michael J wrote:
> >From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> >Sent: Friday, February 23, 2024 10:48 AM
> >On Fri, Feb 23, 2024 at 09:18:14AM -0500, Michael J. Ruhl wrote:
> >> clkdev ID information is limited to arrays of 20 and 16 bytes
> >> (MAX_DEV_ID/MAX_CON_ID). It is possible that the IDs could be
> >> longer that. If so, the lookup will fail because the "real ID"
> >> will not match the copied value.
> >
> >Perhaps you need to add a real example.
>
> How about:
>
> Generating a device name for the I2C Designware module using the PCI
> ID can result in a name of:
>
> i2c_designware.39424
>
> clkdev_create will store:
clkdev_create()
> i2c_designware.3942
>
> The stored name is one off and will not match correctly during probe.
>
> >> Increase the size of the IDs to allow for longer names.
...
> >> -#define MAX_DEV_ID 20
> >> -#define MAX_CON_ID 16
> >> +#define MAX_DEV_ID 32
So with the above example increasing by 4 is enough, right?
Maybe we can be modest for now as it will solve your issue?
#define MAX_DEV_ID 24
> >> +#define MAX_CON_ID 32
> >
> >Do we need to alter both?
>
> It wasn't clear to why there was a difference in sizes. At the moment the CON_ID isn't
> causing me an issue. Shall I drop that part of the change?
I think so.
--
With Best Regards,
Andy Shevchenko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2024-02-23 16:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 14:18 [PATCH] clkdev: Update clkdev id usage to allow for longer names Michael J. Ruhl
2024-02-23 15:48 ` Andy Shevchenko
2024-02-23 16:09 ` Ruhl, Michael J
2024-02-23 16:19 ` Andy Shevchenko [this message]
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=ZdjFoLP6uqi7JsYy@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=michael.j.ruhl@intel.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).