tree:
https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
reserved-tags.v3
head: 7e846b812c89291eaaf342f3a37944fefc17473b
commit: 0b5ae3c0eabfefb5573b84647788cc5d9af89135 [39/41] hisi_sas: use task tag to
reference the slot
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project
1ccde533425a4ba9d379510206ad680ff9702129)
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 0b5ae3c0eabfefb5573b84647788cc5d9af89135
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/scsi/hisi_sas/hisi_sas_main.c:1147:18: error: variable has incomplete type
'struct scsilun'
struct scsilun lun;
^
drivers/scsi/hisi_sas/hisi_sas_main.c:1147:10: note: forward declaration of 'struct
scsilun'
struct scsilun lun;
^
drivers/scsi/hisi_sas/hisi_sas_main.c:1150:8: warning: address of function
'dev_is_sata' will always evaluate to 'true' [-Wpointer-bool-conversion]
if (!dev_is_sata) {
~^~~~~~~~~~~
drivers/scsi/hisi_sas/hisi_sas_main.c:1150:8: note: prefix with the address-of operator
to silence this warning
if (!dev_is_sata) {
^
&
drivers/scsi/hisi_sas/hisi_sas_main.c:1151:24: error: initializing 'struct
sas_ssp_task' with an expression of incompatible type 'void *'
struct sas_ssp_task ssp_task = parameter;
^ ~~~~~~~~~
> drivers/scsi/hisi_sas/hisi_sas_main.c:1972:1: warning: unused
label 'err_out' [-Wunused-label]
err_out:
^~~~~~~~
drivers/scsi/hisi_sas/hisi_sas_main.c:2549:41: warning: shift count >= width of type
[-Wshift-count-overflow]
error = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
3 warnings and 2 errors generated.
vim +/err_out +1972 drivers/scsi/hisi_sas/hisi_sas_main.c
0efff300c72df7 John Garry 2015-11-18 1899
441c27401470c4 John Garry 2016-08-24 1900 static int
ad6048325c7807 John Garry 2017-06-14 1901 hisi_sas_internal_abort_task_exec(struct
hisi_hba *hisi_hba, int device_id,
441c27401470c4 John Garry 2016-08-24 1902 struct sas_task *task, int
abort_flag,
795f25a31b542d John Garry 2019-02-06 1903 int task_tag, struct hisi_sas_dq
*dq)
441c27401470c4 John Garry 2016-08-24 1904 {
441c27401470c4 John Garry 2016-08-24 1905 struct domain_device *device =
task->dev;
441c27401470c4 John Garry 2016-08-24 1906 struct hisi_sas_device *sas_dev =
device->lldd_dev;
11b752490a051b John Garry 2017-06-14 1907 struct device *dev = hisi_hba->dev;
441c27401470c4 John Garry 2016-08-24 1908 struct hisi_sas_port *port;
441c27401470c4 John Garry 2016-08-24 1909 struct hisi_sas_slot *slot;
2e244f0f5bcaa9 John Garry 2017-03-23 1910 struct asd_sas_port *sas_port =
device->port;
441c27401470c4 John Garry 2016-08-24 1911 struct hisi_sas_cmd_hdr *cmd_hdr_base;
441c27401470c4 John Garry 2016-08-24 1912 int dlvry_queue_slot, dlvry_queue,
n_elem = 0, rc, slot_idx;
897cc769bcc092 John Garry 2019-08-05 1913 unsigned long flags;
fa222db0b03689 Xiang Chen 2018-05-09 1914 int wr_q_index;
441c27401470c4 John Garry 2016-08-24 1915
917d3bdaf8f2ab Xiaofei Tan 2017-08-11 1916 if
(unlikely(test_bit(HISI_SAS_REJECT_CMD_BIT, &hisi_hba->flags)))
06ec0fb97c0281 Xiang Chen 2017-03-23 1917 return -EINVAL;
06ec0fb97c0281 Xiang Chen 2017-03-23 1918
441c27401470c4 John Garry 2016-08-24 1919 if (!device->port)
441c27401470c4 John Garry 2016-08-24 1920 return -1;
441c27401470c4 John Garry 2016-08-24 1921
2e244f0f5bcaa9 John Garry 2017-03-23 1922 port = to_hisi_sas_port(sas_port);
441c27401470c4 John Garry 2016-08-24 1923
0b5ae3c0eabfef Hannes Reinecke 2020-04-29 1924 slot_idx = task->tag;
0b5ae3c0eabfef Hannes Reinecke 2020-04-29 1925 if (task->tag == -1)
0b5ae3c0eabfef Hannes Reinecke 2020-04-29 1926 return -EAGAIN;
b1a49412f0aed7 Xiang Chen 2017-06-14 1927
3de0026dad6b8e Xiang Chen 2018-05-09 1928 slot =
&hisi_hba->slot_info[slot_idx];
fa222db0b03689 Xiang Chen 2018-05-09 1929
e9dc5e11c97ee9 Xiang Chen 2020-01-20 1930 spin_lock(&dq->lock);
897cc769bcc092 John Garry 2019-08-05 1931 wr_q_index = dq->wr_point;
897cc769bcc092 John Garry 2019-08-05 1932 dq->wr_point = (dq->wr_point + 1)
% HISI_SAS_QUEUE_SLOTS;
fa222db0b03689 Xiang Chen 2018-05-09 1933 list_add_tail(&slot->delivery,
&dq->list);
e9dc5e11c97ee9 Xiang Chen 2020-01-20 1934 spin_unlock(&dq->lock);
e9dc5e11c97ee9 Xiang Chen 2020-01-20 1935 spin_lock(&sas_dev->lock);
4fefe5bbf599d6 Xiang Chen 2019-02-06 1936 list_add_tail(&slot->entry,
&sas_dev->list);
e9dc5e11c97ee9 Xiang Chen 2020-01-20 1937 spin_unlock(&sas_dev->lock);
441c27401470c4 John Garry 2016-08-24 1938
b1a49412f0aed7 Xiang Chen 2017-06-14 1939 dlvry_queue = dq->id;
fa222db0b03689 Xiang Chen 2018-05-09 1940 dlvry_queue_slot = wr_q_index;
b1a49412f0aed7 Xiang Chen 2017-06-14 1941
4fefe5bbf599d6 Xiang Chen 2019-02-06 1942 slot->device_id =
sas_dev->device_id;
441c27401470c4 John Garry 2016-08-24 1943 slot->n_elem = n_elem;
441c27401470c4 John Garry 2016-08-24 1944 slot->dlvry_queue = dlvry_queue;
441c27401470c4 John Garry 2016-08-24 1945 slot->dlvry_queue_slot =
dlvry_queue_slot;
441c27401470c4 John Garry 2016-08-24 1946 cmd_hdr_base =
hisi_hba->cmd_hdr[dlvry_queue];
441c27401470c4 John Garry 2016-08-24 1947 slot->cmd_hdr =
&cmd_hdr_base[dlvry_queue_slot];
441c27401470c4 John Garry 2016-08-24 1948 slot->task = task;
441c27401470c4 John Garry 2016-08-24 1949 slot->port = port;
cd938e535e909b Xiang Chen 2018-05-02 1950 slot->is_internal = true;
441c27401470c4 John Garry 2016-08-24 1951 task->lldd_task = slot;
441c27401470c4 John Garry 2016-08-24 1952
441c27401470c4 John Garry 2016-08-24 1953 memset(slot->cmd_hdr, 0,
sizeof(struct hisi_sas_cmd_hdr));
031da09c110106 Xiang Chen 2017-08-11 1954 memset(hisi_sas_cmd_hdr_addr_mem(slot),
0, HISI_SAS_COMMAND_TABLE_SZ);
d380f55503ed28 Xiang Chen 2019-08-05 1955
memset(hisi_sas_status_buf_addr_mem(slot), 0,
d380f55503ed28 Xiang Chen 2019-08-05 1956 sizeof(struct
hisi_sas_err_record));
441c27401470c4 John Garry 2016-08-24 1957
a2b3820bddfbff Xiang Chen 2018-05-09 1958 hisi_sas_task_prep_abort(hisi_hba, slot,
device_id,
441c27401470c4 John Garry 2016-08-24 1959 abort_flag, task_tag);
441c27401470c4 John Garry 2016-08-24 1960
54c9dd2d26d095 John Garry 2017-03-23 1961
spin_lock_irqsave(&task->task_state_lock, flags);
441c27401470c4 John Garry 2016-08-24 1962 task->task_state_flags |=
SAS_TASK_AT_INITIATOR;
54c9dd2d26d095 John Garry 2017-03-23 1963
spin_unlock_irqrestore(&task->task_state_lock, flags);
1c09b663168bb5 Xiaofei Tan 2018-07-18 1964 WRITE_ONCE(slot->ready, 1);
b1a49412f0aed7 Xiang Chen 2017-06-14 1965 /* send abort command to the chip */
e9dc5e11c97ee9 Xiang Chen 2020-01-20 1966 spin_lock(&dq->lock);
b1a49412f0aed7 Xiang Chen 2017-06-14 1967 hisi_hba->hw->start_delivery(dq);
e9dc5e11c97ee9 Xiang Chen 2020-01-20 1968 spin_unlock(&dq->lock);
441c27401470c4 John Garry 2016-08-24 1969
441c27401470c4 John Garry 2016-08-24 1970 return 0;
441c27401470c4 John Garry 2016-08-24 1971
441c27401470c4 John Garry 2016-08-24 @1972 err_out:
441c27401470c4 John Garry 2016-08-24 1973 dev_err(dev, "internal abort task
prep: failed[%d]!\n", rc);
441c27401470c4 John Garry 2016-08-24 1974
441c27401470c4 John Garry 2016-08-24 1975 return rc;
441c27401470c4 John Garry 2016-08-24 1976 }
441c27401470c4 John Garry 2016-08-24 1977
:::::: The code at line 1972 was first introduced by commit
:::::: 441c27401470c417cf4a33ab9c17bcefdf1ecca3 scsi: hisi_sas: add internal abort main
code
:::::: TO: John Garry <john.garry(a)huawei.com>
:::::: CC: Martin K. Petersen <martin.petersen(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org