From: kernel test robot <lkp@intel.com>
To: Subbaraya Sundeep <sbhatta@marvell.com>,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
saikrishnag@marvell.com, gakula@marvell.com, hkelam@marvell.com,
sgoutham@marvell.com, lcherian@marvell.com,
bbhushan2@marvell.com, jerinj@marvell.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
netdev@vger.kernel.org, Subbaraya Sundeep <sbhatta@marvell.com>
Subject: Re: [net PATCH] octeontx2-pf: Avoid typecasts by simplifying otx2_atomic64_add macro
Date: Tue, 27 May 2025 09:22:14 +0800 [thread overview]
Message-ID: <202505270941.xkydqqTv-lkp@intel.com> (raw)
In-Reply-To: <1748274232-20835-1-git-send-email-sbhatta@marvell.com>
Hi Subbaraya,
kernel test robot noticed the following build errors:
[auto build test ERROR on net/main]
url: https://github.com/intel-lab-lkp/linux/commits/Subbaraya-Sundeep/octeontx2-pf-Avoid-typecasts-by-simplifying-otx2_atomic64_add-macro/20250526-234505
base: net/main
patch link: https://lore.kernel.org/r/1748274232-20835-1-git-send-email-sbhatta%40marvell.com
patch subject: [net PATCH] octeontx2-pf: Avoid typecasts by simplifying otx2_atomic64_add macro
config: x86_64-buildonly-randconfig-006-20250527 (https://download.01.org/0day-ci/archive/20250527/202505270941.xkydqqTv-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250527/202505270941.xkydqqTv-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/202505270941.xkydqqTv-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c:10:
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:804:9: warning: ISO C does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
804 | return otx2_atomic64_add(incr, ptr);
| ^ ~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:42: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ^~~~
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:804:9: error: invalid operands to binary expression ('void' and 'u64' (aka 'unsigned long long'))
804 | return otx2_atomic64_add(incr, ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:47: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ~~~~ ^ ~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c:451:14: warning: shift count >= width of type [-Wshift-count-overflow]
451 | cc->mask = CYCLECOUNTER_MASK(64);
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/timecounter.h:14:59: note: expanded from macro 'CYCLECOUNTER_MASK'
14 | #define CYCLECOUNTER_MASK(bits) (u64)((bits) < 64 ? ((1ULL<<(bits))-1) : -1)
| ^ ~~~~~~
2 warnings and 1 error generated.
--
In file included from drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c:13:
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:804:9: warning: ISO C does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
804 | return otx2_atomic64_add(incr, ptr);
| ^ ~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:42: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ^~~~
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:804:9: error: invalid operands to binary expression ('void' and 'u64' (aka 'unsigned long long'))
804 | return otx2_atomic64_add(incr, ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:47: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ~~~~ ^ ~~~~
1 warning and 1 error generated.
--
In file included from drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:17:
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:804:9: warning: ISO C does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
804 | return otx2_atomic64_add(incr, ptr);
| ^ ~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:42: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ^~~~
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:804:9: error: invalid operands to binary expression ('void' and 'u64' (aka 'unsigned long long'))
804 | return otx2_atomic64_add(incr, ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:47: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ~~~~ ^ ~~~~
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:34:17: warning: ISO C does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
34 | stats->bytes = otx2_atomic64_add(incr, ptr);
| ^ ~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:42: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ^~~~
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:34:17: error: invalid operands to binary expression ('void' and 'u64' (aka 'unsigned long long'))
34 | stats->bytes = otx2_atomic64_add(incr, ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:47: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ~~~~ ^ ~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:37:16: warning: ISO C does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
37 | stats->pkts = otx2_atomic64_add(incr, ptr);
| ^ ~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:42: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ^~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:37:16: error: invalid operands to binary expression ('void' and 'u64' (aka 'unsigned long long'))
37 | stats->pkts = otx2_atomic64_add(incr, ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:47: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ~~~~ ^ ~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:47:17: warning: ISO C does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
47 | stats->bytes = otx2_atomic64_add(incr, ptr);
| ^ ~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:42: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ^~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:47:17: error: invalid operands to binary expression ('void' and 'u64' (aka 'unsigned long long'))
47 | stats->bytes = otx2_atomic64_add(incr, ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:47: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ~~~~ ^ ~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:50:16: warning: ISO C does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
50 | stats->pkts = otx2_atomic64_add(incr, ptr);
| ^ ~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:42: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ^~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:50:16: error: invalid operands to binary expression ('void' and 'u64' (aka 'unsigned long long'))
50 | stats->pkts = otx2_atomic64_add(incr, ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:47: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ~~~~ ^ ~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:873:9: warning: ISO C does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
873 | val = otx2_atomic64_add(incr, ptr);
| ^ ~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:42: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ^~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c:873:9: error: invalid operands to binary expression ('void' and 'u64' (aka 'unsigned long long'))
873 | val = otx2_atomic64_add(incr, ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:47: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ~~~~ ^ ~~~~
6 warnings and 6 errors generated.
--
In file included from drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c:11:
In file included from drivers/net/ethernet/marvell/octeontx2/nic/cn10k.h:11:
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:804:9: warning: ISO C does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
804 | return otx2_atomic64_add(incr, ptr);
| ^ ~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:42: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ^~~~
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:804:9: error: invalid operands to binary expression ('void' and 'u64' (aka 'unsigned long long'))
804 | return otx2_atomic64_add(incr, ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:47: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ~~~~ ^ ~~~~
>> drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c:159:8: warning: ISO C does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
159 | val = otx2_atomic64_add(incr, ptr);
| ^ ~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:42: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ^~~~
>> drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c:159:8: error: invalid operands to binary expression ('void' and 'u64' (aka 'unsigned long long'))
159 | val = otx2_atomic64_add(incr, ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:47: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ~~~~ ^ ~~~~
2 warnings and 2 errors generated.
--
In file included from drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:22:
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:804:9: warning: ISO C does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
804 | return otx2_atomic64_add(incr, ptr);
| ^ ~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:42: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ^~~~
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:804:9: error: invalid operands to binary expression ('void' and 'u64' (aka 'unsigned long long'))
804 | return otx2_atomic64_add(incr, ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:47: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ~~~~ ^ ~~~~
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1314:9: warning: ISO C does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
1314 | val = otx2_atomic64_add((qidx << 44), ptr);
| ^ ~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:42: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ^~~~
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1314:9: error: invalid operands to binary expression ('void' and 'u64' (aka 'unsigned long long'))
1314 | val = otx2_atomic64_add((qidx << 44), ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:47: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ~~~~ ^ ~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1353:9: warning: ISO C does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
1353 | val = otx2_atomic64_add((qidx << 44), ptr);
| ^ ~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:42: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ^~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1353:9: error: invalid operands to binary expression ('void' and 'u64' (aka 'unsigned long long'))
1353 | val = otx2_atomic64_add((qidx << 44), ptr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h:751:47: note: expanded from macro 'otx2_atomic64_add'
751 | #define otx2_atomic64_add(incr, ptr) ({ *ptr += incr; })
| ~~~~ ^ ~~~~
3 warnings and 3 errors generated.
vim +804 drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
4c236d5dc8b8622 Geetha sowjanya 2021-02-11 797
caa2da34fd25a37 Sunil Goutham 2020-01-27 798 /* Alloc pointer from pool/aura */
caa2da34fd25a37 Sunil Goutham 2020-01-27 799 static inline u64 otx2_aura_allocptr(struct otx2_nic *pfvf, int aura)
caa2da34fd25a37 Sunil Goutham 2020-01-27 800 {
22f5790bc6ba331 Subbaraya Sundeep 2025-05-26 801 void __iomem *ptr = otx2_get_regaddr(pfvf, NPA_LF_AURA_OP_ALLOCX(0));
caa2da34fd25a37 Sunil Goutham 2020-01-27 802 u64 incr = (u64)aura | BIT_ULL(63);
caa2da34fd25a37 Sunil Goutham 2020-01-27 803
caa2da34fd25a37 Sunil Goutham 2020-01-27 @804 return otx2_atomic64_add(incr, ptr);
caa2da34fd25a37 Sunil Goutham 2020-01-27 805 }
caa2da34fd25a37 Sunil Goutham 2020-01-27 806
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2025-05-27 1:23 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1748274232-20835-1-git-send-email-sbhatta@marvell.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202505270941.xkydqqTv-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=bbhushan2@marvell.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=horms@kernel.org \
--cc=jerinj@marvell.com \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=saikrishnag@marvell.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox