From patchwork Tue Nov 21 00:55:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 167452 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp320702vqb; Mon, 20 Nov 2023 16:57:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IG5EZxG0GjGgTeeQIwqWJgGbsLLrct4D8zMIzelmZJ8KXJAG04754Jyq2wMbDvTgKo25R3J X-Received: by 2002:a05:6871:331e:b0:1ef:f127:34fa with SMTP id nf30-20020a056871331e00b001eff12734famr10036542oac.57.1700528278636; Mon, 20 Nov 2023 16:57:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700528278; cv=none; d=google.com; s=arc-20160816; b=Ii0GRXMOlyY9OhjFw+9bn/YufImsndtKggyvUVX8z9buQgnMyGWKGt8qNQgairFlwi OvQzc/Ed7sOMvFqff5IrYz2auFQblM1b8Lzug1oP87ARHr/48/jDsJMRtqFUIgG+4Jg5 v5me9EensWlXOq7JQpfAN2wQBpoG5VbmcNaXp1hHSJkrQLwT0h0mjtA0byyi7Kg5nnTs PL4QLJelYWpdZYFVLPu+Zv4BiovfWdxigc86Irf+qtsd9jqK+UPj6HZzWDxSUfLqU+l+ R0KMVi/wW6oVBie2iLBTYF8H9gKa01anrFrLpgPe4oE0s/N/n6QuGQsoDthFDSEs/4he XxBQ== 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=9ryVeyGzKxShP0yHz50q672naUutd5scx72OzMnITy4=; fh=gkYh5md1jJLsMNOOOwfK3SSxTqmxboTmSy6gJZf38xg=; b=JKcYnqC5ZqwSzNTu9jC1B90GR2BssnXwa0jMlD0YYVS3+D3rlQ0MfvEfThBbDHAc6A ZI5Zh3p8jG+gapy7p+atVgIDI4EkzViUI/mgbgCaixE31rtsDfY0dT7IqozD5wbj4h2/ HHG0T5GGM/2xbhL5HEe5gVNNYYdN8W84hYwBCfoLy7ByWw5R51kffB/x9AwKfwwR56vP Um04DlgBVX/ki00yGBkWouNZY9mpzywe6I98SlnzalwApxveBNzns7tNqy8ho+na3GBF Irxh97rqCjTZDY/J/knP9BNonZIZ9eXGxxAMiVG/9w+zRM7ELiVx0TRYLsuH6FAlAsRi oLNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id q17-20020aa79831000000b006c4d5ca7fe7si8949774pfl.366.2023.11.20.16.57.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 16:57:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 1ED258079337; Mon, 20 Nov 2023 16:56:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232752AbjKUA4G (ORCPT + 27 others); Mon, 20 Nov 2023 19:56:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230107AbjKUA4F (ORCPT ); Mon, 20 Nov 2023 19:56:05 -0500 Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E03C6C1; Mon, 20 Nov 2023 16:56:01 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VwqOChu_1700528158; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VwqOChu_1700528158) by smtp.aliyun-inc.com; Tue, 21 Nov 2023 08:55:59 +0800 From: Yang Li To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, markgross@kernel.org, vadimp@nvidia.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] platform/mellanox: Simplify bool conversion Date: Tue, 21 Nov 2023 08:55:57 +0800 Message-Id: <20231121005557.69324-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 20 Nov 2023 16:56:16 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783133140715442481 X-GMAIL-MSGID: 1783133140715442481 ./drivers/platform/mellanox/mlxbf-tmfifo.c:94:41-46: WARNING: conversion to bool not needed here Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7584 Signed-off-by: Yang Li --- drivers/platform/mellanox/mlxbf-tmfifo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c index 5c683b4eaf10..8ba23eb5be0b 100644 --- a/drivers/platform/mellanox/mlxbf-tmfifo.c +++ b/drivers/platform/mellanox/mlxbf-tmfifo.c @@ -91,7 +91,7 @@ struct mlxbf_tmfifo_vring { /* Check whether vring is in drop mode. */ #define IS_VRING_DROP(_r) ({ \ typeof(_r) (r) = (_r); \ - (r->desc_head == &r->drop_desc ? true : false); }) + (r->desc_head == &r->drop_desc); }) /* A stub length to drop maximum length packet. */ #define VRING_DROP_DESC_MAX_LEN GENMASK(15, 0)