* [PATCH 0/4] Some small cleanups for scsi/libsas
@ 2022-02-11 6:42 chenxiang
2022-02-11 6:42 ` [PATCH 1/4] scsi: libsas: Use void for sas_discover_event() return code chenxiang
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: chenxiang @ 2022-02-11 6:42 UTC (permalink / raw)
To: jejb, martin.petersen; +Cc: linuxarm, linux-scsi, john.garry, Xiang Chen
From: Xiang Chen <chenxiang66@hisilicon.com>
There are some cleanups related to scsi and libsas:
- Use void for sas_discover_event() return code;
- Remove duplicated setting for task->task_state_flags;
- Remove unused parameter for function sas_ata_eh();
- Remove unused member cmd_pool for structure scsi_host_template;
Xiang Chen (4):
scsi: libsas: Use void for sas_discover_event() return code
scsi: libsas: Remove duplicated setting for task->task_state_flags
scsi: libsas: Remove unused parameter for function sas_ata_eh()
scsi: Remove unused member cmd_pool for structure scsi_host_template
drivers/scsi/libsas/sas_ata.c | 4 +---
drivers/scsi/libsas/sas_discover.c | 6 ++----
drivers/scsi/libsas/sas_scsi_host.c | 2 +-
include/scsi/libsas.h | 2 +-
include/scsi/sas_ata.h | 6 ++----
include/scsi/scsi_host.h | 3 ---
6 files changed, 7 insertions(+), 16 deletions(-)
--
2.33.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/4] scsi: libsas: Use void for sas_discover_event() return code
2022-02-11 6:42 [PATCH 0/4] Some small cleanups for scsi/libsas chenxiang
@ 2022-02-11 6:42 ` chenxiang
2022-02-11 6:42 ` [PATCH 2/4] scsi: libsas: Remove duplicated setting for task->task_state_flags chenxiang
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: chenxiang @ 2022-02-11 6:42 UTC (permalink / raw)
To: jejb, martin.petersen; +Cc: linuxarm, linux-scsi, john.garry, Xiang Chen
From: Xiang Chen <chenxiang66@hisilicon.com>
The callers of function sas_discover_event() don't check its return value,
and also it only returns 0, so use void for its return code.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Reviewed-by: John Garry <john.garry@huawei.com>
---
drivers/scsi/libsas/sas_discover.c | 6 ++----
include/scsi/libsas.h | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c
index 758213694091..d5bc1314c341 100644
--- a/drivers/scsi/libsas/sas_discover.c
+++ b/drivers/scsi/libsas/sas_discover.c
@@ -545,19 +545,17 @@ static void sas_chain_event(int event, unsigned long *pending,
}
}
-int sas_discover_event(struct asd_sas_port *port, enum discover_event ev)
+void sas_discover_event(struct asd_sas_port *port, enum discover_event ev)
{
struct sas_discovery *disc;
if (!port)
- return 0;
+ return;
disc = &port->disc;
BUG_ON(ev >= DISC_NUM_EVENTS);
sas_chain_event(ev, &disc->pending, &disc->disc_work[ev].work, port->ha);
-
- return 0;
}
/**
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 698f2032807b..1bb7ceded135 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -685,7 +685,7 @@ int sas_ex_revalidate_domain(struct domain_device *);
void sas_unregister_domain_devices(struct asd_sas_port *port, int gone);
void sas_init_disc(struct sas_discovery *disc, struct asd_sas_port *);
-int sas_discover_event(struct asd_sas_port *, enum discover_event ev);
+void sas_discover_event(struct asd_sas_port *, enum discover_event ev);
int sas_discover_sata(struct domain_device *);
int sas_discover_end_dev(struct domain_device *);
--
2.33.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/4] scsi: libsas: Remove duplicated setting for task->task_state_flags
2022-02-11 6:42 [PATCH 0/4] Some small cleanups for scsi/libsas chenxiang
2022-02-11 6:42 ` [PATCH 1/4] scsi: libsas: Use void for sas_discover_event() return code chenxiang
@ 2022-02-11 6:42 ` chenxiang
2022-02-11 6:42 ` [PATCH 3/4] scsi: libsas: Remove unused parameter for function sas_ata_eh() chenxiang
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: chenxiang @ 2022-02-11 6:42 UTC (permalink / raw)
To: jejb, martin.petersen; +Cc: linuxarm, linux-scsi, john.garry, Xiang Chen
From: Xiang Chen <chenxiang66@hisilicon.com>
Task->task_state_flags is already set in function sas_alloc_task(), so
remove duplicated setting.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Reviewed-by: John Garry <john.garry@huawei.com>
---
drivers/scsi/libsas/sas_ata.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index a315715b3622..8dbd5a771824 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -209,7 +209,6 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc)
}
task->scatter = qc->sg;
task->ata_task.retry_count = 1;
- task->task_state_flags = SAS_TASK_STATE_PENDING;
qc->lldd_task = task;
task->ata_task.use_ncq = ata_is_ncq(qc->tf.protocol);
--
2.33.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/4] scsi: libsas: Remove unused parameter for function sas_ata_eh()
2022-02-11 6:42 [PATCH 0/4] Some small cleanups for scsi/libsas chenxiang
2022-02-11 6:42 ` [PATCH 1/4] scsi: libsas: Use void for sas_discover_event() return code chenxiang
2022-02-11 6:42 ` [PATCH 2/4] scsi: libsas: Remove duplicated setting for task->task_state_flags chenxiang
@ 2022-02-11 6:42 ` chenxiang
2022-02-11 6:42 ` [PATCH 4/4] scsi: Remove unused member cmd_pool for structure scsi_host_template chenxiang
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: chenxiang @ 2022-02-11 6:42 UTC (permalink / raw)
To: jejb, martin.petersen; +Cc: linuxarm, linux-scsi, john.garry, Xiang Chen
From: Xiang Chen <chenxiang66@hisilicon.com>
Input parameter work_q is not unused in function sas_ata_eh(), so remove it.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Reviewed-by: John Garry <john.garry@huawei.com>
---
drivers/scsi/libsas/sas_ata.c | 3 +--
drivers/scsi/libsas/sas_scsi_host.c | 2 +-
include/scsi/sas_ata.h | 6 ++----
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index 8dbd5a771824..e0030a093994 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -782,8 +782,7 @@ void sas_ata_strategy_handler(struct Scsi_Host *shost)
sas_enable_revalidation(sas_ha);
}
-void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q,
- struct list_head *done_q)
+void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q)
{
struct scsi_cmnd *cmd, *n;
struct domain_device *eh_dev;
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index fb19e739a39c..bcb391b0c7ed 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -757,7 +757,7 @@ void sas_scsi_recover_host(struct Scsi_Host *shost)
* scsi_unjam_host does, but we skip scsi_eh_abort_cmds because any
* command we see here has no sas_task and is thus unknown to the HA.
*/
- sas_ata_eh(shost, &eh_work_q, &ha->eh_done_q);
+ sas_ata_eh(shost, &eh_work_q);
if (!scsi_eh_get_sense(&eh_work_q, &ha->eh_done_q))
scsi_eh_ready_devs(shost, &eh_work_q, &ha->eh_done_q);
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h
index 416c9c47d0e7..21e7c10c6295 100644
--- a/include/scsi/sas_ata.h
+++ b/include/scsi/sas_ata.h
@@ -25,8 +25,7 @@ int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy);
int sas_ata_init(struct domain_device *dev);
void sas_ata_task_abort(struct sas_task *task);
void sas_ata_strategy_handler(struct Scsi_Host *shost);
-void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q,
- struct list_head *done_q);
+void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q);
void sas_ata_schedule_reset(struct domain_device *dev);
void sas_ata_wait_eh(struct domain_device *dev);
void sas_probe_sata(struct asd_sas_port *port);
@@ -52,8 +51,7 @@ static inline void sas_ata_strategy_handler(struct Scsi_Host *shost)
{
}
-static inline void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q,
- struct list_head *done_q)
+static inline void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q)
{
}
--
2.33.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/4] scsi: Remove unused member cmd_pool for structure scsi_host_template
2022-02-11 6:42 [PATCH 0/4] Some small cleanups for scsi/libsas chenxiang
` (2 preceding siblings ...)
2022-02-11 6:42 ` [PATCH 3/4] scsi: libsas: Remove unused parameter for function sas_ata_eh() chenxiang
@ 2022-02-11 6:42 ` chenxiang
2022-02-11 9:10 ` John Garry
2022-02-11 22:14 ` [PATCH 0/4] Some small cleanups for scsi/libsas Martin K. Petersen
2022-02-15 3:19 ` Martin K. Petersen
5 siblings, 1 reply; 8+ messages in thread
From: chenxiang @ 2022-02-11 6:42 UTC (permalink / raw)
To: jejb, martin.petersen; +Cc: linuxarm, linux-scsi, john.garry, Xiang Chen
From: Xiang Chen <chenxiang66@hisilicon.com>
After the commit e9c787e65c0c ("scsi: allocate scsi_cmnd structures as
part of struct request"), the member cmd_pool in structure
scsi_host_template is not used, so remove it.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
---
include/scsi/scsi_host.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 72e1a347baa6..667d889b92b5 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -16,7 +16,6 @@ struct completion;
struct module;
struct scsi_cmnd;
struct scsi_device;
-struct scsi_host_cmd_pool;
struct scsi_target;
struct Scsi_Host;
struct scsi_transport_template;
@@ -493,8 +492,6 @@ struct scsi_host_template {
*/
u64 vendor_id;
- struct scsi_host_cmd_pool *cmd_pool;
-
/* Delay for runtime autosuspend */
int rpm_autosuspend_delay;
};
--
2.33.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] scsi: Remove unused member cmd_pool for structure scsi_host_template
2022-02-11 6:42 ` [PATCH 4/4] scsi: Remove unused member cmd_pool for structure scsi_host_template chenxiang
@ 2022-02-11 9:10 ` John Garry
0 siblings, 0 replies; 8+ messages in thread
From: John Garry @ 2022-02-11 9:10 UTC (permalink / raw)
To: chenxiang, jejb, martin.petersen; +Cc: linuxarm, linux-scsi
On 11/02/2022 06:42, chenxiang wrote:
> From: Xiang Chen<chenxiang66@hisilicon.com>
>
> After the commit e9c787e65c0c ("scsi: allocate scsi_cmnd structures as
> part of struct request"), the member cmd_pool in structure
> scsi_host_template is not used, so remove it.
>
> Signed-off-by: Xiang Chen<chenxiang66@hisilicon.com>
> ---
Reviewed-by: John Garry <john.garry@huawei.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/4] Some small cleanups for scsi/libsas
2022-02-11 6:42 [PATCH 0/4] Some small cleanups for scsi/libsas chenxiang
` (3 preceding siblings ...)
2022-02-11 6:42 ` [PATCH 4/4] scsi: Remove unused member cmd_pool for structure scsi_host_template chenxiang
@ 2022-02-11 22:14 ` Martin K. Petersen
2022-02-15 3:19 ` Martin K. Petersen
5 siblings, 0 replies; 8+ messages in thread
From: Martin K. Petersen @ 2022-02-11 22:14 UTC (permalink / raw)
To: chenxiang; +Cc: jejb, martin.petersen, linuxarm, linux-scsi, john.garry
> There are some cleanups related to scsi and libsas:
> - Use void for sas_discover_event() return code;
> - Remove duplicated setting for task->task_state_flags;
> - Remove unused parameter for function sas_ata_eh();
> - Remove unused member cmd_pool for structure scsi_host_template;
Applied to 5.18/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/4] Some small cleanups for scsi/libsas
2022-02-11 6:42 [PATCH 0/4] Some small cleanups for scsi/libsas chenxiang
` (4 preceding siblings ...)
2022-02-11 22:14 ` [PATCH 0/4] Some small cleanups for scsi/libsas Martin K. Petersen
@ 2022-02-15 3:19 ` Martin K. Petersen
5 siblings, 0 replies; 8+ messages in thread
From: Martin K. Petersen @ 2022-02-15 3:19 UTC (permalink / raw)
To: chenxiang, jejb; +Cc: Martin K . Petersen, linux-scsi, linuxarm, john.garry
On Fri, 11 Feb 2022 14:42:54 +0800, chenxiang wrote:
> From: Xiang Chen <chenxiang66@hisilicon.com>
>
> There are some cleanups related to scsi and libsas:
> - Use void for sas_discover_event() return code;
> - Remove duplicated setting for task->task_state_flags;
> - Remove unused parameter for function sas_ata_eh();
> - Remove unused member cmd_pool for structure scsi_host_template;
>
> [...]
Applied to 5.18/scsi-queue, thanks!
[1/4] scsi: libsas: Use void for sas_discover_event() return code
https://git.kernel.org/mkp/scsi/c/26d4a969dd05
[2/4] scsi: libsas: Remove duplicated setting for task->task_state_flags
https://git.kernel.org/mkp/scsi/c/59803ccb657d
[3/4] scsi: libsas: Remove unused parameter for function sas_ata_eh()
https://git.kernel.org/mkp/scsi/c/3a20e64281fd
[4/4] scsi: Remove unused member cmd_pool for structure scsi_host_template
https://git.kernel.org/mkp/scsi/c/23406e4d1f1e
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-02-15 3:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11 6:42 [PATCH 0/4] Some small cleanups for scsi/libsas chenxiang
2022-02-11 6:42 ` [PATCH 1/4] scsi: libsas: Use void for sas_discover_event() return code chenxiang
2022-02-11 6:42 ` [PATCH 2/4] scsi: libsas: Remove duplicated setting for task->task_state_flags chenxiang
2022-02-11 6:42 ` [PATCH 3/4] scsi: libsas: Remove unused parameter for function sas_ata_eh() chenxiang
2022-02-11 6:42 ` [PATCH 4/4] scsi: Remove unused member cmd_pool for structure scsi_host_template chenxiang
2022-02-11 9:10 ` John Garry
2022-02-11 22:14 ` [PATCH 0/4] Some small cleanups for scsi/libsas Martin K. Petersen
2022-02-15 3:19 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).