1
0
Fork 0

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 <sachin.pandhare@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
hifive-unleashed-5.1
Sachin Pandhare 2015-11-24 07:59:10 +05:30 committed by Greg Kroah-Hartman
parent bfe2c99c1c
commit fc25d9068e
1 changed files with 1 additions and 1 deletions

View File

@ -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;