All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Kees Cook <keescook@chromium.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: luciano.coelho@intel.com, linux-kernel@vger.kernel.org,
	linux-wireless@vger.kernel.org
Subject: New sparse warning from min_t(): expression using sizeof(void)
Date: Sat, 21 Apr 2018 10:50:51 +0300	[thread overview]
Message-ID: <87a7txf15w.fsf@kamboji.qca.qualcomm.com> (raw)

Hi Kees&Linus,

after upgrading to v4.17-rc1 I started to see this sparse warning from
min_t():

drivers/net/wireless/ath/ath10k/wmi.c:4620:31: warning: expression using sizeof(void)

I counted 167 such warnings just from ath10k alone and Luca told me that
he sees similar sparse warnings with iwlwifi as well. My sparse is
pretty old (v0.5.0-44-g40791b94c56b) but Luca said updating sparse to
0.5.2 didn't help. I also see this with latest commit from Linus' tree
(83beed7b2b26).

After reverting these two commits the sparse warnings go away:

e9092d0d9796 Fix subtle macro variable shadowing in min_not_zero()
3c8ba0d61d04 kernel.h: Retain constant expression output for max()/min()

I had to revert e9092d0d9796 due to conflicts but it seems 3c8ba0d61d04
is the actual commit causing these warnings.

Is there any way to fix it? With ath10k I use sparse a lot and because
of these warnings sparse is now very annoying to use.

-- 
Kalle Valo

             reply	other threads:[~2018-04-21  7:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-21  7:50 Kalle Valo [this message]
2018-04-21  8:24 ` New sparse warning from min_t(): expression using sizeof(void) Joey Pabalinas
2018-04-21  8:54   ` Kalle Valo
2018-04-23  6:20     ` Luciano Coelho
2018-04-23  7:41       ` Joey Pabalinas
2018-04-23 14:10     ` Kalle Valo

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=87a7txf15w.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@codeaurora.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.