All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v1 3/3] pinctrl: th1520: Factor out casts
@ 2024-10-15  9:52 kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2024-10-15  9:52 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20241011144826.381104-4-emil.renner.berthing@canonical.com>
References: <20241011144826.381104-4-emil.renner.berthing@canonical.com>
TO: Emil Renner Berthing <emil.renner.berthing@canonical.com>

Hi Emil,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linusw-pinctrl/devel]
[also build test WARNING on linusw-pinctrl/for-next next-20241015]
[cannot apply to linus/master v6.12-rc3]
[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/Emil-Renner-Berthing/pinctrl-th1520-Fix-pinconf-return-values/20241011-224939
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
patch link:    https://lore.kernel.org/r/20241011144826.381104-4-emil.renner.berthing%40canonical.com
patch subject: [PATCH v1 3/3] pinctrl: th1520: Factor out casts
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: csky-randconfig-r073-20241015 (https://download.01.org/0day-ci/archive/20241015/202410151731.MnWrd9PX-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.1.0

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202410151731.MnWrd9PX-lkp@intel.com/

smatch warnings:
drivers/pinctrl/pinctrl-th1520.c:808 th1520_pinmux_set_mux() warn: variable dereferenced before check 'func' (see line 806)

vim +/func +808 drivers/pinctrl/pinctrl-th1520.c

bed5cd6f8a9883 Emil Renner Berthing 2024-09-30  800  
bed5cd6f8a9883 Emil Renner Berthing 2024-09-30  801  static int th1520_pinmux_set_mux(struct pinctrl_dev *pctldev,
bed5cd6f8a9883 Emil Renner Berthing 2024-09-30  802  				 unsigned int fsel, unsigned int gsel)
bed5cd6f8a9883 Emil Renner Berthing 2024-09-30  803  {
bed5cd6f8a9883 Emil Renner Berthing 2024-09-30  804  	struct th1520_pinctrl *thp = pinctrl_dev_get_drvdata(pctldev);
bed5cd6f8a9883 Emil Renner Berthing 2024-09-30  805  	const struct function_desc *func = pinmux_generic_get_function(pctldev, fsel);
3d7cbbc97d4a47 Emil Renner Berthing 2024-10-11 @806  	enum th1520_muxtype muxtype = (uintptr_t)func->data;
bed5cd6f8a9883 Emil Renner Berthing 2024-09-30  807  
d01240b22abf28 clingfei             2024-10-03 @808  	if (!func)
d01240b22abf28 clingfei             2024-10-03  809  		return -EINVAL;
3d7cbbc97d4a47 Emil Renner Berthing 2024-10-11  810  
bed5cd6f8a9883 Emil Renner Berthing 2024-09-30  811  	return th1520_pinmux_set(thp, thp->desc.pins[gsel].number,
3d7cbbc97d4a47 Emil Renner Berthing 2024-10-11  812  				 th1520_pad_muxdata(thp->desc.pins[gsel].drv_data),
3d7cbbc97d4a47 Emil Renner Berthing 2024-10-11  813  				 muxtype);
bed5cd6f8a9883 Emil Renner Berthing 2024-09-30  814  }
bed5cd6f8a9883 Emil Renner Berthing 2024-09-30  815  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH v1 0/3] pinctrl: th1520: Unbreak the driver
@ 2024-10-11 14:48 Emil Renner Berthing
  2024-10-11 14:48   ` Emil Renner Berthing
  0 siblings, 1 reply; 8+ messages in thread
From: Emil Renner Berthing @ 2024-10-11 14:48 UTC (permalink / raw)
  To: linux-kernel, linux-gpio, devicetree, linux-riscv
  Cc: Linus Walleij, Jisheng Zhang, Guo Ren, Fu Wei, Paul Walmsley,
	Palmer Dabbelt, Thomas Bonnefille

Hi,

Here are 2 important fixes and a code improvement to the T-Head TH1520
pinctrl driver that was either introduced or missed when Drew took over
upstreaming it.

It is based on Linus' pinctrl/for-next:

  6dbd1577b7dc ("Merge branch 'devel' into for-next")

Emil Renner Berthing (3):
  pinctrl: th1520: Fix pinconf return values
  pinctrl: th1520: Update pinmux tables
  pinctrl: th1520: Factor out casts

 drivers/pinctrl/pinctrl-th1520.c | 52 ++++++++++++++++++++------------
 1 file changed, 32 insertions(+), 20 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-10-16 18:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-15  9:52 [PATCH v1 3/3] pinctrl: th1520: Factor out casts kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2024-10-11 14:48 [PATCH v1 0/3] pinctrl: th1520: Unbreak the driver Emil Renner Berthing
2024-10-11 14:48 ` [PATCH v1 3/3] pinctrl: th1520: Factor out casts Emil Renner Berthing
2024-10-11 14:48   ` Emil Renner Berthing
2024-10-11 16:35   ` Drew Fustini
2024-10-11 16:35     ` Drew Fustini
2024-10-15  9:57   ` Dan Carpenter
2024-10-16 18:45   ` Kees Bakker
2024-10-16 18:45     ` Kees Bakker

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.