linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Jérôme Pouiller" <jerome.pouiller@silabs.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: drivers/staging/wfx/./traces.h:154:1: sparse: sparse: incorrect type in argument 1 (different base types)
Date: Sun, 5 Jul 2020 06:03:57 +0800	[thread overview]
Message-ID: <202007050654.h0yqDr11%lkp@intel.com> (raw)

[-- 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 --]

                 reply	other threads:[~2020-07-04 22:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202007050654.h0yqDr11%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jerome.pouiller@silabs.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).