diff options
author | Christian Gromm <christian.gromm@microchip.com> | 2019-12-13 13:04:18 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-17 13:54:37 +0100 |
commit | c3bb9d883f1a5b2e60675779205e7c6ded2272aa (patch) | |
tree | d680c8a7e27840774cdd39be899749bd19e51f74 /drivers/staging/most | |
parent | d72f82635e3317b5e035af40aa815c6d064c2fee (diff) |
staging: most: configfs: reduce array size
This patch reduces the size of the arrays inside the mdev_link struct to
a reasonable value.
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1576238662-16512-6-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r-- | drivers/staging/most/configfs.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/staging/most/configfs.c b/drivers/staging/most/configfs.c index 9fbcadfafba2..9818f6c8b22a 100644 --- a/drivers/staging/most/configfs.c +++ b/drivers/staging/most/configfs.c @@ -12,6 +12,8 @@ #include <linux/configfs.h> #include <most/most.h> +#define MAX_STRING_SIZE 80 + struct mdev_link { struct config_item item; struct list_head list; @@ -22,13 +24,13 @@ struct mdev_link { u16 subbuffer_size; u16 packets_per_xact; u16 dbr_size; - char datatype[PAGE_SIZE]; - char direction[PAGE_SIZE]; - char name[PAGE_SIZE]; - char device[PAGE_SIZE]; - char channel[PAGE_SIZE]; - char comp[PAGE_SIZE]; - char comp_params[PAGE_SIZE]; + char datatype[MAX_STRING_SIZE]; + char direction[MAX_STRING_SIZE]; + char name[MAX_STRING_SIZE]; + char device[MAX_STRING_SIZE]; + char channel[MAX_STRING_SIZE]; + char comp[MAX_STRING_SIZE]; + char comp_params[MAX_STRING_SIZE]; }; static struct list_head mdev_link_list; |