Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753442AbbFHUmC (ORCPT ); Mon, 8 Jun 2015 16:42:02 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57723 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752838AbbFHUly (ORCPT ); Mon, 8 Jun 2015 16:41:54 -0400 Date: Mon, 8 Jun 2015 13:41:53 -0700 From: "gregkh@linuxfoundation.org" To: "DHANAPAL, GNANACHANDRAN (G.)" Cc: "devel@driverdev.osuosl.org" , "mdcasey@chabloom.com" , "behanw@converseincode.com" , "mateusz.kulikowski@gmail.com" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3] Staging: rtl8192e: Casting correct Endianness Message-ID: <20150608204153.GA17791@kroah.com> References: <20150602160156.GA20704@visteon-gnana> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150602160156.GA20704@visteon-gnana> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1747 Lines: 41 On Tue, Jun 02, 2015 at 03:59:32PM +0000, DHANAPAL, GNANACHANDRAN (G.) wrote: > From: Gnanachandran Dhanapal > > Casting correct Endianness for __le16 variable used in assignment and > condition check > > Signed-off-by: Gnanachandran Dhanapal > --- > v3: Greg review comments addressed > > --- > drivers/staging/rtl8192e/rtllib_softmac.c | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c > index 9dce121..a842170 100644 > --- a/drivers/staging/rtl8192e/rtllib_softmac.c > +++ b/drivers/staging/rtl8192e/rtllib_softmac.c > @@ -1265,7 +1265,7 @@ inline struct sk_buff *rtllib_association_req(struct rtllib_network *beacon, > skb_put(skb, sizeof(struct rtllib_assoc_request_frame) + 2); > > > - hdr->header.frame_ctl = RTLLIB_STYPE_ASSOC_REQ; > + hdr->header.frame_ctl = cpu_to_le16(RTLLIB_STYPE_ASSOC_REQ); > hdr->header.duration_id = cpu_to_le16(37); > ether_addr_copy(hdr->header.addr1, beacon->bssid); > ether_addr_copy(hdr->header.addr2, ieee->dev->dev_addr); > @@ -2244,8 +2244,10 @@ inline int rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb, > struct rtllib_assoc_response_frame *assoc_resp; > struct rtllib_hdr_3addr *header = (struct rtllib_hdr_3addr *) skb->data; > > + u16 frame_ctl = le16_to_cpu(header->frame_ctl); > + Why the blank line before this variable definition? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/