Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3287530ybb; Tue, 31 Mar 2020 02:08:53 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsyUdpvu5YG6B37Sc+hjLDUZsSYZru6RfA2dBeS8WtQp5dvRe3Vh/s9Lq16hXlxbQZhxAKh X-Received: by 2002:aca:4b56:: with SMTP id y83mr1435874oia.142.1585645732958; Tue, 31 Mar 2020 02:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585645732; cv=none; d=google.com; s=arc-20160816; b=eSjVm5y1hNxpfBw+6e8fYLAA6EbxfXev7sgmRuVyEQzYiyFtdqBlk7IaeYunDoAqya iuh3uV1GNOgtoSs0zIELbdFGOG8AARWLKOp15bppWF0fF6VWSpz++0AMXDJELd/2Hkcx S6Hr0PTnrn186mNlANGrO1Zon8jfiafVDjN31IeIS9W7Sr8fwey4QYkcX1StYhSA5ADy nu9cD0ZECwdLlMNAZybJO70ByZCmFof8sWhxcdbGnXmn1KSBpiZfIU76ZA6K+aXjWLiZ C+lmvW3yNi9UXnPE12SQzMnM3sB5NvZgIpSGqitMd9XwmmanwpfpEdPq9/UuW7rXkcD1 KMAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Y8cZktGGxjlNtrz9SjKpWGsc8mvYzb0rDG5qpU4IOlw=; b=Hkr4HtyWawDX/EfFlIaRT4Ycx/FYw3DVsE4g5y1167DDG9/NZmh0ZGGsBEyR5udnlN a7OCdHIiZQBNAvl27BGF9rsXuFr6U8m56YK6ObCYmbXVsg6wDnIiBPIHAXVP2R0nnLzV ics4+EN6NOe0jA+fqZ7Bz4NuHlegQr0mt4p1bOMKYRcPsKWwLP5xm96LYK9uAsHQV9Yu Q9sKwck7d2IXnBz87ByQTCJvvwwyAgyrTRql7sK3N5551fC9xGuRYbx3K4KL/jqXSR7b HpRIo5frongGfoLbfm+WuPkkSxzC8WykzlKnZ6DgkjAAO80QIb0PAwGmObcETOQvNsR4 V7ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QQKRZXeq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3si7787514oth.163.2020.03.31.02.08.40; Tue, 31 Mar 2020 02:08:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QQKRZXeq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731115AbgCaJHZ (ORCPT + 99 others); Tue, 31 Mar 2020 05:07:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:49054 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731205AbgCaJHT (ORCPT ); Tue, 31 Mar 2020 05:07:19 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A345520675; Tue, 31 Mar 2020 09:07:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585645639; bh=fonGa2Jo6J/Aqu3Gec9US4klKsW7E93xxowFHt7fUKw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QQKRZXeqOzJuYjZAzQcqeB0Wi0PYCouLyrpDxhcbAFbl50hz7Qozp0rzsmvdxAOqc ynk9UZ54QKLhmw6zINOhxevlBeqR/O/g5hT60dNUtTt8CyMrygGHohC6SUJpL/Rage oxIglGeTxk5xECxz4DQu6jJ22vZWXt1T4KJY1GlI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Madalin Bucur , "David S. Miller" , Sasha Levin Subject: [PATCH 5.5 077/170] dpaa_eth: Remove unnecessary boolean expression in dpaa_get_headroom Date: Tue, 31 Mar 2020 10:58:11 +0200 Message-Id: <20200331085432.504560513@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200331085423.990189598@linuxfoundation.org> References: <20200331085423.990189598@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor [ Upstream commit 7395f62d95aafacdb9bd4996ec2f95b4a655d7e6 ] Clang warns: drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:2860:9: warning: converting the result of '?:' with integer constants to a boolean always evaluates to 'true' [-Wtautological-constant-compare] return DPAA_FD_DATA_ALIGNMENT ? ALIGN(headroom, ^ drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:131:34: note: expanded from macro 'DPAA_FD_DATA_ALIGNMENT' \#define DPAA_FD_DATA_ALIGNMENT (fman_has_errata_a050385() ? 64 : 16) ^ 1 warning generated. This was exposed by commit 3c68b8fffb48 ("dpaa_eth: FMan erratum A050385 workaround") even though it appears to have been an issue since the introductory commit 9ad1a3749333 ("dpaa_eth: add support for DPAA Ethernet") since DPAA_FD_DATA_ALIGNMENT has never been able to be zero. Just replace the whole boolean expression with the true branch, as it is always been true. Link: https://github.com/ClangBuiltLinux/linux/issues/928 Signed-off-by: Nathan Chancellor Reviewed-by: Madalin Bucur Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index 36e2e28fa6e38..1e8dcae5f4b40 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -2845,9 +2845,7 @@ static inline u16 dpaa_get_headroom(struct dpaa_buffer_layout *bl) headroom = (u16)(bl->priv_data_size + DPAA_PARSE_RESULTS_SIZE + DPAA_TIME_STAMP_SIZE + DPAA_HASH_RESULTS_SIZE); - return DPAA_FD_DATA_ALIGNMENT ? ALIGN(headroom, - DPAA_FD_DATA_ALIGNMENT) : - headroom; + return ALIGN(headroom, DPAA_FD_DATA_ALIGNMENT); } static int dpaa_eth_probe(struct platform_device *pdev) -- 2.20.1