All of lore.kernel.org
 help / color / mirror / Atom feed
* [hare-scsi-devel:scsi-result-rework 135/146] drivers/scsi/scsi_debug.c:1203:12: error: invalid storage class for function 'fetch_to_dev_buffer'
@ 2021-04-22  5:18 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-04-22  5:18 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git scsi-result-rework
head:   19720ea7b22b443a182646eef7edc36e32e7b515
commit: 56cfbbc9742fcafa726599c74f2d2f5c774b0557 [135/146] scsi_debug: set hostbyte before returning the result
config: mips-randconfig-r016-20210421 (attached as .config)
compiler: mips64el-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/commit/?id=56cfbbc9742fcafa726599c74f2d2f5c774b0557
        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-result-rework
        git checkout 56cfbbc9742fcafa726599c74f2d2f5c774b0557
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=mips 

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

All error/warnings (new ones prefixed by >>):

   drivers/scsi/scsi_debug.c: In function 'p_fill_from_dev_buffer':
>> drivers/scsi/scsi_debug.c:1203:12: error: invalid storage class for function 'fetch_to_dev_buffer'
    1203 | static int fetch_to_dev_buffer(struct scsi_cmnd *scp, unsigned char *arr,
         |            ^~~~~~~~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1203:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
    1203 | static int fetch_to_dev_buffer(struct scsi_cmnd *scp, unsigned char *arr,
         | ^~~~~~
>> drivers/scsi/scsi_debug.c:1224:12: error: invalid storage class for function 'inquiry_vpd_83'
    1224 | static int inquiry_vpd_83(unsigned char *arr, int port_group_id,
         |            ^~~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1318:12: error: invalid storage class for function 'inquiry_vpd_84'
    1318 | static int inquiry_vpd_84(unsigned char *arr)
         |            ^~~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1325:12: error: invalid storage class for function 'inquiry_vpd_85'
    1325 | static int inquiry_vpd_85(unsigned char *arr)
         |            ^~~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1360:12: error: invalid storage class for function 'inquiry_vpd_88'
    1360 | static int inquiry_vpd_88(unsigned char *arr, int target_dev_id)
         |            ^~~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1447:12: error: invalid storage class for function 'inquiry_vpd_89'
    1447 | static int inquiry_vpd_89(unsigned char *arr)
         |            ^~~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1462:12: error: invalid storage class for function 'inquiry_vpd_b0'
    1462 | static int inquiry_vpd_b0(unsigned char *arr)
         |            ^~~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1509:12: error: invalid storage class for function 'inquiry_vpd_b1'
    1509 | static int inquiry_vpd_b1(struct sdebug_dev_info *devip, unsigned char *arr)
         |            ^~~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1523:12: error: invalid storage class for function 'inquiry_vpd_b2'
    1523 | static int inquiry_vpd_b2(unsigned char *arr)
         |            ^~~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1542:12: error: invalid storage class for function 'inquiry_vpd_b6'
    1542 | static int inquiry_vpd_b6(struct sdebug_dev_info *devip, unsigned char *arr)
         |            ^~~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1564:12: error: invalid storage class for function 'resp_inquiry'
    1564 | static int resp_inquiry(struct scsi_cmnd *scp, struct sdebug_dev_info *devip)
         |            ^~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1732:12: error: invalid storage class for function 'resp_requests'
    1732 | static int resp_requests(struct scsi_cmnd *scp,
         |            ^~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1786:12: error: invalid storage class for function 'resp_start_stop'
    1786 | static int resp_start_stop(struct scsi_cmnd *scp, struct sdebug_dev_info *devip)
         |            ^~~~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1829:17: error: invalid storage class for function 'get_sdebug_capacity'
    1829 | static sector_t get_sdebug_capacity(void)
         |                 ^~~~~~~~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1841:12: error: invalid storage class for function 'resp_readcap'
    1841 | static int resp_readcap(struct scsi_cmnd *scp,
         |            ^~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1860:12: error: invalid storage class for function 'resp_readcap16'
    1860 | static int resp_readcap16(struct scsi_cmnd *scp,
         |            ^~~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1899:12: error: invalid storage class for function 'resp_report_tgtpgs'
    1899 | static int resp_report_tgtpgs(struct scsi_cmnd *scp,
         |            ^~~~~~~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:1977:12: error: invalid storage class for function 'resp_rsup_opcodes'
    1977 | static int resp_rsup_opcodes(struct scsi_cmnd *scp,
         |            ^~~~~~~~~~~~~~~~~
>> drivers/scsi/scsi_debug.c:2128:12: error: invalid storage class for function 'resp_rsup_tmfs'
    2128 | static int resp_rsup_tmfs(struct scsi_cmnd *scp,
         |            ^~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2157:12: error: invalid storage class for function 'resp_err_recov_pg'
    2157 | static int resp_err_recov_pg(unsigned char *p, int pcontrol, int target)
         |            ^~~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2168:12: error: invalid storage class for function 'resp_disconnect_pg'
    2168 | static int resp_disconnect_pg(unsigned char *p, int pcontrol, int target)
         |            ^~~~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2179:12: error: invalid storage class for function 'resp_format_pg'
    2179 | static int resp_format_pg(unsigned char *p, int pcontrol, int target)
         |            ^~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2199:12: error: invalid storage class for function 'resp_caching_pg'
    2199 | static int resp_caching_pg(unsigned char *p, int pcontrol, int target)
         |            ^~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2219:12: error: invalid storage class for function 'resp_ctrl_m_pg'
    2219 | static int resp_ctrl_m_pg(unsigned char *p, int pcontrol, int target)
         |            ^~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2243:12: error: invalid storage class for function 'resp_iec_m_pg'
    2243 | static int resp_iec_m_pg(unsigned char *p, int pcontrol, int target)
         |            ^~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2258:12: error: invalid storage class for function 'resp_sas_sf_m_pg'
    2258 | static int resp_sas_sf_m_pg(unsigned char *p, int pcontrol, int target)
         |            ^~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2270:12: error: invalid storage class for function 'resp_sas_pcd_m_spg'
    2270 | static int resp_sas_pcd_m_spg(unsigned char *p, int pcontrol, int target,
         |            ^~~~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2303:12: error: invalid storage class for function 'resp_sas_sha_m_spg'
    2303 | static int resp_sas_sha_m_spg(unsigned char *p, int pcontrol)
         |            ^~~~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2317:12: error: invalid storage class for function 'resp_mode_sense'
    2317 | static int resp_mode_sense(struct scsi_cmnd *scp,
         |            ^~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2483:12: error: invalid storage class for function 'resp_mode_select'
    2483 | static int resp_mode_select(struct scsi_cmnd *scp,
         |            ^~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2567:12: error: invalid storage class for function 'resp_temp_l_pg'
    2567 | static int resp_temp_l_pg(unsigned char *arr)
         |            ^~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2577:12: error: invalid storage class for function 'resp_ie_l_pg'
    2577 | static int resp_ie_l_pg(unsigned char *arr)
         |            ^~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2592:12: error: invalid storage class for function 'resp_log_sense'
    2592 | static int resp_log_sense(struct scsi_cmnd *scp,
         |            ^~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2670:20: error: invalid storage class for function 'sdebug_dev_is_zoned'
    2670 | static inline bool sdebug_dev_is_zoned(struct sdebug_dev_info *devip)
         |                    ^~~~~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2675:32: error: invalid storage class for function 'zbc_zone'
    2675 | static struct sdeb_zone_state *zbc_zone(struct sdebug_dev_info *devip,
         |                                ^~~~~~~~
   drivers/scsi/scsi_debug.c:2681:20: error: invalid storage class for function 'zbc_zone_is_conv'
    2681 | static inline bool zbc_zone_is_conv(struct sdeb_zone_state *zsp)
         |                    ^~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2686:13: error: invalid storage class for function 'zbc_close_zone'
    2686 | static void zbc_close_zone(struct sdebug_dev_info *devip,
         |             ^~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2711:13: error: invalid storage class for function 'zbc_close_imp_open_zone'
    2711 | static void zbc_close_imp_open_zone(struct sdebug_dev_info *devip)
         |             ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2724:13: error: invalid storage class for function 'zbc_open_zone'
    2724 | static void zbc_open_zone(struct sdebug_dev_info *devip,
         |             ^~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2755:13: error: invalid storage class for function 'zbc_inc_wp'
    2755 | static void zbc_inc_wp(struct sdebug_dev_info *devip,
         |             ^~~~~~~~~~
   drivers/scsi/scsi_debug.c:2797:12: error: invalid storage class for function 'check_zbc_access_params'
    2797 | static int check_zbc_access_params(struct scsi_cmnd *scp,
         |            ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2869:19: error: invalid storage class for function 'check_device_access_params'
    2869 | static inline int check_device_access_params
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2902:39: error: invalid storage class for function 'devip2sip'
    2902 | static inline struct sdeb_store_info *devip2sip(struct sdebug_dev_info *devip,
         |                                       ^~~~~~~~~
   drivers/scsi/scsi_debug.c:2913:12: error: invalid storage class for function 'do_device_access'
    2913 | static int do_device_access(struct sdeb_store_info *sip, struct scsi_cmnd *scp,
         |            ^~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2956:12: error: invalid storage class for function 'do_dout_fetch'
    2956 | static int do_dout_fetch(struct scsi_cmnd *scp, u32 num, u8 *doutp)
         |            ^~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2971:13: error: invalid storage class for function 'comp_write_worker'
    2971 | static bool comp_write_worker(struct sdeb_store_info *sip, u64 lba, u32 num,
         |             ^~~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:3001:15: error: invalid storage class for function 'dif_compute_csum'
    3001 | static __be16 dif_compute_csum(const void *buf, int len)
         |               ^~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:3013:12: error: invalid storage class for function 'dif_verify'
    3013 | static int dif_verify(struct t10_pi_tuple *sdt, const void *data,
         |            ^~~~~~~~~~
   drivers/scsi/scsi_debug.c:3040:13: error: invalid storage class for function 'dif_copy_prot'
    3040 | static void dif_copy_prot(struct scsi_cmnd *scp, sector_t sector,
         |             ^~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:3086:12: error: invalid storage class for function 'prot_verify_read'
    3086 | static int prot_verify_read(struct scsi_cmnd *scp, sector_t start_sec,
         |            ^~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:3118:12: error: invalid storage class for function 'resp_read_dt0'
    3118 | static int resp_read_dt0(struct scsi_cmnd *scp, struct sdebug_dev_info *devip)
         |            ^~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:3250:13: error: invalid storage class for function 'dump_sector'
    3250 | static void dump_sector(unsigned char *buf, int len)


vim +/fetch_to_dev_buffer +1203 drivers/scsi/scsi_debug.c

fb0cc8d1c1881c Douglas Gilbert   2016-05-31  1199  
fb0cc8d1c1881c Douglas Gilbert   2016-05-31  1200  /* Fetches from SCSI "data-out" buffer. Returns number of bytes fetched into
fb0cc8d1c1881c Douglas Gilbert   2016-05-31  1201   * 'arr' or -1 if error.
fb0cc8d1c1881c Douglas Gilbert   2016-05-31  1202   */
^1da177e4c3f41 Linus Torvalds    2005-04-16 @1203  static int fetch_to_dev_buffer(struct scsi_cmnd *scp, unsigned char *arr,
21a6182924d531 FUJITA Tomonori   2008-03-09  1204  			       int arr_len)
^1da177e4c3f41 Linus Torvalds    2005-04-16  1205  {
21a6182924d531 FUJITA Tomonori   2008-03-09  1206  	if (!scsi_bufflen(scp))
^1da177e4c3f41 Linus Torvalds    2005-04-16  1207  		return 0;
ae3d56d81507c3 Christoph Hellwig 2019-01-29  1208  	if (scp->sc_data_direction != DMA_TO_DEVICE)
^1da177e4c3f41 Linus Torvalds    2005-04-16  1209  		return -1;
21a6182924d531 FUJITA Tomonori   2008-03-09  1210  
21a6182924d531 FUJITA Tomonori   2008-03-09  1211  	return scsi_sg_copy_to_buffer(scp, arr, arr_len);
^1da177e4c3f41 Linus Torvalds    2005-04-16  1212  }
^1da177e4c3f41 Linus Torvalds    2005-04-16  1213  
^1da177e4c3f41 Linus Torvalds    2005-04-16  1214  
e5203cf05282a4 Hannes Reinecke   2017-10-02  1215  static char sdebug_inq_vendor_id[9] = "Linux   ";
e5203cf05282a4 Hannes Reinecke   2017-10-02  1216  static char sdebug_inq_product_id[17] = "scsi_debug      ";
9b760fd8776475 Douglas Gilbert   2017-12-05  1217  static char sdebug_inq_product_rev[5] = SDEBUG_VERSION;
1b37bd606deef0 Douglas Gilbert   2016-05-06  1218  /* Use some locally assigned NAAs for SAS addresses. */
1b37bd606deef0 Douglas Gilbert   2016-05-06  1219  static const u64 naa3_comp_a = 0x3222222000000000ULL;
1b37bd606deef0 Douglas Gilbert   2016-05-06  1220  static const u64 naa3_comp_b = 0x3333333000000000ULL;
1b37bd606deef0 Douglas Gilbert   2016-05-06  1221  static const u64 naa3_comp_c = 0x3111111000000000ULL;
^1da177e4c3f41 Linus Torvalds    2005-04-16  1222  
cbf67842c3d9e7 Douglas Gilbert   2014-07-26  1223  /* Device identification VPD page. Returns number of bytes placed in arr */
760f3b0342df19 Douglas Gilbert   2016-05-06 @1224  static int inquiry_vpd_83(unsigned char *arr, int port_group_id,
5a09e39810ae04 Hannes Reinecke   2006-10-20  1225  			  int target_dev_id, int dev_id_num,
09ba24c18c7e0c Douglas Gilbert   2016-05-06  1226  			  const char *dev_id_str, int dev_id_str_len,
bf47643389bbc1 Christoph Hellwig 2017-05-17  1227  			  const uuid_t *lu_name)
^1da177e4c3f41 Linus Torvalds    2005-04-16  1228  {
c65b1445d153a6 Douglas Gilbert   2006-06-06  1229  	int num, port_a;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1230  	char b[32];
^1da177e4c3f41 Linus Torvalds    2005-04-16  1231  
c65b1445d153a6 Douglas Gilbert   2006-06-06  1232  	port_a = target_dev_id + 1;
^1da177e4c3f41 Linus Torvalds    2005-04-16  1233  	/* T10 vendor identifier field format (faked) */
^1da177e4c3f41 Linus Torvalds    2005-04-16  1234  	arr[0] = 0x2;	/* ASCII */
^1da177e4c3f41 Linus Torvalds    2005-04-16  1235  	arr[1] = 0x1;
^1da177e4c3f41 Linus Torvalds    2005-04-16  1236  	arr[2] = 0x0;
e5203cf05282a4 Hannes Reinecke   2017-10-02  1237  	memcpy(&arr[4], sdebug_inq_vendor_id, 8);
e5203cf05282a4 Hannes Reinecke   2017-10-02  1238  	memcpy(&arr[12], sdebug_inq_product_id, 16);
^1da177e4c3f41 Linus Torvalds    2005-04-16  1239  	memcpy(&arr[28], dev_id_str, dev_id_str_len);
^1da177e4c3f41 Linus Torvalds    2005-04-16  1240  	num = 8 + 16 + dev_id_str_len;
^1da177e4c3f41 Linus Torvalds    2005-04-16  1241  	arr[3] = num;
^1da177e4c3f41 Linus Torvalds    2005-04-16  1242  	num += 4;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1243  	if (dev_id_num >= 0) {
09ba24c18c7e0c Douglas Gilbert   2016-05-06  1244  		if (sdebug_uuid_ctl) {
09ba24c18c7e0c Douglas Gilbert   2016-05-06  1245  			/* Locally assigned UUID */
09ba24c18c7e0c Douglas Gilbert   2016-05-06  1246  			arr[num++] = 0x1;  /* binary (not necessarily sas) */
09ba24c18c7e0c Douglas Gilbert   2016-05-06  1247  			arr[num++] = 0xa;  /* PIV=0, lu, naa */
09ba24c18c7e0c Douglas Gilbert   2016-05-06  1248  			arr[num++] = 0x0;
09ba24c18c7e0c Douglas Gilbert   2016-05-06  1249  			arr[num++] = 0x12;
09ba24c18c7e0c Douglas Gilbert   2016-05-06  1250  			arr[num++] = 0x10; /* uuid type=1, locally assigned */
09ba24c18c7e0c Douglas Gilbert   2016-05-06  1251  			arr[num++] = 0x0;
09ba24c18c7e0c Douglas Gilbert   2016-05-06  1252  			memcpy(arr + num, lu_name, 16);
09ba24c18c7e0c Douglas Gilbert   2016-05-06  1253  			num += 16;
09ba24c18c7e0c Douglas Gilbert   2016-05-06  1254  		} else {
1b37bd606deef0 Douglas Gilbert   2016-05-06  1255  			/* NAA-3, Logical unit identifier (binary) */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1256  			arr[num++] = 0x1;  /* binary (not necessarily sas) */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1257  			arr[num++] = 0x3;  /* PIV=0, lu, naa */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1258  			arr[num++] = 0x0;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1259  			arr[num++] = 0x8;
1b37bd606deef0 Douglas Gilbert   2016-05-06  1260  			put_unaligned_be64(naa3_comp_b + dev_id_num, arr + num);
773642d95b8220 Douglas Gilbert   2016-04-25  1261  			num += 8;
09ba24c18c7e0c Douglas Gilbert   2016-05-06  1262  		}
c65b1445d153a6 Douglas Gilbert   2006-06-06  1263  		/* Target relative port number */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1264  		arr[num++] = 0x61;	/* proto=sas, binary */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1265  		arr[num++] = 0x94;	/* PIV=1, target port, rel port */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1266  		arr[num++] = 0x0;	/* reserved */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1267  		arr[num++] = 0x4;	/* length */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1268  		arr[num++] = 0x0;	/* reserved */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1269  		arr[num++] = 0x0;	/* reserved */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1270  		arr[num++] = 0x0;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1271  		arr[num++] = 0x1;	/* relative port A */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1272  	}
1b37bd606deef0 Douglas Gilbert   2016-05-06  1273  	/* NAA-3, Target port identifier */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1274  	arr[num++] = 0x61;	/* proto=sas, binary */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1275  	arr[num++] = 0x93;	/* piv=1, target port, naa */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1276  	arr[num++] = 0x0;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1277  	arr[num++] = 0x8;
1b37bd606deef0 Douglas Gilbert   2016-05-06  1278  	put_unaligned_be64(naa3_comp_a + port_a, arr + num);
773642d95b8220 Douglas Gilbert   2016-04-25  1279  	num += 8;
1b37bd606deef0 Douglas Gilbert   2016-05-06  1280  	/* NAA-3, Target port group identifier */
5a09e39810ae04 Hannes Reinecke   2006-10-20  1281  	arr[num++] = 0x61;	/* proto=sas, binary */
5a09e39810ae04 Hannes Reinecke   2006-10-20  1282  	arr[num++] = 0x95;	/* piv=1, target port group id */
5a09e39810ae04 Hannes Reinecke   2006-10-20  1283  	arr[num++] = 0x0;
5a09e39810ae04 Hannes Reinecke   2006-10-20  1284  	arr[num++] = 0x4;
5a09e39810ae04 Hannes Reinecke   2006-10-20  1285  	arr[num++] = 0;
5a09e39810ae04 Hannes Reinecke   2006-10-20  1286  	arr[num++] = 0;
773642d95b8220 Douglas Gilbert   2016-04-25  1287  	put_unaligned_be16(port_group_id, arr + num);
773642d95b8220 Douglas Gilbert   2016-04-25  1288  	num += 2;
1b37bd606deef0 Douglas Gilbert   2016-05-06  1289  	/* NAA-3, Target device identifier */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1290  	arr[num++] = 0x61;	/* proto=sas, binary */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1291  	arr[num++] = 0xa3;	/* piv=1, target device, naa */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1292  	arr[num++] = 0x0;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1293  	arr[num++] = 0x8;
1b37bd606deef0 Douglas Gilbert   2016-05-06  1294  	put_unaligned_be64(naa3_comp_a + target_dev_id, arr + num);
773642d95b8220 Douglas Gilbert   2016-04-25  1295  	num += 8;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1296  	/* SCSI name string: Target device identifier */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1297  	arr[num++] = 0x63;	/* proto=sas, UTF-8 */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1298  	arr[num++] = 0xa8;	/* piv=1, target device, SCSI name string */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1299  	arr[num++] = 0x0;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1300  	arr[num++] = 24;
1b37bd606deef0 Douglas Gilbert   2016-05-06  1301  	memcpy(arr + num, "naa.32222220", 12);
c65b1445d153a6 Douglas Gilbert   2006-06-06  1302  	num += 12;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1303  	snprintf(b, sizeof(b), "%08X", target_dev_id);
c65b1445d153a6 Douglas Gilbert   2006-06-06  1304  	memcpy(arr + num, b, 8);
c65b1445d153a6 Douglas Gilbert   2006-06-06  1305  	num += 8;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1306  	memset(arr + num, 0, 4);
c65b1445d153a6 Douglas Gilbert   2006-06-06  1307  	num += 4;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1308  	return num;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1309  }
c65b1445d153a6 Douglas Gilbert   2006-06-06  1310  
c65b1445d153a6 Douglas Gilbert   2006-06-06  1311  static unsigned char vpd84_data[] = {
c65b1445d153a6 Douglas Gilbert   2006-06-06  1312  /* from 4th byte */ 0x22,0x22,0x22,0x0,0xbb,0x0,
c65b1445d153a6 Douglas Gilbert   2006-06-06  1313      0x22,0x22,0x22,0x0,0xbb,0x1,
c65b1445d153a6 Douglas Gilbert   2006-06-06  1314      0x22,0x22,0x22,0x0,0xbb,0x2,
c65b1445d153a6 Douglas Gilbert   2006-06-06  1315  };
c65b1445d153a6 Douglas Gilbert   2006-06-06  1316  
cbf67842c3d9e7 Douglas Gilbert   2014-07-26  1317  /*  Software interface identification VPD page */
760f3b0342df19 Douglas Gilbert   2016-05-06 @1318  static int inquiry_vpd_84(unsigned char *arr)
c65b1445d153a6 Douglas Gilbert   2006-06-06  1319  {
c65b1445d153a6 Douglas Gilbert   2006-06-06  1320  	memcpy(arr, vpd84_data, sizeof(vpd84_data));
c65b1445d153a6 Douglas Gilbert   2006-06-06  1321  	return sizeof(vpd84_data);
c65b1445d153a6 Douglas Gilbert   2006-06-06  1322  }
c65b1445d153a6 Douglas Gilbert   2006-06-06  1323  
cbf67842c3d9e7 Douglas Gilbert   2014-07-26  1324  /* Management network addresses VPD page */
760f3b0342df19 Douglas Gilbert   2016-05-06 @1325  static int inquiry_vpd_85(unsigned char *arr)
c65b1445d153a6 Douglas Gilbert   2006-06-06  1326  {
c65b1445d153a6 Douglas Gilbert   2006-06-06  1327  	int num = 0;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1328  	const char *na1 = "https://www.kernel.org/config";
c65b1445d153a6 Douglas Gilbert   2006-06-06  1329  	const char *na2 = "http://www.kernel.org/log";
c65b1445d153a6 Douglas Gilbert   2006-06-06  1330  	int plen, olen;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1331  
c65b1445d153a6 Douglas Gilbert   2006-06-06  1332  	arr[num++] = 0x1;	/* lu, storage config */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1333  	arr[num++] = 0x0;	/* reserved */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1334  	arr[num++] = 0x0;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1335  	olen = strlen(na1);
c65b1445d153a6 Douglas Gilbert   2006-06-06  1336  	plen = olen + 1;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1337  	if (plen % 4)
c65b1445d153a6 Douglas Gilbert   2006-06-06  1338  		plen = ((plen / 4) + 1) * 4;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1339  	arr[num++] = plen;	/* length, null termianted, padded */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1340  	memcpy(arr + num, na1, olen);
c65b1445d153a6 Douglas Gilbert   2006-06-06  1341  	memset(arr + num + olen, 0, plen - olen);
c65b1445d153a6 Douglas Gilbert   2006-06-06  1342  	num += plen;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1343  
c65b1445d153a6 Douglas Gilbert   2006-06-06  1344  	arr[num++] = 0x4;	/* lu, logging */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1345  	arr[num++] = 0x0;	/* reserved */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1346  	arr[num++] = 0x0;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1347  	olen = strlen(na2);
c65b1445d153a6 Douglas Gilbert   2006-06-06  1348  	plen = olen + 1;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1349  	if (plen % 4)
c65b1445d153a6 Douglas Gilbert   2006-06-06  1350  		plen = ((plen / 4) + 1) * 4;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1351  	arr[num++] = plen;	/* length, null terminated, padded */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1352  	memcpy(arr + num, na2, olen);
c65b1445d153a6 Douglas Gilbert   2006-06-06  1353  	memset(arr + num + olen, 0, plen - olen);
c65b1445d153a6 Douglas Gilbert   2006-06-06  1354  	num += plen;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1355  
c65b1445d153a6 Douglas Gilbert   2006-06-06  1356  	return num;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1357  }
c65b1445d153a6 Douglas Gilbert   2006-06-06  1358  
c65b1445d153a6 Douglas Gilbert   2006-06-06  1359  /* SCSI ports VPD page */
760f3b0342df19 Douglas Gilbert   2016-05-06 @1360  static int inquiry_vpd_88(unsigned char *arr, int target_dev_id)
c65b1445d153a6 Douglas Gilbert   2006-06-06  1361  {
c65b1445d153a6 Douglas Gilbert   2006-06-06  1362  	int num = 0;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1363  	int port_a, port_b;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1364  
c65b1445d153a6 Douglas Gilbert   2006-06-06  1365  	port_a = target_dev_id + 1;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1366  	port_b = port_a + 1;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1367  	arr[num++] = 0x0;	/* reserved */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1368  	arr[num++] = 0x0;	/* reserved */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1369  	arr[num++] = 0x0;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1370  	arr[num++] = 0x1;	/* relative port 1 (primary) */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1371  	memset(arr + num, 0, 6);
c65b1445d153a6 Douglas Gilbert   2006-06-06  1372  	num += 6;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1373  	arr[num++] = 0x0;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1374  	arr[num++] = 12;	/* length tp descriptor */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1375  	/* naa-5 target port identifier (A) */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1376  	arr[num++] = 0x61;	/* proto=sas, binary */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1377  	arr[num++] = 0x93;	/* PIV=1, target port, NAA */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1378  	arr[num++] = 0x0;	/* reserved */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1379  	arr[num++] = 0x8;	/* length */
1b37bd606deef0 Douglas Gilbert   2016-05-06  1380  	put_unaligned_be64(naa3_comp_a + port_a, arr + num);
773642d95b8220 Douglas Gilbert   2016-04-25  1381  	num += 8;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1382  	arr[num++] = 0x0;	/* reserved */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1383  	arr[num++] = 0x0;	/* reserved */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1384  	arr[num++] = 0x0;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1385  	arr[num++] = 0x2;	/* relative port 2 (secondary) */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1386  	memset(arr + num, 0, 6);
c65b1445d153a6 Douglas Gilbert   2006-06-06  1387  	num += 6;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1388  	arr[num++] = 0x0;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1389  	arr[num++] = 12;	/* length tp descriptor */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1390  	/* naa-5 target port identifier (B) */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1391  	arr[num++] = 0x61;	/* proto=sas, binary */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1392  	arr[num++] = 0x93;	/* PIV=1, target port, NAA */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1393  	arr[num++] = 0x0;	/* reserved */
c65b1445d153a6 Douglas Gilbert   2006-06-06  1394  	arr[num++] = 0x8;	/* length */
1b37bd606deef0 Douglas Gilbert   2016-05-06  1395  	put_unaligned_be64(naa3_comp_a + port_b, arr + num);
773642d95b8220 Douglas Gilbert   2016-04-25  1396  	num += 8;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1397  
c65b1445d153a6 Douglas Gilbert   2006-06-06  1398  	return num;
c65b1445d153a6 Douglas Gilbert   2006-06-06  1399  }
c65b1445d153a6 Douglas Gilbert   2006-06-06  1400  

:::::: The code at line 1203 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34689 bytes --]

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

only message in thread, other threads:[~2021-04-22  5:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-22  5:18 [hare-scsi-devel:scsi-result-rework 135/146] drivers/scsi/scsi_debug.c:1203:12: error: invalid storage class for function 'fetch_to_dev_buffer' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.