tree:
https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git virtio-vfc.v6
head: 7e3ab9aac391a4fb2aef468332128900bdef8df6
commit: 65a1d16588d3c3cb7b09f0f162c571be3533afc4 [3/5] virtio-scsi: Add FC transport
class
config: arm64-randconfig-r012-20210314 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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/commi...
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 virtio-vfc.v6
git checkout 65a1d16588d3c3cb7b09f0f162c571be3533afc4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/scsi/virtio_scsi.c: In function 'virtscsi_complete_cmd':
> drivers/scsi/virtio_scsi.c:178:3: error: 'tgt' undeclared
(first use in this function)
178 | tgt = rport->dd_data;
| ^~~
drivers/scsi/virtio_scsi.c:178:3: note: each undeclared identifier is reported only
once for each function it appears in
drivers/scsi/virtio_scsi.c: At top level:
> drivers/scsi/virtio_scsi.c:848:2: error: expected declaration
specifiers or '...' before 'rport'
848 | rport =
starget_to_rport(starget);
| ^~~~~
drivers/scsi/virtio_scsi.c:849:2: error: expected declaration specifiers or
'...' before 'if'
849 | if (rport) {
| ^~
In file included from include/linux/atomic.h:82,
from include/asm-generic/bitops/atomic.h:5,
from arch/arm64/include/asm/bitops.h:26,
from include/linux/bitops.h:32,
from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/scsi/virtio_scsi.c:15:
include/asm-generic/atomic-instrumented.h:48:20: error: expected declaration specifiers
or '...' before 'atomic_set'
48 | #define atomic_set atomic_set
| ^~~~~~~~~~
drivers/scsi/virtio_scsi.c:875:2: note: in expansion of macro 'atomic_set'
875 | atomic_set(&tgt->reqs, 0);
| ^~~~~~~~~~
drivers/scsi/virtio_scsi.c:876:2: error: expected declaration specifiers or
'...' before 'tgt'
876 | tgt->req_vq = &vscsi->req_vqs[0];
| ^~~
drivers/scsi/virtio_scsi.c:877:2: error: expected declaration specifiers or
'...' before 'tgt'
877 | tgt->vscsi = vscsi;
| ^~~
drivers/scsi/virtio_scsi.c:878:2: error: expected declaration specifiers or
'...' before 'return'
878 | return 0;
| ^~~~~~
drivers/scsi/virtio_scsi.c:879:1: error: expected declaration specifiers or
'...' before '}' token
879 | }
| ^
drivers/scsi/virtio_scsi.c:879:1: error: expected ';', ',' or
')' before '}' token
drivers/scsi/virtio_scsi.c: In function 'virtscsi_rescan_work':
drivers/scsi/virtio_scsi.c:951:8: error: implicit declaration of function
'virtscsi_kick_cmd'; did you mean 'virtscsi_kick_vq'?
[-Werror=implicit-function-declaration]
951 | ret = virtscsi_kick_cmd(&vscsi->ctrl_vq, cmd,
sizeof(cmd->req.rescan),
| ^~~~~~~~~~~~~~~~~
| virtscsi_kick_vq
drivers/scsi/virtio_scsi.c: At top level:
drivers/scsi/virtio_scsi.c:1119:5: warning: no previous prototype for
'virtscsi_scan_finished' [-Wmissing-prototypes]
1119 | int virtscsi_scan_finished(struct Scsi_Host *sh, unsigned long time)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/virtio_scsi.c:881:13: warning: 'virtscsi_target_destroy' defined
but not used [-Wunused-function]
881 | static void virtscsi_target_destroy(struct scsi_target *starget)
| ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/tgt +178 drivers/scsi/virtio_scsi.c
156
157 /*
158 * virtscsi_complete_cmd - finish a scsi_cmd and invoke scsi_done
159 *
160 * Called with vq_lock held.
161 */
162 static void virtscsi_complete_cmd(struct virtio_scsi *vscsi, void *buf)
163 {
164 struct virtio_scsi_cmd *cmd = buf;
165 #if IS_ENABLED(CONFIG_SCSI_FC_ATTRS)
166 struct fc_rport *rport;
167 #endif
168 struct scsi_cmnd *sc = cmd->sc;
169 struct virtio_scsi_cmd_resp *resp = &cmd->resp.cmd;
170
171 dev_dbg(&sc->device->sdev_gendev,
172 "cmd %p response %u status %#02x sense_len %u\n",
173 sc, resp->response, resp->status, resp->sense_len);
174
175 #if IS_ENABLED(CONFIG_SCSI_FC_ATTRS)
176 rport = starget_to_rport(scsi_target(sc->device));
177 if (rport)
178 tgt = rport->dd_data;
179 #endif
180 sc->result = resp->status;
181 virtscsi_compute_resid(sc, virtio32_to_cpu(vscsi->vdev, resp->resid));
182 switch (resp->response) {
183 case VIRTIO_SCSI_S_OK:
184 set_host_byte(sc, DID_OK);
185 break;
186 case VIRTIO_SCSI_S_OVERRUN:
187 set_host_byte(sc, DID_ERROR);
188 break;
189 case VIRTIO_SCSI_S_ABORTED:
190 set_host_byte(sc, DID_ABORT);
191 break;
192 case VIRTIO_SCSI_S_BAD_TARGET:
193 set_host_byte(sc, DID_BAD_TARGET);
194 break;
195 case VIRTIO_SCSI_S_RESET:
196 set_host_byte(sc, DID_RESET);
197 break;
198 case VIRTIO_SCSI_S_BUSY:
199 set_host_byte(sc, DID_BUS_BUSY);
200 break;
201 case VIRTIO_SCSI_S_TRANSPORT_FAILURE:
202 set_host_byte(sc, DID_TRANSPORT_DISRUPTED);
203 break;
204 case VIRTIO_SCSI_S_TARGET_FAILURE:
205 set_host_byte(sc, DID_TARGET_FAILURE);
206 break;
207 case VIRTIO_SCSI_S_NEXUS_FAILURE:
208 set_host_byte(sc, DID_NEXUS_FAILURE);
209 break;
210 default:
211 scmd_printk(KERN_WARNING, sc, "Unknown response %d",
212 resp->response);
213 fallthrough;
214 case VIRTIO_SCSI_S_FAILURE:
215 set_host_byte(sc, DID_ERROR);
216 break;
217 }
218
219 WARN_ON(virtio32_to_cpu(vscsi->vdev, resp->sense_len) >
220 VIRTIO_SCSI_SENSE_SIZE);
221 if (sc->sense_buffer) {
222 memcpy(sc->sense_buffer, resp->sense,
223 min_t(u32,
224 virtio32_to_cpu(vscsi->vdev, resp->sense_len),
225 VIRTIO_SCSI_SENSE_SIZE));
226 if (resp->sense_len)
227 set_driver_byte(sc, DRIVER_SENSE);
228 }
229
230 sc->scsi_done(sc);
231 }
232
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org