* [PATCH net-next 0/3] net: c101: clean up some code style issues
@ 2021-06-19 7:28 Peng Li
2021-06-19 7:28 ` [PATCH net-next 1/3] net: c101: add blank line after declarations Peng Li
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Peng Li @ 2021-06-19 7:28 UTC (permalink / raw)
To: davem, kuba, xie.he.0141, ms, willemb
Cc: netdev, linux-kernel, huangguangbin2
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net-next 1/3] net: c101: add blank line after declarations
2021-06-19 7:28 [PATCH net-next 0/3] net: c101: clean up some code style issues Peng Li
@ 2021-06-19 7:28 ` Peng Li
2021-06-19 7:28 ` [PATCH net-next 2/3] net: c101: replace comparison to NULL with "!card" Peng Li
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Peng Li @ 2021-06-19 7:28 UTC (permalink / raw)
To: davem, kuba, xie.he.0141, ms, willemb
Cc: netdev, linux-kernel, huangguangbin2
This patch fixes the checkpatch error about missing a blank line
after declarations.
Signed-off-by: Peng Li <lipeng321@huawei.com>
---
drivers/net/wan/c101.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c
index 7e431e5..94b852f 100644
--- a/drivers/net/wan/c101.c
+++ b/drivers/net/wan/c101.c
@@ -416,6 +416,7 @@ static void __exit c101_cleanup(void)
while (card) {
card_t *ptr = card;
+
card = card->next_card;
unregister_hdlc_device(port_to_dev(ptr));
c101_destroy_card(ptr);
--
2.8.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net-next 2/3] net: c101: replace comparison to NULL with "!card"
2021-06-19 7:28 [PATCH net-next 0/3] net: c101: clean up some code style issues Peng Li
2021-06-19 7:28 ` [PATCH net-next 1/3] net: c101: add blank line after declarations Peng Li
@ 2021-06-19 7:28 ` Peng Li
2021-06-19 7:28 ` [PATCH net-next 3/3] net: c101: remove redundant spaces Peng Li
2021-06-21 19:50 ` [PATCH net-next 0/3] net: c101: clean up some code style issues patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Peng Li @ 2021-06-19 7:28 UTC (permalink / raw)
To: davem, kuba, xie.he.0141, ms, willemb
Cc: netdev, linux-kernel, huangguangbin2
According to the chackpatch.pl, comparison to NULL could
be written "!card".
Signed-off-by: Peng Li <lipeng321@huawei.com>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net-next 3/3] net: c101: remove redundant spaces
2021-06-19 7:28 [PATCH net-next 0/3] net: c101: clean up some code style issues Peng Li
2021-06-19 7:28 ` [PATCH net-next 1/3] net: c101: add blank line after declarations Peng Li
2021-06-19 7:28 ` [PATCH net-next 2/3] net: c101: replace comparison to NULL with "!card" Peng Li
@ 2021-06-19 7:28 ` Peng Li
2021-06-21 19:50 ` [PATCH net-next 0/3] net: c101: clean up some code style issues patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Peng Li @ 2021-06-19 7:28 UTC (permalink / raw)
To: davem, kuba, xie.he.0141, ms, willemb
Cc: netdev, linux-kernel, huangguangbin2
According to the chackpatch.pl, no space before tabs.
Signed-off-by: Peng Li <lipeng321@huawei.com>
---
drivers/net/wan/c101.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c
index f33192e..059c2f7 100644
--- a/drivers/net/wan/c101.c
+++ b/drivers/net/wan/c101.c
@@ -92,7 +92,7 @@ static card_t **new_card = &first_card;
#define phy_node(port) (0)
#define winsize(card) (C101_WINDOW_SIZE)
#define win0base(card) ((card)->win0base)
-#define winbase(card) ((card)->win0base + 0x2000)
+#define winbase(card) ((card)->win0base + 0x2000)
#define get_port(card, port) (card)
static void sca_msci_intr(port_t *port);
--
2.8.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 0/3] net: c101: clean up some code style issues
2021-06-19 7:28 [PATCH net-next 0/3] net: c101: clean up some code style issues Peng Li
` (2 preceding siblings ...)
2021-06-19 7:28 ` [PATCH net-next 3/3] net: c101: remove redundant spaces Peng Li
@ 2021-06-21 19:50 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-21 19:50 UTC (permalink / raw)
To: Peng Li
Cc: davem, kuba, xie.he.0141, ms, willemb, netdev, linux-kernel,
huangguangbin2
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-06-21 19:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-19 7:28 [PATCH net-next 0/3] net: c101: clean up some code style issues Peng Li
2021-06-19 7:28 ` [PATCH net-next 1/3] net: c101: add blank line after declarations Peng Li
2021-06-19 7:28 ` [PATCH net-next 2/3] net: c101: replace comparison to NULL with "!card" Peng Li
2021-06-19 7:28 ` [PATCH net-next 3/3] net: c101: remove redundant spaces Peng Li
2021-06-21 19:50 ` [PATCH net-next 0/3] net: c101: clean up some code style issues patchwork-bot+netdevbpf
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).