* [PATCH 0/2] atm: iphase: Fix misleading indention and return -ENOMEM on error
@ 2015-10-10 19:47 ` Tillmann Heidsieck
0 siblings, 0 replies; 12+ messages in thread
From: Tillmann Heidsieck @ 2015-10-10 19:47 UTC (permalink / raw)
To: Chas Williams
Cc: linux-atm-general, netdev, kernel-janitors, linux-kernel,
Tillmann Heidsieck
OK here it goes ...
There are three non-indention specific smatch warnings in atm/iphase.c
drivers/atm/iphase.c:115 ia_enque_rtn_q() warn: returning -1 instead of -ENOMEM is sloppy
drivers/atm/iphase.c:148 ia_hack_tcq() warn: if();
drivers/atm/iphase.c:1178 rx_pkt() warn: curly braces intended?
this series fixes two of them. The if(); warning would require
restructuring the code to a larger extend. Beyond this there remains a
whooping number of > 2k checkpatch.pl warnings and errors each. Those
can be grouped into
- Direct usage of printk()
- Style issues concerning operators
- Style issues concerning {}
- Indention with spaces, mixed tabs and spaces etc
- Trailing white-spaces
Generally I would not mind cleaning all this up for those who have to
make functional changes to the driver. However, I would like to know
from the maintainers if such an afford would be welcome or not.
Regards,
Tillmann Heidsieck
Tillmann Heidsieck (2):
atm: iphase: return -ENOMEM instead of -1 in case of failed kmalloc()
atm: iphase: fix misleading indention
drivers/atm/iphase.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--
2.6.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/2] atm: iphase: Fix misleading indention and return -ENOMEM on error
@ 2015-10-10 19:47 ` Tillmann Heidsieck
0 siblings, 0 replies; 12+ messages in thread
From: Tillmann Heidsieck @ 2015-10-10 19:47 UTC (permalink / raw)
To: Chas Williams
Cc: linux-atm-general, netdev, kernel-janitors, linux-kernel,
Tillmann Heidsieck
OK here it goes ...
There are three non-indention specific smatch warnings in atm/iphase.c
drivers/atm/iphase.c:115 ia_enque_rtn_q() warn: returning -1 instead of -ENOMEM is sloppy
drivers/atm/iphase.c:148 ia_hack_tcq() warn: if();
drivers/atm/iphase.c:1178 rx_pkt() warn: curly braces intended?
this series fixes two of them. The if(); warning would require
restructuring the code to a larger extend. Beyond this there remains a
whooping number of > 2k checkpatch.pl warnings and errors each. Those
can be grouped into
- Direct usage of printk()
- Style issues concerning operators
- Style issues concerning {}
- Indention with spaces, mixed tabs and spaces etc
- Trailing white-spaces
Generally I would not mind cleaning all this up for those who have to
make functional changes to the driver. However, I would like to know
from the maintainers if such an afford would be welcome or not.
Regards,
Tillmann Heidsieck
Tillmann Heidsieck (2):
atm: iphase: return -ENOMEM instead of -1 in case of failed kmalloc()
atm: iphase: fix misleading indention
drivers/atm/iphase.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--
2.6.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/2] atm: iphase: return -ENOMEM instead of -1 in case of failed kmalloc()
2015-10-10 19:47 ` Tillmann Heidsieck
@ 2015-10-10 19:47 ` Tillmann Heidsieck
-1 siblings, 0 replies; 12+ messages in thread
From: Tillmann Heidsieck @ 2015-10-10 19:47 UTC (permalink / raw)
To: Chas Williams
Cc: linux-atm-general, netdev, kernel-janitors, linux-kernel,
Tillmann Heidsieck
Smatch complains about returning hard coded error codes, silence this
warning.
drivers/atm/iphase.c:115 ia_enque_rtn_q() warn: returning -1 instead of -ENOMEM is sloppy
Signed-off-by: Tillmann Heidsieck <theidsieck@leenox.de>
---
drivers/atm/iphase.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index 65e65903faa0..d5010d7a99c3 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -112,7 +112,8 @@ static void ia_enque_head_rtn_q (IARTN_Q *que, IARTN_Q * data)
static int ia_enque_rtn_q (IARTN_Q *que, struct desc_tbl_t data) {
IARTN_Q *entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
- if (!entry) return -1;
+ if (!entry)
+ return -ENOMEM;
entry->data = data;
entry->next = NULL;
if (que->next == NULL)
--
2.6.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 1/2] atm: iphase: return -ENOMEM instead of -1 in case of failed kmalloc()
@ 2015-10-10 19:47 ` Tillmann Heidsieck
0 siblings, 0 replies; 12+ messages in thread
From: Tillmann Heidsieck @ 2015-10-10 19:47 UTC (permalink / raw)
To: Chas Williams
Cc: linux-atm-general, netdev, kernel-janitors, linux-kernel,
Tillmann Heidsieck
Smatch complains about returning hard coded error codes, silence this
warning.
drivers/atm/iphase.c:115 ia_enque_rtn_q() warn: returning -1 instead of -ENOMEM is sloppy
Signed-off-by: Tillmann Heidsieck <theidsieck@leenox.de>
---
drivers/atm/iphase.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index 65e65903faa0..d5010d7a99c3 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -112,7 +112,8 @@ static void ia_enque_head_rtn_q (IARTN_Q *que, IARTN_Q * data)
static int ia_enque_rtn_q (IARTN_Q *que, struct desc_tbl_t data) {
IARTN_Q *entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
- if (!entry) return -1;
+ if (!entry)
+ return -ENOMEM;
entry->data = data;
entry->next = NULL;
if (que->next = NULL)
--
2.6.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] atm: iphase: fix misleading indention
2015-10-10 19:47 ` Tillmann Heidsieck
@ 2015-10-10 19:47 ` Tillmann Heidsieck
-1 siblings, 0 replies; 12+ messages in thread
From: Tillmann Heidsieck @ 2015-10-10 19:47 UTC (permalink / raw)
To: Chas Williams
Cc: linux-atm-general, netdev, kernel-janitors, linux-kernel,
Tillmann Heidsieck
Fix a smatch warning:
drivers/atm/iphase.c:1178 rx_pkt() warn: curly braces intended?
The code is correct, the indention is misleading. In case the allocation
of skb fails, we want to skip to the end.
Signed-off-by: Tillmann Heidsieck <theidsieck@leenox.de>
---
drivers/atm/iphase.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index d5010d7a99c3..7d00f2994738 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -1176,7 +1176,7 @@ static int rx_pkt(struct atm_dev *dev)
if (!(skb = atm_alloc_charge(vcc, len, GFP_ATOMIC))) {
if (vcc->vci < 32)
printk("Drop control packets\n");
- goto out_free_desc;
+ goto out_free_desc;
}
skb_put(skb,len);
// pwang_test
--
2.6.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] atm: iphase: fix misleading indention
@ 2015-10-10 19:47 ` Tillmann Heidsieck
0 siblings, 0 replies; 12+ messages in thread
From: Tillmann Heidsieck @ 2015-10-10 19:47 UTC (permalink / raw)
To: Chas Williams
Cc: linux-atm-general, netdev, kernel-janitors, linux-kernel,
Tillmann Heidsieck
Fix a smatch warning:
drivers/atm/iphase.c:1178 rx_pkt() warn: curly braces intended?
The code is correct, the indention is misleading. In case the allocation
of skb fails, we want to skip to the end.
Signed-off-by: Tillmann Heidsieck <theidsieck@leenox.de>
---
drivers/atm/iphase.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index d5010d7a99c3..7d00f2994738 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -1176,7 +1176,7 @@ static int rx_pkt(struct atm_dev *dev)
if (!(skb = atm_alloc_charge(vcc, len, GFP_ATOMIC))) {
if (vcc->vci < 32)
printk("Drop control packets\n");
- goto out_free_desc;
+ goto out_free_desc;
}
skb_put(skb,len);
// pwang_test
--
2.6.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] atm: iphase: Fix misleading indention and return -ENOMEM on error
2015-10-10 19:47 ` Tillmann Heidsieck
@ 2015-10-12 15:28 ` Charles (Chas) Williams
-1 siblings, 0 replies; 12+ messages in thread
From: Charles (Chas) Williams @ 2015-10-12 15:28 UTC (permalink / raw)
To: Tillmann Heidsieck
Cc: linux-atm-general, netdev, kernel-janitors, linux-kernel
On Sat, 2015-10-10 at 21:47 +0200, Tillmann Heidsieck wrote:
> this series fixes two of them. The if(); warning would require
> restructuring the code to a larger extend. Beyond this there remains a
> whooping number of > 2k checkpatch.pl warnings and errors each. Those
> can be grouped into
...
> Generally I would not mind cleaning all this up for those who have to
> make functional changes to the driver. However, I would like to know
> from the maintainers if such an afford would be welcome or not.
It doesn't bother me if you do this. I can review it.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] atm: iphase: Fix misleading indention and return -ENOMEM on error
@ 2015-10-12 15:28 ` Charles (Chas) Williams
0 siblings, 0 replies; 12+ messages in thread
From: Charles (Chas) Williams @ 2015-10-12 15:28 UTC (permalink / raw)
To: Tillmann Heidsieck
Cc: linux-atm-general, netdev, kernel-janitors, linux-kernel
On Sat, 2015-10-10 at 21:47 +0200, Tillmann Heidsieck wrote:
> this series fixes two of them. The if(); warning would require
> restructuring the code to a larger extend. Beyond this there remains a
> whooping number of > 2k checkpatch.pl warnings and errors each. Those
> can be grouped into
...
> Generally I would not mind cleaning all this up for those who have to
> make functional changes to the driver. However, I would like to know
> from the maintainers if such an afford would be welcome or not.
It doesn't bother me if you do this. I can review it.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] atm: iphase: return -ENOMEM instead of -1 in case of failed kmalloc()
2015-10-10 19:47 ` Tillmann Heidsieck
@ 2015-10-13 2:56 ` David Miller
-1 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2015-10-13 2:56 UTC (permalink / raw)
To: theidsieck
Cc: 3chas3, linux-atm-general, netdev, kernel-janitors, linux-kernel
From: Tillmann Heidsieck <theidsieck@leenox.de>
Date: Sat, 10 Oct 2015 21:47:18 +0200
> Smatch complains about returning hard coded error codes, silence this
> warning.
>
> drivers/atm/iphase.c:115 ia_enque_rtn_q() warn: returning -1 instead of -ENOMEM is sloppy
>
> Signed-off-by: Tillmann Heidsieck <theidsieck@leenox.de>
Applied to net-next.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] atm: iphase: return -ENOMEM instead of -1 in case of failed kmalloc()
@ 2015-10-13 2:56 ` David Miller
0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2015-10-13 2:56 UTC (permalink / raw)
To: theidsieck
Cc: 3chas3, linux-atm-general, netdev, kernel-janitors, linux-kernel
From: Tillmann Heidsieck <theidsieck@leenox.de>
Date: Sat, 10 Oct 2015 21:47:18 +0200
> Smatch complains about returning hard coded error codes, silence this
> warning.
>
> drivers/atm/iphase.c:115 ia_enque_rtn_q() warn: returning -1 instead of -ENOMEM is sloppy
>
> Signed-off-by: Tillmann Heidsieck <theidsieck@leenox.de>
Applied to net-next.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] atm: iphase: fix misleading indention
2015-10-10 19:47 ` Tillmann Heidsieck
@ 2015-10-13 2:56 ` David Miller
-1 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2015-10-13 2:56 UTC (permalink / raw)
To: theidsieck
Cc: 3chas3, linux-atm-general, netdev, kernel-janitors, linux-kernel
From: Tillmann Heidsieck <theidsieck@leenox.de>
Date: Sat, 10 Oct 2015 21:47:19 +0200
> Fix a smatch warning:
> drivers/atm/iphase.c:1178 rx_pkt() warn: curly braces intended?
>
> The code is correct, the indention is misleading. In case the allocation
> of skb fails, we want to skip to the end.
>
> Signed-off-by: Tillmann Heidsieck <theidsieck@leenox.de>
Applied to net-next.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] atm: iphase: fix misleading indention
@ 2015-10-13 2:56 ` David Miller
0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2015-10-13 2:56 UTC (permalink / raw)
To: theidsieck
Cc: 3chas3, linux-atm-general, netdev, kernel-janitors, linux-kernel
From: Tillmann Heidsieck <theidsieck@leenox.de>
Date: Sat, 10 Oct 2015 21:47:19 +0200
> Fix a smatch warning:
> drivers/atm/iphase.c:1178 rx_pkt() warn: curly braces intended?
>
> The code is correct, the indention is misleading. In case the allocation
> of skb fails, we want to skip to the end.
>
> Signed-off-by: Tillmann Heidsieck <theidsieck@leenox.de>
Applied to net-next.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-10-13 2:56 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-10 19:47 [PATCH 0/2] atm: iphase: Fix misleading indention and return -ENOMEM on error Tillmann Heidsieck
2015-10-10 19:47 ` Tillmann Heidsieck
2015-10-10 19:47 ` [PATCH 1/2] atm: iphase: return -ENOMEM instead of -1 in case of failed kmalloc() Tillmann Heidsieck
2015-10-10 19:47 ` Tillmann Heidsieck
2015-10-13 2:56 ` David Miller
2015-10-13 2:56 ` David Miller
2015-10-10 19:47 ` [PATCH 2/2] atm: iphase: fix misleading indention Tillmann Heidsieck
2015-10-10 19:47 ` Tillmann Heidsieck
2015-10-13 2:56 ` David Miller
2015-10-13 2:56 ` David Miller
2015-10-12 15:28 ` [PATCH 0/2] atm: iphase: Fix misleading indention and return -ENOMEM on error Charles (Chas) Williams
2015-10-12 15:28 ` Charles (Chas) Williams
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.