From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/pinctrl/renesas/pinctrl-rzt2h.c:197 rzt2h_pinctrl_set_pfc_mode() warn: subtract is higher precedence than shift
Date: Wed, 23 Sep 2026 20:30:46 +0200 [thread overview]
Message-ID: <202609232049.IcVFcnuj-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
CC: Geert Uytterhoeven <geert+renesas@glider.be>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fe2ec83746e501645709761605c2464a44fd2929
commit: f9fb67bc77d322568bf573e81335be0e9be2a7c8 pinctrl: renesas: rzt2h: Skip PFC mode configuration if already set
date: 4 months ago
:::::: branch date: 25 hours ago
:::::: commit date: 4 months ago
config: arm64-randconfig-r2202-20260923 (https://download.01.org/0day-ci/archive/20260923/202609232049.IcVFcnuj-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 4b99afb361a8cfd45fc17aebc637688661e9e472)
smatch: v0.5.0-9187-g5189e3fb
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
| Fixes: f9fb67bc77d3 ("pinctrl: renesas: rzt2h: Skip PFC mode configuration if already set")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202609232049.IcVFcnuj-lkp@intel.com/
New smatch warnings:
drivers/pinctrl/renesas/pinctrl-rzt2h.c:197 rzt2h_pinctrl_set_pfc_mode() warn: subtract is higher precedence than shift
drivers/pinctrl/renesas/pinctrl-rzt2h.c:197 rzt2h_pinctrl_set_pfc_mode() warn: subtract is higher precedence than shift
drivers/pinctrl/renesas/pinctrl-rzt2h.c:197 rzt2h_pinctrl_set_pfc_mode() warn: subtract is higher precedence than shift
drivers/pinctrl/renesas/pinctrl-rzt2h.c:197 rzt2h_pinctrl_set_pfc_mode() warn: subtract is higher precedence than shift
Old smatch warnings:
drivers/pinctrl/renesas/pinctrl-rzt2h.c:523 rzt2h_pinctrl_pinconf_get() warn: subtract is higher precedence than shift
drivers/pinctrl/renesas/pinctrl-rzt2h.c:523 rzt2h_pinctrl_pinconf_get() warn: subtract is higher precedence than shift
drivers/pinctrl/renesas/pinctrl-rzt2h.c:523 rzt2h_pinctrl_pinconf_get() warn: subtract is higher precedence than shift
drivers/pinctrl/renesas/pinctrl-rzt2h.c:523 rzt2h_pinctrl_pinconf_get() warn: subtract is higher precedence than shift
drivers/pinctrl/renesas/pinctrl-rzt2h.c:556 rzt2h_pinctrl_pinconf_get() warn: subtract is higher precedence than shift
drivers/pinctrl/renesas/pinctrl-rzt2h.c:556 rzt2h_pinctrl_pinconf_get() warn: subtract is higher precedence than shift
drivers/pinctrl/renesas/pinctrl-rzt2h.c:556 rzt2h_pinctrl_pinconf_get() warn: subtract is higher precedence than shift
drivers/pinctrl/renesas/pinctrl-rzt2h.c:556 rzt2h_pinctrl_pinconf_get() warn: subtract is higher precedence than shift
vim +197 drivers/pinctrl/renesas/pinctrl-rzt2h.c
ba4a92372bea29 Cosmin Tanislav 2025-12-05 185
34d4d093077a5c Thierry Bultel 2025-08-08 186 static void rzt2h_pinctrl_set_pfc_mode(struct rzt2h_pinctrl *pctrl,
34d4d093077a5c Thierry Bultel 2025-08-08 187 u8 port, u8 pin, u8 func)
34d4d093077a5c Thierry Bultel 2025-08-08 188 {
34d4d093077a5c Thierry Bultel 2025-08-08 189 u64 reg64;
34d4d093077a5c Thierry Bultel 2025-08-08 190 u16 reg16;
34d4d093077a5c Thierry Bultel 2025-08-08 191
ebe7561e9b9203 Cosmin Tanislav 2026-02-05 192 guard(raw_spinlock_irqsave)(&pctrl->lock);
34d4d093077a5c Thierry Bultel 2025-08-08 193
f9fb67bc77d322 Lad Prabhakar 2026-05-13 194 reg64 = rzt2h_pinctrl_readq(pctrl, port, PFC(port));
f9fb67bc77d322 Lad Prabhakar 2026-05-13 195 /* Check if pin is already configured to the desired function */
f9fb67bc77d322 Lad Prabhakar 2026-05-13 196 if ((rzt2h_pinctrl_readb(pctrl, port, PMC(port)) & BIT(pin)) &&
f9fb67bc77d322 Lad Prabhakar 2026-05-13 @197 field_get(PFC_PIN_MASK(pin), reg64) == func)
f9fb67bc77d322 Lad Prabhakar 2026-05-13 198 return;
f9fb67bc77d322 Lad Prabhakar 2026-05-13 199
34d4d093077a5c Thierry Bultel 2025-08-08 200 /* Set pin to 'Non-use (Hi-Z input protection)' */
34d4d093077a5c Thierry Bultel 2025-08-08 201 reg16 = rzt2h_pinctrl_readw(pctrl, port, PM(port));
34d4d093077a5c Thierry Bultel 2025-08-08 202 reg16 &= ~PM_PIN_MASK(pin);
34d4d093077a5c Thierry Bultel 2025-08-08 203 rzt2h_pinctrl_writew(pctrl, port, reg16, PM(port));
34d4d093077a5c Thierry Bultel 2025-08-08 204
34d4d093077a5c Thierry Bultel 2025-08-08 205 /* Temporarily switch to GPIO mode with PMC register */
ba4a92372bea29 Cosmin Tanislav 2025-12-05 206 rzt2h_pinctrl_set_gpio_en(pctrl, port, pin, true);
34d4d093077a5c Thierry Bultel 2025-08-08 207
34d4d093077a5c Thierry Bultel 2025-08-08 208 /* Select Pin function mode with PFC register */
34d4d093077a5c Thierry Bultel 2025-08-08 209 reg64 &= ~PFC_PIN_MASK(pin);
34d4d093077a5c Thierry Bultel 2025-08-08 210 rzt2h_pinctrl_writeq(pctrl, port, reg64 | ((u64)func << (pin * 8)), PFC(port));
34d4d093077a5c Thierry Bultel 2025-08-08 211
34d4d093077a5c Thierry Bultel 2025-08-08 212 /* Switch to Peripheral pin function with PMC register */
ba4a92372bea29 Cosmin Tanislav 2025-12-05 213 rzt2h_pinctrl_set_gpio_en(pctrl, port, pin, false);
bf48f99d95dfd6 Geert Uytterhoeven 2025-09-24 214 }
34d4d093077a5c Thierry Bultel 2025-08-08 215
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-09-23 18:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202609232049.IcVFcnuj-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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 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.