From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Stanley Chu <stanley.chu@mediatek.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Pengshun Zhao <pengshun.zhao@mediatek.com>
Subject: [kbuild] drivers/scsi/ufs/ufs-mediatek.c:530:17: sparse: sparse: dubious: x & !y
Date: Thu, 25 Feb 2021 18:35:15 +0300 [thread overview]
Message-ID: <20210225153515.GB2222@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 2540 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 29c395c77a9a514c5857c45ceae2665e9bd99ac7
commit: 488edafb1120f715bebd80b6fe4089f83fb082b2 scsi: ufs-mediatek: Introduce low-power mode for device power supply
config: arm64-randconfig-s031-20210225 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.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.3-229-g60c1f270-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=488edafb1120f715bebd80b6fe4089f83fb082b2
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 488edafb1120f715bebd80b6fe4089f83fb082b2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
drivers/scsi/ufs/ufs-mediatek.c:182:5: sparse: sparse: symbol 'ufs_mtk_wait_link_state' was not declared. Should it be static?
>> drivers/scsi/ufs/ufs-mediatek.c:530:17: sparse: sparse: dubious: x & !y
vim +530 drivers/scsi/ufs/ufs-mediatek.c
488edafb1120f7 Stanley Chu 2020-06-01 525 static void ufs_mtk_vreg_set_lpm(struct ufs_hba *hba, bool lpm)
488edafb1120f7 Stanley Chu 2020-06-01 526 {
488edafb1120f7 Stanley Chu 2020-06-01 527 if (!hba->vreg_info.vccq2)
488edafb1120f7 Stanley Chu 2020-06-01 528 return;
488edafb1120f7 Stanley Chu 2020-06-01 529
488edafb1120f7 Stanley Chu 2020-06-01 @530 if (lpm & !hba->vreg_info.vcc->enabled)
This works because both sides are bool, but why not just use &&?
488edafb1120f7 Stanley Chu 2020-06-01 531 regulator_set_mode(hba->vreg_info.vccq2->reg,
488edafb1120f7 Stanley Chu 2020-06-01 532 REGULATOR_MODE_IDLE);
488edafb1120f7 Stanley Chu 2020-06-01 533 else if (!lpm)
488edafb1120f7 Stanley Chu 2020-06-01 534 regulator_set_mode(hba->vreg_info.vccq2->reg,
488edafb1120f7 Stanley Chu 2020-06-01 535 REGULATOR_MODE_NORMAL);
488edafb1120f7 Stanley Chu 2020-06-01 536 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35477 bytes --]
[-- Attachment #3: Type: text/plain, Size: 149 bytes --]
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org
reply other threads:[~2021-02-25 15:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210225153515.GB2222@kadam \
--to=dan.carpenter@oracle.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=martin.petersen@oracle.com \
--cc=pengshun.zhao@mediatek.com \
--cc=stanley.chu@mediatek.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
all inboxes | Powered by JetHome®