RE: [PATCH 3/4] powerpc: pseries: only store the device node basename in full_name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




From: Rob Herring
> Sent: 25 July 2017 22:44
> With dependencies on full_name containing the entire device node path
> removed, stop storing the full_name in nodes created by
> dlpar_configure_connector() and pSeries_reconfig_add_node().
...
>	dn = kzalloc(sizeof(*dn), GFP_KERNEL);
> 	if (!dn)
> 		return NULL;
> 
> 	name = (char *)ccwa + be32_to_cpu(ccwa->name_offset);
> -	dn->full_name = kasprintf(GFP_KERNEL, "%s/%s", path, name);
> +	dn->full_name = kasprintf(GFP_KERNEL, "%s", name);

Isn't this just strdup()?
Perhaps you should rename full_name to name - since it is no longer 'full'?

Maybe you could do a single malloc() for both 'dn' and the name?

	David

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux