Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2877968ybv; Mon, 24 Feb 2020 13:30:29 -0800 (PST) X-Google-Smtp-Source: APXvYqxU6FWkm/LxfQUe/fG1P91Vs0fTZVt9WrM+Uh+bq/lEtxgVjH8XwJXl4xn0+PPwP05+VkN5 X-Received: by 2002:a54:4195:: with SMTP id 21mr868708oiy.92.1582579829149; Mon, 24 Feb 2020 13:30:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582579829; cv=none; d=google.com; s=arc-20160816; b=E8I/sb/VsQDvrWzDn6jZiZzaEPGm6LgrE1uBjErps/SvbChJwxQvpWEhWyhGro0iNW ARIzen3wvo8Jth9J6YThFzvIIVfU2QsTxo57PFQZrnomT5B/ACEtVAkSNsFWtc1HeOWa kLGYZ8J2mK02XssDaCE8c/eXd2oORDgVX4FOFPF4eZdl3ZqeYav0zgZPZ+JJhLW4dAZh ceOw9/1nOR/ly5KnLy9DedCLJK0Qllr3/tE+yITYeQ4M2g4Z2/MQ93MpcIyKbJuvFZJP u7mJRqwvqVGVna6w/w+xLHmLv5FkcikBnJoXJhELTn8xkonyukmnsCdPlKT1nmlKwALR YjiQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature; bh=ArTAv9akc7/LkDwjVGNvRKjk3sNTR9LtjKLQSrks0NI=; b=sPQ30Y2TaMlUXYE0Sv4AWE2LR7JIOayAFRU/tnF0MD2fTDZOrQ+1B1eca4EHK9BjhE d2lxWjtkOiJxB5wfAcvRlnyARBe/IWS6841sgv60vVSbDXL/1L+as6j+V1Aub/cEZ4Tc mlSXmPHKO/824dDVy2RZ1iA3sBCinPx7Zh6qXym1kKatR0XPvMZSgyfCrQ+9BCRKpNPT kX/saTfd1lyoowMnzDVPpg2+0qcX0Xj3Ldmh32qIzpbYN0nPpwCB1MZgu/1RnkaJB/ET bvUXDkyPzHHaXX2Q7kGHrYjqaGCedCXIHgK8FOU1Tvb4b5FDgwJirzcRGBecNitz84+R m5pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HqueA0Lm; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9si6985211otq.68.2020.02.24.13.30.17; Mon, 24 Feb 2020 13:30:29 -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=@gmail.com header.s=20161025 header.b=HqueA0Lm; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728359AbgBXV35 (ORCPT + 99 others); Mon, 24 Feb 2020 16:29:57 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:53112 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728348AbgBXV34 (ORCPT ); Mon, 24 Feb 2020 16:29:56 -0500 Received: by mail-wm1-f65.google.com with SMTP id p9so846106wmc.2; Mon, 24 Feb 2020 13:29:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ArTAv9akc7/LkDwjVGNvRKjk3sNTR9LtjKLQSrks0NI=; b=HqueA0Lmn1Zpxq9axX/VWOSITGEVfEB6gNYiySfDYa+MnjQREfX353O41GJJlDmDVG BBLpXrJcwzfp8wyLD9tTJBLnCH0NzijpqXDNocE1ukKTAPByiEJiVqE+G5RJm0WGfYNp nnk9Mk001ImOqYNh/YUb7KH0dhuTY5XcWaVOdJzIjuDnCZlLgjIrt6c8TgGnE4IEo8Uj 3tKGJuVmE8sabhkXM0g9UsX8ToFE0VLokzJ+ggyjxXtLj1WuA9PdE5ouVY8vPd8UCabM uGx7OYe1jqn3UAeKAR1fWL5jlVlstqcBhMdDIoLzfeXH+iqcWyNpoP6dz7Rzd5fan0nn G3WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ArTAv9akc7/LkDwjVGNvRKjk3sNTR9LtjKLQSrks0NI=; b=QMLGX6dT6R7rRkfk+Wysl2NuTjjPN176mM0s7HXZpsRTRHiVbH0K0eS+CEnLbWrFZV Youzodjv9RbOzGPEpd+rMu/JX+tr4ZvYJd9wcvLBhIFKeQS0AUD81ATHBOjO/SwTeLEk ARZTpbumdjXnq4hoo6ztTGbTPdhBxtPDMCH6Jj+bRL4TltOIViwVpnTN1W25TeQe/llV vPB9EEWQZTfpsGntWIwz+H+gcjxSqTx45dAgSok3bkMOJtNTsfBJqkBx9ac1mqC+vw2e K93dH6JlnuQhoeD6Lzwe3fGNWw7d65gMSTQfCwJcMLaY1bYpSJNiPDvRcBCmgD/7RyQ9 SDPg== X-Gm-Message-State: APjAAAXcShwbMSKrktD32q8dHJtCKg1tWY9/pHNQ6FRNkNtfn785EBTu 6frKQzpNNsc+pxL9tSzRK10= X-Received: by 2002:a05:600c:54e:: with SMTP id k14mr895842wmc.115.1582579792028; Mon, 24 Feb 2020 13:29:52 -0800 (PST) Received: from ?IPv6:2003:ea:8f29:6000:3d90:eff:31bc:c6a9? (p200300EA8F2960003D900EFF31BCC6A9.dip0.t-ipconnect.de. [2003:ea:8f29:6000:3d90:eff:31bc:c6a9]) by smtp.googlemail.com with ESMTPSA id f8sm20427058wrt.28.2020.02.24.13.29.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Feb 2020 13:29:51 -0800 (PST) Subject: [PATCH 8/8] sound: bt87x: use pci_status_get_and_clear_errors From: Heiner Kallweit To: Bjorn Helgaas , Clemens Ladisch , Jaroslav Kysela , Takashi Iwai Cc: "linux-pci@vger.kernel.org" , Linux Kernel Mailing List , alsa-devel@alsa-project.org References: <5939f711-92aa-e7ed-2a26-4f1e4169f786@gmail.com> Message-ID: Date: Mon, 24 Feb 2020 22:29:32 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <5939f711-92aa-e7ed-2a26-4f1e4169f786@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use new helper pci_status_get_and_clear_errors() to simplify the code. Signed-off-by: Heiner Kallweit --- sound/pci/bt87x.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index 8c48864c8..656750466 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c @@ -271,13 +271,8 @@ static void snd_bt87x_free_risc(struct snd_bt87x *chip) static void snd_bt87x_pci_error(struct snd_bt87x *chip, unsigned int status) { - u16 pci_status; + int pci_status = pci_status_get_and_clear_errors(chip->pci); - pci_read_config_word(chip->pci, PCI_STATUS, &pci_status); - pci_status &= PCI_STATUS_PARITY | PCI_STATUS_SIG_TARGET_ABORT | - PCI_STATUS_REC_TARGET_ABORT | PCI_STATUS_REC_MASTER_ABORT | - PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY; - pci_write_config_word(chip->pci, PCI_STATUS, pci_status); if (pci_status != PCI_STATUS_DETECTED_PARITY) dev_err(chip->card->dev, "Aieee - PCI error! status %#08x, PCI status %#04x\n", -- 2.25.1