Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2459289pxm; Fri, 25 Feb 2022 02:19:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyKAgc65XY+aclnS4ivVJCk4ZZZjh7pzI1MG0lnOSYKKJnlSjttA0xp+1QPO0JqXwrLhCkM X-Received: by 2002:a17:906:9b88:b0:6d0:f843:4068 with SMTP id dd8-20020a1709069b8800b006d0f8434068mr5439465ejc.678.1645784346601; Fri, 25 Feb 2022 02:19:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645784346; cv=none; d=google.com; s=arc-20160816; b=T/h0+/GWLYX1W8ICz4QtWe+4c54uPNIJEKi+GZCdmPopyfNKITf2JdajfnoPtnBnkZ Oi+pVBRLsYQpGirW+7lwH5cPKO4mIxBszOovf2U56wKq9u3n27rqDNCB1kjh0PO6I+ok wU9rlRhEy9MWcivxa42zTAfwJDMoGazwZ1+tEpzDj7gzKlnMPBWs6qy/AGRC0jn38TVN mSlPdhHuBCISDgwSluBxFAo68mXsT8nKEOVyPI3c4JFoLZhsJ55LNrqaRpWHz5SZIM4E uBECExZYKhFgLwuZYeYrWV6xJ+i7J2O+Ee72PTHPYbLbdCgo5CZKeRfiy94Gyc1XmwSZ DSBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=flSpEHJLXhRcAHprqv/e69d9DyWz6vR29rvBrc7xfmA=; b=Hi0+CDXlBVh8xIQpNWOsllYMnlqm+u173D/Z/GLx6vNP+AsCx8kxlpLXJmi0kUOZqG BchXXeTeuoYNazvK/UcA/PElRZkcf2VjFQDWhO9A7rXcoItW8pCrNYZB9vKyhplV5wS1 rwOQ2MlZdsCCsP3sO3tYBEDmbTkBvIlF2hs0rb7dTkBh+7k8GyaxpH74dC4nkX6AaEeg kMj5vsslMRsJp/qSz4vhDbyUbe9j5s9OB021NRkAzVIipxKBTUMbAauriswxQvTHj77C diQPnbinYcrOY87oupXqFwCfvZunRCmVmXLDTchocZSSrVdWDZvWCjlTSi7MwB7jk/2p q2zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j1-20020a170906094100b006ce62f85635si1163470ejd.661.2022.02.25.02.18.42; Fri, 25 Feb 2022 02:19:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238338AbiBYICP (ORCPT + 99 others); Fri, 25 Feb 2022 03:02:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238335AbiBYICN (ORCPT ); Fri, 25 Feb 2022 03:02:13 -0500 X-Greylist: delayed 62 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 25 Feb 2022 00:01:39 PST Received: from mail.meizu.com (unknown [14.29.68.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97527DF1B; Fri, 25 Feb 2022 00:01:39 -0800 (PST) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail04.meizu.com (172.16.1.16) with Microsoft SMTP Server (TLS) id 14.3.487.0; Fri, 25 Feb 2022 16:00:37 +0800 Received: from meizu.meizu.com (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Fri, 25 Feb 2022 16:00:35 +0800 From: Haowen Bai To: , CC: , , "Haowen Bai" Subject: [PATCH] soc: qcom: qmi: Use min() instead of doing it manually Date: Fri, 25 Feb 2022 16:00:31 +0800 Message-ID: <1645776031-13516-1-git-send-email-baihaowen@meizu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-124.meizu.com (172.16.1.124) To IT-EXMB-1-125.meizu.com (172.16.1.125) X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL,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 Fix following coccicheck warning: drivers/soc/qcom/qmi_interface.c:773:12-13: WARNING opportunity for min() Signed-off-by: Haowen Bai --- drivers/soc/qcom/qmi_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/qmi_interface.c b/drivers/soc/qcom/qmi_interface.c index c8c4c73..3337a70 100644 --- a/drivers/soc/qcom/qmi_interface.c +++ b/drivers/soc/qcom/qmi_interface.c @@ -770,7 +770,7 @@ static ssize_t qmi_send_message(struct qmi_handle *qmi, kfree(msg); - return ret < 0 ? ret : 0; + return min(ret, 0); } /** -- 2.7.4