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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 7 Dec 2022 14:45:47 +0800
From:   kernel test robot <lkp@...el.com>
To:     David Collins <quic_collinsd@...cinc.com>,
        Amit Kucheria <amitk@...nel.org>,
        Thara Gopinath <thara.gopinath@...il.com>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>
Cc:     oe-kbuild-all@...ts.linux.dev,
        David Collins <quic_collinsd@...cinc.com>,
        Konrad Dybcio <konrad.dybcio@...ainline.org>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Zhang Rui <rui.zhang@...el.com>, linux-arm-msm@...r.kernel.org,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/3] thermal: qcom-spmi-temp-alarm: add support for
 LITE PMIC peripherals

Hi David,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on rafael-pm/thermal]
[also build test ERROR on linus/master v6.1-rc8 next-20221207]
[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/David-Collins/thermal-qcom-spmi-temp-alarm-add-support-for-new-TEMP_ALARM-subtypes/20221207-100725
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal
patch link:    https://lore.kernel.org/r/fa5b6b7a88b23f3efb15f4da4a2fdfa6e6d57cb2.1670375556.git.quic_collinsd%40quicinc.com
patch subject: [PATCH v2 3/3] thermal: qcom-spmi-temp-alarm: add support for LITE PMIC peripherals
config: powerpc-allmodconfig
compiler: powerpc-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/e0a2cf4754a17500d98226eb7fa3e10822bd497b
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review David-Collins/thermal-qcom-spmi-temp-alarm-add-support-for-new-TEMP_ALARM-subtypes/20221207-100725
        git checkout e0a2cf4754a17500d98226eb7fa3e10822bd497b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/thermal/

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

All errors (new ones prefixed by >>):

   drivers/thermal/qcom/qcom-spmi-temp-alarm.c: In function 'qpnp_tm_set_temp_lite_thresh':
>> drivers/thermal/qcom/qcom-spmi-temp-alarm.c:374:16: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
     374 |         reg |= FIELD_PREP(LITE_TEMP_CFG_THRESHOLD_MASK, thresh);
         |                ^~~~~~~~~~
   drivers/thermal/qcom/qcom-spmi-temp-alarm.c: In function 'qpnp_tm_temp_lite_init':
>> drivers/thermal/qcom/qcom-spmi-temp-alarm.c:648:18: error: implicit declaration of function 'FIELD_GET'; did you mean 'FOLL_GET'? [-Werror=implicit-function-declaration]
     648 |         thresh = FIELD_GET(LITE_TEMP_CFG_THRESHOLD_MASK, reg);
         |                  ^~~~~~~~~
         |                  FOLL_GET
   cc1: some warnings being treated as errors


vim +/FIELD_PREP +374 drivers/thermal/qcom/qcom-spmi-temp-alarm.c

   314	
   315	static int qpnp_tm_set_temp_lite_thresh(struct qpnp_tm_chip *chip, int trip,
   316					       int temp)
   317	{
   318		int ret, temp_cfg, i;
   319		const long *temp_map;
   320		u16 addr;
   321		u8 reg, thresh;
   322	
   323		if (trip < 0 || trip >= STAGE_COUNT) {
   324			dev_err(chip->dev, "invalid TEMP_LITE trip = %d\n", trip);
   325			return -EINVAL;
   326		}
   327	
   328		switch (trip) {
   329		case 0:
   330			temp_map = temp_map_lite_warning;
   331			addr = QPNP_TM_REG_LITE_TEMP_CFG1;
   332			break;
   333		case 1:
   334			/*
   335			 * The second trip point is purely in software to facilitate
   336			 * a controlled shutdown after the warning threshold is crossed
   337			 * but before the automatic hardware shutdown threshold is
   338			 * crossed.
   339			 */
   340			return 0;
   341		case 2:
   342			temp_map = temp_map_lite_shutdown;
   343			addr = QPNP_TM_REG_LITE_TEMP_CFG2;
   344			break;
   345		default:
   346			return 0;
   347		}
   348	
   349		if (temp < temp_map[THRESH_MIN] || temp > temp_map[THRESH_MAX]) {
   350			dev_err(chip->dev, "invalid TEMP_LITE temp = %d\n", temp);
   351			return -EINVAL;
   352		}
   353	
   354		thresh = 0;
   355		temp_cfg = temp_map[thresh];
   356		for (i = THRESH_MAX; i >= THRESH_MIN; i--) {
   357			if (temp >= temp_map[i]) {
   358				thresh = i;
   359				temp_cfg = temp_map[i];
   360				break;
   361			}
   362		}
   363	
   364		if (temp_cfg == chip->temp_dac_map[trip])
   365			return 0;
   366	
   367		ret = qpnp_tm_read(chip, addr, &reg);
   368		if (ret < 0) {
   369			dev_err(chip->dev, "LITE_TEMP_CFG read failed, ret=%d\n", ret);
   370			return ret;
   371		}
   372	
   373		reg &= ~LITE_TEMP_CFG_THRESHOLD_MASK;
 > 374		reg |= FIELD_PREP(LITE_TEMP_CFG_THRESHOLD_MASK, thresh);
   375	
   376		ret = qpnp_tm_write(chip, addr, reg);
   377		if (ret < 0) {
   378			dev_err(chip->dev, "LITE_TEMP_CFG write failed, ret=%d\n", ret);
   379			return ret;
   380		}
   381	
   382		chip->temp_dac_map[trip] = temp_cfg;
   383	
   384		return 0;
   385	}
   386	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (323443 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ