[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACGkMEusUJvJuk2QLcQNt4kb4TK-dsUwzx1q5zzK1dggx3iDpw@mail.gmail.com>
Date: Mon, 15 Jul 2024 09:54:18 +0800
From: Jason Wang <jasowang@...hat.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Srujana Challa <schalla@...vell.com>, vattunuru@...vell.com,
"Michael S. Tsirkin" <mst@...hat.com>, Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Eugenio Pérez <eperezma@...hat.com>,
Shijith Thotton <sthotton@...vell.com>, Nithin Dabilpuram <ndabilpuram@...vell.com>,
virtualization@...ts.linux.dev, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] vdpa/octeon_ep: Fix error code in octep_process_mbox()
On Fri, Jul 12, 2024 at 10:06 PM Dan Carpenter <dan.carpenter@...aro.org> wrote:
>
> Return -EINVAL for invalid signatures. Don't return success.
>
> Fixes: 8b6c724cdab8 ("virtio: vdpa: vDPA driver for Marvell OCTEON DPU devices")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
> Nag mode: When we add a new driver, then could we use the patch prefix for the
> driver not for the subsystem only.
>
> BAD: net: add driver for abc123
> GOOD: net/abc123: add driver for abc123
>
> drivers/vdpa/octeon_ep/octep_vdpa_hw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/vdpa/octeon_ep/octep_vdpa_hw.c b/drivers/vdpa/octeon_ep/octep_vdpa_hw.c
> index 7fa0491bb201..11bd76ae18cf 100644
> --- a/drivers/vdpa/octeon_ep/octep_vdpa_hw.c
> +++ b/drivers/vdpa/octeon_ep/octep_vdpa_hw.c
> @@ -140,7 +140,7 @@ static int octep_process_mbox(struct octep_hw *oct_hw, u16 id, u16 qid, void *bu
> val = octep_read_sig(mbox);
> if ((val & 0xFFFF) != MBOX_RSP_SIG) {
> dev_warn(&pdev->dev, "Invalid Signature from mbox : %d response\n", id);
> - return ret;
> + return -EINVAL;
> }
>
> val = octep_read_sts(mbox);
Acked-by: Jason Wang <jasowang@...hat.com>
Thanks
Powered by blists - more mailing lists