Re: [PATCH v2] regulator: event: Add regulator netlink event support
From: Naresh Solanki
Date: Mon Nov 27 2023 - 14:58:52 EST
Hi Mark,
On Mon, 27 Nov 2023 at 19:45, Mark Brown <broonie@xxxxxxxxxx> wrote:
>
> On Mon, Nov 27, 2023 at 04:07:45PM +0530, Naresh Solanki wrote:
> > On Thu, 23 Nov 2023 at 18:27, Mark Brown <broonie@xxxxxxxxxx> wrote:
>
> > > I'm also not clear on where the 15 byte limit comes from.
>
> > I felt 15 characters would be sufficient for regulator names.
> > Would need your inputs to make sure here.
>
> It does feel like it might be a bit tight - perhaps double it?
Sure. Will change to 32.
Also there is a possibility of regulator name duplication.
And below mechanism is already used in debugfs:
const char *rname = rdev_get_name(rdev);
char name[NAME_MAX];
/* Avoid duplicate debugfs directory names */
if (parent && rname == rdev->desc->name) {
snprintf(name, sizeof(name), "%s-%s", dev_name(parent),
rname);
rname = name;
}
I need recommendations here.
Regards,
Naresh