Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp385902pxb; Wed, 3 Mar 2021 05:55:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJztk2R8iL83mF5O6+bizFhVbvmXGZwMPoCgNmtzXfFexoi+pT9eKtyksExl3bRlMkXjzh0f X-Received: by 2002:a50:ec07:: with SMTP id g7mr24997895edr.72.1614779758654; Wed, 03 Mar 2021 05:55:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614779758; cv=none; d=google.com; s=arc-20160816; b=khbiM3QIcv5kSf6cFKKYjmYR/ELkpJX6BEJl5BliPGmPYrWnjjcRgW/epcKzEP0Kpv YMFfuxPaL4zQVW1Zh21GCBepvw0CpGM0/llxekEgudrYb5lqip1VVFVj1aFR8u0LtcFJ 3n93VSehpO61Zy2nqieAvpgojUwT4ZKtpJpA+yfBNcZlzaiaSJhKvT8vm2zD+1ZLwJOw nqP7P8Zmkztq+D08htTKo6kZMNpuHbqYR4shq7oBZ3RpSErQrIQKHMdzjvImoMJ6f64q k2dd+FgEF8iyBngt9hYT1BtHzB25RwnVfgu8FPH+yaz7GS+52bm0FogykAQqP+2BjttB 11EA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cAvCGUIWBSigy8LpD/LEmi3vG3cIvDA//o+8oTX0bRc=; b=ULYcSJPt1rLqhI+igaX+I6YQyTYOG68n9ouYAlfJwGwBSU09il6D3ycYYi9pgP28Sw e0w809JhWd5/8pTSakvm1BaffYhcIjN/FL+ot0HH6bcTAlC8hSF05v3Cob7RDxkDIVrX KWn04imNtBAq54cAEuAsIhhQVhaEle3UfLsjScsTDIKvbEFYMofo907c9ppmxKjxludg LURh+Olit4dyk2c5rqr+RnebCy0TGfaPsmrEAul4xsoQsjZROhjugq5L50cP3WdhKzMQ NGd/gX35ZIvrRk73PU1T9OjwFKhcfO5F+IU4aRjM9SPdfDkl9EYVF/hPeDdMBkZPQ3Rt lNyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n7LAnMxU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f8si14483890ejz.220.2021.03.03.05.55.10; Wed, 03 Mar 2021 05:55:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n7LAnMxU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242911AbhCAUNK (ORCPT + 99 others); Mon, 1 Mar 2021 15:13:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:33238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236053AbhCARDu (ORCPT ); Mon, 1 Mar 2021 12:03:50 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 76E5664F68; Mon, 1 Mar 2021 16:39:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614616741; bh=eT39xaQOiQE9iX/3+l/9yrjkQleI1avlPT9OBeh+DR4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n7LAnMxUIX3l8MoWAbPixB2ZzkTPV/yp3GB/Aw8X8OyS1S+sePLjDbxhfKFNsSA9s 9BhARbmwv7yxD2/K8YqTAN4Rd0Ny7XmI5D1LvT2kz+fMnscxnDHY5OCJCp3AJsbaaZ g9DWgTGoo6REITR0Ma9UtUdbVR5kPijBynR1iEUU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Golovin , Nathan Chancellor , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 4.19 079/247] MIPS: lantiq: Explicitly compare LTQ_EBU_PCC_ISTAT against 0 Date: Mon, 1 Mar 2021 17:11:39 +0100 Message-Id: <20210301161035.550890927@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor [ Upstream commit c6f2a9e17b9bef7677caddb1626c2402f3e9d2bd ] When building xway_defconfig with clang: arch/mips/lantiq/irq.c:305:48: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand] if ((irq == LTQ_ICU_EBU_IRQ) && (module == 0) && LTQ_EBU_PCC_ISTAT) ^ ~~~~~~~~~~~~~~~~~ arch/mips/lantiq/irq.c:305:48: note: use '&' for a bitwise operation if ((irq == LTQ_ICU_EBU_IRQ) && (module == 0) && LTQ_EBU_PCC_ISTAT) ^~ & arch/mips/lantiq/irq.c:305:48: note: remove constant to silence this warning if ((irq == LTQ_ICU_EBU_IRQ) && (module == 0) && LTQ_EBU_PCC_ISTAT) ~^~~~~~~~~~~~~~~~~~~~ 1 error generated. Explicitly compare the constant LTQ_EBU_PCC_ISTAT against 0 to fix the warning. Additionally, remove the unnecessary parentheses as this is a simple conditional statement and shorthand '== 0' to '!'. Fixes: 3645da0276ae ("OF: MIPS: lantiq: implement irq_domain support") Link: https://github.com/ClangBuiltLinux/linux/issues/807 Reported-by: Dmitry Golovin Signed-off-by: Nathan Chancellor Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/lantiq/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c index 37caeadb2964c..0476d7e97a03f 100644 --- a/arch/mips/lantiq/irq.c +++ b/arch/mips/lantiq/irq.c @@ -244,7 +244,7 @@ static void ltq_hw_irq_handler(struct irq_desc *desc) generic_handle_irq(irq_linear_revmap(ltq_domain, hwirq)); /* if this is a EBU irq, we need to ack it or get a deadlock */ - if ((irq == LTQ_ICU_EBU_IRQ) && (module == 0) && LTQ_EBU_PCC_ISTAT) + if (irq == LTQ_ICU_EBU_IRQ && !module && LTQ_EBU_PCC_ISTAT != 0) ltq_ebu_w32(ltq_ebu_r32(LTQ_EBU_PCC_ISTAT) | 0x10, LTQ_EBU_PCC_ISTAT); } -- 2.27.0