Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6364173pxb; Tue, 15 Feb 2022 00:20:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUMnO1hoslmrSetC3wzr80mpYf3Tw4gvATIRhuc9fSfbYGsGiVZzS9hd41m+cJSLVXfPR0 X-Received: by 2002:a05:6402:3450:: with SMTP id l16mr2678513edc.225.1644913216366; Tue, 15 Feb 2022 00:20:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644913216; cv=none; d=google.com; s=arc-20160816; b=Dl2swLJ8uFN13itJKGxWXKm1/KRKW44bFnteHdl1XIuuQH0zuXzScwrWPnvPeYbsLm X2oARw/a4IvrMl3JTxF99tG5bQnJwNgPyR85p0g2ImrfV0SbofNfNtN1FAygGtsjNv4I o97qwq9PNyxa7IXD+rqcv9Xujk8KJlfGm3eWyoG4/95lUQuegczx7ru8yEyqyGV1y+da kTvfkv1YnFT6REYw8URdDqgQQ8jtul6JYy8pVXECLrb1VMK35L5tX+fJjGqjyjlOfjCB vqW9fsba+5bxq7ZmMQgHIKjkAdWhonlBN0GNkLTb1IKn8Xj00Rd+5B4oz1ZNhO3YomlL 19YQ== 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 :message-id:date:subject:cc:to:from; bh=/6ZwQBii40zBegAUlQd2M5FCt7fH3RYcE38q4bhJCwI=; b=bAUVmdqBVnk6jlPMbf/Q/Gmt1Es3WO9oROAmn9Xg09SIrELnRVUHWWQqTq1ZCSEhAy VxPuSLocXvvURCukvqcHmG/NoFbTgWnxmbU04+8Sr+3eKF1752p6uArQlBKI0R3rzqVi v5PMb8iCpRPA8Y+RfTjAfLaOHIS2XW7AdybJNG6jydiKRpdc/H4qP0DjYcNZZ2vtgHH+ eMhS2/UIf2mDNZ0hn/BnGGqbqGaCFUh63tiD1dFMw9QaVq/qGyqlnYujDdoWcH1igCzI RItG7KgOfHP6rpVkI+r0M4J6GhDzq054bTVRRHO1T4RHzBbzp4WM1BKft76Juhi/T9V2 h55g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id di3si25302641ejc.982.2022.02.15.00.19.44; Tue, 15 Feb 2022 00:20:16 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232489AbiBOBJ3 (ORCPT + 99 others); Mon, 14 Feb 2022 20:09:29 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230031AbiBOBJ3 (ORCPT ); Mon, 14 Feb 2022 20:09:29 -0500 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A32DF3F89C; Mon, 14 Feb 2022 17:09:18 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04357;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0V4VOvy5_1644887355; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0V4VOvy5_1644887355) by smtp.aliyun-inc.com(127.0.0.1); Tue, 15 Feb 2022 09:09:16 +0800 From: Yang Li To: kuba@kernel.org Cc: davem@davemloft.net, ioana.ciornei@nxp.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] dpaa2-eth: Simplify bool conversion Date: Tue, 15 Feb 2022 09:09:13 +0800 Message-Id: <20220215010913.114395-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham 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 the following coccicheck warnings: ./drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:1199:42-47: WARNING: conversion to bool not needed here ./drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:1218:54-59: WARNING: conversion to bool not needed here Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c index c4a48e6f1758..3e709c8fb961 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -1196,7 +1196,7 @@ static int dpaa2_eth_build_gso_fd(struct dpaa2_eth_priv *priv, /* Setup the SG entry for the header */ dpaa2_sg_set_addr(sgt, tso_hdr_dma); dpaa2_sg_set_len(sgt, hdr_len); - dpaa2_sg_set_final(sgt, data_left > 0 ? false : true); + dpaa2_sg_set_final(sgt, data_left <= 0); /* Compose the SG entries for each fragment of data */ num_sge = 1; @@ -1215,7 +1215,7 @@ static int dpaa2_eth_build_gso_fd(struct dpaa2_eth_priv *priv, } dpaa2_sg_set_addr(sgt, addr); dpaa2_sg_set_len(sgt, size); - dpaa2_sg_set_final(sgt, size == data_left ? true : false); + dpaa2_sg_set_final(sgt, size == data_left); num_sge++; -- 2.20.1.7.g153144c