lkml.org 
[lkml]   [2008]   [Feb]   [5]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 5 Feb 2008 16:44:25 +1100
FromStephen Rothwell <>
SubjectRe: [PATCH 5/6] Add OF-tree support to RapidIO controller driver.
On Wed, 30 Jan 2008 18:30:52 +0800 Zhang Wei <wei.zhang@freescale.com> wrote:
>
> -void fsl_rio_setup(int law_start, int law_size)
> +int fsl_rio_setup(struct of_device *dev)
>  {

> +	if (!dev->node) {
> +		dev_err(&dev->dev, "Device OF-Node is NULL");
> +		return -EFAULT;

Probably -EINVAL would be better. Here and all the other -EFAULTs.

> +	aw = *(u32 *)of_get_property(dev->node, "#address-cells", NULL);
> +	sw = *(u32 *)of_get_property(dev->node, "#size-cells", NULL);

What happens if either of these properties is missing?

> +static struct of_device_id fsl_of_rio_rpn_ids[] = {

This should be "const" please.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2008-02-05 07:15    [from the cache]
©2003-2008