public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH v1 1/1] ata: libata-scsi: Refactor scsi_6_lba_len() with use of get_unaligned_be24()
Date: Fri, 29 Jul 2022 11:36:15 +0800	[thread overview]
Message-ID: <202207291100.qslmQQl1-lkp@intel.com> (raw)
In-Reply-To: <20220726154518.73248-1-andriy.shevchenko@linux.intel.com>

Hi Andy,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.19-rc8 next-20220728]
[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/Andy-Shevchenko/ata-libata-scsi-Refactor-scsi_6_lba_len-with-use-of-get_unaligned_be24/20220726-234746
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git e0dccc3b76fb35bb257b4118367a883073d7390e
config: i386-randconfig-a003 (https://download.01.org/0day-ci/archive/20220729/202207291100.qslmQQl1-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/ae9a00d0e0375aa2aea7a61dc2894d9d06005f8e
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Andy-Shevchenko/ata-libata-scsi-Refactor-scsi_6_lba_len-with-use-of-get_unaligned_be24/20220726-234746
        git checkout ae9a00d0e0375aa2aea7a61dc2894d9d06005f8e
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/ata/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/ata/libata-scsi.c: In function 'scsi_6_lba_len':
>> drivers/ata/libata-scsi.c:1320:39: warning: passing argument 1 of 'get_unaligned_be24' makes pointer from integer without a cast [-Wint-conversion]
    1320 |         *plba = get_unaligned_be24(cdb[1]) & 0x1fffff;
         |                                    ~~~^~~
         |                                       |
         |                                       u8 {aka unsigned char}
   In file included from ./arch/x86/include/generated/asm/unaligned.h:1,
                    from drivers/ata/libata-scsi.c:33:
   include/asm-generic/unaligned.h:90:50: note: expected 'const void *' but argument is of type 'u8' {aka 'unsigned char'}
      90 | static inline u32 get_unaligned_be24(const void *p)
         |                                      ~~~~~~~~~~~~^


vim +/get_unaligned_be24 +1320 drivers/ata/libata-scsi.c

  1307	
  1308	/**
  1309	 *	scsi_6_lba_len - Get LBA and transfer length
  1310	 *	@cdb: SCSI command to translate
  1311	 *
  1312	 *	Calculate LBA and transfer length for 6-byte commands.
  1313	 *
  1314	 *	RETURNS:
  1315	 *	@plba: the LBA
  1316	 *	@plen: the transfer length
  1317	 */
  1318	static void scsi_6_lba_len(const u8 *cdb, u64 *plba, u32 *plen)
  1319	{
> 1320		*plba = get_unaligned_be24(cdb[1]) & 0x1fffff;
  1321		*plen = cdb[4];
  1322	}
  1323	

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

  parent reply	other threads:[~2022-07-29  3:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26 15:45 [PATCH v1 1/1] ata: libata-scsi: Refactor scsi_6_lba_len() with use of get_unaligned_be24() Andy Shevchenko
2022-07-26 17:55 ` Christoph Hellwig
2022-07-29  3:25 ` kernel test robot
2022-07-29  3:25 ` kernel test robot
2022-07-29  3:36 ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-16 13:18 Andy Shevchenko
2024-10-17  0:32 ` Damien Le Moal
2024-10-17  8:14 ` Niklas Cassel

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=202207291100.qslmQQl1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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