Re: [PATCH] staging-slicoss: Use a signed return type for slic_card_locate()

2015-12-19 Thread Dan Carpenter
It returns zero or negative error codes.  The callers expect int.  It is
harmless.  It should just be int.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging-slicoss: Use a signed return type for slic_card_locate()

2015-12-19 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 19 Dec 2015 20:30:39 +0100

The return type "u32" was used by the slic_card_locate() function
despite of the aspect that it will eventually return a negative
error code.
Improve this implementation detail by using the type "s32" instead.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
---
 drivers/staging/slicoss/slicoss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/slicoss/slicoss.c 
b/drivers/staging/slicoss/slicoss.c
index b23a2d1..9ba0e4b 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -2953,7 +2953,7 @@ static const struct net_device_ops slic_netdev_ops = {
.ndo_change_mtu = eth_change_mtu,
 };
 
-static u32 slic_card_locate(struct adapter *adapter)
+static s32 slic_card_locate(struct adapter *adapter)
 {
struct sliccard *card = slic_global.slic_card;
struct physcard *physcard = slic_global.phys_card;
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] staging-slicoss: Use a signed return type for slic_card_locate()

2015-12-19 Thread Dan Carpenter
It returns zero or negative error codes.  The callers expect int.  It is
harmless.  It should just be int.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging-slicoss: Use a signed return type for slic_card_locate()

2015-12-19 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sat, 19 Dec 2015 20:30:39 +0100

The return type "u32" was used by the slic_card_locate() function
despite of the aspect that it will eventually return a negative
error code.
Improve this implementation detail by using the type "s32" instead.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
---
 drivers/staging/slicoss/slicoss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/slicoss/slicoss.c 
b/drivers/staging/slicoss/slicoss.c
index b23a2d1..9ba0e4b 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -2953,7 +2953,7 @@ static const struct net_device_ops slic_netdev_ops = {
.ndo_change_mtu = eth_change_mtu,
 };
 
-static u32 slic_card_locate(struct adapter *adapter)
+static s32 slic_card_locate(struct adapter *adapter)
 {
struct sliccard *card = slic_global.slic_card;
struct physcard *physcard = slic_global.phys_card;
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/