From patchwork Wed Feb 10 15:16:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Keith Busch X-Patchwork-Id: 12081029 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2D6CC433E6 for ; Wed, 10 Feb 2021 15:17:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 88B9864E7C for ; Wed, 10 Feb 2021 15:17:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231927AbhBJPQw (ORCPT ); Wed, 10 Feb 2021 10:16:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:45586 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231810AbhBJPQr (ORCPT ); Wed, 10 Feb 2021 10:16:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 97E3364DEC; Wed, 10 Feb 2021 15:16:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612970166; bh=lfsFEAalhTM051RAsUfFSTOh24m0k34Q3x7HnpRka84=; h=From:To:Cc:Subject:Date:From; b=bvjPokggnyq3OgTYLtUUI3mrXjFGbXC6RW9fuQAqFcKDP6dUDxcyS2X3prfY2Q/AD +1ycekIEMhs2zJY0Lu74GQlMW6Or2uose+wmM3UxfeVe7w9LX0fpwTqtAYGguwRFr+ fjmadDX66zoqi1AAuDItknzvjHkPQv1ngDJ7ZmEZpPs4tCHKELeoOixXFYnZo6J9IZ N0WT7ZJLCEGk/5d0iTCT2PPTkyatlQvz72sxBhdQTCEH+uNDdst5lBSl+WWCqz69bg QEWI1XGeLOfuwZM/72ztP5tUwqJ/b43v4AC0pychLPl04HUf7rb8LEGFJEQv7lfB89 4qYncxaLokLhg== From: Keith Busch To: linux-pci@vger.kernel.org, Bjorn Helgaas Cc: Keith Busch Subject: [PATCH] PCI/ERR: Fix state assignment Date: Wed, 10 Feb 2021 07:16:04 -0800 Message-Id: <20210210151604.2678236-1-kbusch@kernel.org> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The state was intended to be assigned rather than compared for equality. Link: https://lore.kernel.org/linux-pci/202102101255.HZtDITwe-lkp@intel.com/ Fixes: 8fae7d8809b815148 ("PCI/ERR: Simplify pci_dev_set_io_state()") Cc: Bjorn Helgass Signed-off-by: Keith Busch Reviewed-by: Krzysztof WilczyƄski --- drivers/pci/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index db267120c962..1e4e4cb48bab 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -345,7 +345,7 @@ static inline bool pci_dev_set_io_state(struct pci_dev *dev, /* Can always put a device in perm_failure state */ if (new == pci_channel_io_perm_failure) { - dev->error_state == pci_channel_io_perm_failure; + dev->error_state = pci_channel_io_perm_failure; return true; }