2021-06-19 10:02:31

by Lipeng

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

This patchset clean up some code style issues.

Peng Li (3):
net: c101: add blank line after declarations
net: c101: replace comparison to NULL with "!card"
net: c101: remove redundant spaces

drivers/net/wan/c101.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

--
2.8.1


2021-06-19 10:02:41

by Lipeng

[permalink] [raw]
Subject: [PATCH net-next 2/3] net: c101: replace comparison to NULL with "!card"

According to the chackpatch.pl, comparison to NULL could
be written "!card".

Signed-off-by: Peng Li <[email protected]>
---
drivers/net/wan/c101.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c
index 94b852f..f33192e 100644
--- a/drivers/net/wan/c101.c
+++ b/drivers/net/wan/c101.c
@@ -307,7 +307,7 @@ static int __init c101_run(unsigned long irq, unsigned long winbase)
}

card = kzalloc(sizeof(card_t), GFP_KERNEL);
- if (card == NULL)
+ if (!card)
return -ENOBUFS;

card->dev = alloc_hdlcdev(card);
@@ -381,7 +381,7 @@ static int __init c101_run(unsigned long irq, unsigned long winbase)

static int __init c101_init(void)
{
- if (hw == NULL) {
+ if (!hw) {
#ifdef MODULE
pr_info("no card initialized\n");
#endif
--
2.8.1

2021-06-21 19:51:30

by patchwork-bot+netdevbpf

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

Hello:

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

On Sat, 19 Jun 2021 15:28:35 +0800 you wrote:
> This patchset clean up some code style issues.
>
> Peng Li (3):
> net: c101: add blank line after declarations
> net: c101: replace comparison to NULL with "!card"
> net: c101: remove redundant spaces
>
> [...]

Here is the summary with links:
- [net-next,1/3] net: c101: add blank line after declarations
https://git.kernel.org/netdev/net-next/c/4f7d2247f839
- [net-next,2/3] net: c101: replace comparison to NULL with "!card"
https://git.kernel.org/netdev/net-next/c/7774318b9e5e
- [net-next,3/3] net: c101: remove redundant spaces
https://git.kernel.org/netdev/net-next/c/41505d3f0f51

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