From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Joe Perches <joe@perches.com>
Cc: <ath10k@lists.infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Dan Carpenter <error27@gmail.com>
Subject: Re: checkpatch: CHECK: No space is necessary after a cast
Date: Tue, 30 Sep 2014 08:35:32 +0300 [thread overview]
Message-ID: <87bnpxy8kb.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1412013755.4302.45.camel@joe-AO725> (Joe Perches's message of "Mon, 29 Sep 2014 11:02:35 -0700")
Joe Perches <joe@perches.com> writes:
> On Mon, 2014-09-29 at 14:49 +0300, Kalle Valo wrote:
>> Hi Joe,
>>
>> I have a problem with checkpatch. On ath10k we have this function:
>>
>> static inline struct ath10k_skb_cb *ATH10K_SKB_CB(struct sk_buff *skb)
>> {
>> BUILD_BUG_ON(sizeof(struct ath10k_skb_cb) >
>> IEEE80211_TX_INFO_DRIVER_DATA_SIZE);
>> return (struct ath10k_skb_cb *)&IEEE80211_SKB_CB(skb)->driver_data;
>> }
>>
>> And the BUILD_BUG_ON triggers this warning:
>>
>> drivers/net/wireless/ath/ath10k/core.h:85: CHECK: No space is necessary after a cast
>>
>> Any advice how to handle that?
>
> It's a checkpatch false positive that could be fixed.
>
> It needs something like another test to look for
> sizeof(type) as not a cast and more arithmetic/comparison
> uses.
>
> Maybe you can test this?
It works, thank you!
Tested-by: Kalle Valo <kvalo@qca.qualcomm.com>
--
Kalle Valo
next prev parent reply other threads:[~2014-09-30 5:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <874mvq1w9v.fsf@kamboji.qca.qualcomm.com>
2014-09-29 18:02 ` checkpatch: CHECK: No space is necessary after a cast Joe Perches
2014-09-30 5:35 ` Kalle Valo [this message]
2015-02-19 5:35 Marek Lindner
2015-02-19 19:55 ` Joe Perches
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=87bnpxy8kb.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=akpm@linux-foundation.org \
--cc=ath10k@lists.infradead.org \
--cc=error27@gmail.com \
--cc=joe@perches.com \
--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