From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 50F09C3F2CD for ; Fri, 6 Mar 2020 06:07:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2AF542072D for ; Fri, 6 Mar 2020 06:07:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725927AbgCFGG7 (ORCPT ); Fri, 6 Mar 2020 01:06:59 -0500 Received: from mx2.suse.de ([195.135.220.15]:37424 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725923AbgCFGG7 (ORCPT ); Fri, 6 Mar 2020 01:06:59 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BF005B066; Fri, 6 Mar 2020 06:06:56 +0000 (UTC) Date: Fri, 06 Mar 2020 07:06:55 +0100 Message-ID: From: Takashi Iwai To: Heiner Kallweit Cc: Bjorn Helgaas , Realtek linux nic maintainers , David Miller , Mirko Lindner , Stephen Hemminger , Clemens Ladisch , Jaroslav Kysela , Takashi Iwai , "linux-pci@vger.kernel.org" , Linux Kernel Mailing List , "netdev@vger.kernel.org" , alsa-devel@alsa-project.org Subject: Re: [PATCH v4 10/10] sound: bt87x: use pci_status_get_and_clear_errors In-Reply-To: <6362e866-9ce3-31f5-3357-9f086eedf11e@gmail.com> References: <6362e866-9ce3-31f5-3357-9f086eedf11e@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Sat, 29 Feb 2020 23:29:07 +0100, Heiner Kallweit wrote: > > Use new helper pci_status_get_and_clear_errors() to simplify the code. > > Signed-off-by: Heiner Kallweit Acked-by: Takashi Iwai thanks, Takashi > --- > 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 > >