From: Markus Elfring
Date: Sun, 18 Jan 2015 14:50:06 +0100
Functions which release a system resource are occasionally documented in the way
that they tolerate the passing of a null pointer for example. I do not see a
need
because of this fact that a function caller repeats a corresponding check.
From: Markus Elfring
Date: Sun, 18 Jan 2015 11:14:16 +0100
The put_disk() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
drivers/
From: Markus Elfring
Date: Sun, 18 Jan 2015 13:33:25 +0100
The iounmap() function performs also input parameter validation.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
drivers/block/cciss.c| 18 ++
While accessing a scsi_device, the use count of the underlying LLDD
module is incremented. The module reference is retrieved through
.module field of struct scsi_host_template.
This mapping between scsi_device and underlying LLDD module works well
except some drivers which consist with the core d
The pata_of_platform driver depends on pata_platform module. The
module reference of this scsi host is initialized to pata_platform's
one. Because this drivers use __pata_platform_probe() which is
defined in pata_platform module and calls scsi_host_alloc() internally.
So these drivers can be unlo
In preparation for moving owner module reference field from struct
scsi_host_template to struct Scsi_Host, this converts cxgbi_hbas_add() into
macro so that LLDDs can pass THIS_MODULE to __iscsi_host_alloc() through
it instead of scsi_host_template->module.
Signed-off-by: Akinobu Mita
Cc: Mike Ch
In preparation for moving owner module reference field from struct
scsi_host_template to struct Scsi_Host, this converts NCR_700_detect() into
macro so that LLDDs can pass THIS_MODULE to scsi_host_alloc() through it
instead of scsi_host_template->module.
Signed-off-by: Akinobu Mita
Cc: Christoph
The unusual usb storage drivers (ums-alauda, ums-cypress, ...) depend
on usb-storage module. The module reference of these scsi host is
initialized to usb-storage's one. Because these drivers use
usb_stor_probe1() which is defined in usb-storage module and calls
scsi_host_alloc(). So these drive
In preparation for moving owner module reference field from struct
scsi_host_template to struct Scsi_Host, this enables libfc_vport_create()
to allocate Scsi_Host with correct module reference through
__libfc_host_alloc() which is introduced while changing libfc_host_alloc()
from inline function to
The ufs support consists with the core driver (ufshcd) and the actual
glue driver (ufshcd-pci or ufshcd-pltfrm). The module reference of
this scsi host is initialized to the core driver's one. Because the
glue drivers use ufshcd_alloc_host() which is defined in ufshcd module
and calls scsi_host_a
While accessing a scsi_device, the use count of the underlying LLDD
module is incremented. The module reference is retrieved through
.module field of struct scsi_host_template.
This mapping between scsi_device and underlying LLDD module works well
except some drivers which consist with the core d
In preparation for moving owner module reference field from struct
scsi_host_template to struct Scsi_Host, this converts scsi_register() into
macro so that legacy LLDDs can pass THIS_MODULE to scsi_host_alloc()
through it instead of scsi_host_template->module.
Signed-off-by: Akinobu Mita
Cc: Chri
In preparation for moving owner module reference field from struct
scsi_host_template to struct Scsi_Host, this converts the following
functions into macros so that LLDDs can pass THIS_MODULE to
scsi_host_alloc() through them instead of scsi_host_template->module.
ata_host_alloc()
ata_host_alloc_p
In preparation for moving owner module reference field from struct
scsi_host_template to struct Scsi_Host, this converts iscsi_host_alloc()
into macro so that LLDDs can pass THIS_MODULE to scsi_host_alloc() through
it instead of scsi_host_template->module.
Signed-off-by: Akinobu Mita
Cc: Mike Chr
The ahci platform drivers depend on libahci_platform module. The
module reference of these scsi host is initialized to libahci_platform's
one. Because these drivers use ahci_platform_init_host() which is
defined in libahci_platform module and calls scsi_host_alloc()
internally. So these drivers
The midlayer scsi logging already logs the command and sense code
if the logging level is high enough, no need to duplicate that
in the sr driver.
Signed-off-by: Christoph Hellwig
---
drivers/scsi/sr_ioctl.c | 18 --
1 file changed, 18 deletions(-)
diff --git a/drivers/scsi/sr_i
The midlayer logging already prints the cdb details if the logging
level is high enough, no need to duplicate this in the ch driver.
Signed-off-by: Christoph Hellwig
---
drivers/scsi/ch.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index 79e46
Signed-off-by: Christoph Hellwig
---
drivers/scsi/scsi_logging.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/scsi_logging.c b/drivers/scsi/scsi_logging.c
index 6128303..ecc5918 100644
--- a/drivers/scsi/scsi_logging.c
+++ b/drivers/scsi/scsi_log
Signed-off-by: Christoph Hellwig
---
include/scsi/scsi_device.h | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index d1aad4d..2e0281e 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -
On Sun, 2015-01-18 at 16:11 +0100, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig
Thanks. Ideally I would have preferred them folded into the logging
series, but if that's not going to be forthcoming, then this works.
For the series:
Reviewed-by: James Bottomley
James
--
To un
Brian, can you ACK this one?
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Jan 05, 2015 at 02:02:59PM +0100, Christoph Hellwig wrote:
> I don't like this. The problem is that sd_shutdown shouldn't even try
> to grab a reference to the scsi device, nevermind the HBA module.
We're fairly late in th 3.19 cycle, and it seems like the proper
fix for the root cause mi
Hi,
On 18-01-15 16:06, Akinobu Mita wrote:
The ahci platform drivers depend on libahci_platform module. The
module reference of these scsi host is initialized to libahci_platform's
one. Because these drivers use ahci_platform_init_host() which is
defined in libahci_platform module and calls sc
On Mon, 2015-01-05 at 12:03 +0100, Bart Van Assche wrote:
> Avoid that the following warning is reported when a SCSI LLD kernel
> module is unloaded:
>
> WARNING: CPU: 5 PID: 228 at kernel/module.c:954 module_put+0x207/0x220()
> Call Trace:
> [] dump_stack+0x4c/0x65
> [] warn_slowpath_common+0x8
On Sun, 2015-01-18 at 16:22 +, James Bottomley wrote:
> On Mon, 2015-01-05 at 12:03 +0100, Bart Van Assche wrote:
> > Avoid that the following warning is reported when a SCSI LLD kernel
> > module is unloaded:
> >
> > WARNING: CPU: 5 PID: 228 at kernel/module.c:954 module_put+0x207/0x220()
> >
From: James Bottomley
After e513cc1 module: Remove stop_machine from module unloading,
module_refcount() is returning (unsigned long)-1 when called from within
a routine that runs in module_exit. This is confusing the scsi device
put code which is coded to detect a module_refcount() of zero for
James Bottomley writes:
> From: James Bottomley
>
> After e513cc1 module: Remove stop_machine from module unloading,
> module_refcount() is returning (unsigned long)-1 when called from within
> a routine that runs in module_exit. This is confusing the scsi device
> put code which is coded to det
(2015/01/19 1:55), James Bottomley wrote:
> From: James Bottomley
>
> After e513cc1 module: Remove stop_machine from module unloading,
> module_refcount() is returning (unsigned long)-1 when called from within
> a routine that runs in module_exit. This is confusing the scsi device
> put code whi
On 01/18/2015 04:11 PM, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes ReineckezSeries & Storage
h...@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5,
On 01/18/2015 04:11 PM, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes ReineckezSeries & Storage
h...@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5,
On 01/18/2015 04:11 PM, Christoph Hellwig wrote:
> The midlayer logging already prints the cdb details if the logging
> level is high enough, no need to duplicate this in the ch driver.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Hannes Reinecke
On 01/18/2015 04:11 PM, Christoph Hellwig wrote:
> The midlayer scsi logging already logs the command and sense code
> if the logging level is high enough, no need to duplicate that
> in the sr driver.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
Dr. Ha
Masami Hiramatsu writes:
> (2015/01/19 1:55), James Bottomley wrote:
>> From: James Bottomley
>>
>> After e513cc1 module: Remove stop_machine from module unloading,
>> module_refcount() is returning (unsigned long)-1 when called from within
>> a routine that runs in module_exit. This is confusi
33 matches
Mail list logo