Re: [PATCH v1 1/2] bus: mhi: core: Bail on writing register fields if read fails

From: kernel test robot
Date: Wed Aug 18 2021 - 22:52:07 EST


Hi Bhaumik,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20210818]
[cannot apply to linus/master v5.14-rc6 v5.14-rc5 v5.14-rc4 v5.14-rc6]
[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/Bhaumik-Bhatt/MHI-MMIO-register-write-updates/20210819-075312
base: f26c3abc432a2026ba9ee7767061a1f88aead6ec
config: arm64-randconfig-r025-20210818 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d2b574a4dea5b718e4386bf2e26af0126e5978ce)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/034c38ae851193cbeec4b4538d1a47e75198b92a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bhaumik-Bhatt/MHI-MMIO-register-write-updates/20210819-075312
git checkout 034c38ae851193cbeec4b4538d1a47e75198b92a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64

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

All warnings (new ones prefixed by >>):

>> drivers/bus/mhi/core/pm.c:133:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
mhi_write_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL,
^~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/bus/mhi/core/pm.c:136:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
mhi_write_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL,
^~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.


vim +/warn_unused_result +133 drivers/bus/mhi/core/pm.c

a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 129
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 130 void mhi_set_mhi_state(struct mhi_controller *mhi_cntrl, enum mhi_state state)
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 131 {
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 132 if (state == MHI_STATE_RESET) {
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 @133 mhi_write_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL,
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 134 MHICTRL_RESET_MASK, MHICTRL_RESET_SHIFT, 1);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 135 } else {
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 136 mhi_write_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL,
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 137 MHICTRL_MHISTATE_MASK,
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 138 MHICTRL_MHISTATE_SHIFT, state);
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 139 }
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 140 }
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 141

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

Attachment: .config.gz
Description: application/gzip