[Pcihpd-discuss] Re: [PATCH] rpaphp.patch -- multi-function devices not handled correctly

John Rose johnrose at austin.ibm.com
Sat Jun 12 07:41:53 EST 2004


Hi Linda-

I have just one question:

> diff -Nru a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c
> --- a/drivers/pci/hotplug/rpadlpar_core.c	Tue Jun  8 22:53:59 2004
> +++ b/drivers/pci/hotplug/rpadlpar_core.c	Tue Jun  8 22:53:59 2004
> @@ -24,25 +24,6 @@
>  	for (child = of_get_next_child(parent, NULL);
> -	     child; child = of_get_next_child(parent, child)) {
> +		child; child = of_get_next_child(parent, child)) {
>  		loc_code = get_property(child, "ibm,loc-code", NULL);
> -		if (loc_code && !strcmp(loc_code, drc_name))
> +		if (loc_code && !strncmp(loc_code, drc_name, strlen(drc_name)))
>  			return child;
>  	}
>

Can you explain why strncmp rather than strcmp?

Other than this, looks good to me!

Thanks-
John


On Wed, 2004-06-09 at 00:00, Linda Xie wrote:
> Hi Greg,
>
> Thank you very much for your comments.  The attached patch contains
> the following fixes. (See my comments below).
>
> John,  your rpadlpar patch has been merged.
>
>
> Linda

>
> ______________________________________________________________________


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list