[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a811008e-4b30-4267-bb74-6957b461b918@acm.org>
Date: Tue, 24 Sep 2024 12:38:04 -0700
From: Bart Van Assche <bvanassche@....org>
To: Liao Chen <liaochen4@...wei.com>, GR-QLogic-Storage-Upstream@...vell.com,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: skashyap@...vell.com, jhasan@...vell.com,
James.Bottomley@...senPartnership.com, martin.petersen@...cle.com
Subject: Re: [PATCH -next v2] scsi: qedf: Remove dead code
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@...wei.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@....org>
Powered by blists - more mailing lists