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: <202009302041.uuBALXbJ-lkp@intel.com>
Date:   Wed, 30 Sep 2020 21:05:43 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Alessandro Zummo <a.zummo@...ertech.it>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        linux-rtc@...r.kernel.org
Subject: Re: [PATCH 3/3] rtc: rv3032: Add a driver for Microcrystal RV-3032

Hi Alexandre,

I love your patch! Perhaps something to improve:

[auto build test WARNING on abelloni/rtc-next]
[also build test WARNING on robh/for-next v5.9-rc7 next-20200929]
[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]

url:    https://github.com/0day-ci/linux/commits/Alexandre-Belloni/dt-bindings-rtc-add-trickle-voltage-mV/20200922-013149
base:   https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
config: nds32-randconfig-r035-20200930 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/038302bc860e9c8ecb37dad9fc74d823bd57fdbe
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Alexandre-Belloni/dt-bindings-rtc-add-trickle-voltage-mV/20200922-013149
        git checkout 038302bc860e9c8ecb37dad9fc74d823bd57fdbe
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   drivers/rtc/rtc-rv3032.c: In function 'rv3032_trickle_charger_setup':
>> drivers/rtc/rtc-rv3032.c:485:6: warning: variable 'val' set but not used [-Wunused-but-set-variable]
     485 |  u32 val, ohms, voltage;
         |      ^~~

vim +/val +485 drivers/rtc/rtc-rv3032.c

   482	
   483	static int rv3032_trickle_charger_setup(struct device *dev, struct rv3032_data *rv3032)
   484	{
 > 485		u32 val, ohms, voltage;
   486		int i, ret;
   487	
   488		val = FIELD_PREP(RV3032_PMU_TCM, 1) | FIELD_PREP(RV3032_PMU_BSM, RV3032_PMU_BSM_DSM);
   489		if (!device_property_read_u32(dev, "trickle-voltage-mV", &voltage)) {
   490			for (i = 0; i < ARRAY_SIZE(rv3032_trickle_voltages); i++)
   491				if (voltage == rv3032_trickle_voltages[i])
   492					break;
   493			if (i < ARRAY_SIZE(rv3032_trickle_voltages))
   494				val = FIELD_PREP(RV3032_PMU_TCM, i) |
   495				      FIELD_PREP(RV3032_PMU_BSM, RV3032_PMU_BSM_LSM);
   496		}
   497	
   498		if (!device_property_read_u32(dev, "trickle-resistor-ohms", &ohms)) {
   499			for (i = 0; i < ARRAY_SIZE(rv3032_trickle_resistors); i++)
   500				if (ohms == rv3032_trickle_resistors[i])
   501					break;
   502	
   503			if (i < ARRAY_SIZE(rv3032_trickle_resistors)) {
   504				ret = regmap_update_bits(rv3032->regmap, RV3032_PMU,
   505							 RV3032_PMU_TCR | RV3032_PMU_TCM | RV3032_PMU_BSM,
   506							 FIELD_PREP(RV3032_PMU_TCR, i));
   507				if (ret)
   508					return ret;
   509			} else {
   510				dev_warn(dev, "invalid trickle resistor value\n");
   511			}
   512		}
   513	
   514		return 0;
   515	}
   516	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (25026 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ