tree:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
linux-5.7.y
head: a06eb423367eea436351ef2a92f61a4e625cf558
commit: be66f10a60e3ec0b589898f78a428bcb34095730 [620/1056] staging: wfx: fix output of
rx_stats on big endian hosts
config: i386-randconfig-s001-20200812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-168-g9554805c-dirty
git checkout be66f10a60e3ec0b589898f78a428bcb34095730
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/staging/wfx/debug.c: note: in included file (through
include/trace/trace_events.h, include/trace/define_trace.h,
drivers/staging/wfx/traces.h):
drivers/staging/wfx/./traces.h:155:1: sparse: sparse: incorrect type in argument 1
(different base types) @@ expected restricted __le16 const [usertype] *p @@ got
unsigned short [usertype] * @@
drivers/staging/wfx/./traces.h:155:1: sparse: expected restricted __le16 const
[usertype] *p
drivers/staging/wfx/./traces.h:155:1: sparse: got unsigned short [usertype] *
drivers/staging/wfx/debug.c: note: in included file (through include/trace/perf.h,
include/trace/define_trace.h, drivers/staging/wfx/traces.h):
drivers/staging/wfx/./traces.h:155:1: sparse: sparse: incorrect type in argument 1
(different base types) @@ expected restricted __le16 const [usertype] *p @@ got
unsigned short [usertype] * @@
drivers/staging/wfx/./traces.h:155:1: sparse: expected restricted __le16 const
[usertype] *p
drivers/staging/wfx/./traces.h:155:1: sparse: got unsigned short [usertype] *
drivers/staging/wfx/debug.c:78:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:79:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:80:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:81:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:82:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:83:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:85:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:86:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:87:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:89:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:90:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:91:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:92:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:93:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:94:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:95:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:96:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:97:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:98:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:99:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:100:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:101:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:103:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:104:9: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:145:20: sparse: sparse: cast to restricted __le32
drivers/staging/wfx/debug.c:156:36: sparse: sparse: cast to restricted __le32
> drivers/staging/wfx/debug.c:157:36: sparse: sparse: cast to
restricted __le16
drivers/staging/wfx/debug.c:158:41: sparse: sparse: cast to
restricted __le16
drivers/staging/wfx/debug.c:159:41: sparse: sparse: cast to restricted __le16
drivers/staging/wfx/debug.c:160:41: sparse: sparse: cast to restricted __le16
vim +157 drivers/staging/wfx/debug.c
135
136 static int wfx_rx_stats_show(struct seq_file *seq, void *v)
137 {
138 struct wfx_dev *wdev = seq->private;
139 struct hif_rx_stats *st = &wdev->rx_stats;
140 int i;
141
142 mutex_lock(&wdev->rx_stats_lock);
143 seq_printf(seq, "Timestamp: %dus\n", st->date);
144 seq_printf(seq, "Low power clock: frequency %uHz, external %s\n",
145 le32_to_cpu(st->pwr_clk_freq),
146 st->is_ext_pwr_clk ? "yes" : "no");
147 seq_printf(seq,
148 "Num. of frames: %d, PER (x10e4): %d, Throughput: %dKbps/s\n",
149 st->nb_rx_frame, st->per_total, st->throughput);
150 seq_puts(seq, " Num. of PER RSSI SNR CFO\n");
151 seq_puts(seq, " frames (x10e4) (dBm) (dB) (kHz)\n");
152 for (i = 0; i < ARRAY_SIZE(channel_names); i++) {
153 if (channel_names[i])
154 seq_printf(seq, "%5s %8d %8d %8d %8d %8d\n",
155 channel_names[i],
156 le32_to_cpu(st->nb_rx_by_rate[i]),
157 le16_to_cpu(st->per[i]),
158
(s16)le16_to_cpu(st->rssi[i]) / 100,
159 (s16)le16_to_cpu(st->snr[i]) / 100,
160 (s16)le16_to_cpu(st->cfo[i]));
161 }
162 mutex_unlock(&wdev->rx_stats_lock);
163
164 return 0;
165 }
166 DEFINE_SHOW_ATTRIBUTE(wfx_rx_stats);
167
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org