Message ID | 20220328115226.3042322-1-michael@walle.cc (mailing list archive) |
---|---|
Headers | show |
Series | hwmon: introduce hwmon_sanitize() | expand |
> I'm not sure how to handle this correctly, as this touches both the > network tree and the hwmon tree. Also, the GPY PHY temperature senors > driver would use it. There are a few options: 1) Get the hwmon_sanitize_name() merged into hwmon, ask for a stable branch, and get it merged into netdev net-next. 2) Have the hwmon maintainers ACK the change and agree that it can be merged via netdev. Probably the second option is easiest, and since it is not touching the core of hwmon, it is unlikely to cause merge conflicts. Andrew
On 3/28/22 05:56, Andrew Lunn wrote: >> I'm not sure how to handle this correctly, as this touches both the >> network tree and the hwmon tree. Also, the GPY PHY temperature senors >> driver would use it. > > There are a few options: > > 1) Get the hwmon_sanitize_name() merged into hwmon, ask for a stable > branch, and get it merged into netdev net-next. > > 2) Have the hwmon maintainers ACK the change and agree that it can be > merged via netdev. > > Probably the second option is easiest, and since it is not touching > the core of hwmon, it is unlikely to cause merge conflicts. > No, it isn't the easiest solution because it also modifies a hwmon driver to use it. Guenter
Am 2022-03-28 18:27, schrieb Guenter Roeck: > On 3/28/22 05:56, Andrew Lunn wrote: >>> I'm not sure how to handle this correctly, as this touches both the >>> network tree and the hwmon tree. Also, the GPY PHY temperature senors >>> driver would use it. >> >> There are a few options: >> >> 1) Get the hwmon_sanitize_name() merged into hwmon, ask for a stable >> branch, and get it merged into netdev net-next. >> >> 2) Have the hwmon maintainers ACK the change and agree that it can be >> merged via netdev. >> >> Probably the second option is easiest, and since it is not touching >> the core of hwmon, it is unlikely to cause merge conflicts. >> > > No, it isn't the easiest solution because it also modifies a hwmon > driver to use it. So that leaves us with option 1? The next version will contain the additional patch which moves the hwmon_is_bad_char() from the include to the core and make it private. That will then need an immutable branch from netdev to get merged back into hwmon before that patch can be applied, right? -michael
On Tue, 29 Mar 2022 00:50:28 +0200 Michael Walle wrote: > > No, it isn't the easiest solution because it also modifies a hwmon > > driver to use it. > > So that leaves us with option 1? The next version will contain the > additional patch which moves the hwmon_is_bad_char() from the include > to the core and make it private. That will then need an immutable > branch from netdev to get merged back into hwmon before that patch > can be applied, right? If anything immutable branch from hwmon that we can pull, because hwmon is the home of the API, and netdev is just _a_ consumer. Either way I think you can post the patch that adds the new helper for review.
On 3/28/22 15:50, Michael Walle wrote: > Am 2022-03-28 18:27, schrieb Guenter Roeck: >> On 3/28/22 05:56, Andrew Lunn wrote: >>>> I'm not sure how to handle this correctly, as this touches both the >>>> network tree and the hwmon tree. Also, the GPY PHY temperature senors >>>> driver would use it. >>> >>> There are a few options: >>> >>> 1) Get the hwmon_sanitize_name() merged into hwmon, ask for a stable >>> branch, and get it merged into netdev net-next. >>> >>> 2) Have the hwmon maintainers ACK the change and agree that it can be >>> merged via netdev. >>> >>> Probably the second option is easiest, and since it is not touching >>> the core of hwmon, it is unlikely to cause merge conflicts. >>> >> >> No, it isn't the easiest solution because it also modifies a hwmon >> driver to use it. > > So that leaves us with option 1? The next version will contain the > additional patch which moves the hwmon_is_bad_char() from the include > to the core and make it private. That will then need an immutable > branch from netdev to get merged back into hwmon before that patch > can be applied, right? We can not control if someone else starts using the function before it is removed. As pointed out, the immutable branch needs to be from hwmon, and the patch to make hwmon_is_bad_char private can only be applied after all of its users are gone from the mainline kernel. I would actually suggest to allocate the new string as part of the function and have it return a pointer to a new string. Something like char *devm_hwmon_sanitize_name(struct device *dev, const char *name); and char *hwmon_sanitize_name(const char *name); because the string duplication is also part of all calling code. Guenter