LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [linux-stable-rc:linux-4.4.y 9951/9999] drivers/ata/libata-scsi.c:1662:7: error: implicit declaration of function 'blk_rq_is_passthrough'
@ 2021-08-24  4:13 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-24  4:13 UTC (permalink / raw)
  To: Jens Axboe; +Cc: kbuild-all, linux-kernel, Greg Kroah-Hartman, Kees Cook

[-- Attachment #1: Type: text/plain, Size: 11095 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
head:   48a16935fdcdb0926ed5e743a9d8d238bbc9c243
commit: 5d784a2d4a0e302f51f6d96f44f5c21de47d6f19 [9951/9999] libata: have ata_scsi_rw_xlat() fail invalid passthrough requests
config: powerpc-buildonly-randconfig-r002-20210822 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 7.5.0
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=5d784a2d4a0e302f51f6d96f44f5c21de47d6f19
        git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
        git fetch --no-tags linux-stable-rc linux-4.4.y
        git checkout 5d784a2d4a0e302f51f6d96f44f5c21de47d6f19
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=powerpc 

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

All errors (new ones prefixed by >>):

     ^~~~~~~~~~~~~~~
   include/linux/blk-mq.h: In function 'blk_mq_rq_from_pdu':
   include/linux/blk-mq.h:247:22: error: invalid application of 'sizeof' to incomplete type 'struct request'
     return pdu - sizeof(struct request);
                         ^~~~~~
   include/linux/blk-mq.h: In function 'blk_mq_rq_to_pdu':
   include/linux/blk-mq.h:251:12: error: invalid use of undefined type 'struct request'
     return rq + 1;
               ^
   In file included from drivers/ata/libata-scsi.c:43:0:
   include/scsi/scsi_cmnd.h: At top level:
   include/scsi/scsi_cmnd.h:30:25: warning: "BLK_MAX_CDB" is not defined, evaluates to 0 [-Wundef]
    #if (MAX_COMMAND_SIZE > BLK_MAX_CDB)
                            ^~~~~~~~~~~
   include/scsi/scsi_cmnd.h:31:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB
    # error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB
      ^~~~~
   include/scsi/scsi_cmnd.h: In function 'scsi_cmd_to_driver':
   include/scsi/scsi_cmnd.h:155:45: error: dereferencing pointer to incomplete type 'struct request'
     return *(struct scsi_driver **)cmd->request->rq_disk->private_data;
                                                ^~
   include/scsi/scsi_cmnd.h: In function 'scsi_bidi_cmnd':
   include/scsi/scsi_cmnd.h:201:9: error: implicit declaration of function 'blk_bidi_rq' [-Werror=implicit-function-declaration]
     return blk_bidi_rq(cmd->request) &&
            ^~~~~~~~~~~
   include/scsi/scsi_cmnd.h: In function 'scsi_get_lba':
   include/scsi/scsi_cmnd.h:294:9: error: implicit declaration of function 'blk_rq_pos' [-Werror=implicit-function-declaration]
     return blk_rq_pos(scmd->request);
            ^~~~~~~~~~
   In file included from drivers/ata/libata-scsi.c:44:0:
   include/scsi/scsi_eh.h: At top level:
   include/scsi/scsi_eh.h:41:24: error: 'BLK_MAX_CDB' undeclared here (not in a function); did you mean 'BLK_MQ_H'?
     unsigned char eh_cmnd[BLK_MAX_CDB];
                           ^~~~~~~~~~~
                           BLK_MQ_H
   In file included from include/linux/libata.h:35:0,
                    from drivers/ata/libata-scsi.c:48:
   include/linux/ata.h: In function 'ata_id_is_lba_capacity_ok':
   include/linux/ata.h:950:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         (lba_sects >= 16383 * 63 * id[ATA_ID_HEADS]))
                    ^~
   In file included from drivers/ata/libata-scsi.c:48:0:
   include/linux/libata.h: In function 'ata_msg_init':
   include/linux/libata.h:112:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (dval < 0 || dval >= (sizeof(u32) * 8))
                          ^~
   drivers/ata/libata-scsi.c: In function 'ata_scsi_park_store':
   drivers/ata/libata-scsi.c:267:17: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     return rc ? rc : len;
                    ^
   drivers/ata/libata-scsi.c: In function 'ata_sas_scsi_ioctl':
   drivers/ata/libata-scsi.c:699:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if (val != ata_ioc32(ap))
               ^~
   In file included from include/asm-generic/bug.h:4:0,
                    from arch/powerpc/include/asm/bug.h:127,
                    from include/linux/bug.h:4,
                    from include/linux/mmdebug.h:4,
                    from include/linux/gfp.h:4,
                    from include/linux/slab.h:14,
                    from drivers/ata/libata-scsi.c:36:
   drivers/ata/libata-scsi.c: In function 'atapi_drain_needed':
   drivers/ata/libata-scsi.c:1124:29: error: 'REQ_TYPE_BLOCK_PC' undeclared (first use in this function)
     if (likely(rq->cmd_type != REQ_TYPE_BLOCK_PC))
                                ^
   include/linux/compiler.h:181:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   drivers/ata/libata-scsi.c:1124:29: note: each undeclared identifier is reported only once for each function it appears in
     if (likely(rq->cmd_type != REQ_TYPE_BLOCK_PC))
                                ^
   include/linux/compiler.h:181:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   drivers/ata/libata-scsi.c:1127:7: error: implicit declaration of function 'blk_rq_bytes'; did you mean 'clear_bits'? [-Werror=implicit-function-declaration]
     if (!blk_rq_bytes(rq) || (rq->cmd_flags & REQ_WRITE))
          ^~~~~~~~~~~~
          clear_bits
   drivers/ata/libata-scsi.c: In function 'ata_scsi_dev_config':
   drivers/ata/libata-scsi.c:1142:2: error: implicit declaration of function 'blk_queue_max_hw_sectors' [-Werror=implicit-function-declaration]
     blk_queue_max_hw_sectors(q, dev->max_sectors);
     ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/ata/libata-scsi.c:1150:3: error: implicit declaration of function 'blk_queue_update_dma_pad' [-Werror=implicit-function-declaration]
      blk_queue_update_dma_pad(q, ATA_DMA_PAD_SZ - 1);
      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/ata/libata-scsi.c:1153:35: error: dereferencing pointer to incomplete type 'struct request_queue'
      buf = kmalloc(ATAPI_MAX_DRAIN, q->bounce_gfp | GFP_KERNEL);
                                      ^~
   drivers/ata/libata-scsi.c:1159:3: error: implicit declaration of function 'blk_queue_dma_drain' [-Werror=implicit-function-declaration]
      blk_queue_dma_drain(q, atapi_drain_needed, buf, ATAPI_MAX_DRAIN);
      ^~~~~~~~~~~~~~~~~~~
   drivers/ata/libata-scsi.c:1177:2: error: implicit declaration of function 'blk_queue_update_dma_alignment'; did you mean '__assume_page_alignment'? [-Werror=implicit-function-declaration]
     blk_queue_update_dma_alignment(q, sdev->sector_size - 1);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     __assume_page_alignment
   drivers/ata/libata-scsi.c:1190:2: error: implicit declaration of function 'blk_queue_flush_queueable'; did you mean 'blk_needs_flush_plug'? [-Werror=implicit-function-declaration]
     blk_queue_flush_queueable(q, false);
     ^~~~~~~~~~~~~~~~~~~~~~~~~
     blk_needs_flush_plug
   drivers/ata/libata-scsi.c: In function 'ata_check_nblocks':
>> drivers/ata/libata-scsi.c:1662:7: error: implicit declaration of function 'blk_rq_is_passthrough' [-Werror=implicit-function-declaration]
     if (!blk_rq_is_passthrough(rq))
          ^~~~~~~~~~~~~~~~~~~~~
   drivers/ata/libata-scsi.c: In function 'ata_scsi_mode_select_xlat':
   drivers/ata/libata-scsi.c:3306:56: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (!scsi_sg_count(scmd) || scsi_sglist(scmd)->length < len)
                                                           ^
   drivers/ata/libata-scsi.c:3312:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (len < hdr_len)
             ^
   drivers/ata/libata-scsi.c:3322:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (len < bd_len)
             ^
   drivers/ata/libata-scsi.c:3358:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (pg_len > len)
                ^
   drivers/ata/libata-scsi.c:3375:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (len > pg_len)
             ^
   In file included from include/asm-generic/bug.h:4:0,
                    from arch/powerpc/include/asm/bug.h:127,
                    from include/linux/bug.h:4,
                    from include/linux/mmdebug.h:4,
                    from include/linux/gfp.h:4,
                    from include/linux/slab.h:14,
                    from drivers/ata/libata-scsi.c:36:
   drivers/ata/libata-scsi.c: In function '__ata_scsi_queuecmd':
   drivers/ata/libata-scsi.c:3497:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             len > dev->cdb_len ||
                 ^
   include/linux/compiler.h:182:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   drivers/ata/libata-scsi.c: In function 'ata_scsi_add_hosts':
   drivers/ata/libata-scsi.c:3695:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (i = 0; i < host->n_ports; i++) {
                   ^
   drivers/ata/libata-scsi.c: In function 'ata_scsi_user_scan':
   drivers/ata/libata-scsi.c:4027:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (lun != SCAN_WILD_CARD && lun)
             ^~
   drivers/ata/libata-scsi.c:4031:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      if (channel != SCAN_WILD_CARD && channel)
                  ^~
   drivers/ata/libata-scsi.c:4035:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      if (id != SCAN_WILD_CARD && id)
             ^~
   drivers/ata/libata-scsi.c: In function 'atapi_drain_needed':
   drivers/ata/libata-scsi.c:1131:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
   cc1: some warnings being treated as errors


vim +/blk_rq_is_passthrough +1662 drivers/ata/libata-scsi.c

  1656	
  1657	static bool ata_check_nblocks(struct scsi_cmnd *scmd, u32 n_blocks)
  1658	{
  1659		struct request *rq = scmd->request;
  1660		u32 req_blocks;
  1661	
> 1662		if (!blk_rq_is_passthrough(rq))
  1663			return true;
  1664	
  1665		req_blocks = blk_rq_bytes(rq) / scmd->device->sector_size;
  1666		if (n_blocks > req_blocks)
  1667			return false;
  1668	
  1669		return true;
  1670	}
  1671	

---
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: 23902 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-24  4:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24  4:13 [linux-stable-rc:linux-4.4.y 9951/9999] drivers/ata/libata-scsi.c:1662:7: error: implicit declaration of function 'blk_rq_is_passthrough' kernel test robot

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).