* [PATCH] staging: rtl8712: Drop void pointer cast
@ 2016-02-25 20:11 Janani Ravichandran
2016-03-11 18:31 ` [Outreachy kernel] " Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Janani Ravichandran @ 2016-02-25 20:11 UTC (permalink / raw)
To: outreachy-kernel
Void pointers need not be cast to other pointer types.
Semantis patch:
@r@
expression x;
void *e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x) [...]
|
((T *)x)->f
|
- (T *)
e
)
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
---
drivers/staging/rtl8712/usb_ops_linux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8712/usb_ops_linux.c b/drivers/staging/rtl8712/usb_ops_linux.c
index c2ac581..454cdf6 100644
--- a/drivers/staging/rtl8712/usb_ops_linux.c
+++ b/drivers/staging/rtl8712/usb_ops_linux.c
@@ -334,7 +334,7 @@ void r8712_usb_read_port_cancel(struct _adapter *padapter)
void r8712_xmit_bh(void *priv)
{
int ret = false;
- struct _adapter *padapter = (struct _adapter *)priv;
+ struct _adapter *padapter = priv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
if (padapter->bDriverStopped ||
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: rtl8712: Drop void pointer cast
2016-02-25 20:11 [PATCH] staging: rtl8712: Drop void pointer cast Janani Ravichandran
@ 2016-03-11 18:31 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2016-03-11 18:31 UTC (permalink / raw)
To: Janani Ravichandran; +Cc: outreachy-kernel
On Thu, Feb 25, 2016 at 03:11:56PM -0500, Janani Ravichandran wrote:
> Void pointers need not be cast to other pointer types.
> Semantis patch:
>
> @r@
> expression x;
> void *e;
> type T;
> identifier f;
> @@
>
> (
> *((T *)e)
> |
> ((T *)x) [...]
> |
> ((T *)x)->f
> |
> - (T *)
> e
> )
>
> Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
> ---
> drivers/staging/rtl8712/usb_ops_linux.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Someone else sent this patch before you did, sorry :(
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-11 18:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-25 20:11 [PATCH] staging: rtl8712: Drop void pointer cast Janani Ravichandran
2016-03-11 18:31 ` [Outreachy kernel] " Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.