Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7149205ybi; Mon, 8 Jul 2019 15:37:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEEUXrjuuRIQKS60waX3Wf0O1tX3pAd75Nbi0LLnKeGN1LV5PrM52rCZ/hKZIz9UbK2R4K X-Received: by 2002:a65:534b:: with SMTP id w11mr26899263pgr.210.1562625474622; Mon, 08 Jul 2019 15:37:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625474; cv=none; d=google.com; s=arc-20160816; b=vIqdKjgh7t5YHkOeUTRuUSl18/bI2fCpP7wULr/TvpI3n8ZSEcD2nmSV0+Hy0lFfvn NI9f3wNfyizHlVQGShJEfZKR4GfHqxZuvHRI4herKN9pUeLOCqZfPicU7Gngnb/oyI4h ZF7yy2DWTH/L6cVGFjtlNawGGHNFg1//kZXQnSL0k/mKtbRXudHqrPC254Z8w+vO+YXA KWHhsI/8qLABwH2rQVT9scUqV+3ZjuWnRQSom1SW0BBdTGClkiY+/s9qGAfRW+j3Lhi/ kjIwCCUoX/2q8dd92H+kEwQL0bN8SaqY6DiubgArTSoBEUndJU99y5opi/f5xF5eGHmY vWvA== 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=OIbVbfTQw3ixBPhLxTY4lIMGteHWAI5s952AVeU9ZmU=; b=grZPWTKuVp2L6pL3ll1d82N6bk5DNTEAiw9BJUmYmZns9rXAa+n5WfS20PwZzTGY4B jKGmH/smj37/U4TucGycBVzpLYbuVfyKzi4BHqxDnicBggOib7yeFSiz59oNR5A2aJFD MY6moRFA5ZVP/lcS9mX1gexfA/5BGjmyp3ywsCuUEpebM3so6Xpvr0qwwR4o6nk+9hMB zi1tI6xX8IXYcTkkS8KZr075K6DEUtpOwGnSj5R3IvcE/aJo4yR22IiKarmyyd6aCxO+ cJ5ikBju4iBAF4mGbMpGKWR33kI9/1zd8Ss7ixOvVK1j1KoAdQ3ciVanNvr888/+N6/a 6c5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qs+gVPY2; 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 k69si20487925pgd.394.2019.07.08.15.37.40; Mon, 08 Jul 2019 15:37:54 -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=qs+gVPY2; 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 S2388339AbfGHPYS (ORCPT + 99 others); Mon, 8 Jul 2019 11:24:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:51516 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388328AbfGHPYP (ORCPT ); Mon, 8 Jul 2019 11:24:15 -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 41CA0214C6; Mon, 8 Jul 2019 15:24:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599454; bh=KawLcqAK8Jtlnzz5LbCaBUmEuHDVz6zoCaHEviFevVk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qs+gVPY2oD4Pjd9CmZFoMm3fFcHVIpLBA94U0zsck0SHFvgjeB38s76HbvJdHX7Nh uq7AY4WPpbUyimh3Qz/Q2OtShnszqI6L4a/O/i0W3k+fdZuaep330uHaQphW5b6/NS 9hKW9t1371MkpxbnGD+08AGjvjPaGUvDaV/SVcaw= 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, Sasha Levin Subject: [PATCH 4.14 21/56] MIPS: netlogic: xlr: Remove erroneous check in nlm_fmn_send() Date: Mon, 8 Jul 2019 17:13:13 +0200 Message-Id: <20190708150520.811521205@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150514.376317156@linuxfoundation.org> References: <20190708150514.376317156@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 [ Upstream commit 02eec6c9fc0cb13169cc97a6139771768791f92b ] 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 Signed-off-by: Sasha Levin --- arch/mips/include/asm/netlogic/xlr/fmn.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/mips/include/asm/netlogic/xlr/fmn.h b/arch/mips/include/asm/netlogic/xlr/fmn.h index 5604db3d1836..d79c68fa78d9 100644 --- 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 int size, unsigned int code, 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; } -- 2.20.1