• Geert Uytterhoeven's avatar
    mfd: cros_ec_spi: Use %z to format pointer differences · c34924b9
    Geert Uytterhoeven authored
    Before commit 5c29e47e ("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: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
    Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
    c34924b9
cros_ec_spi.c 9.56 KB