2023-01-16 20:35:24

by Doug Brown

[permalink] [raw]
Subject: [PATCH v3 1/4] wifi: libertas: fix capitalization in mrvl_ie_data struct

This struct is currently unused, but it will be used in future patches.
Fix the code style to not use camel case.

Signed-off-by: Doug Brown <[email protected]>
---
drivers/net/wireless/marvell/libertas/types.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/libertas/types.h b/drivers/net/wireless/marvell/libertas/types.h
index cd4ceb6f885d..398e3272e85f 100644
--- a/drivers/net/wireless/marvell/libertas/types.h
+++ b/drivers/net/wireless/marvell/libertas/types.h
@@ -105,7 +105,7 @@ struct mrvl_ie_header {

struct mrvl_ie_data {
struct mrvl_ie_header header;
- u8 Data[1];
+ u8 data[1];
} __packed;

struct mrvl_ie_rates_param_set {
--
2.34.1


2023-01-17 03:46:57

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: [PATCH v3 1/4] wifi: libertas: fix capitalization in mrvl_ie_data struct



> -----Original Message-----
> From: Doug Brown <[email protected]>
> Sent: Tuesday, January 17, 2023 4:21 AM
> To: Kalle Valo <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet
> <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>
> Cc: Dan Williams <[email protected]>; Simon Horman <[email protected]>;
> [email protected]; [email protected]; [email protected]; Doug Brown
> <[email protected]>
> Subject: [PATCH v3 1/4] wifi: libertas: fix capitalization in mrvl_ie_data struct
>
> This struct is currently unused, but it will be used in future patches.
> Fix the code style to not use camel case.
>
> Signed-off-by: Doug Brown <[email protected]>
> ---
> drivers/net/wireless/marvell/libertas/types.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/marvell/libertas/types.h
> b/drivers/net/wireless/marvell/libertas/types.h
> index cd4ceb6f885d..398e3272e85f 100644
> --- a/drivers/net/wireless/marvell/libertas/types.h
> +++ b/drivers/net/wireless/marvell/libertas/types.h
> @@ -105,7 +105,7 @@ struct mrvl_ie_header {
>
> struct mrvl_ie_data {
> struct mrvl_ie_header header;
> - u8 Data[1];
> + u8 data[1];

data[]. see [1]

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays

> } __packed;
>
> struct mrvl_ie_rates_param_set {
> --
> 2.34.1

2023-01-17 06:37:54

by Doug Brown

[permalink] [raw]
Subject: Re: [PATCH v3 1/4] wifi: libertas: fix capitalization in mrvl_ie_data struct

On 1/16/2023 7:39 PM, Ping-Ke Shih wrote:
>
>
>> -----Original Message-----
>> From: Doug Brown <[email protected]>
>> Sent: Tuesday, January 17, 2023 4:21 AM
>> To: Kalle Valo <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet
>> <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>
>> Cc: Dan Williams <[email protected]>; Simon Horman <[email protected]>;
>> [email protected]; [email protected]; [email protected]; Doug Brown
>> <[email protected]>
>> Subject: [PATCH v3 1/4] wifi: libertas: fix capitalization in mrvl_ie_data struct
>>
>> This struct is currently unused, but it will be used in future patches.
>> Fix the code style to not use camel case.
>>
>> Signed-off-by: Doug Brown <[email protected]>
>> ---
>> drivers/net/wireless/marvell/libertas/types.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/marvell/libertas/types.h
>> b/drivers/net/wireless/marvell/libertas/types.h
>> index cd4ceb6f885d..398e3272e85f 100644
>> --- a/drivers/net/wireless/marvell/libertas/types.h
>> +++ b/drivers/net/wireless/marvell/libertas/types.h
>> @@ -105,7 +105,7 @@ struct mrvl_ie_header {
>>
>> struct mrvl_ie_data {
>> struct mrvl_ie_header header;
>> - u8 Data[1];
>> + u8 data[1];
>
> data[]. see [1]
>
> [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays

Hi Ping-Ke,

Thanks for the link. There are several other cases of this same syntax
for flexible trailing arrays in this file, so I will update this patch
in the next version of the series to fix them all.

>
>> } __packed;
>>
>> struct mrvl_ie_rates_param_set {
>> --
>> 2.34.1
>