Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp330315rwl; Fri, 4 Nov 2022 00:28:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM63QfaJAQPD8bIjn56SM6TC7OTq+AbKkYtcnco/kF7Nmt6pVWT7+ccpA2jlkoWFWKqIMkGX X-Received: by 2002:a17:902:f552:b0:186:cdb2:b864 with SMTP id h18-20020a170902f55200b00186cdb2b864mr33851925plf.24.1667546900676; Fri, 04 Nov 2022 00:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667546900; cv=none; d=google.com; s=arc-20160816; b=IhJ4MAf5Bjhwueks54TbPVm99w5W9Oh8V93GEMdMnM29KVqwfntKOr1tlVpR1Ws1nx 5vJXpT3vo57AVlAYZ8iCzeVqAGOQkrGfK3ckW19bXRSclEiQERwU7qItvLVFk+CfW0c4 Yuvjwy2IVmNYH4m1La2hNQCtnnrLeXfQ2upJhpYA3EGNm0LG+xQ0jjALiNnfZkjc9gE4 ACjeAXlk2+ZyKFpSlMNdpIC11l3E114oKmZBBdejllxMStRgrjLdz0DSRFlFf0r5pMy1 Ge4cW/9ZxEXwg4Ld8+tU6dtM+QunooYznaBBhuoIVuTJitXBJMkswB14IaCr+uPv09mo DT4w== 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=w1h5/wRuVz7RIQWcEvpvsZTjh8/RTtJD0NiJw1Pts74=; b=U0TxRVPvU9HXEb48EzUPBIlWniZGUoDLyCg7E7ee1JB1uX4Ds/g5svp1toAaon8ckQ of/aZEIWSpZISkovHTmA8tlgKW5hKoSrtqEZCsMdJOFsy+gmmI56X7QsjEVDYpsEMSir glVFRgMd14Rng/RI/0Df6DcPAZc8OwCPGiVkoyTlKF9naoJL8/kcQgkmJc3q3EDOmD7l 8DLDI5G2o3/EX87N0dk2SwS5nQrFW/HvnnvWxT5yAsf7ei8uU7v16CpuCPoTaqHGbFNd 0uO4n5SnYTkWrb2eNZIfgJPKbAj2aiYcXgyNizmGq+6C0LUVIKaSFPgp7mVHwubfoBgI ZieA== 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 l7-20020a635707000000b0043aa67c7d8esi3874793pgb.738.2022.11.04.00.28.08; Fri, 04 Nov 2022 00:28:20 -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 S231182AbiKDGhl (ORCPT + 95 others); Fri, 4 Nov 2022 02:37:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230005AbiKDGhj (ORCPT ); Fri, 4 Nov 2022 02:37:39 -0400 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15CE821E18; Thu, 3 Nov 2022 23:37:37 -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=ay29a033018045168;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0VTvrMNq_1667543853; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VTvrMNq_1667543853) by smtp.aliyun-inc.com; Fri, 04 Nov 2022 14:37:34 +0800 From: Yang Li To: richardcochran@gmail.com, bagasdotme@gmail.com Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next v3] net: ethernet: Simplify bool conversion Date: Fri, 4 Nov 2022 14:37:31 +0800 Message-Id: <20221104063731.84008-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 v3: --According to Richard's suggestion, to preserve reverse Christmas tree order. 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..0dc80f6bbf94 100644 --- a/drivers/net/ethernet/renesas/rcar_gen4_ptp.c +++ b/drivers/net/ethernet/renesas/rcar_gen4_ptp.c @@ -29,8 +29,8 @@ 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; s64 addend = ptp_priv->default_addend; + bool neg_adj = scaled_ppm < 0; s64 diff; if (neg_adj) -- 2.20.1.7.g153144c