[PATCH 10/10] qla2xxx: Fix indentation

2015-06-04 Thread Bart Van Assche
Detected by smatch. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_iocb.c | 8 drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- drivers/scsi/qla2xxx/qla_nx.c | 2 +- drivers/scs

[PATCH 09/10] qla2xxx: Comment out unreachable code

2015-06-04 Thread Bart Van Assche
Comment out the code that is never reached in qla83xx_idc_unlock() and also in qlt_set_data_offset() to avoid that static source code analysis tools report warnings for this code. Signed-off-by: Bart Van Assche Cc: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- drivers/scsi/qla2xxx/ql

[PATCH 08/10] qla2xxx: Remove unreachable code

2015-06-04 Thread Bart Van Assche
The "return QLA_SUCCESS" statement just above the "fw_load_failed" label cannot be reached, hence remove it. Additionally remove the "else" keyword since the code block below the if-statement ends with a return statement. Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran

[PATCH 07/10] qla2xxx: Remove a superfluous test

2015-06-04 Thread Bart Van Assche
Avoid that smatch reports the following warning: drivers/scsi/qla2xxx/qla_attr.c:1081: qla2x00_model_desc_show() warn: this array is probably non-NULL. 'vha->hw->model_desc' Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- drivers/scsi/qla2xxx/

[PATCH 06/10] qla2xxx: Fix sparse annotations

2015-06-04 Thread Bart Van Assche
This patch removes 21 casts between an __iomem pointer type and another data type but also introduces five new casts (see also the casts with "__force"). Although this patch does not change any functionality, IMHO the code with __force casts needs further review. Signed-off-by: Bart Van Assche Ac

[PATCH 05/10] qla2xxx: Specify the [noderef] attribute once

2015-06-04 Thread Bart Van Assche
This patch avoids that sparse complains about duplicate [noderef] attributes. Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_iocb.c | 4 ++-

[PATCH 04/10] qla2xxx: Remove __constant_ prefix

2015-06-04 Thread Bart Van Assche
Whether htonl() or __constant_htonl() is used, if the argument is a constant the conversion happens at compile time. Hence leave out the __constant_ prefix for this and other endianness conversion functions. This improves source code readability. Signed-off-by: Bart Van Assche Acked-by: Himanshu

[PATCH 03/10] qla2xxx: Replace two macros with an inline function

2015-06-04 Thread Bart Van Assche
Replace the QLA82XX_ADDR_IN_RANGE() and QLA8044_ADDR_IN_RANGE() macros with the inline function addr_in_range(). This avoids that the compiler reports the following warning when building with W=1: comparison of unsigned expression >= 0 is always true. Signed-off-by: Bart Van Assche Acked-by: Hima

[PATCH 02/10] qla2xxx: Remove set-but-not-used variables

2015-06-04 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_attr.c | 2 -- drivers/scsi/qla2xxx/qla_bsg.c| 5 - drivers/scsi/qla2xxx/qla_dbg.c| 24 ++-- drivers/scsi/qla2xxx/qla_init.c | 10 -

[PATCH 01/10] qla2xxx: Declare local functions static

2015-06-04 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Cc: Quinn Tran Cc: Saurav Kashyap --- drivers/scsi/qla2xxx/qla_bsg.c | 2 +- drivers/scsi/qla2xxx/qla_iocb.c | 4 ++-- drivers/scsi/qla2xxx/qla_nx.c | 2 +- drivers/scsi/qla2xxx/qla_nx2.c | 4 ++-- 4 files changed, 6 insertions(+),

[PATCH v2 0/10] qla2xxx: Fix various warnings reported by static source code analysis tools

2015-06-04 Thread Bart Van Assche
This patch series addresses several warnings reported by static source code analysis tools for the qla2xxx driver (gcc (W=1), sparse (C=2) and smatch (C=2 CHECK="smatch -p=kernel")). The patches in this series are: 0001-qla2xxx-Declare-local-functions-static.patch 0002-qla2xxx-Remove-set-but-not-

Re: [PATCH] scsi: Avoid potential infinite eh_timeout_handler() loop

2015-06-04 Thread Rajat Jain
Hello James, On Thu, Jun 4, 2015 at 1:27 PM, James Bottomley wrote: > On Thu, 2015-06-04 at 11:40 -0700, Rajat Jain wrote: >> Each cmd timeout should result in scmd->retries++. Currently it happens >> just only before a command is requeued back. However, if the LLD >> eh_timed_out() handler asks

Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device

2015-06-04 Thread ygardi
> Hi Yaniv, > > 2015-06-03 18:37 GMT+09:00 Yaniv Gardi : >> @@ -321,7 +313,22 @@ static int ufshcd_pltfrm_probe(struct >> platform_device *pdev) >> goto out; >> } >> >> - hba->vops = get_variant_ops(&pdev->dev); >> + err = of_platform_populate(node, NULL, NULL, &

Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device

2015-06-04 Thread ygardi
> On Wed, 2015-06-03 at 12:37 +0300, Yaniv Gardi wrote: >> --- a/drivers/scsi/ufs/ufs-qcom.c >> +++ b/drivers/scsi/ufs/ufs-qcom.c > >> EXPORT_SYMBOL(ufs_hba_qcom_vops); > > Nothing uses this export. It's still a (static) symbol that is not > included in any header. I think this export serves no pu

Re: [PATCH] scsi: Avoid potential infinite eh_timeout_handler() loop

2015-06-04 Thread James Bottomley
On Thu, 2015-06-04 at 11:40 -0700, Rajat Jain wrote: > Each cmd timeout should result in scmd->retries++. Currently it happens > just only before a command is requeued back. However, if the LLD > eh_timed_out() handler asks to reset timer back again, then also it should > be incremented because eff

[PATCH] scsi: Avoid potential infinite eh_timeout_handler() loop

2015-06-04 Thread Rajat Jain
Each cmd timeout should result in scmd->retries++. Currently it happens just only before a command is requeued back. However, if the LLD eh_timed_out() handler asks to reset timer back again, then also it should be incremented because effectively LLD will be given a full time period (SD_TIMEOUT = 3

Please submit specific discussion proposals for the File & Storage miniconf at LPC2015

2015-06-04 Thread Darrick J. Wong
Hi folks, Well, we made it! As of yesterday, the File & Storage systems microconf has been approved for Plumbers! If you're interested in attending, I highly recommend that you register[0] immediately, as the earlybird deadline is tomorrow, June 5th. We have a solid list of discussion ideas on

Re: [PATCH v3] fusion: remove dead MTRR code

2015-06-04 Thread Luis R. Rodriguez
On Thu, Jun 04, 2015 at 10:20:23AM +0530, Sreekanth Reddy wrote: > Hi Luis, > > Sorry for delay in response. Actually I was looking for the history of > this section of code but I couldn't find it. Anyway this is dead code > and we are fine with removing this dead code. > > James, > > Please con

Re: [RFC 0/2] target: Add TFO->complete_irq queue_work bypass

2015-06-04 Thread Sagi Grimberg
On 6/4/2015 10:06 AM, Nicholas A. Bellinger wrote: On Wed, 2015-06-03 at 14:57 +0200, Christoph Hellwig wrote: This makes lockdep very unhappy, rightly so. If you execute one end_io function inside another you basіcally nest every possible lock taken in the I/O completion path. Also adding mor

Re: [patch] hpsa: fix an sprintf() overflow in the reset handler

2015-06-04 Thread walter harms
Am 04.06.2015 16:47, schrieb Dan Carpenter: > The string "cmd %d RESET FAILED, new lockup detected" is not quite > large enough so the sprintf() will overflow. I have increased the size > of the buffer and also changed the sprintf calls to snprintf. > > Fixes: 73153fe533bc ('hpsa: use block lay

[patch] hpsa: fix an sprintf() overflow in the reset handler

2015-06-04 Thread Dan Carpenter
The string "cmd %d RESET FAILED, new lockup detected" is not quite large enough so the sprintf() will overflow. I have increased the size of the buffer and also changed the sprintf calls to snprintf. Fixes: 73153fe533bc ('hpsa: use block layer tag for command allocation') Signed-off-by: Dan Carpe

Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device

2015-06-04 Thread Paul Bolle
On Thu, 2015-06-04 at 16:07 +0200, Paul Bolle wrote: > On Wed, 2015-06-03 at 12:37 +0300, Yaniv Gardi wrote: > > +static int ufs_qcom_probe(struct platform_device *pdev) > > +{ > > + dev_set_drvdata(&pdev->dev, (void *)&ufs_hba_qcom_vops); > > (Cast to void * should not be needed.) Only if ufs_

Re: [PATCH v3] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-04 Thread Brian King
On 06/02/2015 06:55 PM, Matthew R. Ochs wrote: > +/** > + * send_tmf() - sends a Task Management Function (TMF) > + * @afu: AFU to checkout from. > + * @scp: SCSI command from stack. > + * @tmfcmd: TMF command to send. > + * > + * Return: > + * 0 on success > + * SCSI_MLQUEUE_HOST_BUSY

Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device

2015-06-04 Thread Akinobu Mita
Hi Yaniv, 2015-06-03 18:37 GMT+09:00 Yaniv Gardi : > @@ -321,7 +313,22 @@ static int ufshcd_pltfrm_probe(struct platform_device > *pdev) > goto out; > } > > - hba->vops = get_variant_ops(&pdev->dev); > + err = of_platform_populate(node, NULL, NULL, &pdev->dev);

Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device

2015-06-04 Thread Paul Bolle
On Wed, 2015-06-03 at 12:37 +0300, Yaniv Gardi wrote: > --- a/drivers/scsi/ufs/ufs-qcom.c > +++ b/drivers/scsi/ufs/ufs-qcom.c > EXPORT_SYMBOL(ufs_hba_qcom_vops); Nothing uses this export. It's still a (static) symbol that is not included in any header. I think this export serves no purpose. Am I

Re: [PATCH v2] mptsas: fix depth param in scsi_track_queue_full

2015-06-04 Thread Sreekanth Reddy
James, This patch looks good, please consider this patch as Acked-by: "Sreekanth Reddy" . Regards, Sreekanth On Wed, Jun 3, 2015 at 9:07 PM, Tomas Henzl wrote: > v2: use debug log level to silence the unsurprising information > > v1: A user of scsi_track_queue_full should pass to the function >

Re: [RFC 0/2] target: Add TFO->complete_irq queue_work bypass

2015-06-04 Thread Nicholas A. Bellinger
On Wed, 2015-06-03 at 14:57 +0200, Christoph Hellwig wrote: > This makes lockdep very unhappy, rightly so. If you execute > one end_io function inside another you basіcally nest every possible > lock taken in the I/O completion path. Also adding more work > to the hardirq path generally isn't a s