k.")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
Please review carefully. This patch is proposed because it triggers one of
my coccinelle scripts. I'm not 100% sure if correct.
The script tries to spot wrongly ordered error handling path. I
'base_addr' has been mapped using 'pci_iomap()'. It should be freed with
the corresponding 'pci_iounmap()' instead of 'iomap()'.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/scsi/3w-sas.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
If 'scsi_host_alloc', 'kzalloc' or '(*aac_drivers[index].init)' fail, the
function will return 0, because 'error' is known to be 0 at this point.
Return -ENOMEM in the 2 first cases and -ENODEV in the third one.
This patch also removes a useless 'error = -ENODEV'.
Signed-off-by: Christophe
All error handling paths 'goto fail' in this function.
If 'scsi_register()' fails, we should also go there, otherwise a
'pci_dev_put(pdev)' will be missing.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
In order to keep consistance with the rest of the file, I've i
All error handling paths in this function go through
'iscsi_host_dec_session_cnt()' except this one.
Fix it and properly decrement the number of active sessions in such a case.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/scsi/libiscsi.c | 2 +-
1 file chan
.
Fixes: 61d8658b4a43 ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver
framework.")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/scsi/qedf/qedf_els.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/d
'rc' is known to be 0 at this point.
If 'create_context()' fails, returns -ENOMEM instead of 0 which means
success.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/scsi/cxlflash/superpipe.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/cx
Le 07/08/2017 à 10:25, walter harms a écrit :
Am 07.08.2017 00:51, schrieb Christophe JAILLET:
In the lines above this test, 8 'kzalloc' are performed, but only 7 results
are tested.
Add the missing one (i.e. '!ioc->port_enable_cmds.reply').
Signed-off-by: Christophe JAILLET <christoph
In the lines above this test, 8 'kzalloc' are performed, but only 7 results
are tested.
Add the missing one (i.e. '!ioc->port_enable_cmds.reply').
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/scsi/mpt3sas/mpt3sas_base.c | 8
1 file changed, 4 i
This patch series improves 'charger_manager_probe()'. The first patch is
about a missing memory allocation failure test.
The 2 others are just things spotted in this function:
- a comment that is no more up to date
- a style issue (which saves 1 line)
Christophe JAILLET (3):
power: supply
Replace some 'dma_alloc_coherent+memset' by some quivalent
'dma_zalloc_coherent' in order to reduce code verbosity
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
This patch generates some checkpatch errors about the use of space to indent
code.
I've left it as-is t
We should return -ENOMEM in case of memory allocation error, as done
elsewhere in this function.
Fixes: ace7f46ba5fde ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver
framework.")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/scsi/qedi/qedi
This patch serie first fixes a case where an error code was missing.
The other path is just a cleanup in the same area.
Christophe JAILLET (2):
scsi: qedi: Fix a return value in case of error in
'qedi_alloc_global_queues'
scsi: qedi: Use 'dma_zalloc_coherent' to reduce code verbosity
Replace some 'dma_alloc_coherent+memset' by some quivalent
'dma_zalloc_coherent' in order to reduce code verbosity
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/scsi/qedf/qedf_main.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
Merge some quoted strings to improve readability and to save some lines
of code.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/scsi/qedf/qedf_main.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/scs
We should return -ENOMEM in case of memory allocation error, as done
elsewhere in this function.
Fixes: 61d8658b4a435 ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver
framework.")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/scsi/qedf/qedf
This patch serie first fixes a case where an error code was missing.
The 2 other patches are just cleanups in the same area.
Christophe JAILLET (3):
scsi: qedf: Fix a return value in case of error in
'qedf_alloc_global_queues'
scsi: qedf: Use 'dma_zalloc_coherent' to reduce code verbosity
'r' is known to be zero here, so it must be set to -ENOMEM is one of these
'kzalloc' fails.
Fixes: c696f7b83edea ("scsi: mpt3sas: Implement device_remove_in_progress check
in IOCTL path")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/scsi/mpt3sa
If 'scsi_host_alloc', 'kzalloc' or '(*aac_drivers[index].init)' fail, the
function will return 0, because 'error' is known to be 0 at this point.
Return -ENOMEM in the 2 first cases and -ENODEV in the third one.
This patch also removes a useless 'error = -ENODEV'.
Signed-off-by: Christophe
Reorder 'fail_free_irq' and 'fail_unmap_regs' in order to correctly free
resources in case of error.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/scsi/qlogicpti.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/qlogi
Hi,
the following code looks really spurious to me.
The function 'qla2x00_probe_one' is too hairy for me to understand it
and propose a patch if needed.
So I just report it to you in case of interest.
(BTW, the code in 'qla2x00_unmap_iobases' looks also quite close to the
code below. Maybe
Reorder 'out_free' and 'out_free_devt' error handling labels in order to
match the way resources have been allocated.
Fixes: 0dba1314d4f8 ("scsi, block: fix duplicate bdi name registration crashes")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drive
Use 'pci_dma_mapping_error()' instead of 'dma_mapping_error()' because it
is more consistent with the rest of the code. It is also a little less
verbove.
While at it, remove some '(dma_addr_t)' casts in order to be consistent
within the file.
Signed-off-by: Christophe JAILLET <christophe.j
BNX2FC_NUM_ERR_BITS is 63. err_warn_bit_map is a u64. So, to make sure that
no shift wrapping will occur, we need need additionnal casting.
The same test is already done a few lines above and '(u64)1' is already
used there. So just do the same here.
Signed-off-by: Christophe JAILLET
Calling 'list_splice' followed by 'INIT_LIST_HEAD' is equivalent to
'list_splice_init'.
This has been spotted with the following coccinelle script:
/
@@
expression y,z;
@@
- list_splice(y,z);
- INIT_LIST_HEAD(y);
+ list_splice_init(y,z);
Signed-off-by: Christophe JAILLET
Calling 'list_splice' followed by 'INIT_LIST_HEAD' is equivalent to
'list_splice_init'.
This has been spotted with the following coccinelle script:
/
@@
expression y,z;
@@
- list_splice(y,z);
- INIT_LIST_HEAD(y);
+ list_splice_init(y,z);
Signed-off-by: Christophe JAILLET
The 2nd parameter of 'find_first_bit' is the number of bits to search.
In this case, we are passing 'sizeof(unsigned long)' which is likely to
be 4.
It is likely that the number of bits in a long was expected here, so use
BITS_PER_LONG instead.
Signed-off-by: Christophe JAILLET <christophe.j
Le 13/08/2016 à 13:35, Joe Perches a écrit :
@@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
_cmd.dma);
if (nonemb_cmd.va == NULL) {
beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
- "BM_%d :
This fixes:
- missing spaces in string split on several lines
- extra spaces after ':'
- missing '\n' at the end of some messages
- turn a \\n to \n in 1 message
- concatenate strings on the same line to fix checkpatch warnings
Signed-off-by: Christophe JAILLET <christophe.j
This fixes:
- missing spaces in string split on several lines
- extra spaces after ':'
- missing '\n' at the end of some messages
- turn a \\n to \n in 1 message (v2)
- concatenate strings on the same line to fix checkpatch warnings (v2)
Signed-off-by: Christophe JAILLET
Le 12/08/2016 à 12:30, Julia Lawall a écrit :
On Fri, 12 Aug 2016, Christophe JAILLET wrote:
This fixes:
- missing spaces in string split on several lines
- extra spaces after ':'
- missing '\n' at the end of some messages
- too long lines
I think that the strings should
We know that 'ret' is not an error code because it has been tested a few
lines above.
So, if one of these function fails, 0 will be returned instead of an error
code.
Return -ENOMEM instead.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/scsi/be2iscsi/be_
This fixes:
- missing spaces in string split on several lines
- extra spaces after ':'
- missing '\n' at the end of some messages
- too long lines
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/scsi/be2iscsi/be_main.
It is likely that checking the result of 'pci_write_config_dword' is
expected here.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/scsi/aic94xx/aic94xx_hwi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/aic94xx/aic94xx_hw
Use 'list_for_each_safe' instead of 'list_for_each' + own logic to keep
safe when a list entry is deleted.
Delete the now useless 'csio_list_prev' macro.
Signed-off-by: Christophe JAILLET christophe.jail...@wanadoo.fr
---
drivers/scsi/csiostor/csio_defs.h | 1 -
drivers/scsi/csiostor/csio_hw.c
This replaces kmalloc + strcpy by an equivalent call to kstrdup.
Signed-off-by: Christophe JAILLET christophe.jail...@wanadoo.fr
---
drivers/scsi/aic7xxx/aic79xx_osm.c | 3 +--
drivers/scsi/aic7xxx/aic7xxx_osm.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi
This replaces kmalloc + strcpy by an equivalent call to kstrdup.
Signed-off-by: Christophe JAILLET christophe.jail...@wanadoo.fr
---
v2: remove useless curly braces
drivers/scsi/aic7xxx/aic79xx_osm.c | 6 ++
drivers/scsi/aic7xxx/aic7xxx_osm.c | 6 ++
2 files changed, 4 insertions(+), 8
Resetting rqbuffer or wqbuffer must be done within a critial section
in order to avoir potential data corruption.
Signed-off-by: Christophe JAILLET christophe.jail...@wanadoo.fr
---
This change is *untested* because I don't have the corresponding hardware.
However, it should'nt have any evil side
Le 07/07/2015 19:04, Khalid Aziz a écrit :
On 07/07/2015 02:45 AM, Frans Klaver wrote:
On Tue, Jul 7, 2015 at 7:39 AM, Christophe JAILLET
christophe.jail...@wanadoo.fr wrote:
Stop comparing the strings as soon as we know that they don't match.
Signed-off-by: Christophe JAILLET christophe.jail
Stop comparing the strings as soon as we know that they don't match.
Signed-off-by: Christophe JAILLET christophe.jail...@wanadoo.fr
---
drivers/scsi/FlashPoint.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/FlashPoint.c b/drivers/scsi/FlashPoint.c
index
40 matches
Mail list logo