diff mbox series

[1/2] qed: Use accurate error num in qed_cxt_dynamic_ilt_alloc

Message ID 20210729151732.30995-1-pkushwaha@marvell.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series [1/2] qed: Use accurate error num in qed_cxt_dynamic_ilt_alloc | expand

Commit Message

Prabhakar Kushwaha July 29, 2021, 3:17 p.m. UTC
To have more accurate error return type use -EOPNOTSUPP instead
of -EINVAL.

Signed-off-by: Shai Malin <smalin@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
---
 drivers/net/ethernet/qlogic/qed/qed_cxt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jason Gunthorpe July 30, 2021, 2:33 p.m. UTC | #1
On Thu, Jul 29, 2021 at 06:17:31PM +0300, Prabhakar Kushwaha wrote:
> To have more accurate error return type use -EOPNOTSUPP instead
> of -EINVAL.
> 
> Signed-off-by: Shai Malin <smalin@marvell.com>
> Signed-off-by: Ariel Elior <aelior@marvell.com>
> Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
> ---
>  drivers/net/ethernet/qlogic/qed/qed_cxt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Both applied to for-next, thanks

Jason
diff mbox series

Patch

diff --git a/drivers/net/ethernet/qlogic/qed/qed_cxt.c b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
index 5a0a3cbcc1c1..cb0f2a3a1ac9 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_cxt.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
@@ -2226,8 +2226,8 @@  qed_cxt_dynamic_ilt_alloc(struct qed_hwfn *p_hwfn,
 		p_blk = &p_cli->pf_blks[CDUT_SEG_BLK(QED_CXT_ROCE_TID_SEG)];
 		break;
 	default:
-		DP_NOTICE(p_hwfn, "-EINVALID elem type = %d", elem_type);
-		return -EINVAL;
+		DP_NOTICE(p_hwfn, "-EOPNOTSUPP elem type = %d", elem_type);
+		return -EOPNOTSUPP;
 	}
 
 	/* Calculate line in ilt */