Commit Graph

3 Commits (0dbc3463c8606e8122f3c8aea9815d0ef6e66bf9)

Author SHA1 Message Date
Geert Uytterhoeven c34924b950 mfd: cros_ec_spi: Use %z to format pointer differences
Before commit 5c29e47e6a ("mfd: cros_ec_spi:
Warnings fix"), 64-bit compiles gave the following warnings:

drivers/mfd/cros_ec_spi.c: In function 'cros_ec_spi_receive_response':
drivers/mfd/cros_ec_spi.c:123:5: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat]
drivers/mfd/cros_ec_spi.c:157:3: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long int' [-Wformat]
drivers/mfd/cros_ec_spi.c:181:2: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat]

After that commit, 32-bit compiles give:

drivers/mfd/cros_ec_spi.c: In function ‘cros_ec_spi_receive_response’:
drivers/mfd/cros_ec_spi.c:123: warning: format ‘%ld’ expects type ‘long int’, but argument 4 has type ‘int’
drivers/mfd/cros_ec_spi.c:157: warning: format ‘%ld’ expects type ‘long int’, but argument 6 has type ‘int’
drivers/mfd/cros_ec_spi.c:181: warning: format ‘%ld’ expects type ‘long int’, but argument 4 has type ‘int’

Use %z to format pointer differences to kill the warnings on both 32-bit
and 64-bit.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-05-16 19:14:06 +02:00
Samuel Ortiz 5c29e47e6a mfd: cros_ec_spi: Warnings fix
To silent those:

 CC [M]  drivers/mfd/cros_ec_spi.o
drivers/mfd/cros_ec_spi.c: In function ‘cros_ec_spi_receive_response’:
drivers/mfd/cros_ec_spi.c:123:5: warning: format ‘%d’ expects argument of type
‘int’, but argument 4 has type ‘long int’ [-Wformat]
drivers/mfd/cros_ec_spi.c:157:3: warning: format ‘%d’ expects argument of type
‘int’, but argument 6 has type ‘long int’ [-Wformat]
drivers/mfd/cros_ec_spi.c:181:2: warning: format ‘%d’ expects argument of type
‘int’, but argument 4 has type ‘long int’ [-Wformat]

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05 11:20:13 +02:00
Simon Glass a17d94f0b6 mfd: Add ChromeOS EC SPI driver
This uses a SPI bus to talk to the ChromeOS EC. The protocol
is defined by the EC and is fairly simple, with a length byte,
checksum, command byte and version byte (to permit easy creation
of new commands).

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05 11:20:13 +02:00