summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/greybus_firmware.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-08-11 13:27:23 -0700
committerGreg Kroah-Hartman <gregkh@google.com>2016-08-12 17:38:19 +0200
commitb2abeaa10d5711e7730bb07120dd60ae27d7b930 (patch)
tree5bca52c2b995b9c07638ac83a6090c15f646ae8d /drivers/staging/greybus/greybus_firmware.h
parent769cb83704db127119d063b55091f782007368e7 (diff)
downloadop-kernel-dev-b2abeaa10d5711e7730bb07120dd60ae27d7b930.zip
op-kernel-dev-b2abeaa10d5711e7730bb07120dd60ae27d7b930.tar.gz
greybus: firmware: s/_LEN/_SIZE
Alex Elder pointed out that the macros also count the trailing NULL ('\0') character and so it should be using SIZE instead of LEN. This patch makes that change. 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>
Diffstat (limited to 'drivers/staging/greybus/greybus_firmware.h')
-rw-r--r--drivers/staging/greybus/greybus_firmware.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/greybus/greybus_firmware.h b/drivers/staging/greybus/greybus_firmware.h
index 8279651..277a2ac 100644
--- a/drivers/staging/greybus/greybus_firmware.h
+++ b/drivers/staging/greybus/greybus_firmware.h
@@ -57,7 +57,7 @@
#include <linux/ioctl.h>
#include <linux/types.h>
-#define GB_FIRMWARE_U_TAG_MAX_LEN 10
+#define GB_FIRMWARE_U_TAG_MAX_SIZE 10
#define GB_FW_U_LOAD_METHOD_UNIPRO 0x01
#define GB_FW_U_LOAD_METHOD_INTERNAL 0x02
@@ -83,20 +83,20 @@
/* IOCTL support */
struct fw_mgmt_ioc_get_intf_version {
- __u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_LEN];
+ __u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_SIZE];
__u16 major;
__u16 minor;
} __attribute__ ((__packed__));
struct fw_mgmt_ioc_get_backend_version {
- __u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_LEN];
+ __u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_SIZE];
__u16 major;
__u16 minor;
__u8 status;
} __attribute__ ((__packed__));
struct fw_mgmt_ioc_intf_load_and_validate {
- __u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_LEN];
+ __u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_SIZE];
__u8 load_method;
__u8 status;
__u16 major;
@@ -104,7 +104,7 @@ struct fw_mgmt_ioc_intf_load_and_validate {
} __attribute__ ((__packed__));
struct fw_mgmt_ioc_backend_fw_update {
- __u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_LEN];
+ __u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_SIZE];
__u8 status;
} __attribute__ ((__packed__));
OpenPOWER on IntegriCloud