* [PATCH] spi: Trivial warning fix
@ 2012-02-27 13:59 ` Shubhrajyoti D
0 siblings, 0 replies; 3+ messages in thread
From: Shubhrajyoti D @ 2012-02-27 13:59 UTC (permalink / raw)
To: spi-devel-general; +Cc: linux-kernel, Shubhrajyoti D, Vitaly Wool
The loop count i traverses for ntrans which is unsigned
so make the loop count i also unsigned.
Fix the below warning
In file included from drivers/spi/spi-omap2-mcspi.c:38:
include/linux/spi/spi.h: In function 'spi_message_alloc':
include/linux/spi/spi.h:556: warning: comparison between signed and unsigned integer expressions
Cc: Vitaly Wool <vwool@ru.mvista.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
Untested !
include/linux/spi/spi.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 176fce9..6ae4993 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -549,7 +549,7 @@ static inline struct spi_message *spi_message_alloc(unsigned ntrans, gfp_t flags
+ ntrans * sizeof(struct spi_transfer),
flags);
if (m) {
- int i;
+ unsigned i;
struct spi_transfer *t = (struct spi_transfer *)(m + 1);
INIT_LIST_HEAD(&m->transfers);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] spi: Trivial warning fix
@ 2012-02-27 13:59 ` Shubhrajyoti D
0 siblings, 0 replies; 3+ messages in thread
From: Shubhrajyoti D @ 2012-02-27 13:59 UTC (permalink / raw)
To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Cc: Vitaly Wool, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Shubhrajyoti D
The loop count i traverses for ntrans which is unsigned
so make the loop count i also unsigned.
Fix the below warning
In file included from drivers/spi/spi-omap2-mcspi.c:38:
include/linux/spi/spi.h: In function 'spi_message_alloc':
include/linux/spi/spi.h:556: warning: comparison between signed and unsigned integer expressions
Cc: Vitaly Wool <vwool-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
Signed-off-by: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>
---
Untested !
include/linux/spi/spi.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 176fce9..6ae4993 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -549,7 +549,7 @@ static inline struct spi_message *spi_message_alloc(unsigned ntrans, gfp_t flags
+ ntrans * sizeof(struct spi_transfer),
flags);
if (m) {
- int i;
+ unsigned i;
struct spi_transfer *t = (struct spi_transfer *)(m + 1);
INIT_LIST_HEAD(&m->transfers);
--
1.7.0.4
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: Trivial warning fix
2012-02-27 13:59 ` Shubhrajyoti D
(?)
@ 2012-03-09 17:57 ` Grant Likely
-1 siblings, 0 replies; 3+ messages in thread
From: Grant Likely @ 2012-03-09 17:57 UTC (permalink / raw)
To: Shubhrajyoti D, spi-devel-general
Cc: Vitaly Wool, linux-kernel, Shubhrajyoti D
On Mon, 27 Feb 2012 19:29:05 +0530, Shubhrajyoti D <shubhrajyoti@ti.com> wrote:
> The loop count i traverses for ntrans which is unsigned
> so make the loop count i also unsigned.
>
> Fix the below warning
> In file included from drivers/spi/spi-omap2-mcspi.c:38:
> include/linux/spi/spi.h: In function 'spi_message_alloc':
> include/linux/spi/spi.h:556: warning: comparison between signed and unsigned integer expressions
>
> Cc: Vitaly Wool <vwool@ru.mvista.com>
> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
> ---
Applied, thanks.
g.
> Untested !
>
> include/linux/spi/spi.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
> index 176fce9..6ae4993 100644
> --- a/include/linux/spi/spi.h
> +++ b/include/linux/spi/spi.h
> @@ -549,7 +549,7 @@ static inline struct spi_message *spi_message_alloc(unsigned ntrans, gfp_t flags
> + ntrans * sizeof(struct spi_transfer),
> flags);
> if (m) {
> - int i;
> + unsigned i;
> struct spi_transfer *t = (struct spi_transfer *)(m + 1);
>
> INIT_LIST_HEAD(&m->transfers);
> --
> 1.7.0.4
>
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> spi-devel-general mailing list
> spi-devel-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/spi-devel-general
--
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies,Ltd.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-09 17:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-27 13:59 [PATCH] spi: Trivial warning fix Shubhrajyoti D
2012-02-27 13:59 ` Shubhrajyoti D
2012-03-09 17:57 ` Grant Likely
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.