Skip to content

Commit

Permalink
greybus: firmware: add comment to show size calculations
Browse files Browse the repository at this point in the history
The firmware file name's maximum length is set to 56 right now, but it
isn't very much readable how we got to that value (unless someone reads
that line).

Update the comment to show calculations.

Reported-by: Alex Elder <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
vireshk authored and gregkh committed Aug 12, 2016
1 parent 0675363 commit ac96a60
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/staging/greybus/firmware.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@

#define FW_NAME_PREFIX "gmp_"

/* Length of the string in format: "FW_NAME_PREFIX""%08x_%08x_%08x_%08x_%s.tftf" */
/*
* Length of the string in format: "FW_NAME_PREFIX""%08x_%08x_%08x_%08x_%s.tftf"
* (3 + 1 + 4 * (8 + 1) + 10 + 1 + 4 + 1)
*/
#define FW_NAME_SIZE 56

/* Firmware Management Protocol specific functions */
Expand Down

0 comments on commit ac96a60

Please sign in to comment.