mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [hare-scsi-devel:scsi-private.v2 2/21] drivers/scsi/scsi_lib.c:1969:27: error: 'REQ_INTERNAL' undeclared; did you mean 'MNT_INTERNAL'?
@ 2021-11-10 22:33 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-11-10 22:33 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: kbuild-all, linux-kernel

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git scsi-private.v2
head:   915b986531e666d840f72752c597fb6b4ea69d35
commit: ab62e1bf357cb49bc1202b317666790b4eb1fc12 [2/21] scsi: add scsi_{get,put}_internal_cmd() helper
config: ia64-defconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.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/hare/scsi-devel.git/commit/?id=ab62e1bf357cb49bc1202b317666790b4eb1fc12
        git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
        git fetch --no-tags hare-scsi-devel scsi-private.v2
        git checkout ab62e1bf357cb49bc1202b317666790b4eb1fc12
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/

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

   drivers/scsi/scsi_lib.c: In function 'scsi_get_internal_cmd':
>> drivers/scsi/scsi_lib.c:1969:27: error: 'REQ_INTERNAL' undeclared (first use in this function); did you mean 'MNT_INTERNAL'?
    1969 |         unsigned int op = REQ_INTERNAL | op_flags;
         |                           ^~~~~~~~~~~~
         |                           MNT_INTERNAL
   drivers/scsi/scsi_lib.c:1969:27: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/scsi/scsi_lib.c:1977:13: error: 'struct scsi_cmnd' has no member named 'request'
    1977 |         scmd->request = rq;
         |             ^~
   drivers/scsi/scsi_lib.c: In function 'scsi_put_internal_cmd':
>> drivers/scsi/scsi_lib.c:1991:13: error: implicit declaration of function 'blk_rq_is_internal'; did you mean 'blk_qc_t_is_internal'? [-Werror=implicit-function-declaration]
    1991 |         if (blk_rq_is_internal(rq))
         |             ^~~~~~~~~~~~~~~~~~
         |             blk_qc_t_is_internal
   cc1: some warnings being treated as errors


vim +1969 drivers/scsi/scsi_lib.c

  1954	
  1955	/**
  1956	 * scsi_get_internal_cmd - allocate an intenral SCSI command
  1957	 * @sdev: SCSI device from which to allocate the command
  1958	 * @data_direction: Data direction for the allocated command
  1959	 * @op_flags: request allocation flags
  1960	 *
  1961	 * Allocates a SCSI command for internal LLDD use.
  1962	 */
  1963	struct scsi_cmnd *scsi_get_internal_cmd(struct scsi_device *sdev,
  1964						int data_direction, int op_flags)
  1965	{
  1966		struct request *rq;
  1967		struct scsi_cmnd *scmd;
  1968		blk_mq_req_flags_t flags = 0;
> 1969		unsigned int op = REQ_INTERNAL | op_flags;
  1970	
  1971		op |= (data_direction == DMA_TO_DEVICE) ?
  1972			REQ_OP_DRV_OUT : REQ_OP_DRV_IN;
  1973		rq = blk_mq_alloc_request(sdev->request_queue, op, flags);
  1974		if (IS_ERR(rq))
  1975			return NULL;
  1976		scmd = blk_mq_rq_to_pdu(rq);
> 1977		scmd->request = rq;
  1978		scmd->device = sdev;
  1979		return scmd;
  1980	}
  1981	EXPORT_SYMBOL_GPL(scsi_get_internal_cmd);
  1982	
  1983	/**
  1984	 * scsi_put_internal_cmd - free an internal SCSI command
  1985	 * @scmd: SCSI command to be freed
  1986	 */
  1987	void scsi_put_internal_cmd(struct scsi_cmnd *scmd)
  1988	{
  1989		struct request *rq = blk_mq_rq_from_pdu(scmd);
  1990	
> 1991		if (blk_rq_is_internal(rq))
  1992			blk_mq_free_request(rq);
  1993	}
  1994	EXPORT_SYMBOL_GPL(scsi_put_internal_cmd);
  1995	

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

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

only message in thread, other threads:[~2021-11-10 22:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10 22:33 [hare-scsi-devel:scsi-private.v2 2/21] drivers/scsi/scsi_lib.c:1969:27: error: 'REQ_INTERNAL' undeclared; did you mean 'MNT_INTERNAL'? 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

Powered by JetHome