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

From: Benjamin Herrenschmidt <[email-masked]>
Date: Fri, 29 Jan 2010 11:03:50 +1100

On Wed, 2010-01-27 at 12:43 -0600, [email-masked] 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.