* [PATCH] staging: ks7010: Wrap macro definitions in parenthesis
@ 2021-06-16 21:26 Caleb D.S. Brzezinski
2023-06-27 11:09 ` Bagas Sanjaya
0 siblings, 1 reply; 2+ messages in thread
From: Caleb D.S. Brzezinski @ 2021-06-16 21:26 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Caleb D.S. Brzezinski
Wrap the definition of TX_RATE_* constants in parenthesis to prevent
incorrect casting during expansion, as recommended by checkpatch.pl.
Signed-off-by: Caleb D.S. Brzezinski <calebdsb@protonmail.com>
---
drivers/staging/ks7010/ks_hostif.h | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
index 39138191a..c62a494ed 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -498,20 +498,20 @@ struct hostif_mic_failure_request {
#define TX_RATE_FIXED 5
/* 11b rate */
-#define TX_RATE_1M (u8)(10 / 5) /* 11b 11g basic rate */
-#define TX_RATE_2M (u8)(20 / 5) /* 11b 11g basic rate */
-#define TX_RATE_5M (u8)(55 / 5) /* 11g basic rate */
-#define TX_RATE_11M (u8)(110 / 5) /* 11g basic rate */
+#define TX_RATE_1M ((u8)(10 / 5)) /* 11b 11g basic rate */
+#define TX_RATE_2M ((u8)(20 / 5)) /* 11b 11g basic rate */
+#define TX_RATE_5M ((u8)(55 / 5)) /* 11g basic rate */
+#define TX_RATE_11M ((u8)(110 / 5)) /* 11g basic rate */
/* 11g rate */
-#define TX_RATE_6M (u8)(60 / 5) /* 11g basic rate */
-#define TX_RATE_12M (u8)(120 / 5) /* 11g basic rate */
-#define TX_RATE_24M (u8)(240 / 5) /* 11g basic rate */
-#define TX_RATE_9M (u8)(90 / 5)
-#define TX_RATE_18M (u8)(180 / 5)
-#define TX_RATE_36M (u8)(360 / 5)
-#define TX_RATE_48M (u8)(480 / 5)
-#define TX_RATE_54M (u8)(540 / 5)
+#define TX_RATE_6M ((u8)(60 / 5)) /* 11g basic rate */
+#define TX_RATE_12M ((u8)(120 / 5)) /* 11g basic rate */
+#define TX_RATE_24M ((u8)(240 / 5)) /* 11g basic rate */
+#define TX_RATE_9M ((u8)(90 / 5))
+#define TX_RATE_18M ((u8)(180 / 5))
+#define TX_RATE_36M ((u8)(360 / 5))
+#define TX_RATE_48M ((u8)(480 / 5))
+#define TX_RATE_54M ((u8)(540 / 5))
static inline bool is_11b_rate(u8 rate)
{
--
2.31.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: ks7010: Wrap macro definitions in parenthesis
2021-06-16 21:26 [PATCH] staging: ks7010: Wrap macro definitions in parenthesis Caleb D.S. Brzezinski
@ 2023-06-27 11:09 ` Bagas Sanjaya
0 siblings, 0 replies; 2+ messages in thread
From: Bagas Sanjaya @ 2023-06-27 11:09 UTC (permalink / raw)
To: Caleb D.S. Brzezinski, gregkh; +Cc: linux-staging, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1874 bytes --]
On Wed, Jun 16, 2021 at 09:26:03PM +0000, Caleb D.S. Brzezinski wrote:
> /* 11b rate */
> -#define TX_RATE_1M (u8)(10 / 5) /* 11b 11g basic rate */
> -#define TX_RATE_2M (u8)(20 / 5) /* 11b 11g basic rate */
> -#define TX_RATE_5M (u8)(55 / 5) /* 11g basic rate */
> -#define TX_RATE_11M (u8)(110 / 5) /* 11g basic rate */
> +#define TX_RATE_1M ((u8)(10 / 5)) /* 11b 11g basic rate */
> +#define TX_RATE_2M ((u8)(20 / 5)) /* 11b 11g basic rate */
> +#define TX_RATE_5M ((u8)(55 / 5)) /* 11g basic rate */
> +#define TX_RATE_11M ((u8)(110 / 5)) /* 11g basic rate */
>
> /* 11g rate */
> -#define TX_RATE_6M (u8)(60 / 5) /* 11g basic rate */
> -#define TX_RATE_12M (u8)(120 / 5) /* 11g basic rate */
> -#define TX_RATE_24M (u8)(240 / 5) /* 11g basic rate */
> -#define TX_RATE_9M (u8)(90 / 5)
> -#define TX_RATE_18M (u8)(180 / 5)
> -#define TX_RATE_36M (u8)(360 / 5)
> -#define TX_RATE_48M (u8)(480 / 5)
> -#define TX_RATE_54M (u8)(540 / 5)
> +#define TX_RATE_6M ((u8)(60 / 5)) /* 11g basic rate */
> +#define TX_RATE_12M ((u8)(120 / 5)) /* 11g basic rate */
> +#define TX_RATE_24M ((u8)(240 / 5)) /* 11g basic rate */
> +#define TX_RATE_9M ((u8)(90 / 5))
> +#define TX_RATE_18M ((u8)(180 / 5))
> +#define TX_RATE_36M ((u8)(360 / 5))
> +#define TX_RATE_48M ((u8)(480 / 5))
> +#define TX_RATE_54M ((u8)(540 / 5))
>
tl;dr (quoted from Greg's bot):
> You sent a patch that has been sent multiple times in the past few
> days, and is identical to ones that has been recently rejected.
> Please always look at the mailing list traffic to determine if you are
> duplicating other people's work.
Why? See discussions on [1] and [2].
[1]: https://lore.kernel.org/all/YCUAy1VhLV3lwa3H@kroah.com/
[2]: https://lore.kernel.org/all/20210222062849.GN2087@kadam/
Thanks.
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-27 11:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 21:26 [PATCH] staging: ks7010: Wrap macro definitions in parenthesis Caleb D.S. Brzezinski
2023-06-27 11:09 ` Bagas Sanjaya
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).