Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp101506rwl; Thu, 3 Nov 2022 20:27:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5KfLgK3p+tNN85NEKUhOtEo5WjmzPyhgfMewlY7jritzJXvbfpwuXeAIjy0kGab45wC3yN X-Received: by 2002:a05:6a00:1a0f:b0:56e:32a2:abcf with SMTP id g15-20020a056a001a0f00b0056e32a2abcfmr8524716pfv.35.1667532477067; Thu, 03 Nov 2022 20:27:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667532477; cv=none; d=google.com; s=arc-20160816; b=hs4LPhq9nDg1lQKoF66TjM7dsiq9Emf5L0UnGt2ObXbczzmjjBlmCcRS3d5QVCh0ys NFDKIvoCKvRcBN1SsL0Xzc3Ajn8ShKt+JZTmdr0laX1wt9PtJL/XcOz46LZKEl5YoXWP i5rJgwkR+MKl17/QCEe/ZuS3an7+R/zMZbKdXwYNUkWZaHDKkzB9Nu9eIICIQ9FAB/5P dDnsBvSS9nC1fUqY/tbo68Kb6vIrTHEfneGxiusIGpF1T2wHJIyqNBWR23QnT49cunTJ ZCHSInGJYko/fnv+/z7vPuIDouVXi0FP27/Wi5mxg3xH9zqQggys/DON803ROL78RxZD 0ccA== 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=1S+AfTGBMMCeL4Yv4MF3AT2Mt8qnqk2ydzD8tA/6gI4=; b=G3TwjYBspWjBNB4+bxiTFE4eYXugC56OTB+8lTcVNAqS63omhaFvaa8eYO3rgoNNQ3 IO2ztSg/99CxQzOJwmQvl9XSACFOAu2ZT4awpK4NZ9vdpzAdfSWZGVnj69t7cIFsgCFI 5gn6xGJyW/Nfw2MHLwl74yu1OFbavVkr9sZhvS0Q0bQdMeJht0Hgcm3Sj7+SEGUzyXd9 mz2otWH7OSxduJRkB9Oobf9/ZkD4YnUUyI8HTFvELZIzUrT/tKsxcRSxK4YwPW2xsheJ v4aQpxQliQfcxwOZqBaB0sMBXY9iSi8pCC0D+It5i+k2XS51CxgEFcpuBiqStCk6RU+i ULcQ== 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 x4-20020a1709027c0400b001869347b0besi2706900pll.174.2022.11.03.20.27.45; Thu, 03 Nov 2022 20:27:57 -0700 (PDT) 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 S230075AbiKDDD0 (ORCPT + 95 others); Thu, 3 Nov 2022 23:03:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229756AbiKDDDW (ORCPT ); Thu, 3 Nov 2022 23:03:22 -0400 Received: from out30-42.freemail.mail.aliyun.com (out30-42.freemail.mail.aliyun.com [115.124.30.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCCB61F2DD; Thu, 3 Nov 2022 20:03:18 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0VTv7Wur_1667530994; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VTv7Wur_1667530994) by smtp.aliyun-inc.com; Fri, 04 Nov 2022 11:03:15 +0800 From: Yang Li To: bagasdotme@gmail.com Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com, netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next v2] net: ethernet: Simplify bool conversion Date: Fri, 4 Nov 2022 11:03:13 +0800 Message-Id: <20221104030313.81670-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,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,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 The result of 'scaled_ppm < 0' is Boolean, and the question mark expression is redundant, remove it to clear the below warning: ./drivers/net/ethernet/renesas/rcar_gen4_ptp.c:32:40-45: WARNING: conversion to bool not needed here Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2729 Reported-by: Abaci Robot Signed-off-by: Yang Li --- change in v2: --According to Bagas's suggestion, describe what this patch does to fix this warning. drivers/net/ethernet/renesas/rcar_gen4_ptp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/renesas/rcar_gen4_ptp.c b/drivers/net/ethernet/renesas/rcar_gen4_ptp.c index c007e33c47e1..37f7359678e5 100644 --- a/drivers/net/ethernet/renesas/rcar_gen4_ptp.c +++ b/drivers/net/ethernet/renesas/rcar_gen4_ptp.c @@ -29,7 +29,7 @@ static const struct rcar_gen4_ptp_reg_offset s4_offs = { static int rcar_gen4_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm) { struct rcar_gen4_ptp_private *ptp_priv = ptp_to_priv(ptp); - bool neg_adj = scaled_ppm < 0 ? true : false; + bool neg_adj = scaled_ppm < 0; s64 addend = ptp_priv->default_addend; s64 diff; -- 2.20.1.7.g153144c