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] [thread-next>] [day] [month] [year] [list]
Message-ID: <YRTEcd0S2/2XlL7p@kroah.com>
Date:   Thu, 12 Aug 2021 08:49:21 +0200
From:   Greg KH <greg@...ah.com>
To:     Utkarsh Verma <utkarshverma294@...il.com>
Cc:     Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PCI: Remove duplicate #ifdef in pci_try_set_mwi()

On Thu, Aug 12, 2021 at 05:16:01AM +0530, Utkarsh Verma wrote:
> Remove the unnecessary #ifdef PCI_DISABLE_MWI, because pci_set_mwi()
> performs the same check.
> 
> Signed-off-by: Utkarsh Verma <utkarshverma294@...il.com>
> ---
>  drivers/pci/pci.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index aacf575c15cf..7d4c7c294ef2 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -4456,11 +4456,7 @@ EXPORT_SYMBOL(pcim_set_mwi);
>   */
>  int pci_try_set_mwi(struct pci_dev *dev)
>  {
> -#ifdef PCI_DISABLE_MWI
> -	return 0;
> -#else
>  	return pci_set_mwi(dev);
> -#endif
>  }
>  EXPORT_SYMBOL(pci_try_set_mwi);

If this is the case, why do we even need pci_try_set_mwi()?  Why not
just replace it with calls to pci_set_mwi() and then delete this one?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ