From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Christopher Harrer <charrer@alacritech.com>,
Dan Carpenter <dan.carpenter@oracle.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Lior Dotan <liodot@gmail.com>,
devel@driverdev.osuosl.org
Cc: Julia Lawall <julia.lawall@lip6.fr>,
kernel-janitors@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH v2] staging-slicoss: Use a signed return type for slic_card_locate()
Date: Tue, 22 Dec 2015 15:12:32 +0100 [thread overview]
Message-ID: <56795A50.9070300@users.sourceforge.net> (raw)
In-Reply-To: <20151219201955.GS5284@mwanda>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 22 Dec 2015 15:05:16 +0100
The return type "u32" was used by the slic_card_locate() function
even though it will eventually return a negative error code.
Improve this implementation detail by using the type "int" instead.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
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..156e57f 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 int slic_card_locate(struct adapter *adapter)
{
struct sliccard *card = slic_global.slic_card;
struct physcard *physcard = slic_global.phys_card;
--
2.6.3
prev parent reply other threads:[~2015-12-22 14:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-19 19:37 [PATCH] staging-slicoss: Use a signed return type for slic_card_locate() SF Markus Elfring
2015-12-19 20:19 ` Dan Carpenter
2015-12-22 14:12 ` SF Markus Elfring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56795A50.9070300@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=charrer@alacritech.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liodot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox