mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Georgios Tsotsos <tsotsos@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: John Smith <catalinnow@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: octeon: Fixing coding style for minor notices.
Date: Sun, 29 Jul 2018 10:33:16 -0700	[thread overview]
Message-ID: <233f0f7b1165f6427fa86f026c4e7dcb5cafe35f.camel@perches.com> (raw)
In-Reply-To: <20180729144358.3442-1-tsotsos@gmail.com>

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);



  reply	other threads:[~2018-07-29 17:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-29 14:43 Georgios Tsotsos
2018-07-29 17:33 ` Joe Perches [this message]
2018-07-29 22:35   ` Georgios Tsotsos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=233f0f7b1165f6427fa86f026c4e7dcb5cafe35f.camel@perches.com \
    --to=joe@perches.com \
    --cc=catalinnow@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tsotsos@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®