Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp731071ybc; Sat, 16 Nov 2019 07:43:15 -0800 (PST) X-Google-Smtp-Source: APXvYqzSSnPTGA3HWiG1QhuLZzKRF37lBeIUj57M/evlS+PGH669Q7ba5IE/bxP8UYABtwVLJ4Qu X-Received: by 2002:a17:906:944d:: with SMTP id z13mr10680403ejx.58.1573918994894; Sat, 16 Nov 2019 07:43:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573918994; cv=none; d=google.com; s=arc-20160816; b=vz2hwcoLFkR8I5RKtsOO+rMsIyZsAGi6lvS6snphnKHy0+WvMUFVpxwJV2tHPtLlWw ZWeMsStCcpUrz29spxN121naQmAczlZ2P2BsnzBmlJUBcDQLJfwP6SxUuPWliyZ6/LPt N2dEyivx0C79gDMBiQeqO5U84QfWm/TQ0OdwrTOn+OlN1nVaZ/mWykQgUiEKr2lqTAyG Ue3yfzLnRXE7fEzTczorx9ABZbsRAwUTqLIudM+f7DM0dqSaDdIWBAucPDYtG5psiOmC VSeOSbwS+WUq681H8TkoQmOt0LYLP9kM0xLoZelBJC7G5Ketj43MRMU5EbcSv6nwasOG UB2A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qaJD4IIw8gOft4uWIm1dRw6LUlK7+BYr766UiE/3DO8=; b=tNJqheyc9Aa0mpJS+UDRc40tutf0o6thS7HqWEsrJmihOiaiZ92n9C2sErOdQuAx1v eNHdSQbmNMfGWbXN83bNtfzcjz29P6cub4acKEfBkvW+lmMFzfgowPZjHQD6w7qg24ta c3FqCUTzpVwaSoTnFvxqOU3oxaOW8ge4doen3bn7eQtHKV3b8QGOytpMEgihFFPr3RV8 SQdKR6CeD4xIzM8n839u5BtIQmp64yaLJSiBs55zMa+5cjKhuCvSjNZPYr3LObN2fjkk 2HYL/FRsmGIyDTKd+yLO2gOue3LgZVqRr8MUTkFk2PcCHaa9LrdRHYMMLIfUtzvzB1WR a0Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="o7xDhO/f"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13si8252101eja.112.2019.11.16.07.42.49; Sat, 16 Nov 2019 07:43:14 -0800 (PST) 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="o7xDhO/f"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727912AbfKPPld (ORCPT + 99 others); Sat, 16 Nov 2019 10:41:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:44490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727866AbfKPPl0 (ORCPT ); Sat, 16 Nov 2019 10:41:26 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7902E2075E; Sat, 16 Nov 2019 15:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573918885; bh=wyyl9s9xZv7JFxye6DTH7V7QfW8oBgfEhI9UUGwxt0g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o7xDhO/fbyh1QXaxTfc4IEgTR1Er3knw2dVRvHNn7l3wLZAkQgu0rEpwXJVmpaP0p CYL3kRxmEXmcleySYSoERt8TegZj2WrMJY4MsZX76GgQqaUxRYuZieG/xr9G4LRdeF t4ViN0gfiaIq8LlO7LQ7ruGkK07Yctoxz+ZaXhuM= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sam Bobroff , Michael Ellerman , Sasha Levin , linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 4.19 014/237] powerpc/eeh: Fix use of EEH_PE_KEEP on wrong field Date: Sat, 16 Nov 2019 10:37:29 -0500 Message-Id: <20191116154113.7417-14-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sam Bobroff [ Upstream commit 473af09b56dc4be68e4af33220ceca6be67aa60d ] eeh_add_to_parent_pe() sometimes removes the EEH_PE_KEEP flag, but it incorrectly removes it from pe->type, instead of pe->state. However, rather than clearing it from the correct field, remove it. Inspection of the code shows that it can't ever have had any effect (even if it had been cleared from the correct field), because the field is never tested after it is cleared by the statement in question. The clear statement was added by commit 807a827d4e74 ("powerpc/eeh: Keep PE during hotplug"), but it didn't explain why it was necessary. Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/kernel/eeh_pe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/eeh_pe.c b/arch/powerpc/kernel/eeh_pe.c index 1b238ecc553e2..210d239a93950 100644 --- a/arch/powerpc/kernel/eeh_pe.c +++ b/arch/powerpc/kernel/eeh_pe.c @@ -379,7 +379,7 @@ int eeh_add_to_parent_pe(struct eeh_dev *edev) while (parent) { if (!(parent->type & EEH_PE_INVALID)) break; - parent->type &= ~(EEH_PE_INVALID | EEH_PE_KEEP); + parent->type &= ~EEH_PE_INVALID; parent = parent->parent; } -- 2.20.1