* [PATCH 0/1] i2c: at91: fix code checker warnings
@ 2015-06-11 9:16 Cyrille Pitchen
[not found] ` <cover.1434013494.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Cyrille Pitchen @ 2015-06-11 9:16 UTC (permalink / raw)
To: ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w,
wsa-z923LK4zBo2bacvFa/9K2g, linux-i2c-u79uwXL29TY76Z2rM5mHXA
Cc: nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Cyrille Pitchen
ChangeLog
v1:
This patch fixes somes code checker warnings reported by Wolfram Sang:
drivers/i2c/busses/i2c-at91.c:213: style: Checking if unsigned variable 'buf_len' is less than zero.
drivers/i2c/busses/i2c-at91.c:254: style: Checking if unsigned variable 'buf_len' is less than zero.
drivers/i2c/busses/i2c-at91.c:293: style: Checking if unsigned variable 'buf_len' is less than zero.
Thanks for reporting!
Cyrille Pitchen (1):
i2c: at91: fix code checker warnings
drivers/i2c/busses/i2c-at91.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
1.8.2.2
^ permalink raw reply [flat|nested] 5+ messages in thread[parent not found: <cover.1434013494.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>]
* [PATCH 1/1] i2c: at91: fix code checker warnings [not found] ` <cover.1434013494.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org> @ 2015-06-11 9:16 ` Cyrille Pitchen [not found] ` <7419376c5a4e60f1b23d36e66a102c7c40db1089.1434013494.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org> 2015-06-11 9:26 ` [PATCH 0/1] " Cyrille Pitchen 1 sibling, 1 reply; 5+ messages in thread From: Cyrille Pitchen @ 2015-06-11 9:16 UTC (permalink / raw) To: ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w, wsa-z923LK4zBo2bacvFa/9K2g, linux-i2c-u79uwXL29TY76Z2rM5mHXA Cc: nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Cyrille Pitchen buf_len is a size_t, so unsigned but was tested with '<= 0'. Signed-off-by: Cyrille Pitchen <cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org> --- drivers/i2c/busses/i2c-at91.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index 0d2dc7d..967c0cb 100644 --- a/drivers/i2c/busses/i2c-at91.c +++ b/drivers/i2c/busses/i2c-at91.c @@ -232,7 +232,7 @@ static void at91_twi_dma_cleanup(struct at91_twi_dev *dev) static void at91_twi_write_next_byte(struct at91_twi_dev *dev) { - if (dev->buf_len <= 0) + if (!dev->buf_len) return; /* 8bit write works with and without FIFO */ @@ -275,7 +275,7 @@ static void at91_twi_write_data_dma(struct at91_twi_dev *dev) struct dma_chan *chan_tx = dma->chan_tx; unsigned int sg_len = 1; - if (dev->buf_len <= 0) + if (!dev->buf_len) return; dma->direction = DMA_TO_DEVICE; @@ -347,7 +347,7 @@ error: static void at91_twi_read_next_byte(struct at91_twi_dev *dev) { - if (dev->buf_len <= 0) + if (!dev->buf_len) return; /* 8bit read works with and without FIFO */ -- 1.8.2.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <7419376c5a4e60f1b23d36e66a102c7c40db1089.1434013494.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 1/1] i2c: at91: fix code checker warnings [not found] ` <7419376c5a4e60f1b23d36e66a102c7c40db1089.1434013494.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org> @ 2015-06-11 12:16 ` Ludovic Desroches 2015-06-11 13:18 ` Wolfram Sang 1 sibling, 0 replies; 5+ messages in thread From: Ludovic Desroches @ 2015-06-11 12:16 UTC (permalink / raw) To: Cyrille Pitchen Cc: ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w, wsa-z923LK4zBo2bacvFa/9K2g, linux-i2c-u79uwXL29TY76Z2rM5mHXA, nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On Thu, Jun 11, 2015 at 11:16:32AM +0200, Cyrille Pitchen wrote: > buf_len is a size_t, so unsigned but was tested with '<= 0'. > > Signed-off-by: Cyrille Pitchen <cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org> Acked-by: Ludovic Desroches <ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org> Thanks > --- > drivers/i2c/busses/i2c-at91.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c > index 0d2dc7d..967c0cb 100644 > --- a/drivers/i2c/busses/i2c-at91.c > +++ b/drivers/i2c/busses/i2c-at91.c > @@ -232,7 +232,7 @@ static void at91_twi_dma_cleanup(struct at91_twi_dev *dev) > > static void at91_twi_write_next_byte(struct at91_twi_dev *dev) > { > - if (dev->buf_len <= 0) > + if (!dev->buf_len) > return; > > /* 8bit write works with and without FIFO */ > @@ -275,7 +275,7 @@ static void at91_twi_write_data_dma(struct at91_twi_dev *dev) > struct dma_chan *chan_tx = dma->chan_tx; > unsigned int sg_len = 1; > > - if (dev->buf_len <= 0) > + if (!dev->buf_len) > return; > > dma->direction = DMA_TO_DEVICE; > @@ -347,7 +347,7 @@ error: > > static void at91_twi_read_next_byte(struct at91_twi_dev *dev) > { > - if (dev->buf_len <= 0) > + if (!dev->buf_len) > return; > > /* 8bit read works with and without FIFO */ > -- > 1.8.2.2 > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] i2c: at91: fix code checker warnings [not found] ` <7419376c5a4e60f1b23d36e66a102c7c40db1089.1434013494.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org> 2015-06-11 12:16 ` Ludovic Desroches @ 2015-06-11 13:18 ` Wolfram Sang 1 sibling, 0 replies; 5+ messages in thread From: Wolfram Sang @ 2015-06-11 13:18 UTC (permalink / raw) To: Cyrille Pitchen Cc: ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w, linux-i2c-u79uwXL29TY76Z2rM5mHXA, nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r [-- Attachment #1: Type: text/plain, Size: 260 bytes --] On Thu, Jun 11, 2015 at 11:16:32AM +0200, Cyrille Pitchen wrote: > buf_len is a size_t, so unsigned but was tested with '<= 0'. > > Signed-off-by: Cyrille Pitchen <cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org> Applied to for-next, thanks! [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/1] i2c: at91: fix code checker warnings [not found] ` <cover.1434013494.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org> 2015-06-11 9:16 ` [PATCH 1/1] " Cyrille Pitchen @ 2015-06-11 9:26 ` Cyrille Pitchen 1 sibling, 0 replies; 5+ messages in thread From: Cyrille Pitchen @ 2015-06-11 9:26 UTC (permalink / raw) To: ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w, wsa-z923LK4zBo2bacvFa/9K2g, linux-i2c-u79uwXL29TY76Z2rM5mHXA Cc: nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Hi all, this patch was made after applying the previous series "[PATCH v6 0/6] i2c: at91: add support to FIFOs and alternative command", which was already accepted. Best Regards, Cyrille Le 11/06/2015 11:16, Cyrille Pitchen a écrit : > ChangeLog > > v1: > This patch fixes somes code checker warnings reported by Wolfram Sang: > > drivers/i2c/busses/i2c-at91.c:213: style: Checking if unsigned variable 'buf_len' is less than zero. > drivers/i2c/busses/i2c-at91.c:254: style: Checking if unsigned variable 'buf_len' is less than zero. > drivers/i2c/busses/i2c-at91.c:293: style: Checking if unsigned variable 'buf_len' is less than zero. > > Thanks for reporting! > > Cyrille Pitchen (1): > i2c: at91: fix code checker warnings > > drivers/i2c/busses/i2c-at91.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-06-11 13:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-11 9:16 [PATCH 0/1] i2c: at91: fix code checker warnings Cyrille Pitchen
[not found] ` <cover.1434013494.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2015-06-11 9:16 ` [PATCH 1/1] " Cyrille Pitchen
[not found] ` <7419376c5a4e60f1b23d36e66a102c7c40db1089.1434013494.git.cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2015-06-11 12:16 ` Ludovic Desroches
2015-06-11 13:18 ` Wolfram Sang
2015-06-11 9:26 ` [PATCH 0/1] " Cyrille Pitchen
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).