lkml.org 
[lkml]   [2021]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[hare-scsi-devel:scsi-private.v2 2/21] drivers/scsi/scsi_lib.c:1969:27: error: 'REQ_INTERNAL' undeclared; did you mean 'MNT_INTERNAL'?
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
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-11-10 23:35    [W:0.037 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site