* drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2024-11-12 11:11 kernel test robot
2024-11-20 7:51 ` [PATCH] platform/mellanox: mlxbf-pmc: incorrect type in assignment Pei Xiao
0 siblings, 1 reply; 9+ messages in thread
From: kernel test robot @ 2024-11-12 11:11 UTC (permalink / raw)
To: Shravan Kumar Ramani
Cc: oe-kbuild-all, linux-kernel, Hans de Goede, Vadim Pasternak,
David Thompson
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2d5404caa8c7bb5c4e0435f94b28834ae5456623
commit: 423c3361855c1e81f1cb91728a2ac5ddfd2cbf16 platform/mellanox: mlxbf-pmc: Add support for BlueField-3
date: 1 year, 2 months ago
config: arm64-randconfig-r112-20241112 (https://download.01.org/0day-ci/archive/20241112/202411121935.cgFcEMO4-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20241112/202411121935.cgFcEMO4-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411121935.cgFcEMO4-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: got void [noderef] __iomem *
>> drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: got void [noderef] __iomem *
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: got void [noderef] __iomem *
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: got void *addr
vim +1172 drivers/platform/mellanox/mlxbf-pmc.c
1163
1164 /* Method to handle crspace counter programming */
1165 static int mlxbf_pmc_program_crspace_counter(int blk_num, uint32_t cnt_num,
1166 uint32_t evt)
1167 {
1168 uint32_t word;
1169 void *addr;
1170 int ret;
1171
> 1172 addr = pmc->block[blk_num].mmio_base +
1173 (rounddown(cnt_num, 2) * MLXBF_PMC_CRSPACE_PERFSEL_SZ);
> 1174 ret = mlxbf_pmc_readl(addr, &word);
1175 if (ret)
1176 return ret;
1177
1178 if (cnt_num % 2) {
1179 word &= ~MLXBF_PMC_CRSPACE_PERFSEL1;
1180 word |= FIELD_PREP(MLXBF_PMC_CRSPACE_PERFSEL1, evt);
1181 } else {
1182 word &= ~MLXBF_PMC_CRSPACE_PERFSEL0;
1183 word |= FIELD_PREP(MLXBF_PMC_CRSPACE_PERFSEL0, evt);
1184 }
1185
1186 return mlxbf_pmc_write(addr, MLXBF_PMC_WRITE_REG_32, word);
1187 }
1188
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH] platform/mellanox: mlxbf-pmc: incorrect type in assignment
2024-11-12 11:11 drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: sparse: incorrect type in assignment (different address spaces) kernel test robot
@ 2024-11-20 7:51 ` Pei Xiao
2024-11-21 21:09 ` David Thompson
2024-12-02 17:16 ` Ilpo Järvinen
0 siblings, 2 replies; 9+ messages in thread
From: Pei Xiao @ 2024-11-20 7:51 UTC (permalink / raw)
To: hdegoede, ilpo.jarvinen, vadimp, platform-driver-x86,
linux-kernel
Cc: davthompson, Pei Xiao, kernel test robot
sparse warning,expected 'void __iomem *addr',but got 'void *addr'
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202411121935.cgFcEMO4-lkp@intel.com/
Fixes: 423c3361855c ("platform/mellanox: mlxbf-pmc: Add support for BlueField-3")
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
---
drivers/platform/mellanox/mlxbf-pmc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/mellanox/mlxbf-pmc.c b/drivers/platform/mellanox/mlxbf-pmc.c
index 9d18dfca6a67..9ff7b487dc48 100644
--- a/drivers/platform/mellanox/mlxbf-pmc.c
+++ b/drivers/platform/mellanox/mlxbf-pmc.c
@@ -1168,7 +1168,7 @@ static int mlxbf_pmc_program_l3_counter(unsigned int blk_num, u32 cnt_num, u32 e
/* Method to handle crspace counter programming */
static int mlxbf_pmc_program_crspace_counter(unsigned int blk_num, u32 cnt_num, u32 evt)
{
- void *addr;
+ void __iomem *addr;
u32 word;
int ret;
@@ -1192,7 +1192,7 @@ static int mlxbf_pmc_program_crspace_counter(unsigned int blk_num, u32 cnt_num,
/* Method to clear crspace counter value */
static int mlxbf_pmc_clear_crspace_counter(unsigned int blk_num, u32 cnt_num)
{
- void *addr;
+ void __iomem *addr;
addr = pmc->block[blk_num].mmio_base +
MLXBF_PMC_CRSPACE_PERFMON_VAL0(pmc->block[blk_num].counters) +
@@ -1405,7 +1405,7 @@ static int mlxbf_pmc_read_l3_event(unsigned int blk_num, u32 cnt_num, u64 *resul
static int mlxbf_pmc_read_crspace_event(unsigned int blk_num, u32 cnt_num, u64 *result)
{
u32 word, evt;
- void *addr;
+ void __iomem *addr;
int ret;
addr = pmc->block[blk_num].mmio_base +
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* RE: [PATCH] platform/mellanox: mlxbf-pmc: incorrect type in assignment
2024-11-20 7:51 ` [PATCH] platform/mellanox: mlxbf-pmc: incorrect type in assignment Pei Xiao
@ 2024-11-21 21:09 ` David Thompson
2024-12-02 17:16 ` Ilpo Järvinen
1 sibling, 0 replies; 9+ messages in thread
From: David Thompson @ 2024-11-21 21:09 UTC (permalink / raw)
To: Pei Xiao, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com,
Vadim Pasternak, platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: kernel test robot
> -----Original Message-----
> From: Pei Xiao <xiaopei01@kylinos.cn>
> Sent: Wednesday, November 20, 2024 2:52 AM
> To: hdegoede@redhat.com; ilpo.jarvinen@linux.intel.com; Vadim Pasternak
> <vadimp@nvidia.com>; platform-driver-x86@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Cc: David Thompson <davthompson@nvidia.com>; Pei Xiao
> <xiaopei01@kylinos.cn>; kernel test robot <lkp@intel.com>
> Subject: [PATCH] platform/mellanox: mlxbf-pmc: incorrect type in assignment
>
> sparse warning,expected 'void __iomem *addr',but got 'void *addr'
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202411121935.cgFcEMO4-
> lkp@intel.com/
> Fixes: 423c3361855c ("platform/mellanox: mlxbf-pmc: Add support for BlueField-
> 3")
> Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
> ---
Reviewed-by: David Thompson <davthompson@nvidia.com>
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] platform/mellanox: mlxbf-pmc: incorrect type in assignment
2024-11-20 7:51 ` [PATCH] platform/mellanox: mlxbf-pmc: incorrect type in assignment Pei Xiao
2024-11-21 21:09 ` David Thompson
@ 2024-12-02 17:16 ` Ilpo Järvinen
1 sibling, 0 replies; 9+ messages in thread
From: Ilpo Järvinen @ 2024-12-02 17:16 UTC (permalink / raw)
To: Pei Xiao
Cc: Hans de Goede, vadimp, platform-driver-x86, LKML, davthompson,
kernel test robot
On Wed, 20 Nov 2024, Pei Xiao wrote:
> sparse warning,expected 'void __iomem *addr',but got 'void *addr'
Hi,
Thanks for the patch. I've applied this patch to review-ilpo-next branch
but I had to reformat the commit message. Please make sure you use proper
spacing and put warnings like that on their own lines in future.
--
i.
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202411121935.cgFcEMO4-lkp@intel.com/
> Fixes: 423c3361855c ("platform/mellanox: mlxbf-pmc: Add support for BlueField-3")
> Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
> ---
> drivers/platform/mellanox/mlxbf-pmc.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/mellanox/mlxbf-pmc.c b/drivers/platform/mellanox/mlxbf-pmc.c
> index 9d18dfca6a67..9ff7b487dc48 100644
> --- a/drivers/platform/mellanox/mlxbf-pmc.c
> +++ b/drivers/platform/mellanox/mlxbf-pmc.c
> @@ -1168,7 +1168,7 @@ static int mlxbf_pmc_program_l3_counter(unsigned int blk_num, u32 cnt_num, u32 e
> /* Method to handle crspace counter programming */
> static int mlxbf_pmc_program_crspace_counter(unsigned int blk_num, u32 cnt_num, u32 evt)
> {
> - void *addr;
> + void __iomem *addr;
> u32 word;
> int ret;
>
> @@ -1192,7 +1192,7 @@ static int mlxbf_pmc_program_crspace_counter(unsigned int blk_num, u32 cnt_num,
> /* Method to clear crspace counter value */
> static int mlxbf_pmc_clear_crspace_counter(unsigned int blk_num, u32 cnt_num)
> {
> - void *addr;
> + void __iomem *addr;
>
> addr = pmc->block[blk_num].mmio_base +
> MLXBF_PMC_CRSPACE_PERFMON_VAL0(pmc->block[blk_num].counters) +
> @@ -1405,7 +1405,7 @@ static int mlxbf_pmc_read_l3_event(unsigned int blk_num, u32 cnt_num, u64 *resul
> static int mlxbf_pmc_read_crspace_event(unsigned int blk_num, u32 cnt_num, u64 *result)
> {
> u32 word, evt;
> - void *addr;
> + void __iomem *addr;
> int ret;
>
> addr = pmc->block[blk_num].mmio_base +
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2024-10-19 8:42 kernel test robot
0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2024-10-19 8:42 UTC (permalink / raw)
To: Shravan Kumar Ramani
Cc: oe-kbuild-all, linux-kernel, Hans de Goede, Vadim Pasternak,
David Thompson
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3d5ad2d4eca337e80f38df77de89614aa5aaceb9
commit: 423c3361855c1e81f1cb91728a2ac5ddfd2cbf16 platform/mellanox: mlxbf-pmc: Add support for BlueField-3
date: 1 year, 1 month ago
config: arm64-randconfig-r133-20241018 (https://download.01.org/0day-ci/archive/20241019/202410191601.5pf9Y9Iw-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce: (https://download.01.org/0day-ci/archive/20241019/202410191601.5pf9Y9Iw-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410191601.5pf9Y9Iw-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: got void [noderef] __iomem *
>> drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: got void [noderef] __iomem *
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: got void [noderef] __iomem *
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/slab.h, ...):
include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false
vim +1172 drivers/platform/mellanox/mlxbf-pmc.c
1163
1164 /* Method to handle crspace counter programming */
1165 static int mlxbf_pmc_program_crspace_counter(int blk_num, uint32_t cnt_num,
1166 uint32_t evt)
1167 {
1168 uint32_t word;
1169 void *addr;
1170 int ret;
1171
> 1172 addr = pmc->block[blk_num].mmio_base +
1173 (rounddown(cnt_num, 2) * MLXBF_PMC_CRSPACE_PERFSEL_SZ);
> 1174 ret = mlxbf_pmc_readl(addr, &word);
1175 if (ret)
1176 return ret;
1177
1178 if (cnt_num % 2) {
1179 word &= ~MLXBF_PMC_CRSPACE_PERFSEL1;
1180 word |= FIELD_PREP(MLXBF_PMC_CRSPACE_PERFSEL1, evt);
1181 } else {
1182 word &= ~MLXBF_PMC_CRSPACE_PERFSEL0;
1183 word |= FIELD_PREP(MLXBF_PMC_CRSPACE_PERFSEL0, evt);
1184 }
1185
1186 return mlxbf_pmc_write(addr, MLXBF_PMC_WRITE_REG_32, word);
1187 }
1188
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 9+ messages in thread* drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2023-12-14 11:24 kernel test robot
0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2023-12-14 11:24 UTC (permalink / raw)
To: Shravan Kumar Ramani
Cc: oe-kbuild-all, linux-kernel, Hans de Goede, Vadim Pasternak,
David Thompson
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5bd7ef53ffe5ca580e93e74eb8c81ed191ddc4bd
commit: 423c3361855c1e81f1cb91728a2ac5ddfd2cbf16 platform/mellanox: mlxbf-pmc: Add support for BlueField-3
date: 3 months ago
config: arm64-randconfig-r121-20231116 (https://download.01.org/0day-ci/archive/20231214/202312141958.5gJeiJvT-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231214/202312141958.5gJeiJvT-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312141958.5gJeiJvT-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: got void [noderef] __iomem *
>> drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: got void [noderef] __iomem *
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: got void [noderef] __iomem *
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: got void *addr
vim +1172 drivers/platform/mellanox/mlxbf-pmc.c
1163
1164 /* Method to handle crspace counter programming */
1165 static int mlxbf_pmc_program_crspace_counter(int blk_num, uint32_t cnt_num,
1166 uint32_t evt)
1167 {
1168 uint32_t word;
1169 void *addr;
1170 int ret;
1171
> 1172 addr = pmc->block[blk_num].mmio_base +
1173 (rounddown(cnt_num, 2) * MLXBF_PMC_CRSPACE_PERFSEL_SZ);
> 1174 ret = mlxbf_pmc_readl(addr, &word);
1175 if (ret)
1176 return ret;
1177
1178 if (cnt_num % 2) {
1179 word &= ~MLXBF_PMC_CRSPACE_PERFSEL1;
1180 word |= FIELD_PREP(MLXBF_PMC_CRSPACE_PERFSEL1, evt);
1181 } else {
1182 word &= ~MLXBF_PMC_CRSPACE_PERFSEL0;
1183 word |= FIELD_PREP(MLXBF_PMC_CRSPACE_PERFSEL0, evt);
1184 }
1185
1186 return mlxbf_pmc_write(addr, MLXBF_PMC_WRITE_REG_32, word);
1187 }
1188
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 9+ messages in thread* drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2023-12-04 14:12 kernel test robot
0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2023-12-04 14:12 UTC (permalink / raw)
To: Shravan Kumar Ramani
Cc: oe-kbuild-all, linux-kernel, Hans de Goede, Vadim Pasternak,
David Thompson
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 33cc938e65a98f1d29d0a18403dbbee050dcad9a
commit: 423c3361855c1e81f1cb91728a2ac5ddfd2cbf16 platform/mellanox: mlxbf-pmc: Add support for BlueField-3
date: 3 months ago
config: arm64-randconfig-r121-20231116 (https://download.01.org/0day-ci/archive/20231204/202312042213.OMFwdhWO-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231204/202312042213.OMFwdhWO-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312042213.OMFwdhWO-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: got void [noderef] __iomem *
>> drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: got void [noderef] __iomem *
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: got void [noderef] __iomem *
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: got void *addr
vim +1172 drivers/platform/mellanox/mlxbf-pmc.c
1163
1164 /* Method to handle crspace counter programming */
1165 static int mlxbf_pmc_program_crspace_counter(int blk_num, uint32_t cnt_num,
1166 uint32_t evt)
1167 {
1168 uint32_t word;
1169 void *addr;
1170 int ret;
1171
> 1172 addr = pmc->block[blk_num].mmio_base +
1173 (rounddown(cnt_num, 2) * MLXBF_PMC_CRSPACE_PERFSEL_SZ);
> 1174 ret = mlxbf_pmc_readl(addr, &word);
1175 if (ret)
1176 return ret;
1177
1178 if (cnt_num % 2) {
1179 word &= ~MLXBF_PMC_CRSPACE_PERFSEL1;
1180 word |= FIELD_PREP(MLXBF_PMC_CRSPACE_PERFSEL1, evt);
1181 } else {
1182 word &= ~MLXBF_PMC_CRSPACE_PERFSEL0;
1183 word |= FIELD_PREP(MLXBF_PMC_CRSPACE_PERFSEL0, evt);
1184 }
1185
1186 return mlxbf_pmc_write(addr, MLXBF_PMC_WRITE_REG_32, word);
1187 }
1188
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 9+ messages in thread* drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2023-11-16 19:37 kernel test robot
0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2023-11-16 19:37 UTC (permalink / raw)
To: Shravan Kumar Ramani
Cc: oe-kbuild-all, linux-kernel, Hans de Goede, Vadim Pasternak,
David Thompson
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7475e51b87969e01a6812eac713a1c8310372e8a
commit: 423c3361855c1e81f1cb91728a2ac5ddfd2cbf16 platform/mellanox: mlxbf-pmc: Add support for BlueField-3
date: 9 weeks ago
config: arm64-randconfig-r121-20231116 (https://download.01.org/0day-ci/archive/20231117/202311170321.oKTTKcgf-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231117/202311170321.oKTTKcgf-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311170321.oKTTKcgf-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: got void [noderef] __iomem *
>> drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: got void [noderef] __iomem *
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: got void [noderef] __iomem *
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: got void *addr
vim +1172 drivers/platform/mellanox/mlxbf-pmc.c
1163
1164 /* Method to handle crspace counter programming */
1165 static int mlxbf_pmc_program_crspace_counter(int blk_num, uint32_t cnt_num,
1166 uint32_t evt)
1167 {
1168 uint32_t word;
1169 void *addr;
1170 int ret;
1171
> 1172 addr = pmc->block[blk_num].mmio_base +
1173 (rounddown(cnt_num, 2) * MLXBF_PMC_CRSPACE_PERFSEL_SZ);
> 1174 ret = mlxbf_pmc_readl(addr, &word);
1175 if (ret)
1176 return ret;
1177
1178 if (cnt_num % 2) {
1179 word &= ~MLXBF_PMC_CRSPACE_PERFSEL1;
1180 word |= FIELD_PREP(MLXBF_PMC_CRSPACE_PERFSEL1, evt);
1181 } else {
1182 word &= ~MLXBF_PMC_CRSPACE_PERFSEL0;
1183 word |= FIELD_PREP(MLXBF_PMC_CRSPACE_PERFSEL0, evt);
1184 }
1185
1186 return mlxbf_pmc_write(addr, MLXBF_PMC_WRITE_REG_32, word);
1187 }
1188
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 9+ messages in thread* drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2023-11-16 16:40 kernel test robot
0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2023-11-16 16:40 UTC (permalink / raw)
To: Shravan Kumar Ramani
Cc: oe-kbuild-all, linux-kernel, Hans de Goede, Vadim Pasternak,
David Thompson
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7475e51b87969e01a6812eac713a1c8310372e8a
commit: 423c3361855c1e81f1cb91728a2ac5ddfd2cbf16 platform/mellanox: mlxbf-pmc: Add support for BlueField-3
date: 9 weeks ago
config: arm64-randconfig-r121-20231116 (https://download.01.org/0day-ci/archive/20231117/202311170008.NMSMlgyY-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231117/202311170008.NMSMlgyY-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311170008.NMSMlgyY-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: got void [noderef] __iomem *
>> drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1174:31: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1186:32: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1194:14: sparse: got void [noderef] __iomem *
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1198:32: sparse: got void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem * @@
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: expected void *addr
drivers/platform/mellanox/mlxbf-pmc.c:1415:14: sparse: got void [noderef] __iomem *
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *addr @@
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: expected void [noderef] __iomem *addr
drivers/platform/mellanox/mlxbf-pmc.c:1417:31: sparse: got void *addr
vim +1172 drivers/platform/mellanox/mlxbf-pmc.c
1163
1164 /* Method to handle crspace counter programming */
1165 static int mlxbf_pmc_program_crspace_counter(int blk_num, uint32_t cnt_num,
1166 uint32_t evt)
1167 {
1168 uint32_t word;
1169 void *addr;
1170 int ret;
1171
> 1172 addr = pmc->block[blk_num].mmio_base +
1173 (rounddown(cnt_num, 2) * MLXBF_PMC_CRSPACE_PERFSEL_SZ);
> 1174 ret = mlxbf_pmc_readl(addr, &word);
1175 if (ret)
1176 return ret;
1177
1178 if (cnt_num % 2) {
1179 word &= ~MLXBF_PMC_CRSPACE_PERFSEL1;
1180 word |= FIELD_PREP(MLXBF_PMC_CRSPACE_PERFSEL1, evt);
1181 } else {
1182 word &= ~MLXBF_PMC_CRSPACE_PERFSEL0;
1183 word |= FIELD_PREP(MLXBF_PMC_CRSPACE_PERFSEL0, evt);
1184 }
1185
1186 return mlxbf_pmc_write(addr, MLXBF_PMC_WRITE_REG_32, word);
1187 }
1188
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-12-02 17:16 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-12 11:11 drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: sparse: incorrect type in assignment (different address spaces) kernel test robot
2024-11-20 7:51 ` [PATCH] platform/mellanox: mlxbf-pmc: incorrect type in assignment Pei Xiao
2024-11-21 21:09 ` David Thompson
2024-12-02 17:16 ` Ilpo Järvinen
-- strict thread matches above, loose matches on Subject: below --
2024-10-19 8:42 drivers/platform/mellanox/mlxbf-pmc.c:1172:14: sparse: sparse: incorrect type in assignment (different address spaces) kernel test robot
2023-12-14 11:24 kernel test robot
2023-12-04 14:12 kernel test robot
2023-11-16 19:37 kernel test robot
2023-11-16 16:40 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox