staging: ccree: fix type mismatch warning
Subsystems (2)
PATCH 1/1 staging: ccree: fix type mismatch warning
__dump_byte_array used to be hidden, but is now visible to the compiler and causes a harmless warning:
drivers/staging/ccree/ssi_driver.c:82:6: error: conflicting types for '__dump_byte_array'drivers/staging/ccree/ssi_driver.c: In function '__dump_byte_array':drivers/staging/ccree/ssi_driver.c:89:41: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t {aka unsigned int}' [-Werror=format=]
This changes the prototype in the header to match that of the actual function on all architectures, and the format string to match the argument.
--- drivers/staging/ccree/ssi_driver.c | 2 +- drivers/staging/ccree/ssi_driver.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/ccree/ssi_driver.c +1 -1
@@ -86,7 +86,7 @@ void __dump_byte_array(const char *name, const u8 *buf, size_t len)if (!buf)return ; -snprintf (prefix,sizeof (prefix),"%s[%lu]: " , name, len); +snprintf (prefix,sizeof (prefix),"%s[%zu]: " , name, len);print_hex_dump (KERN_DEBUG , prefix,DUMP_PREFIX_ADDRESS ,16 ,1 , buf, len, false);
drivers/staging/ccree/ssi_driver.h +2 -2
@@ -175,9 +175,9 @@ static inline struct device *drvdata_to_dev(struct cc_drvdata *drvdata) }void __dump_byte_array (const char *name,const u8 *the_array, -unsigned long size); +size_t size);static inline void dump_byte_array (const char *name,const u8 *the_array, -unsigned long size) +size_t size) {if (cc_dump_bytes)__dump_byte_array (name, the_array, size);
Signature · 1 line
2.9.0
Greg Kroah-Hartman
maintainerQuoted 11 lines · Arnd Bergmann
__dump_byte_arrayused to be hidden, but is now visible to the compiler and causes a harmless warning:
drivers/staging/ccree/ssi_driver.c:82:6: error: conflicting types for '__dump_byte_array'drivers/staging/ccree/ssi_driver.c: In function '__dump_byte_array':drivers/staging/ccree/ssi_driver.c:89:41: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t{aka unsigned int}' [-Werror=format=]This changes the prototype in the header to match that of the actual function on all architectures, and the format string to match the argument.
Quoted 6 lines
Fixes 3f268f5d6669 ("staging: ccree: turn compile time debug log to params")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/staging/ccree/ssi_driver.c | 2 +- drivers/staging/ccree/ssi_driver.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Should already be fixed, sorry.
greg k-h