lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202007050654.h0yqDr11%lkp@intel.com>
Date:   Sun, 5 Jul 2020 06:03:57 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jérôme Pouiller <jerome.pouiller@...abs.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: drivers/staging/wfx/./traces.h:154:1: sparse: sparse: incorrect type
 in argument 1 (different base types)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   35e884f89df4c48566d745dc5a97a0d058d04263
commit: 1cc298c9152352b36a7b0019b40e1863689727b2 staging: wfx: add tracepoints for HIF
date:   9 months ago
config: x86_64-randconfig-s021-20200705 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-3-gfa153962-dirty
        git checkout 1cc298c9152352b36a7b0019b40e1863689727b2
        # 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@...el.com>


sparse warnings: (new ones prefixed by >>)

>> drivers/staging/wfx/./traces.h:154: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:154:1: sparse:     expected restricted __le16 const [usertype] *p
   drivers/staging/wfx/./traces.h:154:1: sparse:     got unsigned short [usertype] *
>> drivers/staging/wfx/./traces.h:154: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:154:1: sparse:     expected restricted __le16 const [usertype] *p
   drivers/staging/wfx/./traces.h:154:1: sparse:     got unsigned short [usertype] *

vim +154 drivers/staging/wfx/./traces.h

   153	
 > 154	DECLARE_EVENT_CLASS(hif_data,
   155		TP_PROTO(struct hif_msg *hif, int tx_fill_level, bool is_recv),
   156		TP_ARGS(hif, tx_fill_level, is_recv),
   157		TP_STRUCT__entry(
   158			__field(int, tx_fill_level)
   159			__field(int, msg_id)
   160			__field(const char *, msg_type)
   161			__field(int, msg_len)
   162			__field(int, buf_len)
   163			__field(int, if_id)
   164			__field(int, mib)
   165			__array(u8, buf, 128)
   166		),
   167		TP_fast_assign(
   168			int header_len;
   169	
   170			__entry->tx_fill_level = tx_fill_level;
   171			__entry->msg_len = hif->len;
   172			__entry->msg_id = hif->id;
   173			__entry->if_id = hif->interface;
   174			if (is_recv)
   175				__entry->msg_type = __entry->msg_id & 0x80 ? "IND" : "CNF";
   176			else
   177				__entry->msg_type = "REQ";
   178			if (!is_recv &&
   179			    (__entry->msg_id == HIF_REQ_ID_READ_MIB || __entry->msg_id == HIF_REQ_ID_WRITE_MIB)) {
   180				__entry->mib = le16_to_cpup((u16 *) hif->body);
   181				header_len = 4;
   182			} else {
   183				__entry->mib = -1;
   184				header_len = 0;
   185			}
   186			__entry->buf_len = min_t(int, __entry->msg_len, sizeof(__entry->buf))
   187					   - sizeof(struct hif_msg) - header_len;
   188			memcpy(__entry->buf, hif->body + header_len, __entry->buf_len);
   189		),
   190		TP_printk("%d:%d:%s_%s%s%s: %s%s (%d bytes)",
   191			__entry->tx_fill_level,
   192			__entry->if_id,
   193			__print_symbolic(__entry->msg_id, hif_msg_list),
   194			__entry->msg_type,
   195			__entry->mib != -1 ? "/" : "",
   196			__entry->mib != -1 ? __print_symbolic(__entry->mib, hif_mib_list) : "",
   197			__print_hex(__entry->buf, __entry->buf_len),
   198			__entry->msg_len > sizeof(__entry->buf) ? " ..." : "",
   199			__entry->msg_len
   200		)
   201	);
   202	DEFINE_EVENT(hif_data, hif_send,
   203		TP_PROTO(struct hif_msg *hif, int tx_fill_level, bool is_recv),
   204		TP_ARGS(hif, tx_fill_level, is_recv));
   205	#define _trace_hif_send(hif, tx_fill_level) trace_hif_send(hif, tx_fill_level, false)
   206	DEFINE_EVENT(hif_data, hif_recv,
   207		TP_PROTO(struct hif_msg *hif, int tx_fill_level, bool is_recv),
   208		TP_ARGS(hif, tx_fill_level, is_recv));
   209	#define _trace_hif_recv(hif, tx_fill_level) trace_hif_recv(hif, tx_fill_level, true)
   210	

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

Download attachment ".config.gz" of type "application/gzip" (31629 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ