Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2918224pxb; Tue, 24 Aug 2021 10:34:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxO8bUWzFrgOrlwCKLCk7IDx5MOAzsDNkaSfMf/ap/4OwOxA5KBMn95Nw+BMMfkFdKzRlqj X-Received: by 2002:a17:906:8493:: with SMTP id m19mr41738559ejx.103.1629826450990; Tue, 24 Aug 2021 10:34:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629826450; cv=none; d=google.com; s=arc-20160816; b=MrBpfpm9SVAzMeoyEX3szBL4Rh999urvCoiQ0qX07O8aHyMbFRm8I4QumytBxQC4Dz zgwmBUtXxb1Frq6qVeFgGlAepDJRHyl0+g2PF0qWB93e6+CL1gwI8NGn+hEvLT/kYEnc 1M2lh3NHb8mVTgW3agu9rJggWfueazfp0w6dSNuMqeVWpHQIQ9PsGJZoIrirZxFc44xF zRbYyjWFdSWabARSG5kzSLuoerKcQhsri/53kYSOZS5pn1sdvSdmRi8n6J6KgEMl6V84 z6ZuYwsZUwRzyQF6H3ClVHeKBr9FqNvPIkTZ7SAI7CgiPbNA2mpyscFuK6xNzNY4ajOe QcAg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yX/9qli/46drk0bm+APwQYNKpW78CFmWq3mQuQPTd38=; b=G6xTQ4gkRWbyV+M9yXUGOtTHRMsbqDeQP0ntiiTK6rhWAkqOxh3Vkyy/GC4CEtakxb Hpq2unQdHcPKnuQnv/0hTq7Sz3KbLTbtxRkvXnm1xUoaT0w77nE/WG1FdVDJtIgcSAxp T1LQK7Wlnl6XPfqNFHGumcU9Zfmfv87vnegIhieY2Vr/H6NMn1WBOMnntF2Teq8T/mDY MTjkvRE4t3XPszU181BqL/MBjooaqfNNk3q72K9iQ0vCI+uoKVOpjj3HZAdg/pVU2Y9J IQoMkVG9dHbznII6FDFrv72XJOa4sPL1usJbPIca7MxhVHnyIfTuwC78fWCOVGpjecl9 G48g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MSJu7iPP; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e10si9285121edz.215.2021.08.24.10.33.47; Tue, 24 Aug 2021 10:34:10 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=MSJu7iPP; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241283AbhHXRbI (ORCPT + 99 others); Tue, 24 Aug 2021 13:31:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:35500 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240580AbhHXR2k (ORCPT ); Tue, 24 Aug 2021 13:28:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8B01261B63; Tue, 24 Aug 2021 17:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629824721; bh=xNDjOULY9Sb5CRSKZB3PB64wDwg1EBJ8CHW31JAPtkI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MSJu7iPPfTN3rvPrxFMhSmqsjgwtNqYnhUbGO7jiB1UylpWa1BYhLRRnr3UXjQ+Pa e1uA7oU7oRsl8y9KrNy29zVCZs4DsI8cjD9cNZikp/0pmUQP4G1ZMIaxMmMCqpt8zJ J+CjZRhvvWpJ5NN4FeaIUeol8FEMbhRWDJ97JQ4k0jvpwyDE1XXUwwIKFg0SdaSSWb KxMQYjvb9n6G60jLC5FGbvXkTjqrVWxDQILjlqODdzjSNUbDGgzNMz8GNy/jEKf7Ni rM5zPUzxnWz9v3GK54xMwD4D/Ztx6VVAfCdVQxHKMSZxiB9NzuqwjWiAaD5qjik4O2 H6GlKLfSVBEqQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Thomas Gleixner , Marc Zyngier , Greg Kroah-Hartman Subject: [PATCH 4.14 23/64] PCI/MSI: Correct misleading comments Date: Tue, 24 Aug 2021 13:04:16 -0400 Message-Id: <20210824170457.710623-24-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210824170457.710623-1-sashal@kernel.org> References: <20210824170457.710623-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.245-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.14.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.14.245-rc1 X-KernelTest-Deadline: 2021-08-26T17:04+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Gleixner commit 689e6b5351573c38ccf92a0dd8b3e2c2241e4aff upstream. The comments about preserving the cached state in pci_msi[x]_shutdown() are misleading as the MSI descriptors are freed right after those functions return. So there is nothing to restore. Preparatory change. Signed-off-by: Thomas Gleixner Tested-by: Marc Zyngier Reviewed-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210729222542.621609423@linutronix.de Signed-off-by: Greg Kroah-Hartman --- drivers/pci/msi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index c69cd0dff301..93dd4c69cc46 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -896,7 +896,6 @@ static void pci_msi_shutdown(struct pci_dev *dev) /* Return the device with MSI unmasked as initial states */ mask = msi_mask(desc->msi_attrib.multi_cap); - /* Keep cached state to be restored */ __pci_msi_desc_mask_irq(desc, mask, 0); /* Restore dev->irq to its default pin-assertion irq */ @@ -982,10 +981,8 @@ static void pci_msix_shutdown(struct pci_dev *dev) } /* Return the device with MSI-X masked as initial states */ - for_each_pci_msi_entry(entry, dev) { - /* Keep cached states to be restored */ + for_each_pci_msi_entry(entry, dev) __pci_msix_desc_mask_irq(entry, 1); - } pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_ENABLE, 0); pci_intx_for_msi(dev, 1); -- 2.30.2