Commit fc25d906 authored by Sachin Pandhare's avatar Sachin Pandhare Committed by Greg Kroah-Hartman

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: default avatarSachin Pandhare <sachin.pandhare@linaro.org>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent bfe2c99c
...@@ -475,7 +475,7 @@ bool gb_manifest_parse(struct gb_interface *intf, void *data, size_t size) ...@@ -475,7 +475,7 @@ bool gb_manifest_parse(struct gb_interface *intf, void *data, size_t size)
} }
/* OK, find all the descriptors */ /* OK, find all the descriptors */
desc = (struct greybus_descriptor *)(header + 1); desc = manifest->descriptors;
size -= sizeof(*header); size -= sizeof(*header);
while (size) { while (size) {
int desc_size; int desc_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment