From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751587AbdEEJel (ORCPT ); Fri, 5 May 2017 05:34:41 -0400 Received: from smtprelay0069.hostedemail.com ([216.40.44.69]:34312 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750922AbdEEJek (ORCPT ); Fri, 5 May 2017 05:34:40 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2194:2198:2199:2200:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3873:4225:4321:5007:9707:10004:10400:10848:11232:11658:11914:12043:12555:12740:12895:13069:13311:13357:13439:13894:14659:21080:21434:21451:21627:30012:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: bath18_7f461cc8d040d X-Filterd-Recvd-Size: 2041 Message-ID: <1493976873.31950.15.camel@perches.com> Subject: Re: [PATCH] mac80211: Create ieee80211_if_process_skb from ieee80211_iface_work From: Joe Perches To: Johannes Berg Cc: "David S. Miller" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 05 May 2017 02:34:33 -0700 In-Reply-To: <1493975178.2500.0.camel@sipsolutions.net> References: <401d68b9015dc036589c99a26ef4664000cc821e.1493919003.git.joe@perches.com> <1493975178.2500.0.camel@sipsolutions.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2017-05-05 at 11:06 +0200, Johannes Berg wrote: > > o Use explicit casts to proper types instead of casts to (void *) > >   and have the compiler do the implicit cast > > I see no advantage in this, why? All it does is make the code longer, > and if anything changes, you have to change it in multiple places now. It makes use of the casted to types consistent within net/mac80211 Here are the current uses. I changed iface .c to match the others. $ grep -P --include=*.[ch] "\((\w++\s*){1,2}\s*\*\).*skb->cb" net/mac80211 net/mac80211/iface.c: ra_tid = (void *)&skb->cb; net/mac80211/iface.c: ra_tid = (void *)&skb->cb; net/mac80211/iface.c: rx_agg = (void *)&skb->cb; net/mac80211/iface.c: rx_agg = (void *)&skb->cb; net/mac80211/agg-tx.c: ra_tid = (struct ieee80211_ra_tid *) &skb->cb; net/mac80211/agg-tx.c: ra_tid = (struct ieee80211_ra_tid *) &skb->cb; net/mac80211/mlme.c: struct ieee80211_rx_status *rx_status = (void *) skb->cb; net/mac80211/mlme.c: rx_status = (struct ieee80211_rx_status *) skb->cb; net/mac80211/agg-rx.c: rx_agg = (struct ieee80211_rx_agg *) &skb->cb;