* [B.A.T.M.A.N.] [PATCH v2] batman-adv: Place constant on right side of comparison
@ 2015-09-13 7:44 Sven Eckelmann
2015-09-14 8:53 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Sven Eckelmann @ 2015-09-13 7:44 UTC (permalink / raw)
To: b.a.t.m.a.n
checkpatch warns when the constant is on the left side of a comparison.
Fixes: 56fd0bab9c18 ("batman-adv: Fix gw_bandwidth calculation on 32 bit systems")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
v2: fix stupid error in the commit message
net/batman-adv/gateway_common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/batman-adv/gateway_common.c b/net/batman-adv/gateway_common.c
index 0cb5e6b..66d9514 100644
--- a/net/batman-adv/gateway_common.c
+++ b/net/batman-adv/gateway_common.c
@@ -89,7 +89,7 @@ static bool batadv_parse_gw_bandwidth(struct net_device *net_dev, char *buff,
break;
}
- if (U32_MAX < ldown) {
+ if (ldown > U32_MAX) {
batadv_err(net_dev,
"Download speed of gateway mode too large: %s\n",
buff);
@@ -139,7 +139,7 @@ static bool batadv_parse_gw_bandwidth(struct net_device *net_dev, char *buff,
break;
}
- if (U32_MAX < lup) {
+ if (lup > U32_MAX) {
batadv_err(net_dev,
"Upload speed of gateway mode too large: %s\n",
slash_ptr + 1);
--
2.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH v2] batman-adv: Place constant on right side of comparison
2015-09-13 7:44 [B.A.T.M.A.N.] [PATCH v2] batman-adv: Place constant on right side of comparison Sven Eckelmann
@ 2015-09-14 8:53 ` Marek Lindner
0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2015-09-14 8:53 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 470 bytes --]
On Sunday, September 13, 2015 09:44:45 Sven Eckelmann wrote:
> checkpatch warns when the constant is on the left side of a comparison.
>
> Fixes: 56fd0bab9c18 ("batman-adv: Fix gw_bandwidth calculation on 32 bit
> systems") Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
> v2: fix stupid error in the commit message
>
> net/batman-adv/gateway_common.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied in revision cef7403.
Thanks,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-14 8:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-13 7:44 [B.A.T.M.A.N.] [PATCH v2] batman-adv: Place constant on right side of comparison Sven Eckelmann
2015-09-14 8:53 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox