From: kernel test robot <lkp@intel.com>
To: Jeff Johnson <quic_jjohnson@quicinc.com>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
Jeff Johnson <quic_jjohnson@quicinc.com>
Subject: Re: [PATCH] soc: qcom: qmi: use const for struct qmi_elem_info
Date: Mon, 22 Aug 2022 22:45:37 +0800 [thread overview]
Message-ID: <202208222238.2bPtxE6h-lkp@intel.com> (raw)
In-Reply-To: <20220822064648.30794-1-quic_jjohnson@quicinc.com>
Hi Jeff,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v6.0-rc2 next-20220822]
[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/Jeff-Johnson/soc-qcom-qmi-use-const-for-struct-qmi_elem_info/20220822-144905
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1c23f9e627a7b412978b4e852793c5e3c3efc555
config: mips-buildonly-randconfig-r002-20220821 (https://download.01.org/0day-ci/archive/20220822/202208222238.2bPtxE6h-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project abce7acebd4c06c977bc4bd79170697f1122bc5e)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/84f0de3071b40fad5e5a48ad27b16ce28f9210fb
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jeff-Johnson/soc-qcom-qmi-use-const-for-struct-qmi_elem_info/20220822-144905
git checkout 84f0de3071b40fad5e5a48ad27b16ce28f9210fb
# 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=mips SHELL=/bin/bash drivers/soc/qcom/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/soc/qcom/qmi_encdec.c:94:9: error: returning 'const struct qmi_elem_info *' from a function with result type 'struct qmi_elem_info *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
return temp_ei;
^~~~~~~
1 error generated.
vim +94 drivers/soc/qcom/qmi_encdec.c
9b8a11e82615274 Bjorn Andersson 2017-12-05 59
84f0de3071b40fa Jeff Johnson 2022-08-21 60 static int qmi_encode(const struct qmi_elem_info *ei_array, void *out_buf,
9b8a11e82615274 Bjorn Andersson 2017-12-05 61 const void *in_c_struct, u32 out_buf_len,
9b8a11e82615274 Bjorn Andersson 2017-12-05 62 int enc_level);
9b8a11e82615274 Bjorn Andersson 2017-12-05 63
84f0de3071b40fa Jeff Johnson 2022-08-21 64 static int qmi_decode(const struct qmi_elem_info *ei_array, void *out_c_struct,
9b8a11e82615274 Bjorn Andersson 2017-12-05 65 const void *in_buf, u32 in_buf_len, int dec_level);
9b8a11e82615274 Bjorn Andersson 2017-12-05 66
9b8a11e82615274 Bjorn Andersson 2017-12-05 67 /**
9b8a11e82615274 Bjorn Andersson 2017-12-05 68 * skip_to_next_elem() - Skip to next element in the structure to be encoded
9b8a11e82615274 Bjorn Andersson 2017-12-05 69 * @ei_array: Struct info describing the element to be skipped.
9b8a11e82615274 Bjorn Andersson 2017-12-05 70 * @level: Depth level of encoding/decoding to identify nested structures.
9b8a11e82615274 Bjorn Andersson 2017-12-05 71 *
9b8a11e82615274 Bjorn Andersson 2017-12-05 72 * This function is used while encoding optional elements. If the flag
9b8a11e82615274 Bjorn Andersson 2017-12-05 73 * corresponding to an optional element is not set, then encoding the
9b8a11e82615274 Bjorn Andersson 2017-12-05 74 * optional element can be skipped. This function can be used to perform
9b8a11e82615274 Bjorn Andersson 2017-12-05 75 * that operation.
9b8a11e82615274 Bjorn Andersson 2017-12-05 76 *
9b8a11e82615274 Bjorn Andersson 2017-12-05 77 * Return: struct info of the next element that can be encoded.
9b8a11e82615274 Bjorn Andersson 2017-12-05 78 */
84f0de3071b40fa Jeff Johnson 2022-08-21 79 static struct qmi_elem_info *skip_to_next_elem(const struct qmi_elem_info *ei_array,
9b8a11e82615274 Bjorn Andersson 2017-12-05 80 int level)
9b8a11e82615274 Bjorn Andersson 2017-12-05 81 {
84f0de3071b40fa Jeff Johnson 2022-08-21 82 const struct qmi_elem_info *temp_ei = ei_array;
9b8a11e82615274 Bjorn Andersson 2017-12-05 83 u8 tlv_type;
9b8a11e82615274 Bjorn Andersson 2017-12-05 84
9b8a11e82615274 Bjorn Andersson 2017-12-05 85 if (level > 1) {
9b8a11e82615274 Bjorn Andersson 2017-12-05 86 temp_ei = temp_ei + 1;
9b8a11e82615274 Bjorn Andersson 2017-12-05 87 } else {
9b8a11e82615274 Bjorn Andersson 2017-12-05 88 do {
9b8a11e82615274 Bjorn Andersson 2017-12-05 89 tlv_type = temp_ei->tlv_type;
9b8a11e82615274 Bjorn Andersson 2017-12-05 90 temp_ei = temp_ei + 1;
9b8a11e82615274 Bjorn Andersson 2017-12-05 91 } while (tlv_type == temp_ei->tlv_type);
9b8a11e82615274 Bjorn Andersson 2017-12-05 92 }
9b8a11e82615274 Bjorn Andersson 2017-12-05 93
9b8a11e82615274 Bjorn Andersson 2017-12-05 @94 return temp_ei;
9b8a11e82615274 Bjorn Andersson 2017-12-05 95 }
9b8a11e82615274 Bjorn Andersson 2017-12-05 96
--
0-DAY CI Kernel Test Service
https://01.org/lkp
parent reply other threads:[~2022-08-22 14:45 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20220822064648.30794-1-quic_jjohnson@quicinc.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202208222238.2bPtxE6h-lkp@intel.com \
--to=lkp@intel.com \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=kbuild-all@lists.01.org \
--cc=konrad.dybcio@somainline.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=quic_jjohnson@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox