Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753070AbdHWBgA (ORCPT ); Tue, 22 Aug 2017 21:36:00 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55940 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752810AbdHWBf7 (ORCPT ); Tue, 22 Aug 2017 21:35:59 -0400 Date: Tue, 22 Aug 2017 18:36:03 -0700 From: Greg KH To: Himanshu Jha Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers: staging: rtl8192e: make const qualified argument Message-ID: <20170823013603.GC3319@kroah.com> References: <1503415862-16551-1-git-send-email-himanshujha199640@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1503415862-16551-1-git-send-email-himanshujha199640@gmail.com> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1323 Lines: 37 On Tue, Aug 22, 2017 at 09:01:02PM +0530, Himanshu Jha wrote: > The ether_addr_copy expects const u8* as its second argument, therefore > pass const qualified argument instead of non-const argument. Huh, why? > > Signed-off-by: Himanshu Jha > --- > drivers/staging/rtl8192e/rtl819x_BAProc.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) Always use scripts/get_maintainer.pl on your patch to know who to send it to, and what lists as well. > > diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c > index 1720e1b..f34a4ee 100644 > --- a/drivers/staging/rtl8192e/rtl819x_BAProc.c > +++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c > @@ -97,10 +97,9 @@ static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *Dst, > > BAReq = skb_put(skb, sizeof(struct rtllib_hdr_3addr)); > > - ether_addr_copy(BAReq->addr1, Dst); > - ether_addr_copy(BAReq->addr2, ieee->dev->dev_addr); > - > - ether_addr_copy(BAReq->addr3, ieee->current_network.bssid); > + ether_addr_copy(BAReq->addr1, (const u8 *)Dst); > + ether_addr_copy(BAReq->addr2, (const u8 *)ieee->dev->dev_addr); > + ether_addr_copy(BAReq->addr3, (const u8 *)ieee->current_network.bssid); I don't understand what this patch "solves"... thanks, greg k-h