lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202512310307.swVDgnPU-lkp@intel.com>
Date: Mon, 5 Jan 2026 15:04:15 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: oe-kbuild@...ts.linux.dev, Yu-Chun Lin <eleanor.lin@...ltek.com>,
	mturquette@...libre.com, sboyd@...nel.org, robh@...nel.org,
	krzk+dt@...nel.org, conor+dt@...nel.org, p.zabel@...gutronix.de,
	cylee12@...ltek.com, jyanchou@...ltek.com
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
	devicetree@...r.kernel.org, linux-clk@...r.kernel.org,
	linux-kernel@...r.kernel.org, james.tai@...ltek.com,
	cy.huang@...ltek.com, stanley_chang@...ltek.com,
	eleanor.lin@...ltek.com
Subject: Re: [PATCH 6/9] clk: realtek: Add support for mux clock

Hi Yu-Chun,

kernel test robot noticed the following build warnings:

https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Yu-Chun-Lin/dt-bindings-clock-Add-Realtek-RTD1625-Clock-Reset-Controller/20251229-155549
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
patch link:    https://lore.kernel.org/r/20251229075313.27254-7-eleanor.lin%40realtek.com
patch subject: [PATCH 6/9] clk: realtek: Add support for mux clock
config: loongarch-randconfig-r072-20251231 (https://download.01.org/0day-ci/archive/20251231/202512310307.swVDgnPU-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.5.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@...el.com>
| Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
| Closes: https://lore.kernel.org/r/202512310307.swVDgnPU-lkp@intel.com/

smatch warnings:
drivers/clk/realtek/clk-regmap-mux.c:23 clk_regmap_mux_get_parent() warn: signedness bug returning '(-22)'

vim +23 drivers/clk/realtek/clk-regmap-mux.c

f53de7a7df69f0 Yu-Chun Lin 2025-12-29   9  static u8 clk_regmap_mux_get_parent(struct clk_hw *hw)
                                                  ^^
This function returns negative error codes so it needs to be type int.

f53de7a7df69f0 Yu-Chun Lin 2025-12-29  10  {
f53de7a7df69f0 Yu-Chun Lin 2025-12-29  11  	struct clk_regmap_mux *clkm = to_clk_regmap_mux(hw);
f53de7a7df69f0 Yu-Chun Lin 2025-12-29  12  	int num_parents = clk_hw_get_num_parents(hw);
f53de7a7df69f0 Yu-Chun Lin 2025-12-29  13  	u32 val;
f53de7a7df69f0 Yu-Chun Lin 2025-12-29  14  	int ret;
f53de7a7df69f0 Yu-Chun Lin 2025-12-29  15  
f53de7a7df69f0 Yu-Chun Lin 2025-12-29  16  	ret = regmap_read(clkm->clkr.regmap, clkm->mux_ofs, &val);
f53de7a7df69f0 Yu-Chun Lin 2025-12-29  17  	if (ret)
f53de7a7df69f0 Yu-Chun Lin 2025-12-29  18  		return ret;
f53de7a7df69f0 Yu-Chun Lin 2025-12-29  19  
f53de7a7df69f0 Yu-Chun Lin 2025-12-29  20  	val = val >> clkm->shift & clkm->mask;
f53de7a7df69f0 Yu-Chun Lin 2025-12-29  21  
f53de7a7df69f0 Yu-Chun Lin 2025-12-29  22  	if (val >= num_parents)
f53de7a7df69f0 Yu-Chun Lin 2025-12-29 @23  		return -EINVAL;
f53de7a7df69f0 Yu-Chun Lin 2025-12-29  24  
f53de7a7df69f0 Yu-Chun Lin 2025-12-29  25  	return val;
f53de7a7df69f0 Yu-Chun Lin 2025-12-29  26  }

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ