All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Mark Brown <broonie@kernel.org>
Cc: Grant Likely <grant.likely@linaro.org>,
	Rob Herring <rob.herring@calxeda.com>,
	linux-spi@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	kernel-janitors@vger.kernel.org
Subject: [patch v2] spi/xilinx: signedness issue checking platform_get_irq()
Date: Wed, 17 Jul 2013 15:34:48 +0000	[thread overview]
Message-ID: <20130717153448.GA963@elgon.mountain> (raw)
In-Reply-To: <20130717150538.GT22506@sirena.org.uk>

In xilinx_spi_probe() we use xspi->irq to store negative error codes so
it has to be signed.  We weren't going to use the upper bit any way so
this is fine.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2:  The first version introduced an ugly cast.  Sorry for that.

diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
index fea815c..0f4a093 100644
--- a/drivers/spi/spi-xilinx.c
+++ b/drivers/spi/spi-xilinx.c
@@ -82,7 +82,7 @@ struct xilinx_spi {
 	struct completion done;
 	void __iomem	*regs;	/* virt. address of the control registers */
 
-	u32		irq;
+	int		irq;
 
 	u8 *rx_ptr;		/* pointer in the Tx buffer */
 	const u8 *tx_ptr;	/* pointer in the Rx buffer */

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Mark Brown <broonie@kernel.org>
Cc: Grant Likely <grant.likely@linaro.org>,
	Rob Herring <rob.herring@calxeda.com>,
	linux-spi@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	kernel-janitors@vger.kernel.org
Subject: [patch v2] spi/xilinx: signedness issue checking platform_get_irq()
Date: Wed, 17 Jul 2013 18:34:48 +0300	[thread overview]
Message-ID: <20130717153448.GA963@elgon.mountain> (raw)
In-Reply-To: <20130717150538.GT22506@sirena.org.uk>

In xilinx_spi_probe() we use xspi->irq to store negative error codes so
it has to be signed.  We weren't going to use the upper bit any way so
this is fine.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2:  The first version introduced an ugly cast.  Sorry for that.

diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
index fea815c..0f4a093 100644
--- a/drivers/spi/spi-xilinx.c
+++ b/drivers/spi/spi-xilinx.c
@@ -82,7 +82,7 @@ struct xilinx_spi {
 	struct completion done;
 	void __iomem	*regs;	/* virt. address of the control registers */
 
-	u32		irq;
+	int		irq;
 
 	u8 *rx_ptr;		/* pointer in the Tx buffer */
 	const u8 *tx_ptr;	/* pointer in the Rx buffer */

  reply	other threads:[~2013-07-17 15:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 12:26 [patch] spi/xilinx: signedness issue checking platform_get_irq() Dan Carpenter
2013-07-17 12:26 ` Dan Carpenter
2013-07-17 15:03 ` Stephen Warren
2013-07-17 15:03   ` Stephen Warren
2013-07-17 15:34   ` Dan Carpenter
2013-07-17 15:34     ` Dan Carpenter
     [not found] ` <20130717122638.GB4851-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2013-07-17 15:05   ` Mark Brown
2013-07-17 15:05     ` Mark Brown
2013-07-17 15:34     ` Dan Carpenter [this message]
2013-07-17 15:34       ` [patch v2] " Dan Carpenter
2013-07-17 17:20       ` Mark Brown
2013-07-17 17:20         ` Mark Brown

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=20130717153448.GA963@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=broonie@kernel.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@linaro.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=rob.herring@calxeda.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 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.