greybus: firmware: add comment to show size calculations
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 11 Aug 2016 20:27:25 +0000 (13:27 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 12 Aug 2016 15:38:19 +0000 (17:38 +0200)
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 <alex.elder@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/firmware.h

index ec6bfb7..f4f0db1 100644 (file)
 
 #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 */