From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Roskin Subject: Re: [ath9k-devel] [PATCH net-next 1/2] wireless: Remove casts of void * Date: Tue, 14 Jun 2011 12:31:40 -0400 Message-ID: <4DF78CEC.70409@gnu.org> References: <337c22b774ff7f007b90b266b25c9a33ff555c48.1308024069.git.joe@perches.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Intel Linux Wireless , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "John W. Linville" , Jouni Malinen , Senthil Balasubramanian , ath9k-devel-xDcbHBWguxHbcTqmT+pZeQ@public.gmane.org, Wey-Yi Guy , Vasanthakumar Thiagarajan , Christian Lamparter , Stanislaw Gruszka To: Joe Perches Return-path: In-Reply-To: <337c22b774ff7f007b90b266b25c9a33ff555c48.1308024069.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org> Sender: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org On 06/14/2011 12:02 AM, Joe Perches wrote: > /* Get the message ID */ > - msg_id = (__be16 *) ((void *) htc_hdr + > - sizeof(struct htc_frame_hdr)); > + msg_id = (void *)htc_hdr + sizeof(struct htc_frame_hdr); I would never do stuff like this without verifying by sparse that no warnings are introduced. Sparse warnings should be avoided to keep sparse checks useful. Otherwise, important warnings would drown in the noise. -- Regards, Pavel Roskin -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html