All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: octeon: Fixing coding style for minor notices.
@ 2018-07-29 14:43 Georgios Tsotsos
  2018-07-29 17:33 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Georgios Tsotsos @ 2018-07-29 14:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Georgios Tsotsos, John Smith, devel, linux-kernel

Fixing coding style for a few lines that were reported to check from
checkpatch.pl in minor cases for alignment and ending with parenthesis.

Signed-off-by: Georgios Tsotsos <tsotsos@gmail.com>
---
 drivers/staging/octeon/ethernet.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index 9b15c9ed844b..1e258deecacc 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -141,8 +141,8 @@ static void cvm_oct_periodic_worker(struct work_struct *work)
 	if (priv->poll)
 		priv->poll(cvm_oct_device[priv->port]);
 
-	cvm_oct_device[priv->port]->netdev_ops->ndo_get_stats(
-						cvm_oct_device[priv->port]);
+	cvm_oct_device[priv->port]->netdev_ops
+				->ndo_get_stats(cvm_oct_device[priv->port]);
 
 	if (!atomic_read(&cvm_oct_poll_queue_stopping))
 		schedule_delayed_work(&priv->port_periodic_work, HZ);
@@ -621,8 +621,8 @@ static const struct net_device_ops cvm_oct_pow_netdev_ops = {
 #endif
 };
 
-static struct device_node *cvm_oct_of_get_child(
-				const struct device_node *parent, int reg_val)
+static struct device_node *cvm_oct_of_get_child(const struct device_node *parent
+						, int reg_val)
 {
 	struct device_node *node = NULL;
 	int size;
@@ -818,7 +818,7 @@ static int cvm_oct_probe(struct platform_device *pdev)
 			priv = netdev_priv(dev);
 			priv->netdev = dev;
 			priv->of_node = cvm_oct_node_for_port(pip, interface,
-								port_index);
+							      port_index);
 
 			INIT_DELAYED_WORK(&priv->port_periodic_work,
 					  cvm_oct_periodic_worker);
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Staging: octeon: Fixing coding style for minor notices.
  2018-07-29 14:43 [PATCH] Staging: octeon: Fixing coding style for minor notices Georgios Tsotsos
@ 2018-07-29 17:33 ` Joe Perches
  2018-07-29 22:35   ` Georgios Tsotsos
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2018-07-29 17:33 UTC (permalink / raw)
  To: Georgios Tsotsos, Greg Kroah-Hartman; +Cc: John Smith, devel, linux-kernel

On Sun, 2018-07-29 at 17:43 +0300, Georgios Tsotsos wrote:
> Fixing coding style for a few lines that were reported to check from
> checkpatch.pl in minor cases for alignment and ending with parenthesis.
> 
> Signed-off-by: Georgios Tsotsos <tsotsos@gmail.com>
> ---
>  drivers/staging/octeon/ethernet.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
> index 9b15c9ed844b..1e258deecacc 100644
> --- a/drivers/staging/octeon/ethernet.c
> +++ b/drivers/staging/octeon/ethernet.c
> @@ -141,8 +141,8 @@ static void cvm_oct_periodic_worker(struct work_struct *work)
>  	if (priv->poll)
>  		priv->poll(cvm_oct_device[priv->port]);
>  
> -	cvm_oct_device[priv->port]->netdev_ops->ndo_get_stats(
> -						cvm_oct_device[priv->port]);
> +	cvm_oct_device[priv->port]->netdev_ops
> +				->ndo_get_stats(cvm_oct_device[priv->port]);
>  
>  	if (!atomic_read(&cvm_oct_poll_queue_stopping))
>  		schedule_delayed_work(&priv->port_periodic_work, HZ);

Probably more sensible to use a temporary.  Something like:
---
 drivers/staging/octeon/ethernet.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index 9b15c9ed844b..2febf1229587 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -137,12 +137,12 @@ static void cvm_oct_periodic_worker(struct work_struct *work)
 	struct octeon_ethernet *priv = container_of(work,
 						    struct octeon_ethernet,
 						    port_periodic_work.work);
+	struct net_device *ndev = cvm_oct_device[priv->port];
 
 	if (priv->poll)
-		priv->poll(cvm_oct_device[priv->port]);
+		priv->poll(ndev);
 
-	cvm_oct_device[priv->port]->netdev_ops->ndo_get_stats(
-						cvm_oct_device[priv->port]);
+	ndev->netdev_ops->ndo_get_stats(ndev);
 
 	if (!atomic_read(&cvm_oct_poll_queue_stopping))
 		schedule_delayed_work(&priv->port_periodic_work, HZ);



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Staging: octeon: Fixing coding style for minor notices.
  2018-07-29 17:33 ` Joe Perches
@ 2018-07-29 22:35   ` Georgios Tsotsos
  0 siblings, 0 replies; 3+ messages in thread
From: Georgios Tsotsos @ 2018-07-29 22:35 UTC (permalink / raw)
  To: Joe Perches; +Cc: Greg Kroah-Hartman, John Smith, devel, linux-kernel

Thank you, i found a few case on this module i will try to fix them
and send a new patch series.
On Sun, 29 Jul 2018 at 20:33, Joe Perches <joe@perches.com> wrote:
>
> On Sun, 2018-07-29 at 17:43 +0300, Georgios Tsotsos wrote:
> > Fixing coding style for a few lines that were reported to check from
> > checkpatch.pl in minor cases for alignment and ending with parenthesis.
> >
> > Signed-off-by: Georgios Tsotsos <tsotsos@gmail.com>
> > ---
> >  drivers/staging/octeon/ethernet.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
> > index 9b15c9ed844b..1e258deecacc 100644
> > --- a/drivers/staging/octeon/ethernet.c
> > +++ b/drivers/staging/octeon/ethernet.c
> > @@ -141,8 +141,8 @@ static void cvm_oct_periodic_worker(struct work_struct *work)
> >       if (priv->poll)
> >               priv->poll(cvm_oct_device[priv->port]);
> >
> > -     cvm_oct_device[priv->port]->netdev_ops->ndo_get_stats(
> > -                                             cvm_oct_device[priv->port]);
> > +     cvm_oct_device[priv->port]->netdev_ops
> > +                             ->ndo_get_stats(cvm_oct_device[priv->port]);
> >
> >       if (!atomic_read(&cvm_oct_poll_queue_stopping))
> >               schedule_delayed_work(&priv->port_periodic_work, HZ);
>
> Probably more sensible to use a temporary.  Something like:
> ---
>  drivers/staging/octeon/ethernet.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
> index 9b15c9ed844b..2febf1229587 100644
> --- a/drivers/staging/octeon/ethernet.c
> +++ b/drivers/staging/octeon/ethernet.c
> @@ -137,12 +137,12 @@ static void cvm_oct_periodic_worker(struct work_struct *work)
>         struct octeon_ethernet *priv = container_of(work,
>                                                     struct octeon_ethernet,
>                                                     port_periodic_work.work);
> +       struct net_device *ndev = cvm_oct_device[priv->port];
>
>         if (priv->poll)
> -               priv->poll(cvm_oct_device[priv->port]);
> +               priv->poll(ndev);
>
> -       cvm_oct_device[priv->port]->netdev_ops->ndo_get_stats(
> -                                               cvm_oct_device[priv->port]);
> +       ndev->netdev_ops->ndo_get_stats(ndev);
>
>         if (!atomic_read(&cvm_oct_poll_queue_stopping))
>                 schedule_delayed_work(&priv->port_periodic_work, HZ);
>
>


-- 
Best regards!
Georgios Tsotsos
Greece-Evia-Chalkida
tsotsos@linux.com
skype: tsotsos
------------------------------------
Georgios Tsotsos
*Greece - Evia - Chalkida*
tsotsos[at]linux.com
skype: tsotsos

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-29 22:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-29 14:43 [PATCH] Staging: octeon: Fixing coding style for minor notices Georgios Tsotsos
2018-07-29 17:33 ` Joe Perches
2018-07-29 22:35   ` Georgios Tsotsos

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.