LKML Archive on lore.kernel.org
 help / color / Atom feed
* drivers/staging/wfx/./traces.h:154:1: sparse: sparse: incorrect type in argument 1 (different base types)
@ 2020-07-04 22:03 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-07-04 22:03 UTC (permalink / raw)
  To: Jérôme Pouiller; +Cc: kbuild-all, linux-kernel, Greg Kroah-Hartman


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

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@intel.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

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

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

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-04 22:03 drivers/staging/wfx/./traces.h:154:1: sparse: sparse: incorrect type in argument 1 (different base types) kernel test robot

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git