OSDN Git Service

platform/x86: huawei-wmi: do not hard-code sizes
authorBarnabás Pőcze <pobrn@protonmail.com>
Wed, 5 Oct 2022 15:00:39 +0000 (15:00 +0000)
committerHans de Goede <hdegoede@redhat.com>
Wed, 16 Nov 2022 07:48:18 +0000 (08:48 +0100)
commitd6fef93258f3b902f5166297b05d72746e16e1f7
treeea6e13499835f6b549fc6c960e1c717eafdbae09
parenta77272c16041862c5c8d450c8701139887e1bb05
platform/x86: huawei-wmi: do not hard-code sizes

Use `sizeof()` and `ARRAY_SIZE()` instead of
hard-coding buffer sizes and indices.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Link: https://lore.kernel.org/r/20221005150032.173198-1-pobrn@protonmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/huawei-wmi.c