* [PATCH -next v2] scsi: qedf: Remove dead code
@ 2024-09-21 6:29 Liao Chen
2024-09-24 19:38 ` Bart Van Assche
2024-10-04 1:38 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Liao Chen @ 2024-09-21 6:29 UTC (permalink / raw)
To: GR-QLogic-Storage-Upstream, linux-scsi, linux-kernel
Cc: skashyap, jhasan, James.Bottomley, martin.petersen, bvanassche
If container_of() is used correctly, its result is never NULL. Remove
the code that depends on container_of() returning a NULL pointer.
Signed-off-by: Liao Chen <liaochen4@huawei.com>
---
drivers/scsi/qedf/qedf_main.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index cf13148ba281..df756f3eef3e 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -4018,11 +4018,6 @@ void qedf_stag_change_work(struct work_struct *work)
struct qedf_ctx *qedf =
container_of(work, struct qedf_ctx, stag_work.work);
- if (!qedf) {
- QEDF_ERR(&qedf->dbg_ctx, "qedf is NULL");
- return;
- }
-
if (test_bit(QEDF_IN_RECOVERY, &qedf->flags)) {
QEDF_ERR(&qedf->dbg_ctx,
"Already is in recovery, hence not calling software context reset.\n");
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH -next v2] scsi: qedf: Remove dead code
2024-09-21 6:29 [PATCH -next v2] scsi: qedf: Remove dead code Liao Chen
@ 2024-09-24 19:38 ` Bart Van Assche
2024-10-04 1:38 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Bart Van Assche @ 2024-09-24 19:38 UTC (permalink / raw)
To: Liao Chen, GR-QLogic-Storage-Upstream, linux-scsi, linux-kernel
Cc: skashyap, jhasan, James.Bottomley, martin.petersen
On 9/20/24 11:29 PM, Liao Chen wrote:
> If container_of() is used correctly, its result is never NULL. Remove
> the code that depends on container_of() returning a NULL pointer.
>
> Signed-off-by: Liao Chen <liaochen4@huawei.com>
> ---
> drivers/scsi/qedf/qedf_main.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
> index cf13148ba281..df756f3eef3e 100644
> --- a/drivers/scsi/qedf/qedf_main.c
> +++ b/drivers/scsi/qedf/qedf_main.c
> @@ -4018,11 +4018,6 @@ void qedf_stag_change_work(struct work_struct *work)
> struct qedf_ctx *qedf =
> container_of(work, struct qedf_ctx, stag_work.work);
>
> - if (!qedf) {
> - QEDF_ERR(&qedf->dbg_ctx, "qedf is NULL");
> - return;
> - }
> -
> if (test_bit(QEDF_IN_RECOVERY, &qedf->flags)) {
> QEDF_ERR(&qedf->dbg_ctx,
> "Already is in recovery, hence not calling software context reset.\n");
The merge window is open so this is not the best time to send patches
that are not fixes for issues discovered during the merge window.
Anyway:
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH -next v2] scsi: qedf: Remove dead code
2024-09-21 6:29 [PATCH -next v2] scsi: qedf: Remove dead code Liao Chen
2024-09-24 19:38 ` Bart Van Assche
@ 2024-10-04 1:38 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2024-10-04 1:38 UTC (permalink / raw)
To: Liao Chen
Cc: GR-QLogic-Storage-Upstream, linux-scsi, linux-kernel, skashyap,
jhasan, James.Bottomley, martin.petersen, bvanassche
Liao,
> If container_of() is used correctly, its result is never NULL. Remove
> the code that depends on container_of() returning a NULL pointer.
Applied to 6.13/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-04 1:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-21 6:29 [PATCH -next v2] scsi: qedf: Remove dead code Liao Chen
2024-09-24 19:38 ` Bart Van Assche
2024-10-04 1:38 ` 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