From: kernel test robot <lkp@intel.com>
To: wenxiong@linux.vnet.ibm.com, jejb@linux.ibm.com
Cc: kbuild-all@lists.01.org, linux-scsi@vger.kernel.org,
brking1@linux.vnet.ibm.com, martin.petersen@oracle.com,
wenxiong@us.ibm.com,
Wen Xiong <root@ltczz405-lp2.aus.stglabs.ibm.com>
Subject: Re: [PATCH V2 1/1] scsi/ses: Saw "Failed to get diagnostic page 0x1"
Date: Sat, 11 Sep 2021 08:23:06 +0800 [thread overview]
Message-ID: <202109110826.6yzWXZIF-lkp@intel.com> (raw)
In-Reply-To: <1631300645-27662-1-git-send-email-wenxiong@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 6523 bytes --]
Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on scsi/for-next]
[also build test ERROR on mkp-scsi/for-next v5.14 next-20210910]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/wenxiong-linux-vnet-ibm-com/scsi-ses-Saw-Failed-to-get-diagnostic-page-0x1/20210911-043434
base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: microblaze-buildonly-randconfig-r001-20210910 (attached as .config)
compiler: microblaze-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://github.com/0day-ci/linux/commit/a117eeeef2a13989a97ac0e10d86ffa6314f481e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review wenxiong-linux-vnet-ibm-com/scsi-ses-Saw-Failed-to-get-diagnostic-page-0x1/20210911-043434
git checkout a117eeeef2a13989a97ac0e10d86ffa6314f481e
# 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=microblaze SHELL=/bin/bash drivers/scsi/
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 >>):
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:6,
from include/linux/kasan-checks.h:5,
from include/asm-generic/rwonce.h:26,
from ./arch/microblaze/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:264,
from include/asm-generic/bug.h:5,
from ./arch/microblaze/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/slab.h:15,
from drivers/scsi/ses.c:8:
drivers/scsi/ses.c: In function 'ses_recv_diag':
>> include/linux/stddef.h:8:14: warning: passing argument 7 of 'scsi_execute_req' makes integer from pointer without a cast [-Wint-conversion]
8 | #define NULL ((void *)0)
| ^~~~~~~~~~~
| |
| void *
drivers/scsi/ses.c:95:42: note: in expansion of macro 'NULL'
95 | bufflen, &sshdr, NULL, SES_TIMEOUT, SES_RETRIES, NULL);
| ^~~~
In file included from include/scsi/scsi_cmnd.h:12,
from drivers/scsi/ses.c:15:
include/scsi/scsi_device.h:467:61: note: expected 'int' but argument is of type 'void *'
467 | unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout,
| ~~~~^~~~~~~
>> drivers/scsi/ses.c:61:21: warning: passing argument 9 of 'scsi_execute_req' makes pointer from integer without a cast [-Wint-conversion]
61 | #define SES_RETRIES 3
| ^
| |
| int
drivers/scsi/ses.c:95:61: note: in expansion of macro 'SES_RETRIES'
95 | bufflen, &sshdr, NULL, SES_TIMEOUT, SES_RETRIES, NULL);
| ^~~~~~~~~~~
In file included from include/scsi/scsi_cmnd.h:12,
from drivers/scsi/ses.c:15:
include/scsi/scsi_device.h:468:27: note: expected 'int *' but argument is of type 'int'
468 | int retries, int *resid)
| ~~~~~^~~~~
>> drivers/scsi/ses.c:94:24: error: too many arguments to function 'scsi_execute_req'
94 | ret = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf,
| ^~~~~~~~~~~~~~~~
In file included from include/scsi/scsi_cmnd.h:12,
from drivers/scsi/ses.c:15:
include/scsi/scsi_device.h:465:19: note: declared here
465 | static inline int scsi_execute_req(struct scsi_device *sdev,
| ^~~~~~~~~~~~~~~~
vim +/scsi_execute_req +94 drivers/scsi/ses.c
59
60 #define SES_TIMEOUT (30 * HZ)
> 61 #define SES_RETRIES 3
62
63 static void init_device_slot_control(unsigned char *dest_desc,
64 struct enclosure_component *ecomp,
65 unsigned char *status)
66 {
67 memcpy(dest_desc, status, 4);
68 dest_desc[0] = 0;
69 /* only clear byte 1 for ENCLOSURE_COMPONENT_DEVICE */
70 if (ecomp->type == ENCLOSURE_COMPONENT_DEVICE)
71 dest_desc[1] = 0;
72 dest_desc[2] &= 0xde;
73 dest_desc[3] &= 0x3c;
74 }
75
76
77 static int ses_recv_diag(struct scsi_device *sdev, int page_code,
78 void *buf, int bufflen)
79 {
80 int ret;
81 unsigned char cmd[] = {
82 RECEIVE_DIAGNOSTIC,
83 1, /* Set PCV bit */
84 page_code,
85 bufflen >> 8,
86 bufflen & 0xff,
87 0
88 };
89 unsigned char recv_page_code;
90 struct scsi_sense_hdr sshdr;
91 int retries = SES_RETRIES;
92
93 do {
> 94 ret = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf,
95 bufflen, &sshdr, NULL, SES_TIMEOUT, SES_RETRIES, NULL);
96
97 } while (scsi_sense_valid(&sshdr) &&
98 sshdr.sense_key == UNIT_ATTENTION && --retries);
99
100 if (unlikely(ret))
101 return ret;
102
103 recv_page_code = ((unsigned char *)buf)[0];
104
105 if (likely(recv_page_code == page_code))
106 return ret;
107
108 /* successful diagnostic but wrong page code. This happens to some
109 * USB devices, just print a message and pretend there was an error */
110
111 sdev_printk(KERN_ERR, sdev,
112 "Wrong diagnostic page; asked for %d got %u\n",
113 page_code, recv_page_code);
114
115 return -EINVAL;
116 }
117
---
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: 37895 bytes --]
next prev parent reply other threads:[~2021-09-11 0:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 19:04 [PATCH V2 1/1] scsi/ses: Saw "Failed to get diagnostic page 0x1" wenxiong
2021-09-11 0:23 ` kernel test robot [this message]
2021-09-11 0:44 ` James Bottomley
[not found] ` <f754c31d348465f96ad4cd7541a86168@imap.linux.ibm.com>
2021-09-13 21:13 ` Martin K. Petersen
[not found] ` <OF31B21169.103CCF65-ON0025874F.00776468-0025874F.00778F79@ibm.com>
2021-09-14 15:27 ` Martin K. Petersen
2021-09-14 15:50 ` James Bottomley
2021-09-14 18:13 ` Martin K. Petersen
2021-09-14 15:52 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202109110826.6yzWXZIF-lkp@intel.com \
--to=lkp@intel.com \
--cc=brking1@linux.vnet.ibm.com \
--cc=jejb@linux.ibm.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=root@ltczz405-lp2.aus.stglabs.ibm.com \
--cc=wenxiong@linux.vnet.ibm.com \
--cc=wenxiong@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox