Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1293554ybj; Fri, 20 Sep 2019 08:11:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjheNXCS9efvOEqjrVIAGp69Rh1BkuOqMqUvqyALza2VdFE9e/zfpmi5TbQyPyWnmyu7EI X-Received: by 2002:a05:6402:13cd:: with SMTP id a13mr22252124edx.6.1568992271772; Fri, 20 Sep 2019 08:11:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568992271; cv=none; d=google.com; s=arc-20160816; b=d8NgdSbumeQYGu8Ow86HEwErYdV84cMLu5r9+2T6pa5sMWRj97XRqWnMOZ1Oluxv96 yfs3EgQaVqU6AK36kqvYQWM3QunAWlb71nOGZInlmdi9aoElxaKHiM7Zwf1ZkijbDXps k5de1h2ID8x+9QMCO1SV4DSmqVzYA4BykjR2Or8USIkMh1H1ipjweA1Pv0Et7sgvPXUb Y/lSowcWNd8QIJpRtkTkFyCg0wwQQCQr5UKfDGSddpsMmhq+LRZi0sL5Uhy6DVNkONDD paEp5eBPXvOoRN9TS+VleF7hYVNQduTVYkM7oy8yPFG/57Fn5AuLCNVy9RJ7r/jAnSvq 9wfQ== 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=KrHN20yw8m0trqG+lO+rkGSRvvOca39x8m+zqsGN8Vs=; b=F2jbtLH6aXO0L4FiJpjAIbOabhtOVgaD7lzI12NFC6/PPieqnqiOvZ0YSPLDTSHYs/ LWCQhRW4NOx4Sacb2HoYrg8FGB/Neu09pb19UlyNn1+je3DHKtLFhpzJQ3CQxLc2DiON pg+X6NmAS1FrLwSds43C4SDItFrn+gPOBdBDzwa5GqHwH5Gp+6QZ89nYeOXRhgU8p4Q9 qt6KYyLuCF0wR5wZWUfXBeuoNj7iq5VE3oAKshVUhxjqLk5NM47wKx41/iAb3fdVYc8Q NcJu8QK3G5UlPg0G4NK1/SDyqiDFQiu2Ura5lnRS81bO0ph418UC0m+mdmNXEMw0xbWC sRuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OqomM5Sh; 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 me9si1201182ejb.280.2019.09.20.08.10.47; Fri, 20 Sep 2019 08:11:11 -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=OqomM5Sh; 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 S2406866AbfISWWd (ORCPT + 99 others); Thu, 19 Sep 2019 18:22:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:37582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406853AbfISWW3 (ORCPT ); Thu, 19 Sep 2019 18:22:29 -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 69BA121927; Thu, 19 Sep 2019 22:22:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568931748; bh=4pzk7W34Hwiym1j70wpXjtgVm/YZFf5dNu8qSh4DBXg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OqomM5ShHsZ5G6UDpdAWEfxs6rcf+aLxfX40qJRXrvRy2FqNX8WuUdbl7CtkJdsaE KtZpknYtXntzKcmUeLEgUAPw1uIFQrrY0ESMBJoC5QSgDNp54JBbSzrOkY1VudgLEI aysrsw65M1B6auDsiyLacJOk/0SuLpPy+MSNt2UE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Burton , Ganesan Ramalingam , James Hogan , Jayachandran C , John Crispin , Ralf Baechle , linux-mips@linux-mips.org, Guenter Roeck Subject: [PATCH 4.4 25/56] MIPS: netlogic: xlr: Remove erroneous check in nlm_fmn_send() Date: Fri, 20 Sep 2019 00:04:06 +0200 Message-Id: <20190919214755.209045371@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919214742.483643642@linuxfoundation.org> References: <20190919214742.483643642@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: Paul Burton commit 02eec6c9fc0cb13169cc97a6139771768791f92b upstream. In nlm_fmn_send() we have a loop which attempts to send a message multiple times in order to handle the transient failure condition of a lack of available credit. When examining the status register to detect the failure we check for a condition that can never be true, which falls foul of gcc 8's -Wtautological-compare: In file included from arch/mips/netlogic/common/irq.c:65: ./arch/mips/include/asm/netlogic/xlr/fmn.h: In function 'nlm_fmn_send': ./arch/mips/include/asm/netlogic/xlr/fmn.h:304:22: error: bitwise comparison always evaluates to false [-Werror=tautological-compare] if ((status & 0x2) == 1) ^~ If the path taken if this condition were true all we do is print a message to the kernel console. Since failures seem somewhat expected here (making the console message questionable anyway) and the condition has clearly never evaluated true we simply remove it, rather than attempting to fix it to check status correctly. Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20174/ Cc: Ganesan Ramalingam Cc: James Hogan Cc: Jayachandran C Cc: John Crispin Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- arch/mips/include/asm/netlogic/xlr/fmn.h | 2 -- 1 file changed, 2 deletions(-) --- a/arch/mips/include/asm/netlogic/xlr/fmn.h +++ b/arch/mips/include/asm/netlogic/xlr/fmn.h @@ -301,8 +301,6 @@ static inline int nlm_fmn_send(unsigned for (i = 0; i < 8; i++) { nlm_msgsnd(dest); status = nlm_read_c2_status0(); - if ((status & 0x2) == 1) - pr_info("Send pending fail!\n"); if ((status & 0x4) == 0) return 0; }