From patchwork Fri Nov 12 10:06:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 12616499 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E18BFC433F5 for ; Fri, 12 Nov 2021 10:06:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C175360F5B for ; Fri, 12 Nov 2021 10:06:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234836AbhKLKJ3 (ORCPT ); Fri, 12 Nov 2021 05:09:29 -0500 Received: from smtp07.smtpout.orange.fr ([80.12.242.129]:53737 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234778AbhKLKJ3 (ORCPT ); Fri, 12 Nov 2021 05:09:29 -0500 Received: from pop-os.home ([86.243.171.122]) by smtp.orange.fr with ESMTPA id lTS6mEc9TFGqtlTS7miLID; Fri, 12 Nov 2021 11:06:36 +0100 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Fri, 12 Nov 2021 11:06:36 +0100 X-ME-IP: 86.243.171.122 From: Christophe JAILLET To: tomas.winkler@intel.com, arnd@arndb.de, gregkh@linuxfoundation.org Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] mei: Remove some dead code Date: Fri, 12 Nov 2021 11:06:33 +0100 Message-Id: <3f904c291f3eed06223dd8d494028e0d49df6f10.1636711522.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 'generated' is known to be true here, so "true || whatever" will still be true. So, remove some dead code. Signed-off-by: Christophe JAILLET Acked-by: Tomas Winkler --- This is also likely that a bug is lurking here. Maybe, the following was expected: - generated = generated || + generated = (hisr & HISR_INT_STS_MSK) || (ipc_isr & SEC_IPC_HOST_INT_STATUS_PENDING); ? --- drivers/misc/mei/hw-txe.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/misc/mei/hw-txe.c b/drivers/misc/mei/hw-txe.c index a4e854b9b9e6..00652c137cc7 100644 --- a/drivers/misc/mei/hw-txe.c +++ b/drivers/misc/mei/hw-txe.c @@ -994,11 +994,7 @@ static bool mei_txe_check_and_ack_intrs(struct mei_device *dev, bool do_ack) hhisr &= ~IPC_HHIER_SEC; } - generated = generated || - (hisr & HISR_INT_STS_MSK) || - (ipc_isr & SEC_IPC_HOST_INT_STATUS_PENDING); - - if (generated && do_ack) { + if (do_ack) { /* Save the interrupt causes */ hw->intr_cause |= hisr & HISR_INT_STS_MSK; if (ipc_isr & SEC_IPC_HOST_INT_STATUS_IN_RDY)