* [PATCH 1/2] drm/i915: constify pointers to hwmon_channel_info
@ 2023-04-07 15:00 ` Krzysztof Kozlowski
0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-07 15:00 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
David Airlie, Daniel Vetter, Ben Skeggs, Karol Herbst, Lyude Paul,
intel-gfx, dri-devel, linux-kernel, nouveau
Cc: Krzysztof Kozlowski, Jean Delvare, Guenter Roeck, linux-hwmon
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/gpu/drm/i915/i915_hwmon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c
index 596dd2c07010..87b527a54272 100644
--- a/drivers/gpu/drm/i915/i915_hwmon.c
+++ b/drivers/gpu/drm/i915/i915_hwmon.c
@@ -267,7 +267,7 @@ static const struct attribute_group *hwm_groups[] = {
NULL
};
-static const struct hwmon_channel_info *hwm_info[] = {
+static const struct hwmon_channel_info * const hwm_info[] = {
HWMON_CHANNEL_INFO(in, HWMON_I_INPUT),
HWMON_CHANNEL_INFO(power, HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_CRIT),
HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT),
@@ -275,7 +275,7 @@ static const struct hwmon_channel_info *hwm_info[] = {
NULL
};
-static const struct hwmon_channel_info *hwm_gt_info[] = {
+static const struct hwmon_channel_info * const hwm_gt_info[] = {
HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT),
NULL
};
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Nouveau] [PATCH 1/2] drm/i915: constify pointers to hwmon_channel_info
@ 2023-04-07 15:00 ` Krzysztof Kozlowski
0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-07 15:00 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
David Airlie, Daniel Vetter, Ben Skeggs, Karol Herbst, Lyude Paul,
intel-gfx, dri-devel, linux-kernel, nouveau
Cc: linux-hwmon, Krzysztof Kozlowski, Jean Delvare, Guenter Roeck
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/gpu/drm/i915/i915_hwmon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c
index 596dd2c07010..87b527a54272 100644
--- a/drivers/gpu/drm/i915/i915_hwmon.c
+++ b/drivers/gpu/drm/i915/i915_hwmon.c
@@ -267,7 +267,7 @@ static const struct attribute_group *hwm_groups[] = {
NULL
};
-static const struct hwmon_channel_info *hwm_info[] = {
+static const struct hwmon_channel_info * const hwm_info[] = {
HWMON_CHANNEL_INFO(in, HWMON_I_INPUT),
HWMON_CHANNEL_INFO(power, HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_CRIT),
HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT),
@@ -275,7 +275,7 @@ static const struct hwmon_channel_info *hwm_info[] = {
NULL
};
-static const struct hwmon_channel_info *hwm_gt_info[] = {
+static const struct hwmon_channel_info * const hwm_gt_info[] = {
HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT),
NULL
};
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 1/2] drm/i915: constify pointers to hwmon_channel_info
@ 2023-04-07 15:00 ` Krzysztof Kozlowski
0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-07 15:00 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
David Airlie, Daniel Vetter, Ben Skeggs, Karol Herbst, Lyude Paul,
intel-gfx, dri-devel, linux-kernel, nouveau
Cc: linux-hwmon, Krzysztof Kozlowski, Jean Delvare, Guenter Roeck
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/gpu/drm/i915/i915_hwmon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c
index 596dd2c07010..87b527a54272 100644
--- a/drivers/gpu/drm/i915/i915_hwmon.c
+++ b/drivers/gpu/drm/i915/i915_hwmon.c
@@ -267,7 +267,7 @@ static const struct attribute_group *hwm_groups[] = {
NULL
};
-static const struct hwmon_channel_info *hwm_info[] = {
+static const struct hwmon_channel_info * const hwm_info[] = {
HWMON_CHANNEL_INFO(in, HWMON_I_INPUT),
HWMON_CHANNEL_INFO(power, HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_CRIT),
HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT),
@@ -275,7 +275,7 @@ static const struct hwmon_channel_info *hwm_info[] = {
NULL
};
-static const struct hwmon_channel_info *hwm_gt_info[] = {
+static const struct hwmon_channel_info * const hwm_gt_info[] = {
HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT),
NULL
};
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/2] drm/nouveau: constify pointers to hwmon_channel_info
2023-04-07 15:00 ` [Nouveau] " Krzysztof Kozlowski
(?)
@ 2023-04-07 15:00 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-07 15:00 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
David Airlie, Daniel Vetter, Ben Skeggs, Karol Herbst, Lyude Paul,
intel-gfx, dri-devel, linux-kernel, nouveau
Cc: Krzysztof Kozlowski, Jean Delvare, Guenter Roeck, linux-hwmon
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/gpu/drm/nouveau/nouveau_hwmon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
index e844be49e11e..db30a4c2cd4d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
@@ -211,7 +211,7 @@ static const struct attribute_group temp1_auto_point_sensor_group = {
#define N_ATTR_GROUPS 3
-static const struct hwmon_channel_info *nouveau_info[] = {
+static const struct hwmon_channel_info * const nouveau_info[] = {
HWMON_CHANNEL_INFO(chip,
HWMON_C_UPDATE_INTERVAL),
HWMON_CHANNEL_INFO(temp,
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Nouveau] [PATCH 2/2] drm/nouveau: constify pointers to hwmon_channel_info
@ 2023-04-07 15:00 ` Krzysztof Kozlowski
0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-07 15:00 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
David Airlie, Daniel Vetter, Ben Skeggs, Karol Herbst, Lyude Paul,
intel-gfx, dri-devel, linux-kernel, nouveau
Cc: linux-hwmon, Krzysztof Kozlowski, Jean Delvare, Guenter Roeck
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/gpu/drm/nouveau/nouveau_hwmon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
index e844be49e11e..db30a4c2cd4d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
@@ -211,7 +211,7 @@ static const struct attribute_group temp1_auto_point_sensor_group = {
#define N_ATTR_GROUPS 3
-static const struct hwmon_channel_info *nouveau_info[] = {
+static const struct hwmon_channel_info * const nouveau_info[] = {
HWMON_CHANNEL_INFO(chip,
HWMON_C_UPDATE_INTERVAL),
HWMON_CHANNEL_INFO(temp,
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/2] drm/nouveau: constify pointers to hwmon_channel_info
@ 2023-04-07 15:00 ` Krzysztof Kozlowski
0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-07 15:00 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
David Airlie, Daniel Vetter, Ben Skeggs, Karol Herbst, Lyude Paul,
intel-gfx, dri-devel, linux-kernel, nouveau
Cc: linux-hwmon, Krzysztof Kozlowski, Jean Delvare, Guenter Roeck
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/gpu/drm/nouveau/nouveau_hwmon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
index e844be49e11e..db30a4c2cd4d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
@@ -211,7 +211,7 @@ static const struct attribute_group temp1_auto_point_sensor_group = {
#define N_ATTR_GROUPS 3
-static const struct hwmon_channel_info *nouveau_info[] = {
+static const struct hwmon_channel_info * const nouveau_info[] = {
HWMON_CHANNEL_INFO(chip,
HWMON_C_UPDATE_INTERVAL),
HWMON_CHANNEL_INFO(temp,
--
2.34.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] drm/nouveau: constify pointers to hwmon_channel_info
2023-04-07 15:00 ` [Nouveau] " Krzysztof Kozlowski
(?)
(?)
@ 2023-04-07 18:22 ` kernel test robot
-1 siblings, 0 replies; 18+ messages in thread
From: kernel test robot @ 2023-04-07 18:22 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: oe-kbuild-all
Hi Krzysztof,
kernel test robot noticed the following build warnings:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.3-rc5 next-20230406]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Krzysztof-Kozlowski/drm-nouveau-constify-pointers-to-hwmon_channel_info/20230407-230201
base: git://anongit.freedesktop.org/drm-intel for-linux-next
patch link: https://lore.kernel.org/r/20230407150031.79749-2-krzysztof.kozlowski%40linaro.org
patch subject: [PATCH 2/2] drm/nouveau: constify pointers to hwmon_channel_info
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20230408/202304080218.aBY9i9gk-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/277cad3231afacf354d188d998acac86f0b645b8
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Krzysztof-Kozlowski/drm-nouveau-constify-pointers-to-hwmon_channel_info/20230407-230201
git checkout 277cad3231afacf354d188d998acac86f0b645b8
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/gpu/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304080218.aBY9i9gk-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/nouveau/nouveau_hwmon.c:658:17: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
658 | .info = nouveau_info,
| ^~~~~~~~~~~~
vim +/const +658 drivers/gpu/drm/nouveau/nouveau_hwmon.c
dbddaaf083e255 drivers/gpu/drm/nouveau/nouveau_hwmon.c Oscar Salvador 2017-05-18 655
dbddaaf083e255 drivers/gpu/drm/nouveau/nouveau_hwmon.c Oscar Salvador 2017-05-18 656 static const struct hwmon_chip_info nouveau_chip_info = {
dbddaaf083e255 drivers/gpu/drm/nouveau/nouveau_hwmon.c Oscar Salvador 2017-05-18 657 .ops = &nouveau_hwmon_ops,
dbddaaf083e255 drivers/gpu/drm/nouveau/nouveau_hwmon.c Oscar Salvador 2017-05-18 @658 .info = nouveau_info,
dbddaaf083e255 drivers/gpu/drm/nouveau/nouveau_hwmon.c Oscar Salvador 2017-05-18 659 };
b54262f3c828ee drivers/gpu/drm/nouveau/nouveau_pm.c Martin Peres 2010-10-26 660 #endif
34e9d85a1aae28 drivers/gpu/drm/nouveau/nouveau_pm.c Martin Peres 2010-09-22 661
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915: constify pointers to hwmon_channel_info
2023-04-07 15:00 ` [Nouveau] " Krzysztof Kozlowski
` (2 preceding siblings ...)
(?)
@ 2023-04-07 18:54 ` kernel test robot
-1 siblings, 0 replies; 18+ messages in thread
From: kernel test robot @ 2023-04-07 18:54 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: llvm, oe-kbuild-all
Hi Krzysztof,
kernel test robot noticed the following build errors:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.3-rc5 next-20230406]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Krzysztof-Kozlowski/drm-nouveau-constify-pointers-to-hwmon_channel_info/20230407-230201
base: git://anongit.freedesktop.org/drm-intel for-linux-next
patch link: https://lore.kernel.org/r/20230407150031.79749-1-krzysztof.kozlowski%40linaro.org
patch subject: [PATCH 1/2] drm/i915: constify pointers to hwmon_channel_info
config: i386-randconfig-a002-20230403 (https://download.01.org/0day-ci/archive/20230408/202304080226.gWUGJ4GU-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/fc5ea3eef62b29fa9968510db0401656ebce03cc
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Krzysztof-Kozlowski/drm-nouveau-constify-pointers-to-hwmon_channel_info/20230407-230201
git checkout fc5ea3eef62b29fa9968510db0401656ebce03cc
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/i915/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304080226.gWUGJ4GU-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/i915/i915_hwmon.c:617:10: error: initializing 'const struct hwmon_channel_info **' with an expression of type 'const struct hwmon_channel_info *const[5]' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
.info = hwm_info,
^~~~~~~~
drivers/gpu/drm/i915/i915_hwmon.c:655:10: error: initializing 'const struct hwmon_channel_info **' with an expression of type 'const struct hwmon_channel_info *const[2]' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
.info = hwm_gt_info,
^~~~~~~~~~~
2 errors generated.
vim +617 drivers/gpu/drm/i915/i915_hwmon.c
b3b088e28183b8 Dale B Stimson 2022-10-13 614
b3b088e28183b8 Dale B Stimson 2022-10-13 615 static const struct hwmon_chip_info hwm_chip_info = {
b3b088e28183b8 Dale B Stimson 2022-10-13 616 .ops = &hwm_ops,
b3b088e28183b8 Dale B Stimson 2022-10-13 @617 .info = hwm_info,
b3b088e28183b8 Dale B Stimson 2022-10-13 618 };
b3b088e28183b8 Dale B Stimson 2022-10-13 619
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915: constify pointers to hwmon_channel_info
2023-04-07 15:00 ` [Nouveau] " Krzysztof Kozlowski
` (3 preceding siblings ...)
(?)
@ 2023-04-07 19:04 ` kernel test robot
-1 siblings, 0 replies; 18+ messages in thread
From: kernel test robot @ 2023-04-07 19:04 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: oe-kbuild-all
Hi Krzysztof,
kernel test robot noticed the following build errors:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.3-rc5 next-20230406]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Krzysztof-Kozlowski/drm-nouveau-constify-pointers-to-hwmon_channel_info/20230407-230201
base: git://anongit.freedesktop.org/drm-intel for-linux-next
patch link: https://lore.kernel.org/r/20230407150031.79749-1-krzysztof.kozlowski%40linaro.org
patch subject: [PATCH 1/2] drm/i915: constify pointers to hwmon_channel_info
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20230408/202304080229.raDEQ2P6-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/fc5ea3eef62b29fa9968510db0401656ebce03cc
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Krzysztof-Kozlowski/drm-nouveau-constify-pointers-to-hwmon_channel_info/20230407-230201
git checkout fc5ea3eef62b29fa9968510db0401656ebce03cc
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/i915/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304080229.raDEQ2P6-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/i915/i915_hwmon.c:617:17: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
617 | .info = hwm_info,
| ^~~~~~~~
drivers/gpu/drm/i915/i915_hwmon.c:655:17: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
655 | .info = hwm_gt_info,
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/const +617 drivers/gpu/drm/i915/i915_hwmon.c
b3b088e28183b8 Dale B Stimson 2022-10-13 614
b3b088e28183b8 Dale B Stimson 2022-10-13 615 static const struct hwmon_chip_info hwm_chip_info = {
b3b088e28183b8 Dale B Stimson 2022-10-13 616 .ops = &hwm_ops,
b3b088e28183b8 Dale B Stimson 2022-10-13 @617 .info = hwm_info,
b3b088e28183b8 Dale B Stimson 2022-10-13 618 };
b3b088e28183b8 Dale B Stimson 2022-10-13 619
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915: constify pointers to hwmon_channel_info
2023-04-07 15:00 ` [Nouveau] " Krzysztof Kozlowski
` (4 preceding siblings ...)
(?)
@ 2023-04-07 19:04 ` kernel test robot
-1 siblings, 0 replies; 18+ messages in thread
From: kernel test robot @ 2023-04-07 19:04 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: oe-kbuild-all
Hi Krzysztof,
kernel test robot noticed the following build warnings:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.3-rc5 next-20230406]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Krzysztof-Kozlowski/drm-nouveau-constify-pointers-to-hwmon_channel_info/20230407-230201
base: git://anongit.freedesktop.org/drm-intel for-linux-next
patch link: https://lore.kernel.org/r/20230407150031.79749-1-krzysztof.kozlowski%40linaro.org
patch subject: [PATCH 1/2] drm/i915: constify pointers to hwmon_channel_info
config: x86_64-randconfig-a012-20230403 (https://download.01.org/0day-ci/archive/20230408/202304080312.K2F23gGg-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/fc5ea3eef62b29fa9968510db0401656ebce03cc
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Krzysztof-Kozlowski/drm-nouveau-constify-pointers-to-hwmon_channel_info/20230407-230201
git checkout fc5ea3eef62b29fa9968510db0401656ebce03cc
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/i915/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304080312.K2F23gGg-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/i915/i915_hwmon.c:617:17: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
617 | .info = hwm_info,
| ^~~~~~~~
drivers/gpu/drm/i915/i915_hwmon.c:655:17: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
655 | .info = hwm_gt_info,
| ^~~~~~~~~~~
vim +/const +617 drivers/gpu/drm/i915/i915_hwmon.c
b3b088e28183b8 Dale B Stimson 2022-10-13 614
b3b088e28183b8 Dale B Stimson 2022-10-13 615 static const struct hwmon_chip_info hwm_chip_info = {
b3b088e28183b8 Dale B Stimson 2022-10-13 616 .ops = &hwm_ops,
b3b088e28183b8 Dale B Stimson 2022-10-13 @617 .info = hwm_info,
b3b088e28183b8 Dale B Stimson 2022-10-13 618 };
b3b088e28183b8 Dale B Stimson 2022-10-13 619
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Intel-gfx] [PATCH 1/2] drm/i915: constify pointers to hwmon_channel_info
2023-04-07 15:00 ` [Nouveau] " Krzysztof Kozlowski
(?)
(?)
@ 2023-04-11 9:27 ` Jani Nikula
-1 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2023-04-11 9:27 UTC (permalink / raw)
To: Krzysztof Kozlowski, Joonas Lahtinen, Rodrigo Vivi,
Tvrtko Ursulin, David Airlie, Daniel Vetter, Ben Skeggs,
Karol Herbst, Lyude Paul, intel-gfx, dri-devel, linux-kernel,
nouveau
Cc: linux-hwmon, Krzysztof Kozlowski, Jean Delvare, Guenter Roeck
On Fri, 07 Apr 2023, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 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.
Thanks for doing this, I couldn't be bothered to follow through with it
[1].
Acked-by: Jani Nikula <jani.nikula@intel.com>
[1] https://lore.kernel.org/r/20230309082841.400118-1-jani.nikula@intel.com
>
> Cc: Jean Delvare <jdelvare@suse.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: linux-hwmon@vger.kernel.org
> ---
> drivers/gpu/drm/i915/i915_hwmon.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c
> index 596dd2c07010..87b527a54272 100644
> --- a/drivers/gpu/drm/i915/i915_hwmon.c
> +++ b/drivers/gpu/drm/i915/i915_hwmon.c
> @@ -267,7 +267,7 @@ static const struct attribute_group *hwm_groups[] = {
> NULL
> };
>
> -static const struct hwmon_channel_info *hwm_info[] = {
> +static const struct hwmon_channel_info * const hwm_info[] = {
> HWMON_CHANNEL_INFO(in, HWMON_I_INPUT),
> HWMON_CHANNEL_INFO(power, HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_CRIT),
> HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT),
> @@ -275,7 +275,7 @@ static const struct hwmon_channel_info *hwm_info[] = {
> NULL
> };
>
> -static const struct hwmon_channel_info *hwm_gt_info[] = {
> +static const struct hwmon_channel_info * const hwm_gt_info[] = {
> HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT),
> NULL
> };
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915: constify pointers to hwmon_channel_info
@ 2023-04-11 9:27 ` Jani Nikula
0 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2023-04-11 9:27 UTC (permalink / raw)
To: Krzysztof Kozlowski, Joonas Lahtinen, Rodrigo Vivi,
Tvrtko Ursulin, David Airlie, Daniel Vetter, Ben Skeggs,
Karol Herbst, Lyude Paul, intel-gfx, dri-devel, linux-kernel,
nouveau
Cc: Krzysztof Kozlowski, Jean Delvare, Guenter Roeck, linux-hwmon
On Fri, 07 Apr 2023, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 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.
Thanks for doing this, I couldn't be bothered to follow through with it
[1].
Acked-by: Jani Nikula <jani.nikula@intel.com>
[1] https://lore.kernel.org/r/20230309082841.400118-1-jani.nikula@intel.com
>
> Cc: Jean Delvare <jdelvare@suse.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: linux-hwmon@vger.kernel.org
> ---
> drivers/gpu/drm/i915/i915_hwmon.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c
> index 596dd2c07010..87b527a54272 100644
> --- a/drivers/gpu/drm/i915/i915_hwmon.c
> +++ b/drivers/gpu/drm/i915/i915_hwmon.c
> @@ -267,7 +267,7 @@ static const struct attribute_group *hwm_groups[] = {
> NULL
> };
>
> -static const struct hwmon_channel_info *hwm_info[] = {
> +static const struct hwmon_channel_info * const hwm_info[] = {
> HWMON_CHANNEL_INFO(in, HWMON_I_INPUT),
> HWMON_CHANNEL_INFO(power, HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_CRIT),
> HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT),
> @@ -275,7 +275,7 @@ static const struct hwmon_channel_info *hwm_info[] = {
> NULL
> };
>
> -static const struct hwmon_channel_info *hwm_gt_info[] = {
> +static const struct hwmon_channel_info * const hwm_gt_info[] = {
> HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT),
> NULL
> };
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Nouveau] [PATCH 1/2] drm/i915: constify pointers to hwmon_channel_info
@ 2023-04-11 9:27 ` Jani Nikula
0 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2023-04-11 9:27 UTC (permalink / raw)
To: Krzysztof Kozlowski, Joonas Lahtinen, Rodrigo Vivi,
Tvrtko Ursulin, David Airlie, Daniel Vetter, Ben Skeggs,
Karol Herbst, Lyude Paul, intel-gfx, dri-devel, linux-kernel,
nouveau
Cc: linux-hwmon, Krzysztof Kozlowski, Jean Delvare, Guenter Roeck
On Fri, 07 Apr 2023, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 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.
Thanks for doing this, I couldn't be bothered to follow through with it
[1].
Acked-by: Jani Nikula <jani.nikula@intel.com>
[1] https://lore.kernel.org/r/20230309082841.400118-1-jani.nikula@intel.com
>
> Cc: Jean Delvare <jdelvare@suse.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: linux-hwmon@vger.kernel.org
> ---
> drivers/gpu/drm/i915/i915_hwmon.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c
> index 596dd2c07010..87b527a54272 100644
> --- a/drivers/gpu/drm/i915/i915_hwmon.c
> +++ b/drivers/gpu/drm/i915/i915_hwmon.c
> @@ -267,7 +267,7 @@ static const struct attribute_group *hwm_groups[] = {
> NULL
> };
>
> -static const struct hwmon_channel_info *hwm_info[] = {
> +static const struct hwmon_channel_info * const hwm_info[] = {
> HWMON_CHANNEL_INFO(in, HWMON_I_INPUT),
> HWMON_CHANNEL_INFO(power, HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_CRIT),
> HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT),
> @@ -275,7 +275,7 @@ static const struct hwmon_channel_info *hwm_info[] = {
> NULL
> };
>
> -static const struct hwmon_channel_info *hwm_gt_info[] = {
> +static const struct hwmon_channel_info * const hwm_gt_info[] = {
> HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT),
> NULL
> };
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915: constify pointers to hwmon_channel_info
@ 2023-04-11 9:27 ` Jani Nikula
0 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2023-04-11 9:27 UTC (permalink / raw)
To: Krzysztof Kozlowski, Joonas Lahtinen, Rodrigo Vivi,
Tvrtko Ursulin, David Airlie, Daniel Vetter, Ben Skeggs,
Karol Herbst, Lyude Paul, intel-gfx, dri-devel, linux-kernel,
nouveau
Cc: linux-hwmon, Krzysztof Kozlowski, Jean Delvare, Guenter Roeck
On Fri, 07 Apr 2023, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 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.
Thanks for doing this, I couldn't be bothered to follow through with it
[1].
Acked-by: Jani Nikula <jani.nikula@intel.com>
[1] https://lore.kernel.org/r/20230309082841.400118-1-jani.nikula@intel.com
>
> Cc: Jean Delvare <jdelvare@suse.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: linux-hwmon@vger.kernel.org
> ---
> drivers/gpu/drm/i915/i915_hwmon.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c
> index 596dd2c07010..87b527a54272 100644
> --- a/drivers/gpu/drm/i915/i915_hwmon.c
> +++ b/drivers/gpu/drm/i915/i915_hwmon.c
> @@ -267,7 +267,7 @@ static const struct attribute_group *hwm_groups[] = {
> NULL
> };
>
> -static const struct hwmon_channel_info *hwm_info[] = {
> +static const struct hwmon_channel_info * const hwm_info[] = {
> HWMON_CHANNEL_INFO(in, HWMON_I_INPUT),
> HWMON_CHANNEL_INFO(power, HWMON_P_MAX | HWMON_P_RATED_MAX | HWMON_P_CRIT),
> HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT),
> @@ -275,7 +275,7 @@ static const struct hwmon_channel_info *hwm_info[] = {
> NULL
> };
>
> -static const struct hwmon_channel_info *hwm_gt_info[] = {
> +static const struct hwmon_channel_info * const hwm_gt_info[] = {
> HWMON_CHANNEL_INFO(energy, HWMON_E_INPUT),
> NULL
> };
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Intel-gfx] [PATCH 2/2] drm/nouveau: constify pointers to hwmon_channel_info
2023-04-07 15:00 ` [Nouveau] " Krzysztof Kozlowski
(?)
(?)
@ 2023-04-13 20:50 ` Lyude Paul
-1 siblings, 0 replies; 18+ messages in thread
From: Lyude Paul @ 2023-04-13 20:50 UTC (permalink / raw)
To: Krzysztof Kozlowski, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Tvrtko Ursulin, David Airlie, Daniel Vetter, Ben Skeggs,
Karol Herbst, intel-gfx, dri-devel, linux-kernel, nouveau
Cc: linux-hwmon, Jean Delvare, Guenter Roeck
Reviewed-by: Lyude Paul <lyude@redhat.com>
On Fri, 2023-04-07 at 17:00 +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
> ---
> drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> index e844be49e11e..db30a4c2cd4d 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> @@ -211,7 +211,7 @@ static const struct attribute_group temp1_auto_point_sensor_group = {
>
> #define N_ATTR_GROUPS 3
>
> -static const struct hwmon_channel_info *nouveau_info[] = {
> +static const struct hwmon_channel_info * const nouveau_info[] = {
> HWMON_CHANNEL_INFO(chip,
> HWMON_C_UPDATE_INTERVAL),
> HWMON_CHANNEL_INFO(temp,
--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] drm/nouveau: constify pointers to hwmon_channel_info
@ 2023-04-13 20:50 ` Lyude Paul
0 siblings, 0 replies; 18+ messages in thread
From: Lyude Paul @ 2023-04-13 20:50 UTC (permalink / raw)
To: Krzysztof Kozlowski, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Tvrtko Ursulin, David Airlie, Daniel Vetter, Ben Skeggs,
Karol Herbst, intel-gfx, dri-devel, linux-kernel, nouveau
Cc: Jean Delvare, Guenter Roeck, linux-hwmon
Reviewed-by: Lyude Paul <lyude@redhat.com>
On Fri, 2023-04-07 at 17:00 +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
> ---
> drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> index e844be49e11e..db30a4c2cd4d 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> @@ -211,7 +211,7 @@ static const struct attribute_group temp1_auto_point_sensor_group = {
>
> #define N_ATTR_GROUPS 3
>
> -static const struct hwmon_channel_info *nouveau_info[] = {
> +static const struct hwmon_channel_info * const nouveau_info[] = {
> HWMON_CHANNEL_INFO(chip,
> HWMON_C_UPDATE_INTERVAL),
> HWMON_CHANNEL_INFO(temp,
--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Nouveau] [PATCH 2/2] drm/nouveau: constify pointers to hwmon_channel_info
@ 2023-04-13 20:50 ` Lyude Paul
0 siblings, 0 replies; 18+ messages in thread
From: Lyude Paul @ 2023-04-13 20:50 UTC (permalink / raw)
To: Krzysztof Kozlowski, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Tvrtko Ursulin, David Airlie, Daniel Vetter, Ben Skeggs,
Karol Herbst, intel-gfx, dri-devel, linux-kernel, nouveau
Cc: linux-hwmon, Jean Delvare, Guenter Roeck
Reviewed-by: Lyude Paul <lyude@redhat.com>
On Fri, 2023-04-07 at 17:00 +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
> ---
> drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> index e844be49e11e..db30a4c2cd4d 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> @@ -211,7 +211,7 @@ static const struct attribute_group temp1_auto_point_sensor_group = {
>
> #define N_ATTR_GROUPS 3
>
> -static const struct hwmon_channel_info *nouveau_info[] = {
> +static const struct hwmon_channel_info * const nouveau_info[] = {
> HWMON_CHANNEL_INFO(chip,
> HWMON_C_UPDATE_INTERVAL),
> HWMON_CHANNEL_INFO(temp,
--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] drm/nouveau: constify pointers to hwmon_channel_info
@ 2023-04-13 20:50 ` Lyude Paul
0 siblings, 0 replies; 18+ messages in thread
From: Lyude Paul @ 2023-04-13 20:50 UTC (permalink / raw)
To: Krzysztof Kozlowski, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Tvrtko Ursulin, David Airlie, Daniel Vetter, Ben Skeggs,
Karol Herbst, intel-gfx, dri-devel, linux-kernel, nouveau
Cc: linux-hwmon, Jean Delvare, Guenter Roeck
Reviewed-by: Lyude Paul <lyude@redhat.com>
On Fri, 2023-04-07 at 17:00 +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
> ---
> drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> index e844be49e11e..db30a4c2cd4d 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> @@ -211,7 +211,7 @@ static const struct attribute_group temp1_auto_point_sensor_group = {
>
> #define N_ATTR_GROUPS 3
>
> -static const struct hwmon_channel_info *nouveau_info[] = {
> +static const struct hwmon_channel_info * const nouveau_info[] = {
> HWMON_CHANNEL_INFO(chip,
> HWMON_C_UPDATE_INTERVAL),
> HWMON_CHANNEL_INFO(temp,
--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2023-05-04 12:34 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-07 15:00 [PATCH 1/2] drm/i915: constify pointers to hwmon_channel_info Krzysztof Kozlowski
2023-04-07 15:00 ` Krzysztof Kozlowski
2023-04-07 15:00 ` [Nouveau] " Krzysztof Kozlowski
2023-04-07 15:00 ` [PATCH 2/2] drm/nouveau: " Krzysztof Kozlowski
2023-04-07 15:00 ` Krzysztof Kozlowski
2023-04-07 15:00 ` [Nouveau] " Krzysztof Kozlowski
2023-04-07 18:22 ` kernel test robot
2023-04-13 20:50 ` [Intel-gfx] " Lyude Paul
2023-04-13 20:50 ` Lyude Paul
2023-04-13 20:50 ` [Nouveau] " Lyude Paul
2023-04-13 20:50 ` Lyude Paul
2023-04-07 18:54 ` [PATCH 1/2] drm/i915: " kernel test robot
2023-04-07 19:04 ` kernel test robot
2023-04-07 19:04 ` kernel test robot
2023-04-11 9:27 ` [Intel-gfx] " Jani Nikula
2023-04-11 9:27 ` Jani Nikula
2023-04-11 9:27 ` [Nouveau] " Jani Nikula
2023-04-11 9:27 ` Jani Nikula
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.