kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] spi: signedness bug in qspi_trigger_transfer_out_int()
@ 2015-04-03  8:45 Dan Carpenter
  2015-04-03  9:44 ` Cao Minh Hiep
  2015-04-06 16:20 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2015-04-03  8:45 UTC (permalink / raw)
  To: Mark Brown, Hiep Cao Minh
  Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA

We need "ret" to be unsigned for the error handling to work.  The
signedness of "i" and "n" don't matter but qspi_set_send_trigger()
returns an int so I've changed them to int as well.

Fixes: 4b6fe3edcbba ('spi: Using Trigger number to transmit/receive data')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index b3871d8..f6bac9e 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -727,7 +727,7 @@ static int rspi_rz_transfer_one(struct spi_master *master,
 static int qspi_trigger_transfer_out_int(struct rspi_data *rspi, const u8 *tx,
 					u8 *rx, unsigned int len)
 {
-	unsigned int i, n, ret;
+	int i, n, ret;
 	int error;
 
 	while (len > 0) {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch] spi: signedness bug in qspi_trigger_transfer_out_int()
  2015-04-03  8:45 [patch] spi: signedness bug in qspi_trigger_transfer_out_int() Dan Carpenter
@ 2015-04-03  9:44 ` Cao Minh Hiep
  2015-04-06 16:20 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Cao Minh Hiep @ 2015-04-03  9:44 UTC (permalink / raw)
  To: Dan Carpenter, Mark Brown
  Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA

Hi,
On 2015年04月03日 17:45, Dan Carpenter wrote:
> We need "ret" to be unsigned for the error handling to work.  The
> signedness of "i" and "n" don't matter but qspi_set_send_trigger()
> returns an int so I've changed them to int as well.
>
> Fixes: 4b6fe3edcbba ('spi: Using Trigger number to transmit/receive data')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
> index b3871d8..f6bac9e 100644
> --- a/drivers/spi/spi-rspi.c
> +++ b/drivers/spi/spi-rspi.c
> @@ -727,7 +727,7 @@ static int rspi_rz_transfer_one(struct spi_master *master,
>   static int qspi_trigger_transfer_out_int(struct rspi_data *rspi, const u8 *tx,
>   					u8 *rx, unsigned int len)
>   {
> -	unsigned int i, n, ret;
> +	int i, n, ret;
>   	int error;
>   
>   	while (len > 0) {
>
>
Thanks for your patch!

Best Regards,
Hiep.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] spi: signedness bug in qspi_trigger_transfer_out_int()
  2015-04-03  8:45 [patch] spi: signedness bug in qspi_trigger_transfer_out_int() Dan Carpenter
  2015-04-03  9:44 ` Cao Minh Hiep
@ 2015-04-06 16:20 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2015-04-06 16:20 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Hiep Cao Minh, linux-spi, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 272 bytes --]

On Fri, Apr 03, 2015 at 11:45:27AM +0300, Dan Carpenter wrote:
> We need "ret" to be unsigned for the error handling to work.  The
> signedness of "i" and "n" don't matter but qspi_set_send_trigger()
> returns an int so I've changed them to int as well.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-06 16:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-03  8:45 [patch] spi: signedness bug in qspi_trigger_transfer_out_int() Dan Carpenter
2015-04-03  9:44 ` Cao Minh Hiep
2015-04-06 16:20 ` Mark Brown

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).