lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <125A3006922D4D419060126ED7EE2E56@areca4e4f859d4>
Date:	Fri, 6 Aug 2010 17:42:37 +0800
From:	"Nick Cheng" <nick.cheng@...ca.com.tw>
To:	"'Dan Carpenter'" <error27@...il.com>,
	"'Julia Lawall'" <julia@...u.dk>
Cc:	"'James E.J. Bottomley'" <James.Bottomley@...e.de>,
	<linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<kernel-janitors@...r.kernel.org>
Subject: RE: [PATCH 9/42] drivers/scsi: Adjust confusing if indentation

I agree.
Signed-off-by: Nick Cheng <nick.cheng@...ca.com.tw>
-----Original Message-----
From: Dan Carpenter [mailto:error27@...il.com] 
Sent: Friday, August 06, 2010 3:50 PM
To: Julia Lawall
Cc: James E.J. Bottomley; linux-scsi@...r.kernel.org;
linux-kernel@...r.kernel.org; kernel-janitors@...r.kernel.org;
nick.cheng@...ca.com.tw
Subject: Re: [PATCH 9/42] drivers/scsi: Adjust confusing if indentation


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@...u.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@...u.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@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ