From: Sachin Pandhare Date: Tue, 24 Nov 2015 02:29:10 +0000 (+0530) Subject: greybus: manifest: simplify descriptor address calculation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fc25d9068e80659ea2b3a4516c63c523bdafc20b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git greybus: manifest: simplify descriptor address calculation This patch doesn't change any functionality. It just improves the readability of the code. Current code to get 'descriptors' pointer looks as if we are forcing the pointer type change. To simplify the address calculations, use 'descriptors' member directly from greybus_manifest structure. Signed-off-by: Sachin Pandhare Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/manifest.c b/drivers/staging/greybus/manifest.c index c80a849617d7..41d51579217f 100644 --- a/drivers/staging/greybus/manifest.c +++ b/drivers/staging/greybus/manifest.c @@ -475,7 +475,7 @@ bool gb_manifest_parse(struct gb_interface *intf, void *data, size_t size) } /* OK, find all the descriptors */ - desc = (struct greybus_descriptor *)(header + 1); + desc = manifest->descriptors; size -= sizeof(*header); while (size) { int desc_size;