Skip to content

Commit

Permalink
spi: Trivial warning fix
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Shubhrajyoti D authored and Grant Likely committed Mar 9, 2012
1 parent d1c8bbd commit 8f53602
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/spi/spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,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);
Expand Down

0 comments on commit 8f53602

Please sign in to comment.