[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211171149.goapqjys-lkp@intel.com>
Date: Thu, 17 Nov 2022 11:24:35 +0800
From: kernel test robot <lkp@...el.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>, agross@...nel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
andersson@...nel.org, konrad.dybcio@...ainline.org,
robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
angelogioacchino.delregno@...labora.com,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, marijn.suijten@...ainline.org,
kernel@...labora.com
Subject: Re: [PATCH v3 2/2] soc: qcom: Add Qualcomm Ramp Controller driver
Hi AngeloGioacchino,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on robh/for-next]
[also build test ERROR on linus/master v6.1-rc5 next-20221116]
[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/AngeloGioacchino-Del-Regno/Qualcomm-Ramp-Controller-and-MSM8976-config/20221115-234706
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link: https://lore.kernel.org/r/20221115154555.324437-3-angelogioacchino.delregno%40collabora.com
patch subject: [PATCH v3 2/2] soc: qcom: Add Qualcomm Ramp Controller driver
config: s390-randconfig-c005-20221116
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 463da45892e2d2a262277b91b96f5f8c05dc25d0)
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
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/b5780f95b36cf32d6ea07cc191a665718d4e4539
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review AngeloGioacchino-Del-Regno/Qualcomm-Ramp-Controller-and-MSM8976-config/20221115-234706
git checkout b5780f95b36cf32d6ea07cc191a665718d4e4539
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash drivers/soc/qcom/
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 >>):
In file included from drivers/soc/qcom/ramp_controller.c:13:
In file included from include/linux/regmap.h:20:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from drivers/soc/qcom/ramp_controller.c:13:
In file included from include/linux/regmap.h:20:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from drivers/soc/qcom/ramp_controller.c:13:
In file included from include/linux/regmap.h:20:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/soc/qcom/ramp_controller.c:104:8: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
ack = FIELD_PREP(RC_CFG_ACK, BIT(ce));
^
12 warnings and 1 error generated.
vim +/FIELD_PREP +104 drivers/soc/qcom/ramp_controller.c
88
89 /**
90 * rc_set_cfg_update() - Ramp Controller configuration update
91 * @qrc: Main driver structure
92 * @ce: Configuration entry to update
93 *
94 * Return: Zero for success or negative number for failure
95 */
96 static int rc_set_cfg_update(struct qcom_ramp_controller *qrc, u8 ce)
97 {
98 const struct qcom_ramp_controller_desc *d = qrc->desc;
99 struct regmap *r = qrc->regmap;
100 u32 ack, val;
101 int ret;
102
103 /* The ack bit is between bits 16-31 of RC_REG_CFG_UPDATE */
> 104 ack = FIELD_PREP(RC_CFG_ACK, BIT(ce));
105
106 /* Write the configuration type first... */
107 ret = regmap_set_bits(r, d->cmd_reg + RC_REG_CFG_UPDATE, ce);
108 if (ret)
109 return ret;
110
111 /* ...and after that, enable the update bit to sync the changes */
112 ret = regmap_set_bits(r, d->cmd_reg + RC_REG_CFG_UPDATE, RC_CFG_UPDATE_EN);
113 if (ret)
114 return ret;
115
116 /* Wait for the changes to go through */
117 ret = regmap_read_poll_timeout(r, d->cmd_reg + RC_REG_CFG_UPDATE, val,
118 val & ack, 1, RC_UPDATE_TIMEOUT_US);
119 if (ret)
120 return ret;
121
122 /*
123 * Configuration update success! The CFG_UPDATE register will not be
124 * cleared automatically upon applying the configuration, so we have
125 * to do that manually in order to leave the ramp controller in a
126 * predictable and clean state.
127 */
128 ret = regmap_write(r, d->cmd_reg + RC_REG_CFG_UPDATE, 0);
129 if (ret)
130 return ret;
131
132 /* Wait for the update bit cleared ack */
133 return regmap_read_poll_timeout(r, d->cmd_reg + RC_REG_CFG_UPDATE,
134 val, !(val & RC_CFG_ACK), 1,
135 RC_UPDATE_TIMEOUT_US);
136 }
137
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (111485 bytes)
Powered by blists - more mailing lists