From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1A89245DB9 for ; Wed, 27 Nov 2024 18:22:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 164ED4069F; Wed, 27 Nov 2024 18:22:28 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 5F2D9402DE for ; Wed, 27 Nov 2024 18:22:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732728146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qe2Mua49or8ZeoAm2miwUoV30nDy0GTT5CT7tTw+xvg=; b=GVKYv831FkrAtzPUanrE04fCYQm7aoqaLJblOxRMHqabZBUBxZ8e3y7pY2ZEr47po2cIp2 p8FO1DgxFN6bowYCLYy+pAn0EQ9BdaWqFTJfMPgl5X733wBH1VGQNNsyI/eOT+qLGDbBWL FLTlgBvX4IjO6xDT8NBTmZMn569VObQ= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-382-CIeS1F1COnqiDv7d1FEASQ-1; Wed, 27 Nov 2024 12:22:22 -0500 X-MC-Unique: CIeS1F1COnqiDv7d1FEASQ-1 X-Mimecast-MFC-AGG-ID: CIeS1F1COnqiDv7d1FEASQ Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A887319540F0; Wed, 27 Nov 2024 17:22:21 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.52]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5180A30001A2; Wed, 27 Nov 2024 17:22:20 +0000 (UTC) From: Kevin Traynor To: Rohit Raj Cc: Hemant Agrawal , dpdk stable Subject: patch 'bus/fslmc: fix Coverity warnings in QBMAN' has been queued to stable release 21.11.9 Date: Wed, 27 Nov 2024 17:18:28 +0000 Message-ID: <20241127171916.690404-81-ktraynor@redhat.com> In-Reply-To: <20241127171916.690404-1-ktraynor@redhat.com> References: <20241127171916.690404-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: zvr0k6HsGSj1KfKY3QFL3mvGtKQMY9g0EW5wWW31Dec_1732728141 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/02/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/e00b805528a35aeaa44dab06b793facfb8fca7d3 Thanks. Kevin --- >From e00b805528a35aeaa44dab06b793facfb8fca7d3 Mon Sep 17 00:00:00 2001 From: Rohit Raj Date: Wed, 23 Oct 2024 17:29:32 +0530 Subject: [PATCH] bus/fslmc: fix Coverity warnings in QBMAN [ upstream commit 051f4185f98faa964b6a965b2e8e7b2da68969de ] Fix Issues reported by NXP Internal Coverity. Fixes: 64f131a82fbe ("bus/fslmc: add qbman debug") Signed-off-by: Rohit Raj Acked-by: Hemant Agrawal --- drivers/bus/fslmc/qbman/qbman_debug.c | 49 +++++++++++++++++---------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c index eea06988ff..0e471ec3fd 100644 --- a/drivers/bus/fslmc/qbman/qbman_debug.c +++ b/drivers/bus/fslmc/qbman/qbman_debug.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright (C) 2015 Freescale Semiconductor, Inc. - * Copyright 2018-2020 NXP + * Copyright 2018-2020,2022 NXP */ @@ -38,4 +38,5 @@ int qbman_bp_query(struct qbman_swp *s, uint32_t bpid, { struct qbman_bp_query_desc *p; + struct qbman_bp_query_rslt *bp_query_rslt; /* Start the management command */ @@ -48,7 +49,7 @@ int qbman_bp_query(struct qbman_swp *s, uint32_t bpid, /* Complete the management command */ - *r = *(struct qbman_bp_query_rslt *)qbman_swp_mc_complete(s, p, - QBMAN_BP_QUERY); - if (!r) { + bp_query_rslt = (struct qbman_bp_query_rslt *)qbman_swp_mc_complete(s, + p, QBMAN_BP_QUERY); + if (!bp_query_rslt) { pr_err("qbman: Query BPID %d failed, no response\n", bpid); @@ -56,4 +57,6 @@ int qbman_bp_query(struct qbman_swp *s, uint32_t bpid, } + *r = *bp_query_rslt; + /* Decode the outcome */ QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_BP_QUERY); @@ -203,4 +206,5 @@ int qbman_fq_query(struct qbman_swp *s, uint32_t fqid, { struct qbman_fq_query_desc *p; + struct qbman_fq_query_rslt *fq_query_rslt; p = (struct qbman_fq_query_desc *)qbman_swp_mc_start(s); @@ -209,7 +213,7 @@ int qbman_fq_query(struct qbman_swp *s, uint32_t fqid, p->fqid = fqid; - *r = *(struct qbman_fq_query_rslt *)qbman_swp_mc_complete(s, p, - QBMAN_FQ_QUERY); - if (!r) { + fq_query_rslt = (struct qbman_fq_query_rslt *)qbman_swp_mc_complete(s, + p, QBMAN_FQ_QUERY); + if (!fq_query_rslt) { pr_err("qbman: Query FQID %d failed, no response\n", fqid); @@ -217,4 +221,6 @@ int qbman_fq_query(struct qbman_swp *s, uint32_t fqid, } + *r = *fq_query_rslt; + /* Decode the outcome */ QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_FQ_QUERY); @@ -399,4 +405,5 @@ int qbman_cgr_query(struct qbman_swp *s, uint32_t cgid, { struct qbman_cgr_query_desc *p; + struct qbman_cgr_query_rslt *cgr_query_rslt; p = (struct qbman_cgr_query_desc *)qbman_swp_mc_start(s); @@ -405,7 +412,7 @@ int qbman_cgr_query(struct qbman_swp *s, uint32_t cgid, p->cgid = cgid; - *r = *(struct qbman_cgr_query_rslt *)qbman_swp_mc_complete(s, p, - QBMAN_CGR_QUERY); - if (!r) { + cgr_query_rslt = (struct qbman_cgr_query_rslt *)qbman_swp_mc_complete(s, + p, QBMAN_CGR_QUERY); + if (!cgr_query_rslt) { pr_err("qbman: Query CGID %d failed, no response\n", cgid); @@ -413,4 +420,6 @@ int qbman_cgr_query(struct qbman_swp *s, uint32_t cgid, } + *r = *cgr_query_rslt; + /* Decode the outcome */ QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_CGR_QUERY); @@ -474,4 +483,5 @@ int qbman_cgr_wred_query(struct qbman_swp *s, uint32_t cgid, { struct qbman_cgr_query_desc *p; + struct qbman_wred_query_rslt *wred_query_rslt; p = (struct qbman_cgr_query_desc *)qbman_swp_mc_start(s); @@ -480,7 +490,7 @@ int qbman_cgr_wred_query(struct qbman_swp *s, uint32_t cgid, p->cgid = cgid; - *r = *(struct qbman_wred_query_rslt *)qbman_swp_mc_complete(s, p, - QBMAN_WRED_QUERY); - if (!r) { + wred_query_rslt = (struct qbman_wred_query_rslt *)qbman_swp_mc_complete( + s, p, QBMAN_WRED_QUERY); + if (!wred_query_rslt) { pr_err("qbman: Query CGID WRED %d failed, no response\n", cgid); @@ -488,4 +498,6 @@ int qbman_cgr_wred_query(struct qbman_swp *s, uint32_t cgid, } + *r = *wred_query_rslt; + /* Decode the outcome */ QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_WRED_QUERY); @@ -528,5 +540,5 @@ void qbman_cgr_attr_wred_dp_decompose(uint32_t dp, uint64_t *minth, *maxth = ma; else - *maxth = ((ma+256) * (1<<(mn-1))); + *maxth = ((uint64_t)(ma+256) * (1<<(mn-1))); if (step_s == 0) @@ -631,4 +643,5 @@ int qbman_wqchan_query(struct qbman_swp *s, uint16_t chanid, { struct qbman_wqchan_query_desc *p; + struct qbman_wqchan_query_rslt *wqchan_query_rslt; /* Start the management command */ @@ -641,7 +654,7 @@ int qbman_wqchan_query(struct qbman_swp *s, uint16_t chanid, /* Complete the management command */ - *r = *(struct qbman_wqchan_query_rslt *)qbman_swp_mc_complete(s, p, - QBMAN_WQ_QUERY); - if (!r) { + wqchan_query_rslt = (struct qbman_wqchan_query_rslt *)qbman_swp_mc_complete( + s, p, QBMAN_WQ_QUERY); + if (!wqchan_query_rslt) { pr_err("qbman: Query WQ Channel %d failed, no response\n", chanid); @@ -649,4 +662,6 @@ int qbman_wqchan_query(struct qbman_swp *s, uint16_t chanid, } + *r = *wqchan_query_rslt; + /* Decode the outcome */ QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_WQ_QUERY); -- 2.47.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-27 17:17:40.826716172 +0000 +++ 0081-bus-fslmc-fix-Coverity-warnings-in-QBMAN.patch 2024-11-27 17:17:38.283269674 +0000 @@ -1 +1 @@ -From 051f4185f98faa964b6a965b2e8e7b2da68969de Mon Sep 17 00:00:00 2001 +From e00b805528a35aeaa44dab06b793facfb8fca7d3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 051f4185f98faa964b6a965b2e8e7b2da68969de ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org