Message ID | 20230407145911.79642-1-krzysztof.kozlowski@linaro.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 87f1c15e8759a006e39ddb7556f6829067f8dc3e |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [1/8] net: netronome: constify pointers to hwmon_channel_info | expand |
On Fri, 7 Apr 2023 16:59:04 +0200 Krzysztof Kozlowski wrote: > This depends on hwmon core patch: > https://lore.kernel.org/all/20230406203103.3011503-2-krzysztof.kozlowski@linaro.org/ That patch should have been put on a stable branch we can pull and avoid any conflict risks... Next time?
On Fri, Apr 07, 2023 at 04:59:04PM +0200, Krzysztof Kozlowski wrote: > Statically allocated array of pointed to hwmon_channel_info can be made > const for safety. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > --- > > This depends on hwmon core patch: > https://lore.kernel.org/all/20230406203103.3011503-2-krzysztof.kozlowski@linaro.org/ > > Therefore I propose this should also go via hwmon tree. > > Cc: Jean Delvare <jdelvare@suse.com> > Cc: Guenter Roeck <linux@roeck-us.net> > Cc: linux-hwmon@vger.kernel.org Subject prefix should be 'nfp: ' Other than that, this looks ok to me. Though I am at a loss as to what tree the patches at the URL above apply to and thus am unable to verify this code in any way other than visually. > --- > drivers/net/ethernet/netronome/nfp/nfp_hwmon.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/netronome/nfp/nfp_hwmon.c b/drivers/net/ethernet/netronome/nfp/nfp_hwmon.c > index 5cabb1aa9c0c..0d6c59d6d4ae 100644 > --- a/drivers/net/ethernet/netronome/nfp/nfp_hwmon.c > +++ b/drivers/net/ethernet/netronome/nfp/nfp_hwmon.c > @@ -115,7 +115,7 @@ static const struct hwmon_channel_info nfp_power = { > .config = nfp_power_config, > }; > > -static const struct hwmon_channel_info *nfp_hwmon_info[] = { > +static const struct hwmon_channel_info * const nfp_hwmon_info[] = { > &nfp_chip, > &nfp_temp, > &nfp_power, > -- > 2.34.1 >
On Fri, Apr 07, 2023 at 08:47:45AM -0700, Jakub Kicinski wrote: > On Fri, 7 Apr 2023 16:59:04 +0200 Krzysztof Kozlowski wrote: > > This depends on hwmon core patch: > > https://lore.kernel.org/all/20230406203103.3011503-2-krzysztof.kozlowski@linaro.org/ > > That patch should have been put on a stable branch we can pull > and avoid any conflict risks... Next time? Yes, and I don't feel comfortable applying all those patches through the hwmon tree since I have zero means to test them. I created a stable branch at git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-const Feel free to use it. Guenter
On Fri, Apr 07, 2023 at 06:07:56PM +0200, Simon Horman wrote: > On Fri, Apr 07, 2023 at 04:59:04PM +0200, Krzysztof Kozlowski wrote: > > Statically allocated array of pointed to hwmon_channel_info can be made > > const for safety. > > > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > > > --- > > > > This depends on hwmon core patch: > > https://lore.kernel.org/all/20230406203103.3011503-2-krzysztof.kozlowski@linaro.org/ > > > > Therefore I propose this should also go via hwmon tree. > > > > Cc: Jean Delvare <jdelvare@suse.com> > > Cc: Guenter Roeck <linux@roeck-us.net> > > Cc: linux-hwmon@vger.kernel.org > > Subject prefix should be 'nfp: ' > > Other than that, this looks ok to me. > Though I am at a loss as to what tree the patches at the URL above apply to > and thus am unable to verify this code in any way other than visually. I've now been able to apply and build the patch on top of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-const Thanks to Guenter for supplying the branch. And thanks to Krzysztof for the patch. My nit about the subject prefix not withstanding, Acked-by: Simon Horman <simon.horman@corigine.com>
On 4/7/23 07:59, Krzysztof Kozlowski wrote: > Statically allocated array of pointed to hwmon_channel_info can be made > const for safety. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > --- > > This depends on hwmon core patch: > https://lore.kernel.org/all/20230406203103.3011503-2-krzysztof.kozlowski@linaro.org/ > > Therefore I propose this should also go via hwmon tree. I am not going to apply patches for 10+ subsystems through the hwmon tree. This can only result in chaos. The dependent patch is available at git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-const or wait until after the next commit window to apply this series. Thanks, Guenter > > Cc: Jean Delvare <jdelvare@suse.com> > Cc: Guenter Roeck <linux@roeck-us.net> > Cc: linux-hwmon@vger.kernel.org > --- > drivers/net/ethernet/netronome/nfp/nfp_hwmon.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/netronome/nfp/nfp_hwmon.c b/drivers/net/ethernet/netronome/nfp/nfp_hwmon.c > index 5cabb1aa9c0c..0d6c59d6d4ae 100644 > --- a/drivers/net/ethernet/netronome/nfp/nfp_hwmon.c > +++ b/drivers/net/ethernet/netronome/nfp/nfp_hwmon.c > @@ -115,7 +115,7 @@ static const struct hwmon_channel_info nfp_power = { > .config = nfp_power_config, > }; > > -static const struct hwmon_channel_info *nfp_hwmon_info[] = { > +static const struct hwmon_channel_info * const nfp_hwmon_info[] = { > &nfp_chip, > &nfp_temp, > &nfp_power,
On Fri, 7 Apr 2023 11:05:06 -0700 Guenter Roeck wrote: > On Fri, Apr 07, 2023 at 08:47:45AM -0700, Jakub Kicinski wrote: > > On Fri, 7 Apr 2023 16:59:04 +0200 Krzysztof Kozlowski wrote: > > > This depends on hwmon core patch: > > > https://lore.kernel.org/all/20230406203103.3011503-2-krzysztof.kozlowski@linaro.org/ > > > > That patch should have been put on a stable branch we can pull > > and avoid any conflict risks... Next time? > > Yes, and I don't feel comfortable applying all those patches through > the hwmon tree since I have zero means to test them. > > I created a stable branch at > > git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-const Thanks! Krzysztof, give us a nod and we'll take the series to net-next.
On 08/04/2023 03:10, Jakub Kicinski wrote: > On Fri, 7 Apr 2023 11:05:06 -0700 Guenter Roeck wrote: >> On Fri, Apr 07, 2023 at 08:47:45AM -0700, Jakub Kicinski wrote: >>> On Fri, 7 Apr 2023 16:59:04 +0200 Krzysztof Kozlowski wrote: >>>> This depends on hwmon core patch: >>>> https://lore.kernel.org/all/20230406203103.3011503-2-krzysztof.kozlowski@linaro.org/ >>> >>> That patch should have been put on a stable branch we can pull >>> and avoid any conflict risks... Next time? >> >> Yes, and I don't feel comfortable applying all those patches through >> the hwmon tree since I have zero means to test them. >> >> I created a stable branch at >> >> git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-const > > Thanks! Krzysztof, give us a nod and we'll take the series to net-next. Sure, go ahead, that's even better solution. Best regards, Krzysztof
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Fri, 7 Apr 2023 16:59:04 +0200 you wrote: > Statically allocated array of pointed to hwmon_channel_info can be made > const for safety. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > --- > > [...] Here is the summary with links: - [1/8] net: netronome: constify pointers to hwmon_channel_info https://git.kernel.org/netdev/net-next/c/87f1c15e8759 - [2/8] net: aquantia: constify pointers to hwmon_channel_info https://git.kernel.org/netdev/net-next/c/bc1585f611b2 - [3/8] net: phy: aquantia: constify pointers to hwmon_channel_info https://git.kernel.org/netdev/net-next/c/234d79a5f826 - [4/8] net: phy: bcm54140: constify pointers to hwmon_channel_info https://git.kernel.org/netdev/net-next/c/211f70be2577 - [5/8] net: phy: marvell: constify pointers to hwmon_channel_info https://git.kernel.org/netdev/net-next/c/ff0805e2bde0 - [6/8] net: phy: mxl: constify pointers to hwmon_channel_info https://git.kernel.org/netdev/net-next/c/2ed84c0c6f75 - [7/8] net: phy: nxp-tja11xx: constify pointers to hwmon_channel_info https://git.kernel.org/netdev/net-next/c/0e76f1dcf487 - [8/8] net: phy: sfp: constify pointers to hwmon_channel_info https://git.kernel.org/netdev/net-next/c/490fde262f17 You are awesome, thank you!
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_hwmon.c b/drivers/net/ethernet/netronome/nfp/nfp_hwmon.c index 5cabb1aa9c0c..0d6c59d6d4ae 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_hwmon.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_hwmon.c @@ -115,7 +115,7 @@ static const struct hwmon_channel_info nfp_power = { .config = nfp_power_config, }; -static const struct hwmon_channel_info *nfp_hwmon_info[] = { +static const struct hwmon_channel_info * const nfp_hwmon_info[] = { &nfp_chip, &nfp_temp, &nfp_power,
Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- This depends on hwmon core patch: https://lore.kernel.org/all/20230406203103.3011503-2-krzysztof.kozlowski@linaro.org/ Therefore I propose this should also go via hwmon tree. Cc: Jean Delvare <jdelvare@suse.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: linux-hwmon@vger.kernel.org --- drivers/net/ethernet/netronome/nfp/nfp_hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)