2021-06-04 07:37:33

by Guangbin Huang

[permalink] [raw]
Subject: [PATCH net-next 0/6] net: hdlc_x25: clean up some code style issues

From: Peng Li <[email protected]>

This patchset clean up some code style issues.

Peng Li (6):
net: hdlc_x25: remove redundant blank lines
net: hdlc_x25: remove unnecessary out of memory message
net: hdlc_x25: move out assignment in if condition
net: hdlc_x25: add some required spaces
net: hdlc_x25: fix the code issue about "if..else.."
net: hdlc_x25: fix the alignment issue

drivers/net/wan/hdlc_x25.c | 77 +++++++++++++++++-----------------------------
1 file changed, 29 insertions(+), 48 deletions(-)

--
2.8.1


2021-06-04 07:37:37

by Guangbin Huang

[permalink] [raw]
Subject: [PATCH net-next 6/6] net: hdlc_x25: fix the alignment issue

From: Peng Li <[email protected]>

Alignment should match open parenthesis.

Signed-off-by: Peng Li <[email protected]>
Signed-off-by: Guangbin Huang <[email protected]>
---
drivers/net/wan/hdlc_x25.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c
index bd4fad3..d2bf72b 100644
--- a/drivers/net/wan/hdlc_x25.c
+++ b/drivers/net/wan/hdlc_x25.c
@@ -315,20 +315,20 @@ static int x25_ioctl(struct net_device *dev, struct ifreq *ifr)
return -EFAULT;

if ((new_settings.dce != 0 &&
- new_settings.dce != 1) ||
- (new_settings.modulo != 8 &&
- new_settings.modulo != 128) ||
- new_settings.window < 1 ||
- (new_settings.modulo == 8 &&
- new_settings.window > 7) ||
- (new_settings.modulo == 128 &&
- new_settings.window > 127) ||
- new_settings.t1 < 1 ||
- new_settings.t1 > 255 ||
- new_settings.t2 < 1 ||
- new_settings.t2 > 255 ||
- new_settings.n2 < 1 ||
- new_settings.n2 > 255)
+ new_settings.dce != 1) ||
+ (new_settings.modulo != 8 &&
+ new_settings.modulo != 128) ||
+ new_settings.window < 1 ||
+ (new_settings.modulo == 8 &&
+ new_settings.window > 7) ||
+ (new_settings.modulo == 128 &&
+ new_settings.window > 127) ||
+ new_settings.t1 < 1 ||
+ new_settings.t1 > 255 ||
+ new_settings.t2 < 1 ||
+ new_settings.t2 > 255 ||
+ new_settings.n2 < 1 ||
+ new_settings.n2 > 255)
return -EINVAL;
}

--
2.8.1

2021-06-04 07:39:06

by Guangbin Huang

[permalink] [raw]
Subject: [PATCH net-next 2/6] net: hdlc_x25: remove unnecessary out of memory message

From: Peng Li <[email protected]>

This patch removes unnecessary out of memory message,
to fix the following checkpatch.pl warning:
"WARNING: Possible unnecessary 'out of memory' message"

Signed-off-by: Peng Li <[email protected]>
Signed-off-by: Guangbin Huang <[email protected]>
---
drivers/net/wan/hdlc_x25.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c
index 86b88f2..525eb42 100644
--- a/drivers/net/wan/hdlc_x25.c
+++ b/drivers/net/wan/hdlc_x25.c
@@ -56,10 +56,8 @@ static void x25_connect_disconnect(struct net_device *dev, int reason, int code)
unsigned char *ptr;

skb = __dev_alloc_skb(1, GFP_ATOMIC | __GFP_NOMEMALLOC);
- if (!skb) {
- netdev_err(dev, "out of memory\n");
+ if (!skb)
return;
- }

ptr = skb_put(skb, 1);
*ptr = code;
--
2.8.1

2021-06-04 21:42:09

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH net-next 0/6] net: hdlc_x25: clean up some code style issues

Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Fri, 4 Jun 2021 15:32:06 +0800 you wrote:
> From: Peng Li <[email protected]>
>
> This patchset clean up some code style issues.
>
> Peng Li (6):
> net: hdlc_x25: remove redundant blank lines
> net: hdlc_x25: remove unnecessary out of memory message
> net: hdlc_x25: move out assignment in if condition
> net: hdlc_x25: add some required spaces
> net: hdlc_x25: fix the code issue about "if..else.."
> net: hdlc_x25: fix the alignment issue
>
> [...]

Here is the summary with links:
- [net-next,1/6] net: hdlc_x25: remove redundant blank lines
https://git.kernel.org/netdev/net-next/c/1c906e369815
- [net-next,2/6] net: hdlc_x25: remove unnecessary out of memory message
https://git.kernel.org/netdev/net-next/c/579ebffe7973
- [net-next,3/6] net: hdlc_x25: move out assignment in if condition
https://git.kernel.org/netdev/net-next/c/ec1f37741244
- [net-next,4/6] net: hdlc_x25: add some required spaces
https://git.kernel.org/netdev/net-next/c/5de446075c8e
- [net-next,5/6] net: hdlc_x25: fix the code issue about "if..else.."
https://git.kernel.org/netdev/net-next/c/792b070fca8f
- [net-next,6/6] net: hdlc_x25: fix the alignment issue
https://git.kernel.org/netdev/net-next/c/316fe3cc7de3

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html