public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Julia Lawall <julia@diku.dk>
Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org, nick.cheng@areca.com.tw
Subject: Re: [PATCH 9/42] drivers/scsi: Adjust confusing if indentation
Date: Fri, 6 Aug 2010 09:49:53 +0200	[thread overview]
Message-ID: <20100806074920.GR9031@bicker> (raw)
In-Reply-To: <Pine.LNX.4.64.1008052219190.31692@ask.diku.dk>


This should go to Nick Cheng.  He would know about the arcmsr driver.

regards,
dan carpenter

On Thu, Aug 05, 2010 at 10:19:36PM +0200, Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
> 
> Outdent the code following the if.
> 
> The semantic match that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r disable braces4@
> position p1,p2;
> statement S1,S2;
> @@
> 
> (
> if (...) { ... }
> |
> if (...) S1@p1 S2@p2
> )
> 
> @script:python@
> p1 << r.p1;
> p2 << r.p2;
> @@
> 
> if (p1[0].column == p2[0].column):
>   cocci.print_main("branch",p1)
>   cocci.print_secs("after",p2)
> // </smpl>
> 
> Signed-off-by: Julia Lawall <julia@diku.dk>
> 
> ---
> This might be the wrong fix, however it doesn't change the current semantics.
> 
>  drivers/scsi/arcmsr/arcmsr_hba.c    |    4 ++--
>  drivers/scsi/mpt2sas/mpt2sas_base.c |    2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
> index 95a895d..c4e5cdc 100644
> --- a/drivers/scsi/arcmsr/arcmsr_hba.c
> +++ b/drivers/scsi/arcmsr/arcmsr_hba.c
> @@ -877,8 +877,8 @@ static void arcmsr_report_ccb_state(struct AdapterControlBlock *acb,
>  	if (!error) {
>  		if (acb->devstate[id][lun] == ARECA_RAID_GONE)
>  			acb->devstate[id][lun] = ARECA_RAID_GOOD;
> -			ccb->pcmd->result = DID_OK << 16;
> -			arcmsr_ccb_complete(ccb);
> +		ccb->pcmd->result = DID_OK << 16;
> +		arcmsr_ccb_complete(ccb);
>  	}else{
>  		switch (ccb->arcmsr_cdb.DeviceStatus) {
>  		case ARCMSR_DEV_SELECT_TIMEOUT: {
> diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
> index 57bcd5c..12faf64 100644
> --- a/drivers/scsi/mpt2sas/mpt2sas_base.c
> +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
> @@ -534,7 +534,7 @@ _base_display_event_data(struct MPT2SAS_ADAPTER *ioc,
>  		if (event_data->DiscoveryStatus)
>  			printk("discovery_status(0x%08x)",
>  			    le32_to_cpu(event_data->DiscoveryStatus));
> -			printk("\n");
> +		printk("\n");
>  		return;
>  	}
>  	case MPI2_EVENT_SAS_BROADCAST_PRIMITIVE:
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-08-06  7:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-05 20:19 [PATCH 9/42] drivers/scsi: Adjust confusing if indentation Julia Lawall
2010-08-06  7:49 ` Dan Carpenter [this message]
2010-08-06  9:42   ` Nick Cheng
2010-08-06  7:59 ` [PATCH] scsi: mpt2sas: Add space in printk Dan Carpenter
2010-08-09 14:16   ` Desai, Kashyap
2010-08-09 14:45     ` Julia Lawall

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=20100806074920.GR9031@bicker \
    --to=error27@gmail.com \
    --cc=James.Bottomley@suse.de \
    --cc=julia@diku.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nick.cheng@areca.com.tw \
    /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