[PATCH] scsi: aic7xxx: aic79xx: Add missing check in ahc_handle_seqint

2021-03-10 Thread Dinghao Liu
ahc_lookup_scb() may return a null pointer and further lead to null-pointer-dereference in case DATA_OVERRUN. Fix this by adding a null check. Signed-off-by: Dinghao Liu --- drivers/scsi/aic7xxx/aic7xxx_core.c | 72 +++-- 1 file changed, 37 insertions(+), 35 deletions

[PATCH] scsi: aic7xxx: aic79xx: Add missing check in ahd_handle_seqint

2021-03-01 Thread Dinghao Liu
ahd_lookup_scb() may return a null pointer and further lead to null pointer dereference in case DATA_OVERRUN. Fix this by adding a null check. Signed-off-by: Dinghao Liu --- drivers/scsi/aic7xxx/aic79xx_core.c | 44 +++-- 1 file changed, 23 insertions(+), 21 deletions

Re: [PATCH] drivers: scsi: aic7xxx: Fix the spelling verson to version in the file aic79xx.h

2021-02-25 Thread Martin K. Petersen
On Tue, 9 Feb 2021 20:01:46 +0530, Bhaskar Chowdhury wrote: > s/verson/version/ Applied to 5.12/scsi-queue, thanks! [1/1] drivers: scsi: aic7xxx: Fix the spelling verson to version in the file aic79xx.h https://git.kernel.org/mkp/scsi/c/1f9f22acbb5d -- Martin K. Petersen Ora

Re: [PATCH] scsi: aic7xxx: Remove unused function pointer typedef ahc_bus_suspend/resume_t

2021-02-25 Thread Martin K. Petersen
On Mon, 15 Feb 2021 19:40:49 +0800, Chen Lin wrote: > Remove the 'ahc_bus_suspend/resume_t' typedef as it is not used. Applied to 5.12/scsi-queue, thanks! [1/1] scsi: aic7xxx: Remove unused function pointer typedef ahc_bus_suspend/resume_t https://git.kernel.org/mkp/scsi/c/c2f23a96c

Re: [PATCH] scsi: aic7xxx: Remove unused function pointer typedef ahc_bus_suspend/resume_t

2021-02-22 Thread Martin K. Petersen
Chen, > Remove the 'ahc_bus_suspend/resume_t' typedef as it is not used. Applied to 5.12/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] drivers: scsi: aic7xxx: Fix the spelling verson to version in the file aic79xx.h

2021-02-22 Thread Martin K. Petersen
Bhaskar, > s/verson/version/ Applied to 5.12/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering

[PATCH] scsi: aic7xxx: Remove unused function pointer typedef ahc_bus_suspend/resume_t

2021-02-15 Thread Chen Lin
From: Chen Lin Remove the 'ahc_bus_suspend/resume_t' typedef as it is not used. Signed-off-by: Chen Lin --- drivers/scsi/aic7xxx/aic7xxx.h |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/aic7xxx/aic7xxx.h b/drivers/scsi/aic7xxx/aic7xxx.h index 11a0979..9bc755a 100644

Re: [PATCH] drivers: scsi: aic7xxx: Fix the spelling verson to version in the file aic79xx.h

2021-02-10 Thread Randy Dunlap
On 2/9/21 6:31 AM, Bhaskar Chowdhury wrote: > > s/verson/version/ > > Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap > --- > drivers/scsi/aic7xxx/aic79xx.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/aic7x

[PATCH] drivers: scsi: aic7xxx: Fix the spelling verson to version in the file aic79xx.h

2021-02-09 Thread Bhaskar Chowdhury
s/verson/version/ Signed-off-by: Bhaskar Chowdhury --- drivers/scsi/aic7xxx/aic79xx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/aic7xxx/aic79xx.h b/drivers/scsi/aic7xxx/aic79xx.h index dd5dfd4f30a5..c31e48fcebc7 100644 --- a/drivers/scsi/aic7xxx

[PATCH] scsi: aic7xxx: remove trailing semicolon in macro definition

2020-11-27 Thread trix
From: Tom Rix The macro use will already have a semicolon. Signed-off-by: Tom Rix --- drivers/scsi/aic7xxx/aic79xx_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c index 98b02e7d38bb

[PATCH 020/141] scsi: aic7xxx: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
by replacing /* FALLTHROUGH */ comments with the new pseudo-keyword macro fallthrough. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/scsi/aic7xxx/aic79xx_core.c | 4 +++- drivers/scsi/aic7xxx/aic7xxx_core.c | 4 ++-- 2 files changed, 5 insertions(+), 3

[PATCH v4 06/29] scsi: aic7xxx: use generic power management

2020-11-02 Thread Vaibhav Gupta
s. Signed-off-by: Vaibhav Gupta --- drivers/scsi/aic7xxx/aic7xxx.h | 10 ++ drivers/scsi/aic7xxx/aic7xxx_core.c| 6 ++-- drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 46 ++ drivers/scsi/aic7xxx/aic7xxx_pci.c | 4 +-- 4 files changed, 17 insertions(+), 49 dele

[RESEND 01/19] scsi: aic7xxx: aic79xx_osm: Remove unused variable 'saved_scsiid'

2020-11-02 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_queue_abort_cmd’: drivers/scsi/aic7xxx/aic79xx_osm.c:2143:9: warning: variable ‘saved_scsiid’ set but not used [-Wunused-but-set-variable] Cc: Hannes Reinecke Signed-off-by: Lee Jones

[PATCH 01/19] scsi: aic7xxx: aic79xx_osm: Remove unused variable 'saved_scsiid'

2020-11-02 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_queue_abort_cmd’: drivers/scsi/aic7xxx/aic79xx_osm.c:2143:9: warning: variable ‘saved_scsiid’ set but not used [-Wunused-but-set-variable] Cc: Hannes Reinecke Signed-off-by: Lee Jones

[PATCH v3 06/28] scsi: aic7xxx: use generic power management

2020-10-01 Thread Vaibhav Gupta
s. Signed-off-by: Vaibhav Gupta --- drivers/scsi/aic7xxx/aic7xxx.h | 10 ++ drivers/scsi/aic7xxx/aic7xxx_core.c| 6 ++-- drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 46 ++ drivers/scsi/aic7xxx/aic7xxx_pci.c | 4 +-- 4 files changed, 17 insertions(+), 49 dele

Re: [PATCH] scsi: aic7xxx: Use kmemdup in two places

2020-09-21 Thread Martin K. Petersen
On Wed, 9 Sep 2020 19:58:55 +0100, Alex Dewar wrote: > kmemdup can be used instead of kmalloc+memcpy. Replace two occurrences > of this pattern. > > Issue identified with Coccinelle. Applied to 5.10/scsi-queue, thanks! [1/1] scsi: aic7xxx: Use kmemdup() in two places

Re: [PATCH] scsi: aic7xxx: Use kmemdup in two places

2020-09-15 Thread Martin K. Petersen
Alex, > kmemdup can be used instead of kmalloc+memcpy. Replace two occurrences > of this pattern. > > Issue identified with Coccinelle. Applied to 5.10/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering

[PATCH] scsi: aic7xxx: Use kmemdup in two places

2020-09-09 Thread Alex Dewar
kmemdup can be used instead of kmalloc+memcpy. Replace two occurrences of this pattern. Issue identified with Coccinelle. Signed-off-by: Alex Dewar --- drivers/scsi/aic7xxx/aic79xx_core.c | 3 +-- drivers/scsi/aic7xxx/aic7xxx_core.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions

Re: [PATCH v2 03/15] scsi: aic7xxx: use generic power management

2020-09-08 Thread Vaibhav Gupta
o, .suspend() and .resume() are invoking other functions for PM, which > were againg bounded by "#ifdef CONFIG_PM" directive. Remove the directive > and mark those functions as "__maybe_unused". > > Compile-tested only. > > Signed-off-by: Vaibhav Gupta

Re: [PATCH] scsi: aic7xxx: fix error code handling

2020-08-31 Thread Martin K. Petersen
On Sun, 16 Aug 2020 03:02:42 -0400, Tong Zhang wrote: > ahc_linux_queue_recovery_cmd returns SUCCESS(0x2002) or FAIL(0x2003), > but the caller is checking error case using !=0 Applied to 5.10/scsi-queue, thanks! [1/1] scsi: aic7xxx: Fix error code handling https://git.kernel.org/mk

[PATCH] scsi: aic7xxx: fix error code handling

2020-08-16 Thread Tong Zhang
ahc_linux_queue_recovery_cmd returns SUCCESS(0x2002) or FAIL(0x2003), but the caller is checking error case using !=0 Signed-off-by: Tong Zhang --- drivers/scsi/aic7xxx/aic7xxx_osm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b

[PATCH] scsi/aic7xxx/aicasm: Add missing fclose() call

2020-08-02 Thread Youling Tang
Add missing fclose() call to close "regdiagfile" in the function stop(). Signed-off-by: Youling Tang --- drivers/scsi/aic7xxx/aicasm/aicasm.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm.c b/drivers/scsi/aic7xxx/aicasm/aicasm.c ind

[PATCH 2/7] scsi: aic7xxx: Remove pci-dma-compat wrapper APIs.

2020-07-29 Thread Suraj Upadhyay
g_error(>dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(>dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(>dev, E2) Signed-off-by: Suraj Upadhyay --- drivers/scsi/aic7xxx/aic79xx_osm.c | 7 +++ 1 file changed, 3 insertions(+), 4

[PATCH RESEND] scsi: aic7xxx: Remove pci-dma-compat wrapper APIs.

2020-07-27 Thread Suraj Upadhyay
2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(>dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(>dev, E2) Signed-off-by: Suraj Upadhyay --- drivers/scsi/aic7xxx/aic79xx_osm.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dr

[PATCH 02/40] scsi: aic7xxx: aic79xx_core: Remove a bunch of unused variables

2020-07-21 Thread Lee Jones
Question: Can 'ahd_inb(ahd, LQISTAT2);' also be safely removed? Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_core.c: In function ‘ahd_dump_sglist’: drivers/scsi/aic7xxx/aic79xx_core.c:1738:14: warning: variable ‘len’ set but not used [-Wunused-but-set-variable

[PATCH 15/40] scsi: aic7xxx: aic79xx_core: Remove set but unused variables 'targ_info' and 'value'

2020-07-21 Thread Lee Jones
Also remove 'tstate' which became unused after this patch. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_core.c: In function ‘ahd_handle_seqint’: drivers/scsi/aic7xxx/aic79xx_core.c:1907:32: warning: variable ‘targ_info’ set but not used [-Wunused-but-set

Re: [PATCH v2 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes'

2020-07-21 Thread Hannes Reinecke
kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_queue_abort_cmd’: drivers/scsi/aic7xxx/aic79xx_osm.c:2155:17: warning: variable ‘saved_modes’ set but not used [-Wunused-but-set-variable] drivers/scsi/aic7xxx/aic79xx_osm.c:2148:9: warning: variable

[PATCH v2 03/15] scsi: aic7xxx: use generic power management

2020-07-20 Thread Vaibhav Gupta
t; directive. Remove the directive and mark those functions as "__maybe_unused". Compile-tested only. Signed-off-by: Vaibhav Gupta --- drivers/scsi/aic7xxx/aic7xxx.h | 10 ++ drivers/scsi/aic7xxx/aic7xxx_core.c| 6 ++-- drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 46 ++

[PATCH] scsi: aic7xxx: Remove pci-dma-compat wrapper APIs.

2020-07-18 Thread Suraj Upadhyay
2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(>dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(>dev, E2) Signed-off-by: Suraj Upadhyay --- drivers/scsi/aic7xxx/aic79xx_osm.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dr

[PATCH v1 03/15] scsi: aic7xxx: use generic power management

2020-07-17 Thread Vaibhav Gupta
t; directive. Remove the directive and mark those functions as "__maybe_unused". Compile-tested only. Signed-off-by: Vaibhav Gupta --- drivers/scsi/aic7xxx/aic7xxx.h | 10 ++ drivers/scsi/aic7xxx/aic7xxx_core.c| 6 ++-- drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 46 ++

Re: [PATCH v2 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes'

2020-07-15 Thread Lee Jones
t; > > > > Haven't been used since 2006. > > > > > > > > > > Fixes the following W=1 kernel build warning(s): > > > > > > > > > > drivers/scsi/aic7xxx/aic79xx_osm.c: In function > > > > > ‘ahd_linux_queue_abort_cmd’

Re: [PATCH v2 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes'

2020-07-15 Thread Lee Jones
e: > > > > > Haven't been used since 2006. > > > > > > > > > > Fixes the following W=1 kernel build warning(s): > > > > > > > > > > drivers/scsi/aic7xxx/aic79xx_osm.c: In function > > > > > ‘ahd_linux_queue

Re: [PATCH v2 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes'

2020-07-14 Thread Hannes Reinecke
On 7/14/20 11:39 PM, Lee Jones wrote: On Tue, 14 Jul 2020, James Bottomley wrote: On Tue, 2020-07-14 at 09:46 +0200, Hannes Reinecke wrote: On 7/13/20 10:00 AM, Lee Jones wrote: Haven't been used since 2006. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx

Re: [PATCH v2 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes'

2020-07-14 Thread James Bottomley
> > > > Fixes the following W=1 kernel build warning(s): > > > > > > > > drivers/scsi/aic7xxx/aic79xx_osm.c: In function > > > > ‘ahd_linux_queue_abort_cmd’: > > > > drivers/scsi/aic7xxx/aic79xx_osm.c:2155:17: warning: variable >

Re: [PATCH v2 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes'

2020-07-14 Thread Lee Jones
On Tue, 14 Jul 2020, James Bottomley wrote: > On Tue, 2020-07-14 at 09:46 +0200, Hannes Reinecke wrote: > > On 7/13/20 10:00 AM, Lee Jones wrote: > > > Haven't been used since 2006. > > > > > > Fixes the following W=1 kernel build warning(s): > > &g

Re: [PATCH v2 18/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'tinfo'

2020-07-14 Thread Lee Jones
On Tue, 14 Jul 2020, Doug Ledford wrote: > On Mon, 2020-07-13 at 08:46 +0100, Lee Jones wrote: > > Looks like none of the artifact from ahc_fetch_transinfo() are used > > anymore. > > > > Fixes the following W=1 kernel build warning(s): > > > > drivers/

Re: [PATCH v2 18/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'tinfo'

2020-07-14 Thread Doug Ledford
On Mon, 2020-07-13 at 08:46 +0100, Lee Jones wrote: > Looks like none of the artifact from ahc_fetch_transinfo() are used > anymore. > > Fixes the following W=1 kernel build warning(s): > > drivers/scsi/aic7xxx/aic7xxx_osm.c: In function > ‘ahc_linux_target_alloc’: &g

Re: [PATCH v2 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes'

2020-07-14 Thread James Bottomley
On Tue, 2020-07-14 at 09:46 +0200, Hannes Reinecke wrote: > On 7/13/20 10:00 AM, Lee Jones wrote: > > Haven't been used since 2006. > > > > Fixes the following W=1 kernel build warning(s): > > > > drivers/scsi/aic7xxx/aic79xx_osm.c: In function > > ‘ahd_li

Re: [PATCH v2 21/24] scsi: aic7xxx: aic79xx_osm: Remove unused variable 'ahd'

2020-07-14 Thread Hannes Reinecke
On 7/13/20 9:59 AM, Lee Jones wrote: > Hasn't been used since 2005. > > Fixes the following W=1 kernel build warning(s): > > drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_slave_configure’: > drivers/scsi/aic7xxx/aic79xx_osm.c:703:20: warning: variable ‘ahd’ s

Re: [PATCH v2 22/24] scsi: aic7xxx: aic79xx_osm: Remove unused variables 'wait' and 'paused'

2020-07-14 Thread Hannes Reinecke
On 7/13/20 9:59 AM, Lee Jones wrote: > It looks like they have never actually been used. > > Fixes the following W=1 kernel build warning(s): > > drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_dev_reset’: > drivers/scsi/aic7xxx/aic79xx_osm.c:782:9: warning: v

Re: [PATCH v2 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes'

2020-07-14 Thread Hannes Reinecke
On 7/13/20 10:00 AM, Lee Jones wrote: > Haven't been used since 2006. > > Fixes the following W=1 kernel build warning(s): > > drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_queue_abort_cmd’: > drivers/scsi/aic7xxx/aic79xx_osm.c:2155:17: warning: variable ‘s

Re: [PATCH v2 23/24] scsi: aic7xxx: aic79xx_osm: Fix 'amount_xferred' set but not used issue

2020-07-14 Thread Hannes Reinecke
ere. > > Fixes the following W=1 kernel build warning(s): > > drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_done’: > drivers/scsi/aic7xxx/aic79xx_osm.c:1796:12: warning: variable > ‘amount_xferred’ set but not used [-Wunused-but-set-variable] > > Cc: Hann

Re: [PATCH v2 21/29] scsi: aic7xxx: aic7xxx_osm: Fix 'amount_xferred' set but not used issue

2020-07-14 Thread Hannes Reinecke
kernel build warning(s): drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_done’: drivers/scsi/aic7xxx/aic7xxx_osm.c:1725:12: warning: variable ‘amount_xferred’ set but not used [-Wunused-but-set-variable] 1725 | uint32_t amount_xferred; | ^~ Cc: Hannes Reinecke Cc

Re: [PATCH v2 20/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'targ'

2020-07-14 Thread Hannes Reinecke
On 7/13/20 9:46 AM, Lee Jones wrote: Looks like checking the 'targ' was removed in 2005. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_send_async’: drivers/scsi/aic7xxx/aic7xxx_osm.c:1604:28: warning: variable ‘targ’ set but not used

Re: [PATCH v2 19/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'ahc'

2020-07-14 Thread Hannes Reinecke
On 7/13/20 9:46 AM, Lee Jones wrote: Looks as though 'ahc' hasn't been used since 2005. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_linux_slave_configure’: drivers/scsi/aic7xxx/aic7xxx_osm.c:674:20: warning: variable ‘ahc’ set

[PATCH v2 21/24] scsi: aic7xxx: aic79xx_osm: Remove unused variable 'ahd'

2020-07-13 Thread Lee Jones
Hasn't been used since 2005. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_slave_configure’: drivers/scsi/aic7xxx/aic79xx_osm.c:703:20: warning: variable ‘ahd’ set but not used [-Wunused-but-set-variable] Cc: Hannes Reinecke

[PATCH v2 23/24] scsi: aic7xxx: aic79xx_osm: Fix 'amount_xferred' set but not used issue

2020-07-13 Thread Lee Jones
/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_done’: drivers/scsi/aic7xxx/aic79xx_osm.c:1796:12: warning: variable ‘amount_xferred’ set but not used [-Wunused-but-set-variable] Cc: Hannes Reinecke Signed-off-by: Lee Jones --- drivers/scsi/aic7xxx/aic79xx_osm.c | 2 ++ 1 file changed, 2 insertions

[PATCH v2 22/24] scsi: aic7xxx: aic79xx_osm: Remove unused variables 'wait' and 'paused'

2020-07-13 Thread Lee Jones
It looks like they have never actually been used. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_dev_reset’: drivers/scsi/aic7xxx/aic79xx_osm.c:782:9: warning: variable ‘wait’ set but not used [-Wunused-but-set-variable] drivers

[PATCH v2 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes'

2020-07-13 Thread Lee Jones
Haven't been used since 2006. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_queue_abort_cmd’: drivers/scsi/aic7xxx/aic79xx_osm.c:2155:17: warning: variable ‘saved_modes’ set but not used [-Wunused-but-set-variable] drivers/scsi

[PATCH v2 19/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'ahc'

2020-07-13 Thread Lee Jones
Looks as though 'ahc' hasn't been used since 2005. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_linux_slave_configure’: drivers/scsi/aic7xxx/aic7xxx_osm.c:674:20: warning: variable ‘ahc’ set but not used [-Wunused-but-set-variable] 674

[PATCH v2 21/29] scsi: aic7xxx: aic7xxx_osm: Fix 'amount_xferred' set but not used issue

2020-07-13 Thread Lee Jones
/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_done’: drivers/scsi/aic7xxx/aic7xxx_osm.c:1725:12: warning: variable ‘amount_xferred’ set but not used [-Wunused-but-set-variable] 1725 | uint32_t amount_xferred; | ^~ Cc: Hannes Reinecke Cc: "Daniel M. Eischen" Cc: Doug Ledfo

[PATCH v2 18/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'tinfo'

2020-07-13 Thread Lee Jones
Looks like none of the artifact from ahc_fetch_transinfo() are used anymore. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_linux_target_alloc’: drivers/scsi/aic7xxx/aic7xxx_osm.c:567:30: warning: variable ‘tinfo’ set but not used

[PATCH v2 20/29] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'targ'

2020-07-13 Thread Lee Jones
Looks like checking the 'targ' was removed in 2005. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_send_async’: drivers/scsi/aic7xxx/aic7xxx_osm.c:1604:28: warning: variable ‘targ’ set but not used [-Wunused-but-set-variable] 1604

Re: [PATCH 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes'

2020-07-09 Thread Lee Jones
On Thu, 09 Jul 2020, James Bottomley wrote: > On Thu, 2020-07-09 at 18:45 +0100, Lee Jones wrote: > > Haven't been used since 2006. > > > > Fixes the following W=1 kernel build warning(s): > > > > drivers/scsi/aic7xxx/aic79xx_osm.c: In function > > ‘a

Re: [PATCH 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes'

2020-07-09 Thread James Bottomley
On Thu, 2020-07-09 at 18:45 +0100, Lee Jones wrote: > Haven't been used since 2006. > > Fixes the following W=1 kernel build warning(s): > > drivers/scsi/aic7xxx/aic79xx_osm.c: In function > ‘ahd_linux_queue_abort_cmd’: > drivers/scsi/aic7xxx/aic79xx_osm.c:2155:

[PATCH 23/24] scsi: aic7xxx: aic79xx_osm: Fix 'amount_xferred' set but not used issue

2020-07-09 Thread Lee Jones
/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_done’: drivers/scsi/aic7xxx/aic79xx_osm.c:1796:12: warning: variable ‘amount_xferred’ set but not used [-Wunused-but-set-variable] Cc: Hannes Reinecke Signed-off-by: Lee Jones --- drivers/scsi/aic7xxx/aic79xx_osm.c | 2 ++ 1 file changed, 2 insertions

[PATCH 21/24] scsi: aic7xxx: aic79xx_osm: Remove unused variable 'ahd'

2020-07-09 Thread Lee Jones
Hasn't been used since 2005. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_slave_configure’: drivers/scsi/aic7xxx/aic79xx_osm.c:703:20: warning: variable ‘ahd’ set but not used [-Wunused-but-set-variable] Cc: Hannes Reinecke

[PATCH 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes'

2020-07-09 Thread Lee Jones
Haven't been used since 2006. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_queue_abort_cmd’: drivers/scsi/aic7xxx/aic79xx_osm.c:2155:17: warning: variable ‘saved_modes’ set but not used [-Wunused-but-set-variable] drivers/scsi

[PATCH 22/24] scsi: aic7xxx: aic79xx_osm: Remove unused variables 'wait' and 'paused'

2020-07-09 Thread Lee Jones
It looks like they have never actually been used. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_dev_reset’: drivers/scsi/aic7xxx/aic79xx_osm.c:782:9: warning: variable ‘wait’ set but not used [-Wunused-but-set-variable] drivers

[PATCH 21/30] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'targ'

2020-07-08 Thread Lee Jones
Looks like checking the 'targ' was removed in 2005. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_send_async’: drivers/scsi/aic7xxx/aic7xxx_osm.c:1604:28: warning: variable ‘targ’ set but not used [-Wunused-but-set-variable] 1604

[PATCH 19/30] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'tinfo'

2020-07-08 Thread Lee Jones
Looks like none of the artifact from ahc_fetch_transinfo() are used anymore. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_linux_target_alloc’: drivers/scsi/aic7xxx/aic7xxx_osm.c:567:30: warning: variable ‘tinfo’ set but not used

[PATCH 22/30] scsi: aic7xxx: aic7xxx_osm: Fix 'amount_xferred' set but not used issue

2020-07-08 Thread Lee Jones
/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_done’: drivers/scsi/aic7xxx/aic7xxx_osm.c:1725:12: warning: variable ‘amount_xferred’ set but not used [-Wunused-but-set-variable] 1725 | uint32_t amount_xferred; | ^~ Cc: Hannes Reinecke Cc: "Daniel M. Eischen" Cc: Doug Ledfo

[PATCH 20/30] scsi: aic7xxx: aic7xxx_osm: Remove unused variable 'ahc'

2020-07-08 Thread Lee Jones
Looks as though 'ahc' hasn't been used since 2005. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_linux_slave_configure’: drivers/scsi/aic7xxx/aic7xxx_osm.c:674:20: warning: variable ‘ahc’ set but not used [-Wunused-but-set-variable] 674

[PATCH] scsi: aic7xxx: fix unintended sign extension on left shifts

2019-10-14 Thread Colin King
the shift. The commit this fixes is pre-git history. Signed-off-by: Colin Ian King --- drivers/scsi/aic7xxx/aic79xx_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c index 7e5044bf05c0..fa440c1b9baa

Re: [PATCH] scsi: aic7xxx: Remove dead code

2019-08-26 Thread Souptick Joarder
ar reason might be that it's impossible for aic7xxx ever to make > use of IU and QAS because they're LVD parameters and it's a SE/HVD > card, so the documentation in the code is actively wrong, but you'd > need to research that. I need to look further to come up with a clear reason.

Re: [PATCH] scsi: aic7xxx: Remove dead code

2019-08-26 Thread James Bottomley
tation for this chip is lost in the mists of time, so code fragments like this are the only way we know how it was supposed to work. A clear reason might be that it's impossible for aic7xxx ever to make use of IU and QAS because they're LVD parameters and it's a SE/HVD card, so the documen

[PATCH] scsi: aic7xxx: Remove dead code

2019-08-24 Thread Souptick Joarder
These are dead code since 2.6.13. If there is no plan to use it further, these can be removed forever. Signed-off-by: Souptick Joarder --- drivers/scsi/aic7xxx/aic7xxx_osm.c | 68 -- 1 file changed, 68 deletions(-) diff --git a/drivers/scsi/aic7xxx

[PATCH v2 22/35] scsi/aic7xxx: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/scsi/aic7xxx/aic79xx_core.c | 3 +-- drivers/scsi/aic7xxx/aic7xxx_core.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) d

Re: [PATCH trivial] [SCSI] aic7xxx: Spelling s/configuraion/configuration/

2019-06-07 Thread Martin K. Petersen
Geert, Applied to 5.3/scsi-queue. Thanks. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH trivial] [SCSI] aic7xxx: Spelling s/configuraion/configuration/

2019-06-07 Thread Hannes Reinecke
On 6/7/19 1:27 PM, Geert Uytterhoeven wrote: > Signed-off-by: Geert Uytterhoeven > --- > drivers/scsi/aic7xxx/aic7xxx.reg | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/aic7xxx/aic7xxx.reg > b/drivers/scsi/aic7xxx/aic7xxx.reg >

[PATCH trivial] [SCSI] aic7xxx: Spelling s/configuraion/configuration/

2019-06-07 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven --- drivers/scsi/aic7xxx/aic7xxx.reg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/aic7xxx/aic7xxx.reg b/drivers/scsi/aic7xxx/aic7xxx.reg index ba0b411d03e2e1fa..00fde2243e486cbd 100644 --- a/drivers/scsi/aic7xxx/aic7xxx.reg

[PATCH 5.0 058/137] scsi: aic7xxx: fix EISA support

2019-05-15 Thread Greg Kroah-Hartman
A API") Reported-by: Matthew Whitehead Signed-off-by: Christoph Hellwig Tested-by: Matthew Whitehead Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aic7xxx/aic7770_osm.c | 1 + drivers/scsi/aic7xxx/aic7xxx.h | 1 + drivers/scsi/aic7xxx/aic7xxx_osm.

[PATCH 4.19 043/113] scsi: aic7xxx: fix EISA support

2019-05-15 Thread Greg Kroah-Hartman
A API") Reported-by: Matthew Whitehead Signed-off-by: Christoph Hellwig Tested-by: Matthew Whitehead Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aic7xxx/aic7770_osm.c | 1 + drivers/scsi/aic7xxx/aic7xxx.h | 1 + drivers/scsi/aic7xxx/aic7xxx_osm.

[PATCH] scsi: aic7xxx: Remove NULL check before kfree()

2019-05-14 Thread Quentin Deslandes
Fix the following coccinelle warning by removing NULL check before calling kfree(): NULL check before some freeing functions in not needed. Signed-off-by: Quentin Deslandes --- drivers/scsi/aic7xxx/aic7xxx_core.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff

[PATCH AUTOSEL 5.0 55/99] scsi: aic7xxx: fix EISA support

2019-05-06 Thread Sasha Levin
evice handling from PCI DMA API") Reported-by: Matthew Whitehead Signed-off-by: Christoph Hellwig Tested-by: Matthew Whitehead Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aic7xxx/aic7770_osm.c | 1 + drivers/scsi/aic7xxx/aic7xxx.h | 1 + dr

Re: [PATCH 05/41] scsi: aic7xxx: aic79xx: mark expected switch fall-through

2019-01-11 Thread Martin K. Petersen
Hannes, >> Friendly ping (second one): >> >> Who can ack/review/take this patch, please? Applied to 5.1/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 05/41] scsi: aic7xxx: aic79xx: mark expected switch fall-through

2019-01-10 Thread Hannes Reinecke
t;Missing break in switch") Signed-off-by: Gustavo A. R. Silva ---   drivers/scsi/aic7xxx/aic79xx_core.c | 14 +-   1 file changed, 9 insertions(+), 5 deletions(-) Sorry, I thought I'd done so already. Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reineck

Re: [PATCH 05/41] scsi: aic7xxx: aic79xx: mark expected switch fall-through

2019-01-10 Thread Gustavo A. R. Silva
to find. Addresses-Coverity-ID: 114961 ("Missing break in switch") Addresses-Coverity-ID: 114962 ("Missing break in switch") Addresses-Coverity-ID: 114963 ("Missing break in switch") Addresses-Coverity-ID: 114964 ("Missing break in switch") Signed-off-by: Gu

Re: [PATCH 06/41] scsi: aic7xxx: mark expected switch fall-throughs

2019-01-10 Thread Gustavo A. R. Silva
to find. Signed-off-by: Gustavo A. R. Silva ---   drivers/scsi/aic7xxx/aic7xxx_core.c | 12 +---   1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c index f3362f4ab16e..d4a7263e4b8f 100644 --- a/

Re: [PATCH 06/41] scsi: aic7xxx: mark expected switch fall-throughs

2018-12-19 Thread Gustavo A. R. Silva
ROUGH" with a "fall through" annotation and then placed it at the bottom of the corresponding switch case, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva --- drivers/scsi/aic7xxx/aic7xxx_core.c | 12 +--- 1 file changed, 9 insertions(+), 3 dele

Re: [PATCH 05/41] scsi: aic7xxx: aic79xx: mark expected switch fall-through

2018-12-19 Thread Gustavo A. R. Silva
Addresses-Coverity-ID: 114963 ("Missing break in switch") Addresses-Coverity-ID: 114964 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/scsi/aic7xxx/aic79xx_core.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a

[PATCH v2] scsi: aic7xxx: Use kmemdup instead of duplicating its function

2018-12-06 Thread Wen Yang
n" CC: linux-s...@vger.kernel.org CC: linux-kernel@vger.kernel.org --- drivers/scsi/aic7xxx/aic79xx_core.c | 4 ++-- drivers/scsi/aic7xxx/aic7xxx_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.

[PATCH v2] scsi: aic7xxx: Use kmemdup instead of duplicating its function

2018-12-06 Thread Wen Yang
n" CC: linux-s...@vger.kernel.org CC: linux-kernel@vger.kernel.org --- drivers/scsi/aic7xxx/aic79xx_core.c | 4 ++-- drivers/scsi/aic7xxx/aic7xxx_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.

[PATCH] scsi: aic7xxx: Use kmemdup instead of duplicating its function

2018-12-06 Thread Wen Yang
n" CC: linux-s...@vger.kernel.org CC: linux-kernel@vger.kernel.org --- drivers/scsi/aic7xxx/aic79xx_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c index 9ee75c9a9aa1..3e72fac6d248 100644 --- a/

Re: [PATCH] scsi: aic7xxx: Fix unintended sign extension issue

2018-10-25 Thread James Bottomley
On Thu, 2018-10-25 at 16:13 +0100, Colin King wrote: > From: Colin Ian King > > In the expression "ahc_inb(ahc, port+3) << 24", the initial value is > a u8, but is promoted to a signed int, then sign-extended to > uint64_t. Why is this, that's highly non intuitive? The compiler is supposed to

Re: [PATCH] scsi: aic7xxx: Fix unintended sign extension issue

2018-10-25 Thread James Bottomley
On Thu, 2018-10-25 at 16:13 +0100, Colin King wrote: > From: Colin Ian King > > In the expression "ahc_inb(ahc, port+3) << 24", the initial value is > a u8, but is promoted to a signed int, then sign-extended to > uint64_t. Why is this, that's highly non intuitive? The compiler is supposed to

Re: [PATCH v2] aic7xxx/aic79xx: remove VLAs

2018-03-14 Thread Martin K. Petersen
Stephen, > In preparation to enabling -Wvla, remove VLAs and replace them with > fixed-length arrays instead. > > The arrays fixed here, using the number of constant sections, aren't > really VLAs, but they appear so to the compiler. Replace the array > sizes with a pre-processor-level constant

Re: [PATCH v2] aic7xxx/aic79xx: remove VLAs

2018-03-14 Thread Martin K. Petersen
Stephen, > In preparation to enabling -Wvla, remove VLAs and replace them with > fixed-length arrays instead. > > The arrays fixed here, using the number of constant sections, aren't > really VLAs, but they appear so to the compiler. Replace the array > sizes with a pre-processor-level constant

Re: [PATCH] aic7xxx/aic79xx: remove VLAs

2018-03-08 Thread Stephen Kitt
On Thu, 8 Mar 2018 11:52:25 -0800, Kees Cook wrote: > On Thu, Mar 8, 2018 at 5:22 AM, Stephen Kitt wrote: > > -static const int num_critical_sections = sizeof(critical_sections) > > - / sizeof(*critical_sections); > >

Re: [PATCH] aic7xxx/aic79xx: remove VLAs

2018-03-08 Thread Stephen Kitt
On Thu, 8 Mar 2018 11:52:25 -0800, Kees Cook wrote: > On Thu, Mar 8, 2018 at 5:22 AM, Stephen Kitt wrote: > > -static const int num_critical_sections = sizeof(critical_sections) > > - / sizeof(*critical_sections); > > +#define NUM_CRITICAL_SECTIONS 14 > >

Re: [PATCH v2] aic7xxx/aic79xx: remove VLAs

2018-03-08 Thread Kees Cook
ar so to the compiler. Replace the array > sizes with a pre-processor-level constant instead using ARRAY_SIZE. > > This was prompted by https://lkml.org/lkml/2018/3/7/621 > > Signed-off-by: Stephen Kitt <st...@sk2.org> Thanks! Reviewed-by: Kees Cook <keesc...@chromi

Re: [PATCH v2] aic7xxx/aic79xx: remove VLAs

2018-03-08 Thread Kees Cook
place the array > sizes with a pre-processor-level constant instead using ARRAY_SIZE. > > This was prompted by https://lkml.org/lkml/2018/3/7/621 > > Signed-off-by: Stephen Kitt Thanks! Reviewed-by: Kees Cook -Kees > --- > drivers/scsi/aic7xxx/aic79xx_core.c

[PATCH v2] aic7xxx/aic79xx: remove VLAs

2018-03-08 Thread Stephen Kitt
ARRAY_SIZE. This was prompted by https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Stephen Kitt <st...@sk2.org> --- drivers/scsi/aic7xxx/aic79xx_core.c| 8 drivers/scsi/aic7xxx/aic79xx_seq.h_shipped | 3 +-- drivers/scsi/aic7xxx/aic7xxx_core.c| 8 drivers/scsi/a

[PATCH v2] aic7xxx/aic79xx: remove VLAs

2018-03-08 Thread Stephen Kitt
ARRAY_SIZE. This was prompted by https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Stephen Kitt --- drivers/scsi/aic7xxx/aic79xx_core.c| 8 drivers/scsi/aic7xxx/aic79xx_seq.h_shipped | 3 +-- drivers/scsi/aic7xxx/aic7xxx_core.c| 8 drivers/scsi/aic7xxx

Re: [PATCH] aic7xxx/aic79xx: remove VLAs

2018-03-08 Thread Kees Cook
o the compiler. Since we know at > build-time how many critical sections there are, we might as well use > a pre-processor-level constant instead. > > This was prompted by https://lkml.org/lkml/2018/3/7/621 > > Signed-off-by: Stephen Kitt <st...@sk2.org> > --- &

Re: [PATCH] aic7xxx/aic79xx: remove VLAs

2018-03-08 Thread Kees Cook
. Since we know at > build-time how many critical sections there are, we might as well use > a pre-processor-level constant instead. > > This was prompted by https://lkml.org/lkml/2018/3/7/621 > > Signed-off-by: Stephen Kitt > --- > drivers/scsi/aic7xxx/aic79xx_core.c

[PATCH] aic7xxx/aic79xx: remove VLAs

2018-03-08 Thread Stephen Kitt
use a pre-processor-level constant instead. This was prompted by https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Stephen Kitt <st...@sk2.org> --- drivers/scsi/aic7xxx/aic79xx_core.c| 8 drivers/scsi/aic7xxx/aic79xx_seq.h_shipped | 3 +-- drivers/scsi/aic7xxx/aic7xxx_

[PATCH] aic7xxx/aic79xx: remove VLAs

2018-03-08 Thread Stephen Kitt
use a pre-processor-level constant instead. This was prompted by https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Stephen Kitt --- drivers/scsi/aic7xxx/aic79xx_core.c| 8 drivers/scsi/aic7xxx/aic79xx_seq.h_shipped | 3 +-- drivers/scsi/aic7xxx/aic7xxx_core.c| 8

Re: [PATCH] scsi: aic7xxx: remove really aiclib.c

2018-01-30 Thread Martin K. Petersen
Corentin, > aiclib.c is unused (and contain no code) since commit 1ff927306e08 > ("[SCSI] aic7xxx: remove aiclib.c") > 13 years later, finish the cleaning by remove it from tree. Applied to 4.16/scsi-fixes, thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: aic7xxx: remove really aiclib.c

2018-01-30 Thread Martin K. Petersen
Corentin, > aiclib.c is unused (and contain no code) since commit 1ff927306e08 > ("[SCSI] aic7xxx: remove aiclib.c") > 13 years later, finish the cleaning by remove it from tree. Applied to 4.16/scsi-fixes, thanks! -- Martin K. Petersen Oracle Linux Engineering

  1   2   3   4   5   6   7   8   9   10   >