All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Jamal Shareef <jamal.k.shareef@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [PATCH v2 1/2] staging: kpc2000: kpc_i2c: Fix lines over 80 chars
Date: Thu, 24 Oct 2019 21:26:48 -0400	[thread overview]
Message-ID: <20191025012648.GA265361@kroah.com> (raw)
In-Reply-To: <e9fce17736dbd3219b4ad5c18b3436ae34299dcd.1571948876.git.jamal.k.shareef@gmail.com>

On Thu, Oct 24, 2019 at 01:35:19PM -0700, Jamal Shareef wrote:
> Fix lines over 80 characters warnings.
> issue found by checkpatch.
> 
> Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
> ---
>  drivers/staging/kpc2000/kpc2000_i2c.c | 203 ++++++++++++++++++--------
>  1 file changed, 139 insertions(+), 64 deletions(-)
> 
> diff --git a/drivers/staging/kpc2000/kpc2000_i2c.c b/drivers/staging/kpc2000/kpc2000_i2c.c
> index bc02534d8dc3..69128fd7fd5e 100644
> --- a/drivers/staging/kpc2000/kpc2000_i2c.c
> +++ b/drivers/staging/kpc2000/kpc2000_i2c.c
> @@ -99,7 +99,8 @@ struct i2c_device {
>  #define SMBHSTSTS_INTR          0x02
>  #define SMBHSTSTS_HOST_BUSY     0x01
>  
> -#define STATUS_FLAGS        (SMBHSTSTS_BYTE_DONE | SMBHSTSTS_FAILED | SMBHSTSTS_BUS_ERR | SMBHSTSTS_DEV_ERR | SMBHSTSTS_INTR)
> +#define STATUS_FLAGS        (SMBHSTSTS_BYTE_DONE | SMBHSTSTS_FAILED | \

Shouldn't you use a tab in this line?

> +		SMBHSTSTS_BUS_ERR | SMBHSTSTS_DEV_ERR | SMBHSTSTS_INTR)

That does not line up very well, it looks worse now :(


>  
>  /* Older devices have their ID defined in <linux/pci_ids.h> */
>  #define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS       0x1c22
> @@ -136,7 +137,9 @@ static int i801_check_pre(struct i2c_device *priv)
>  
>  	status = inb_p(SMBHSTSTS(priv));
>  	if (status & SMBHSTSTS_HOST_BUSY) {
> -		dev_err(&priv->adapter.dev, "SMBus is busy, can't use it! (status=%x)\n", status);
> +		dev_err(&priv->adapter.dev,
> +			"SMBus is busy, can't use it! (status=%x)\n",
> +			status);

Why did you put status on a new line?

>  		return -EBUSY;
>  	}
>  
> @@ -146,7 +149,9 @@ static int i801_check_pre(struct i2c_device *priv)
>  		outb_p(status, SMBHSTSTS(priv));
>  		status = inb_p(SMBHSTSTS(priv)) & STATUS_FLAGS;
>  		if (status) {
> -			dev_err(&priv->adapter.dev, "Failed clearing status flags (%02x)\n", status);
> +			dev_err(&priv->adapter.dev,
> +				"Failed clearing status flags (%02x)\n",
> +				status);

Same here, why this last line change?



>  			return -EBUSY;
>  		}
>  	}
> @@ -162,15 +167,20 @@ static int i801_check_post(struct i2c_device *priv, int status, int timeout)
>  	if (timeout) {
>  		dev_err(&priv->adapter.dev, "Transaction timeout\n");
>  		/* try to stop the current command */
> -		dev_dbg(&priv->adapter.dev, "Terminating the current operation\n");
> -		outb_p(inb_p(SMBHSTCNT(priv)) | SMBHSTCNT_KILL, SMBHSTCNT(priv));
> +		dev_dbg(&priv->adapter.dev,
> +			"Terminating the current operation\n");
> +		outb_p(inb_p(SMBHSTCNT(priv)) | SMBHSTCNT_KILL,
> +		       SMBHSTCNT(priv));

SHouldn't this line up a bit differently?

You might want to use a text editor that handles this properly when
adding indentation.  I know vim does it, and I imagine that emacs does
as well.

thanks,

greg k-h


  reply	other threads:[~2019-10-25  1:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 20:35 [PATCH v2 0/2] kpc2000_i2c cleanup Jamal Shareef
2019-10-24 20:35 ` [PATCH v2 1/2] staging: kpc2000: kpc_i2c: Fix lines over 80 chars Jamal Shareef
2019-10-25  1:26   ` Greg KH [this message]
2019-10-25  2:16     ` Jamal Shareef
2019-10-24 20:35 ` [PATCH v2 2/2] staging: kpc2000: kpc_i2c: Remove commented code Jamal Shareef

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=20191025012648.GA265361@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=jamal.k.shareef@gmail.com \
    --cc=outreachy-kernel@googlegroups.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 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.