linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Bean Huo <beanhuo@micron.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Avri Altman <avri.altman@wdc.com>
Subject: drivers/scsi/ufs/ufshpb.c:335:25: sparse: sparse: incorrect type in assignment (different base types)
Date: Fri, 15 Apr 2022 10:05:59 +0800	[thread overview]
Message-ID: <202204150904.vrT7zPxT-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a19944809fe9942e6a96292490717904d0690c21
commit: 63522bf3aced0a782b59f0314dbad5cdc8b14c59 scsi: ufs: core: Add L2P entry swap quirk for Micron UFS
date:   8 months ago
config: powerpc-randconfig-s032-20220414 (https://download.01.org/0day-ci/archive/20220415/202204150904.vrT7zPxT-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 11.2.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-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=63522bf3aced0a782b59f0314dbad5cdc8b14c59
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 63522bf3aced0a782b59f0314dbad5cdc8b14c59
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/scsi/ufs/

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/ufshpb.c:335:27: sparse: sparse: cast from restricted __be64
>> drivers/scsi/ufs/ufshpb.c:335:25: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be64 [usertype] ppn_tmp @@     got unsigned long long [usertype] @@
   drivers/scsi/ufs/ufshpb.c:335:25: sparse:     expected restricted __be64 [usertype] ppn_tmp
   drivers/scsi/ufs/ufshpb.c:335:25: sparse:     got unsigned long long [usertype]

vim +335 drivers/scsi/ufs/ufshpb.c

   324	
   325	static void
   326	ufshpb_set_hpb_read_to_upiu(struct ufs_hba *hba, struct ufshpb_lu *hpb,
   327				    struct ufshcd_lrb *lrbp, u32 lpn, __be64 ppn,
   328				    u8 transfer_len, int read_id)
   329	{
   330		unsigned char *cdb = lrbp->cmd->cmnd;
   331		__be64 ppn_tmp = ppn;
   332		cdb[0] = UFSHPB_READ;
   333	
   334		if (hba->dev_quirks & UFS_DEVICE_QUIRK_SWAP_L2P_ENTRY_FOR_HPB_READ)
 > 335			ppn_tmp = swab64(ppn);
   336	
   337		/* ppn value is stored as big-endian in the host memory */
   338		memcpy(&cdb[6], &ppn_tmp, sizeof(__be64));
   339		cdb[14] = transfer_len;
   340		cdb[15] = read_id;
   341	
   342		lrbp->cmd->cmd_len = UFS_CDB_SIZE;
   343	}
   344	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-04-15  2:09 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=202204150904.vrT7zPxT-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.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;
as well as URLs for NNTP newsgroup(s).