Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1062728pxb; Wed, 6 Apr 2022 07:53:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqoFS7fX2ulor3Pyzao+rj7xmnKv1tuYTHISmDMwjGokHAUNxnd/8886Mpoc/aNeRTymIi X-Received: by 2002:a17:90a:5983:b0:1c9:ee11:76df with SMTP id l3-20020a17090a598300b001c9ee1176dfmr10452340pji.95.1649256790458; Wed, 06 Apr 2022 07:53:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649256790; cv=none; d=google.com; s=arc-20160816; b=YKMZ09QYJedqo0mPFLJBm1dUdkipUQDoUP9U9UKpA7matSrdO4R4zI+xjdg9vwl8Wl KTNEP7Ru5sjMY/AjmFvdIGFQ34br1TZzGlRYSC/D/gkRvDTQUVFgX9oMbmEAGG0rDvBy 6si4OBf1imrgqIo/YGDM7qUKsOYkQ75duI5UlG0PrR7dcrDVqkZgFZ+RO6Et6Og5ZMr9 +JMJATvtuIt9pO4uHBz93HljiUez3znIgyiach1cE2jKo6Oyz2pJWTrPmELQ4HhVqZ38 H6Z3y9c+0Ndn5XHldrLYPr6aiJwMd6ZRpCkbCG84v0I9Lo5RyvMw4uFZjg490U9NpGpc S18w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xAPSksevALtNR4PC0SvoG2WKxHfmcQ1JVmes6UfbRRI=; b=egyTvR2qa29oRaNK3w8044s7el4A+m3wDqHlrMa7exkSJBFWRYjF1jYoVGGQOhVulm dOqURf107qG+SfEl8+y5Um6DcrUB+0CzYVfH23bSgHMvbY0PvaQr+rbx/1sUrgebdaJ0 AnmfohpHjjN6tNa3/nMm0ZQAk1vWZXVaFw0EDv7wrgkCZzeM2VbxymqTAYzaFoV0GL8o 0AySpOK9F5VnB//K47uyVOCbvAFafpPsYLny8HETHtoP/O6a0x2fGkM5OJG/Q5UGWrCS ciGGOTsmMNVeTRKa3oeSCFasp8l5tg5dSStQb1R2bni1XO2R69OGtOpHo6ryHIE9QPBv eeuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JfSQ7Jfx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f7-20020a170902ce8700b00153b2d163fesi16787571plg.6.2022.04.06.07.53.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 07:53:10 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JfSQ7Jfx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D52F16A703F; Wed, 6 Apr 2022 05:44:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1578061AbiDEXSN (ORCPT + 99 others); Tue, 5 Apr 2022 19:18:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349711AbiDEJvD (ORCPT ); Tue, 5 Apr 2022 05:51:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9389DEF2; Tue, 5 Apr 2022 02:49:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 60FBFB81B14; Tue, 5 Apr 2022 09:49:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE497C385A2; Tue, 5 Apr 2022 09:49:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152142; bh=eI/tG81nC1saJgPatTgG7icD/lGlD5gWAo+K+jBtukE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JfSQ7Jfx4ipHTDL8+TTham6Ez6K53Rroj7o1hXoPk1rBkZmzc7OX8uXzo0fFeLDRf Aqz/YxtvroeS5KWOM6bLL6Yhmo2pm5FsSXPxYJ9UatrvwJ8oHRLrDuXUskOvjyUrRr 3rXvYmDi+2kb/zDatA+BbQdqJry5XW/ImL+lebKc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tom Rix , "David S. Miller" , Sasha Levin Subject: [PATCH 5.15 671/913] qlcnic: dcb: default to returning -EOPNOTSUPP Date: Tue, 5 Apr 2022 09:28:53 +0200 Message-Id: <20220405070359.949755467@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tom Rix [ Upstream commit 1521db37f0d42334a88e8ff28198a27d1ed5cd7b ] Clang static analysis reports this issue qlcnic_dcb.c:382:10: warning: Assigned value is garbage or undefined mbx_out = *val; ^ ~~~~ val is set in the qlcnic_dcb_query_hw_capability() wrapper. If there is no query_hw_capability op in dcp, success is returned without setting the val. For this and similar wrappers, return -EOPNOTSUPP. Fixes: 14d385b99059 ("qlcnic: dcb: Query adapter DCB capabilities.") Signed-off-by: Tom Rix Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h index 5d79ee4370bc..7519773eaca6 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h @@ -51,7 +51,7 @@ static inline int qlcnic_dcb_get_hw_capability(struct qlcnic_dcb *dcb) if (dcb && dcb->ops->get_hw_capability) return dcb->ops->get_hw_capability(dcb); - return 0; + return -EOPNOTSUPP; } static inline void qlcnic_dcb_free(struct qlcnic_dcb *dcb) @@ -65,7 +65,7 @@ static inline int qlcnic_dcb_attach(struct qlcnic_dcb *dcb) if (dcb && dcb->ops->attach) return dcb->ops->attach(dcb); - return 0; + return -EOPNOTSUPP; } static inline int @@ -74,7 +74,7 @@ qlcnic_dcb_query_hw_capability(struct qlcnic_dcb *dcb, char *buf) if (dcb && dcb->ops->query_hw_capability) return dcb->ops->query_hw_capability(dcb, buf); - return 0; + return -EOPNOTSUPP; } static inline void qlcnic_dcb_get_info(struct qlcnic_dcb *dcb) @@ -89,7 +89,7 @@ qlcnic_dcb_query_cee_param(struct qlcnic_dcb *dcb, char *buf, u8 type) if (dcb && dcb->ops->query_cee_param) return dcb->ops->query_cee_param(dcb, buf, type); - return 0; + return -EOPNOTSUPP; } static inline int qlcnic_dcb_get_cee_cfg(struct qlcnic_dcb *dcb) @@ -97,7 +97,7 @@ static inline int qlcnic_dcb_get_cee_cfg(struct qlcnic_dcb *dcb) if (dcb && dcb->ops->get_cee_cfg) return dcb->ops->get_cee_cfg(dcb); - return 0; + return -EOPNOTSUPP; } static inline void qlcnic_dcb_aen_handler(struct qlcnic_dcb *dcb, void *msg) -- 2.34.1