public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <jbottomley@parallels.com>
To: 黃清隆 <ching2048@areca.com.tw>
Cc: Tomas Henzl <thenzl@redhat.com>,
	"fengguang.wu@intel.com" <fengguang.wu@intel.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH 1/1 v1.1] arcmsr: Support Areca new SATA Raid Adapter ARC1214/1224/1264/1284 (Resend renew)
Date: Thu, 29 Aug 2013 11:59:43 +0000	[thread overview]
Message-ID: <1377777581.2223.93.camel@dabdike> (raw)
In-Reply-To: <CAKiknE_FJN7gRLMFHCfNOtjg73fLLCQ45yacHb+w1B46C5dJQA@mail.gmail.com>

On Thu, 2013-08-29 at 12:55 +0800, 黃清隆 wrote:
> Update the patch code.
> 
> From: Ching<ching2048@areca.com.tw>
> 
> Support Areca new SATA Raid Adapter ARC1214/1224/1264/1284.
> Modify maximum outstanding command number.
> Notify command complete with auto request sense.
> Fix bug of updating adapter firmware through ioctl(ARCHTTP) interface.
> Fix coding style warning.
> Fix compiling warning.
> Fix ARC1880 hardware reset.
> Fix coding style - indent

This patch is too big for the SCSI mailing list.  We have a 400k limit.
Your patch is 292k, which would ordinarily be OK, but you attached it
twice (once inline and once as an attachment), which is why it's not
going through.

> -	{PCI_DEVICE(PCI_VENDOR_ID_ARECA, PCI_DEVICE_ID_ARECA_1380)},
> -	{PCI_DEVICE(PCI_VENDOR_ID_ARECA, PCI_DEVICE_ID_ARECA_1381)},

Why are you removing these adapters from the driver?

I agree with Dan, all these whitespace changes make the patch very hard
to read for the significant pieces; can't they be done separately?

Some of them, like this


> -static void arcmsr_hba_doorbell_isr(struct AdapterControlBlock *acb)
> +static void
> +arcmsr_hbaA_doorbell_isr(struct AdapterControlBlock *acb)
>  {
>  	uint32_t outbound_doorbell;
> -	struct MessageUnit_A __iomem *reg = acb->pmuA;
> +	struct MessageUnit_A __iomem *reg  = acb->pmuA;

Aren't even correct (last one introduces an extra spurious space).

Others, like this:

> +		kfree((const void *)ver_addr);
[...]
> -		kfree(ver_addr);

Are stylistically wrong: ver_addr is an unsigned char *; there's no
reason to cast it to anything before calling kfree (any pointer can be
passed without cast to a function taking a void *)

> -		memcpy(ptmpuserbuffer, pcmdmessagefld->messagedatabuffer, user_len);
> +		memcpy((void *)ptmpuserbuffer,
> +			(const void *)pcmdmessagefld->messagedatabuffer, user_len);

You do a lot of this spurious casting to void *; please don't:

> -		} while (((readl(&pmuC->host_diagnostic) & ARCMSR_ARC1880_DiagWrite_ENABLE) == 0) && (count < 5));
> -		writel(ARCMSR_ARC1880_RESET_ADAPTER, &pmuC->host_diagnostic);
> +		} while ((((temp = readl(&pmuC->host_diagnostic)) &
> +			ARCMSR_ARC1880_DiagWrite_ENABLE) == 0) &&
> +			(count < 5));

Why assign to temp?  You never refer to it again.

I'm sure there are other issues, but the massive code reformat changes
mean I probably missed them.

James


      parent reply	other threads:[~2013-08-29 11:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29  4:55 [PATCH 1/1 v1.1] arcmsr: Support Areca new SATA Raid Adapter ARC1214/1224/1264/1284 (Resend renew) 黃清隆
2013-08-29  5:08 ` Joe Perches
2013-08-29 11:59 ` James Bottomley [this message]

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=1377777581.2223.93.camel@dabdike \
    --to=jbottomley@parallels.com \
    --cc=ching2048@areca.com.tw \
    --cc=dan.carpenter@oracle.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=thenzl@redhat.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