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>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 30 Sep 2014 08:35:32 +0300
From:	Kalle Valo <kvalo@....qualcomm.com>
To:	Joe Perches <joe@...ches.com>
CC:	<ath10k@...ts.infradead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Dan Carpenter <error27@...il.com>
Subject: Re: checkpatch: CHECK: No space is necessary after a cast

Joe Perches <joe@...ches.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@....qualcomm.com>

-- 
Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ