lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <s5hv9nidnk0.wl-tiwai@suse.de>
Date:   Fri, 06 Mar 2020 07:06:55 +0100
From:   Takashi Iwai <tiwai@...e.de>
To:     Heiner Kallweit <hkallweit1@...il.com>
Cc:     Bjorn Helgaas <bhelgaas@...gle.com>,
        Realtek linux nic maintainers <nic_swsd@...ltek.com>,
        David Miller <davem@...emloft.net>,
        Mirko Lindner <mlindner@...vell.com>,
        Stephen Hemminger <stephen@...workplumber.org>,
        Clemens Ladisch <clemens@...isch.de>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        alsa-devel@...a-project.org
Subject: Re: [PATCH v4 10/10] sound: bt87x: use pci_status_get_and_clear_errors

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 <hkallweit1@...il.com>

Acked-by: Takashi Iwai <tiwai@...e.de>


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
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ