tree: https://github.com/jsarha/linux topic/cros-sof-v4.19 head: d7a3e91d8d16d1ef8653deec5a1fffc4de034a0c commit: cb830e93e29574f6eae7ecd6f709905e15c245cb [923/6555] UPSTREAM: soc: qcom: Allow COMPILE_TEST of qcom SoC Kconfigs config: mips-randconfig-s031-20220624 compiler: mips-linux-gcc (GCC) 11.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-31-g4880bd19-dirty # https://github.com/jsarha/linux/commit/cb830e93e29574f6eae7ecd6f709905e15c245cb git remote add jsarha https://github.com/jsarha/linux git fetch --no-tags jsarha topic/cros-sof-v4.19 git checkout cb830e93e29574f6eae7ecd6f709905e15c245cb # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash drivers/soc/qcom/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> drivers/soc/qcom/smd-rpm.c:183:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] *src @@ got unsigned char const * @@ drivers/soc/qcom/smd-rpm.c:183:47: sparse: expected void const volatile [noderef] *src drivers/soc/qcom/smd-rpm.c:183:47: sparse: got unsigned char const * drivers/soc/qcom/smd-rpm.c:41: warning: Function parameter or member 'dev' not described in 'qcom_smd_rpm' drivers/soc/qcom/smd-rpm.c:105: warning: Function parameter or member 'state' not described in 'qcom_rpm_smd_write' vim +183 drivers/soc/qcom/smd-rpm.c 936f14cf4e6716 Bjorn Andersson 2015-07-27 152 5052de8deff561 Bjorn Andersson 2017-03-27 153 static int qcom_smd_rpm_callback(struct rpmsg_device *rpdev, 5052de8deff561 Bjorn Andersson 2017-03-27 154 void *data, 5052de8deff561 Bjorn Andersson 2017-03-27 155 int count, 5052de8deff561 Bjorn Andersson 2017-03-27 156 void *priv, 5052de8deff561 Bjorn Andersson 2017-03-27 157 u32 addr) 936f14cf4e6716 Bjorn Andersson 2015-07-27 158 { 936f14cf4e6716 Bjorn Andersson 2015-07-27 159 const struct qcom_rpm_header *hdr = data; 30b7ea5eda0afb Stephen Boyd 2015-09-02 160 size_t hdr_length = le32_to_cpu(hdr->length); 936f14cf4e6716 Bjorn Andersson 2015-07-27 161 const struct qcom_rpm_message *msg; 5052de8deff561 Bjorn Andersson 2017-03-27 162 struct qcom_smd_rpm *rpm = dev_get_drvdata(&rpdev->dev); 936f14cf4e6716 Bjorn Andersson 2015-07-27 163 const u8 *buf = data + sizeof(struct qcom_rpm_header); 30b7ea5eda0afb Stephen Boyd 2015-09-02 164 const u8 *end = buf + hdr_length; 936f14cf4e6716 Bjorn Andersson 2015-07-27 165 char msgbuf[32]; 936f14cf4e6716 Bjorn Andersson 2015-07-27 166 int status = 0; 30b7ea5eda0afb Stephen Boyd 2015-09-02 167 u32 len, msg_length; 936f14cf4e6716 Bjorn Andersson 2015-07-27 168 30b7ea5eda0afb Stephen Boyd 2015-09-02 169 if (le32_to_cpu(hdr->service_type) != RPM_SERVICE_TYPE_REQUEST || 30b7ea5eda0afb Stephen Boyd 2015-09-02 170 hdr_length < sizeof(struct qcom_rpm_message)) { b853cb9628bfbc Bjorn Andersson 2016-03-28 171 dev_err(rpm->dev, "invalid request\n"); 936f14cf4e6716 Bjorn Andersson 2015-07-27 172 return 0; 936f14cf4e6716 Bjorn Andersson 2015-07-27 173 } 936f14cf4e6716 Bjorn Andersson 2015-07-27 174 936f14cf4e6716 Bjorn Andersson 2015-07-27 175 while (buf < end) { 936f14cf4e6716 Bjorn Andersson 2015-07-27 176 msg = (struct qcom_rpm_message *)buf; 30b7ea5eda0afb Stephen Boyd 2015-09-02 177 msg_length = le32_to_cpu(msg->length); 30b7ea5eda0afb Stephen Boyd 2015-09-02 178 switch (le32_to_cpu(msg->msg_type)) { 936f14cf4e6716 Bjorn Andersson 2015-07-27 179 case RPM_MSG_TYPE_MSG_ID: 936f14cf4e6716 Bjorn Andersson 2015-07-27 180 break; 936f14cf4e6716 Bjorn Andersson 2015-07-27 181 case RPM_MSG_TYPE_ERR: 30b7ea5eda0afb Stephen Boyd 2015-09-02 182 len = min_t(u32, ALIGN(msg_length, 4), sizeof(msgbuf)); 936f14cf4e6716 Bjorn Andersson 2015-07-27 @183 memcpy_fromio(msgbuf, msg->message, len); 936f14cf4e6716 Bjorn Andersson 2015-07-27 184 msgbuf[len - 1] = 0; 936f14cf4e6716 Bjorn Andersson 2015-07-27 185 936f14cf4e6716 Bjorn Andersson 2015-07-27 186 if (!strcmp(msgbuf, "resource does not exist")) 936f14cf4e6716 Bjorn Andersson 2015-07-27 187 status = -ENXIO; 936f14cf4e6716 Bjorn Andersson 2015-07-27 188 else 936f14cf4e6716 Bjorn Andersson 2015-07-27 189 status = -EINVAL; 936f14cf4e6716 Bjorn Andersson 2015-07-27 190 break; 936f14cf4e6716 Bjorn Andersson 2015-07-27 191 } 936f14cf4e6716 Bjorn Andersson 2015-07-27 192 30b7ea5eda0afb Stephen Boyd 2015-09-02 193 buf = PTR_ALIGN(buf + 2 * sizeof(u32) + msg_length, 4); 936f14cf4e6716 Bjorn Andersson 2015-07-27 194 } 936f14cf4e6716 Bjorn Andersson 2015-07-27 195 936f14cf4e6716 Bjorn Andersson 2015-07-27 196 rpm->ack_status = status; 936f14cf4e6716 Bjorn Andersson 2015-07-27 197 complete(&rpm->ack); 936f14cf4e6716 Bjorn Andersson 2015-07-27 198 return 0; 936f14cf4e6716 Bjorn Andersson 2015-07-27 199 } 936f14cf4e6716 Bjorn Andersson 2015-07-27 200 :::::: The code at line 183 was first introduced by commit :::::: 936f14cf4e67168fcd37f10cebf5a475f490fb6e soc: qcom: Driver for the Qualcomm RPM over SMD :::::: TO: Bjorn Andersson :::::: CC: Andy Gross -- 0-DAY CI Kernel Test Service https://01.org/lkp