Re: [PATCH] scsi: ufs-debugfs: Add error counters
From: kernel test robot
Date: Wed Dec 16 2020 - 11:49:04 EST
Hi Adrian,
I love your patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on scsi/for-next next-20201215]
[cannot apply to v5.10]
[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/Adrian-Hunter/scsi-ufs-debugfs-Add-error-counters/20201216-222801
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-randconfig-s021-20201216 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-184-g1b896707-dirty
# https://github.com/0day-ci/linux/commit/d62bfd1751cd091c2ae671208b026c6885b8184e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Adrian-Hunter/scsi-ufs-debugfs-Add-error-counters/20201216-222801
git checkout d62bfd1751cd091c2ae671208b026c6885b8184e
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
>> drivers/scsi/ufs/ufs-debugfs.c:10:6: warning: no previous prototype for 'ufs_debugfs_init' [-Wmissing-prototypes]
10 | void ufs_debugfs_init(void)
| ^~~~~~~~~~~~~~~~
>> drivers/scsi/ufs/ufs-debugfs.c:15:6: warning: no previous prototype for 'ufs_debugfs_exit' [-Wmissing-prototypes]
15 | void ufs_debugfs_exit(void)
| ^~~~~~~~~~~~~~~~
>> drivers/scsi/ufs/ufs-debugfs.c:46:6: warning: no previous prototype for 'ufs_debugfs_hba_init' [-Wmissing-prototypes]
46 | void ufs_debugfs_hba_init(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/scsi/ufs/ufs-debugfs.c:52:6: warning: no previous prototype for 'ufs_debugfs_hba_exit' [-Wmissing-prototypes]
52 | void ufs_debugfs_hba_exit(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~
vim +/ufs_debugfs_init +10 drivers/scsi/ufs/ufs-debugfs.c
9
> 10 void ufs_debugfs_init(void)
11 {
12 ufs_debugfs_root = debugfs_create_dir("ufshcd", NULL);
13 }
14
> 15 void ufs_debugfs_exit(void)
16 {
17 debugfs_remove_recursive(ufs_debugfs_root);
18 }
19
20 static int ufs_debugfs_stats_show(struct seq_file *s, void *data)
21 {
22 struct ufs_hba *hba = s->private;
23 struct ufs_event_hist *e = hba->ufs_stats.event;
24
25 #define PRT(fmt, typ) \
26 seq_printf(s, fmt, e[UFS_EVT_ ## typ].cnt)
27
28 PRT("PHY Adapter Layer errors (except LINERESET): %llu\n", PA_ERR);
29 PRT("Data Link Layer errors: %llu\n", DL_ERR);
30 PRT("Network Layer errors: %llu\n", NL_ERR);
31 PRT("Transport Layer errors: %llu\n", TL_ERR);
32 PRT("Generic DME errors: %llu\n", DME_ERR);
33 PRT("Auto-hibernate errors: %llu\n", AUTO_HIBERN8_ERR);
34 PRT("IS Fatal errors (CEFES, SBFES, HCFES, DFES): %llu\n", FATAL_ERR);
35 PRT("DME Link Startup errors: %llu\n", LINK_STARTUP_FAIL);
36 PRT("PM Resume errors: %llu\n", RESUME_ERR);
37 PRT("PM Suspend errors : %llu\n", SUSPEND_ERR);
38 PRT("Logical Unit Resets: %llu\n", DEV_RESET);
39 PRT("Host Resets: %llu\n", HOST_RESET);
40 PRT("SCSI command aborts: %llu\n", ABORT);
41 #undef PRT
42 return 0;
43 }
44 DEFINE_SHOW_ATTRIBUTE(ufs_debugfs_stats);
45
> 46 void ufs_debugfs_hba_init(struct ufs_hba *hba)
47 {
48 hba->debugfs_root = debugfs_create_dir(dev_name(hba->dev), ufs_debugfs_root);
49 debugfs_create_file("stats", 0400, hba->debugfs_root, hba, &ufs_debugfs_stats_fops);
50 }
51
> 52 void ufs_debugfs_hba_exit(struct ufs_hba *hba)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip