From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752952AbcDSIot (ORCPT ); Tue, 19 Apr 2016 04:44:49 -0400 Received: from smtprelay0198.hostedemail.com ([216.40.44.198]:33385 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750969AbcDSIoq (ORCPT ); Tue, 19 Apr 2016 04:44:46 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:981:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:4321:5007:7514:7576:10004:10400:10848:11026:11232:11657:11658:11914:12043:12517:12519:12555:12679:12740:13069:13161:13229:13311:13357:13439:13894:14181:14659:14721:21080:30030:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:3,LUA_SUMMARY:none X-HE-Tag: cover69_4657c7218a741 X-Filterd-Recvd-Size: 1961 Message-ID: <1461055475.1917.17.camel@perches.com> Subject: Re: [PATCH v3 06/18] wcn36xx: Add helper macros to cast sta to priv From: Joe Perches To: Bjorn Andersson , Eugene Krasnikov , Kalle Valo Cc: Pontus Fuchs , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 19 Apr 2016 01:44:35 -0700 In-Reply-To: <1461042056-10607-7-git-send-email-bjorn.andersson@linaro.org> References: <1461042056-10607-1-git-send-email-bjorn.andersson@linaro.org> <1461042056-10607-7-git-send-email-bjorn.andersson@linaro.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu1 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 Mon, 2016-04-18 at 22:00 -0700, Bjorn Andersson wrote: > From: Pontus Fuchs > > While poking at this I also change two related things. I rename one > variable to make the names consistent. I also move one assignment of > priv_sta to the declaration to save a few lines. trivia: The commit subject is a bit misleading as this adds the preferred static inline not a macro. > diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h [] > @@ -275,4 +275,10 @@ struct ieee80211_vif *wcn36xx_priv_to_vif(struct wcn36xx_vif *vif_priv) >   return container_of((void *) vif_priv, struct ieee80211_vif, drv_priv); >  } >   > +static inline > +struct wcn36xx_sta *wcn36xx_sta_to_priv(struct ieee80211_sta *sta) > +{ > + return (struct wcn36xx_sta *)sta->drv_priv; > +} > + >  #endif /* _WCN36XX_H_ */ And this could be const struct ieee8021_sta *sta