[PATCH 1/2] eeh: Fixing a bug when pci structure is null

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Jan 29 11:03:50 EST 2010


On Wed, 2010-01-27 at 12:43 -0600, leitao at linux.vnet.ibm.com wrote:

> diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
> index ef8e454..afdddf6 100644
> --- a/arch/powerpc/platforms/pseries/eeh_driver.c
> +++ b/arch/powerpc/platforms/pseries/eeh_driver.c
> @@ -41,6 +41,13 @@ static inline const char * pcid_name (struct pci_dev *pdev)
>  	return "";
>  }
>  
> +inline const char *eeh_pci_name(struct pci_dev *pdev)
> +{
> +        if (NULL==pdev)
> +                return "<null>";
> +        return pci_name(pdev);
> +}
> +

Coding style gack ... just make it static inline in the header file.

Cheers,
Ben.




More information about the Linuxppc-dev mailing list