All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Johannes Schilling <of82ecuq@cip.cs.fau.de>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
	Kurt Kanzenbach <shifty91@gmail.com>,
	linux-kernel@i4.cs.fau.de,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Al Cho <acho@novell.com>,
	Amarjargal Gundjalam <amarjargal16@gmail.com>,
	Laura Lawniczak <laura.lawniczak@googlemail.com>
Subject: Re: [PATCH 6/6] keucr: fix some alignment- and whitespace-problems
Date: Fri, 7 Jun 2013 00:44:42 +0300	[thread overview]
Message-ID: <20130606214442.GF28112@mwanda> (raw)
In-Reply-To: <1370535050-7167-7-git-send-email-of82ecuq@cip.cs.fau.de>

On Thu, Jun 06, 2013 at 06:10:50PM +0200, Johannes Schilling wrote:
> resolves checkpatch errors and warnings regarding whitespace around
> operators, line lengths and indentation.
> 

I feel like this should be broken up into several patches.  A lot of
these changes will make checkpatch.pl happy but they are not
beautiful.

> --- a/drivers/staging/keucr/init.c
> +++ b/drivers/staging/keucr/init.c
> @@ -98,11 +98,16 @@ int ENE_SMInit(struct us_data *us)
>  	us->SM_CardID   = buf[2];
>  
>  	if (us->SM_Status.Insert && us->SM_Status.Ready) {

The better way to solve this is:

-		dev_info(&us->pusb_dev->dev, "Insert     = %x\n", us->SM_Status.Insert);
+		dev_info(us_dev, "Insert     = %x\n", us->SM_Status.Insert);

> -		dev_info(&us->pusb_dev->dev, "Ready      = %x\n", us->SM_Status.Ready);
> -		dev_info(&us->pusb_dev->dev, "WtP        = %x\n", us->SM_Status.WtP);
> -		dev_info(&us->pusb_dev->dev, "DeviceID   = %x\n", us->SM_DeviceID);
> -		dev_info(&us->pusb_dev->dev, "CardID     = %x\n", us->SM_CardID);
> +		dev_info(&us->pusb_dev->dev, "Insert     = %x\n",
> +					     us->SM_Status.Insert);
> +		dev_info(&us->pusb_dev->dev, "Ready      = %x\n",
> +					     us->SM_Status.Ready);
> +		dev_info(&us->pusb_dev->dev, "WtP        = %x\n",
> +					     us->SM_Status.WtP);
> +		dev_info(&us->pusb_dev->dev, "DeviceID   = %x\n",
> +					     us->SM_DeviceID);
> +		dev_info(&us->pusb_dev->dev, "CardID     = %x\n",
> +					     us->SM_CardID);
>  		MediaChange = 1;
>  		Check_D_MediaFmt(us);
>  	} else {
> @@ -174,7 +179,8 @@ int ENE_SendScsiCmd(struct us_data *us, BYTE fDir, void *buf, int use_sg)
>  	result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe,
>  					    bcb, US_BULK_CB_WRAP_LEN, NULL);
>  	if (result != USB_STOR_XFER_GOOD) {
> -		dev_err(&us->pusb_dev->dev, "send cmd to out endpoint fail ---\n");
> +		dev_err(&us->pusb_dev->dev,
> +				"send cmd to out endpoint fail ---\n");

Line the parameters up:

+		dev_info(&us->pusb_dev->dev,
+			 "my extra long messssssssssssssssagesfasdfadf ---\n");

I used 3 tabs and a space to make everything line up correctly.  But
if you use a temporary variable this will fit on one line.


> @@ -604,9 +604,9 @@ static int eucr_probe(struct usb_interface *intf,
>  	if (!(MiscReg03 & 0x02)) {
>  		result = -ENODEV;
>  		quiesce_and_remove_host(us);
> -		pr_info("keucr: The driver only supports SM/MS card.\
> -			To use SD card, \
> -			please build driver/usb/storage/ums-eneub6250.ko\n");
> +		pr_info("keucr: The driver only supports SM/MS card. "
> +			"To use SD card, "
> +			"please build driver/usb/storage/ums-eneub6250.ko\n");
>  		goto BadDevice;
>  	}
>  

This is a bug fix.  It should go in as a separate patch.

regards,
dan carpenter

  parent reply	other threads:[~2013-06-06 21:46 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05  8:50 [PATCH 0/6] keucr: checkpatch fixes Johannes Schilling
2013-06-05  8:50 ` [PATCH 1/6] keucr: remove some unneccesary typedefs Johannes Schilling
2013-06-05  9:25   ` Dan Carpenter
2013-06-05  8:50 ` [PATCH 2/6] keucr: fix some camelCase warnings Johannes Schilling
2013-06-05  9:23   ` Dan Carpenter
2013-06-05  9:48     ` Dan Carpenter
2013-06-05  8:50 ` [PATCH 3/6] keucr: migrate printk to dev_dbg/info/warn/err Johannes Schilling
2013-06-05  9:32   ` Dan Carpenter
2013-06-05  8:50 ` [PATCH 4/6] keucr: make error messages less aggressive Johannes Schilling
2013-06-05  9:36   ` Dan Carpenter
2013-06-05  8:50 ` [PATCH 5/6] keucr: fix some alignment- and whitespace-problems Johannes Schilling
2013-06-05  8:50 ` [PATCH 6/6] keucr: use more specific max_t(int, Johannes Schilling
2013-06-05  9:45   ` Dan Carpenter
2013-06-06 16:10     ` [PATCH 0/6] keucr: checkpatch fixes Johannes Schilling
2013-06-06 16:10       ` [PATCH 1/6] keucr: remove some unneccesary typedefs Johannes Schilling
2013-06-06 16:10       ` [PATCH 2/6] keucr: use more specific max_t(int, Johannes Schilling
2013-06-06 16:10       ` [PATCH 3/6] keucr: migrate printk to dev_dbg/info/warn/err Johannes Schilling
2013-06-06 17:53         ` Joe Perches
2013-06-06 21:11           ` Dan Carpenter
2013-06-06 21:23             ` Joe Perches
2013-06-06 22:07               ` Dan Carpenter
2013-06-06 21:14         ` Dan Carpenter
2013-06-06 16:10       ` [PATCH 4/6] keucr: more readable and friendly error messages Johannes Schilling
2013-06-06 21:48         ` Dan Carpenter
2013-06-06 16:10       ` [PATCH 5/6] keucr: moved function to other file Johannes Schilling
2013-06-06 21:23         ` Dan Carpenter
2013-06-06 16:10       ` [PATCH 6/6] keucr: fix some alignment- and whitespace-problems Johannes Schilling
2013-06-06 18:03         ` Joe Perches
2013-06-06 21:44         ` Dan Carpenter [this message]
2013-06-06 18:47       ` [PATCH 0/6] keucr: checkpatch fixes Greg Kroah-Hartman

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=20130606214442.GF28112@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=acho@novell.com \
    --cc=amarjargal16@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=laura.lawniczak@googlemail.com \
    --cc=linux-kernel@i4.cs.fau.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=of82ecuq@cip.cs.fau.de \
    --cc=shifty91@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 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.