* [PATCH] drivers: staging: rtl8192e: make const qualified argument
@ 2017-08-22 15:31 Himanshu Jha
2017-08-23 1:36 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Himanshu Jha @ 2017-08-22 15:31 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Himanshu Jha
The ether_addr_copy expects const u8* as its second argument, therefore
pass const qualified argument instead of non-const argument.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
---
drivers/staging/rtl8192e/rtl819x_BAProc.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
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);
BAReq->frame_ctl = cpu_to_le16(RTLLIB_STYPE_MANAGE_ACT);
tag = skb_put(skb, 9);
@@ -160,9 +159,9 @@ static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst,
Delba = skb_put(skb, sizeof(struct rtllib_hdr_3addr));
- ether_addr_copy(Delba->addr1, dst);
- ether_addr_copy(Delba->addr2, ieee->dev->dev_addr);
- ether_addr_copy(Delba->addr3, ieee->current_network.bssid);
+ ether_addr_copy(Delba->addr1, (const u8 *)dst);
+ ether_addr_copy(Delba->addr2, (const u8 *)ieee->dev->dev_addr);
+ ether_addr_copy(Delba->addr3, (const u8 *)ieee->current_network.bssid);
Delba->frame_ctl = cpu_to_le16(RTLLIB_STYPE_MANAGE_ACT);
tag = skb_put(skb, 6);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers: staging: rtl8192e: make const qualified argument
2017-08-22 15:31 [PATCH] drivers: staging: rtl8192e: make const qualified argument Himanshu Jha
@ 2017-08-23 1:36 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2017-08-23 1:36 UTC (permalink / raw)
To: Himanshu Jha; +Cc: linux-kernel
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 <himanshujha199640@gmail.com>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-23 1:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-22 15:31 [PATCH] drivers: staging: rtl8192e: make const qualified argument Himanshu Jha
2017-08-23 1:36 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).