Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp342897pxb; Wed, 29 Sep 2021 00:00:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyl+HqmNTIIZmRKGZ6RVcpC8jhBfvJT0/sRV3y01mnJ+i2Inpw4z2TSsdNXb3Stk0i2rJbb X-Received: by 2002:a05:6402:1a23:: with SMTP id be3mr10575696edb.372.1632898850105; Wed, 29 Sep 2021 00:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632898850; cv=none; d=google.com; s=arc-20160816; b=PXd6lKJ5Eu93SDty7d3EF9lMPg1cjKcNYzXDIF7wKLq9WQ3aiwhKkiI3cEeKJ3xEOp nVQc4KcwXBEep8l/w8/CmxrQeMQuHsouvhrSKpzUOlxRMvnYnTCZMWQkSdHXuHOxn3pd JBbtxCXtIHfsGSQcI4Q05uAVG7sLEw2ZoOIm9rZDibE01s4sAYtwwnC5+ot3cWo9LY9n owgtntWANTgBs2us/WRNNHLHzSJxK4+57glRG2jBguPTy9d96IxoyzHK3scbUBHVE6Su lL/ZxKURQ9ezdfpVu8G+shlX5HO2UmIV1t2kf2SeGw2CMGAizGls/jq0HvthQlD9g9F4 DSLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=mh6ku98I+rK0dq2pnwWJQvAyDaTVkMLA7kvX1+rEf3g=; b=eBjI0EdHT1dCGv1TmbrBuNkRwo0qUyirJduYOPRbzO0z709SsEP0MW3WpKrLdQTPOC RDdCsFwzfx8ZJjiX3dTkZjenTvXtOJfOi+/UQ+iRJSi7s2dEIb93/y0jtAXb7y2xTTbh Vr7rcgnpeE2SJAc3B4gsfUZpw3FZes+/NCt8DrpUexkgmCfQVjsbY/TRDMw2opm0QGNT vY16afkfmTQo2wJkmhFV3+IiCukns7tE0jx8Gy88m/pp+17M8AVUadDsUqWBESYjB8CJ PbRfM11R4VzsaT5zV8krF8B7y//5hkyB+AHyLx1szl4amHWKOlyPH1Yf5cmydBGvEuGD oXVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w2si1806641ejn.164.2021.09.29.00.00.24; Wed, 29 Sep 2021 00:00:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S244403AbhI2G6O (ORCPT + 99 others); Wed, 29 Sep 2021 02:58:14 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:45050 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbhI2G6M (ORCPT ); Wed, 29 Sep 2021 02:58:12 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0Uq.dnIy_1632898588; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Uq.dnIy_1632898588) by smtp.aliyun-inc.com(127.0.0.1); Wed, 29 Sep 2021 14:56:29 +0800 From: Yang Li To: kuba@kernel.org Cc: davem@davemloft.net, jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] intel: Simplify bool conversion Date: Wed, 29 Sep 2021 14:56:26 +0800 Message-Id: <1632898586-96655-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: ./drivers/net/ethernet/intel/i40e/i40e_xsk.c:229:35-40: WARNING: conversion to bool not needed here ./drivers/net/ethernet/intel/ice/ice_xsk.c:399:35-40: WARNING: conversion to bool not needed here Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 2 +- drivers/net/ethernet/intel/ice/ice_xsk.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c index 6f85879..ea06e95 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c +++ b/drivers/net/ethernet/intel/i40e/i40e_xsk.c @@ -226,7 +226,7 @@ bool i40e_alloc_rx_buffers_zc(struct i40e_ring *rx_ring, u16 count) rx_desc->wb.qword1.status_error_len = 0; i40e_release_rx_desc(rx_ring, ntu); - return count == nb_buffs ? true : false; + return count == nb_buffs; } /** diff --git a/drivers/net/ethernet/intel/ice/ice_xsk.c b/drivers/net/ethernet/intel/ice/ice_xsk.c index 7682eaa..35b6e81 100644 --- a/drivers/net/ethernet/intel/ice/ice_xsk.c +++ b/drivers/net/ethernet/intel/ice/ice_xsk.c @@ -396,7 +396,7 @@ bool ice_alloc_rx_bufs_zc(struct ice_ring *rx_ring, u16 count) rx_desc->wb.status_error0 = 0; ice_release_rx_desc(rx_ring, ntu); - return count == nb_buffs ? true : false; + return count == nb_buffs; } /** -- 1.8.3.1