lkml.org 
[lkml]   [2017]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303
From
From: Juergen Borleis <jbe@pengutronix.de>
Date: Fri, 7 Apr 2017 10:15:00 +0200

> +static inline struct lan9303 *ds_to_lan9303(struct dsa_switch *ds)
> +{
> + return (struct lan9303 *)ds->priv;
> +}

You never need an explicit cast from a void pointer to another kind of
pointer. Please remove this.

In fact, this therefore makes the helper kind of useless and you can
just simply go:

struct lan9303_priv *priv = ds->priv;

everywhere.

\
 
 \ /
  Last update: 2017-04-07 15:37    [W:0.145 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site