All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: ccree: use size_t consistently
@ 2017-12-20  7:23 Gilad Ben-Yossef
  2017-12-20  7:40   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Gilad Ben-Yossef @ 2017-12-20  7:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Ofir Drang, linux-crypto, driverdev-devel, devel, linux-kernel

Fix declaration, implementation and wrapper function to use
the same size_t type we actually define the parameter to be.

Fixes: 3f268f5d6669 ("staging: ccree: turn compile time debug log to params")
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
---
 drivers/staging/ccree/ssi_driver.c | 2 +-
 drivers/staging/ccree/ssi_driver.h | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging/ccree/ssi_driver.c
index 56b5d45..1254c69 100644
--- a/drivers/staging/ccree/ssi_driver.c
+++ b/drivers/staging/ccree/ssi_driver.c
@@ -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);
diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ssi_driver.h
index 5a56f7a..bf83f3e 100644
--- a/drivers/staging/ccree/ssi_driver.h
+++ b/drivers/staging/ccree/ssi_driver.h
@@ -174,10 +174,9 @@ static inline struct device *drvdata_to_dev(struct cc_drvdata *drvdata)
 	return &drvdata->plat_dev->dev;
 }
 
-void __dump_byte_array(const char *name, const u8 *the_array,
-		       unsigned long size);
+void __dump_byte_array(const char *name, const u8 *buf, size_t len);
 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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: ccree: use size_t consistently
  2017-12-20  7:23 [PATCH] staging: ccree: use size_t consistently Gilad Ben-Yossef
@ 2017-12-20  7:40   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2017-12-20  7:40 UTC (permalink / raw)
  To: Gilad Ben-Yossef
  Cc: devel, linux-kernel, driverdev-devel, linux-crypto, Ofir Drang

On Wed, Dec 20, 2017 at 07:23:31AM +0000, Gilad Ben-Yossef wrote:
> Fix declaration, implementation and wrapper function to use
> the same size_t type we actually define the parameter to be.
> 
> Fixes: 3f268f5d6669 ("staging: ccree: turn compile time debug log to params")
> Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>

You forgot the reported-by: tag :(

I'll go add it...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: ccree: use size_t consistently
@ 2017-12-20  7:40   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2017-12-20  7:40 UTC (permalink / raw)
  To: Gilad Ben-Yossef
  Cc: Ofir Drang, linux-crypto, driverdev-devel, devel, linux-kernel

On Wed, Dec 20, 2017 at 07:23:31AM +0000, Gilad Ben-Yossef wrote:
> Fix declaration, implementation and wrapper function to use
> the same size_t type we actually define the parameter to be.
> 
> Fixes: 3f268f5d6669 ("staging: ccree: turn compile time debug log to params")
> Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>

You forgot the reported-by: tag :(

I'll go add it...

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-20  7:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-20  7:23 [PATCH] staging: ccree: use size_t consistently Gilad Ben-Yossef
2017-12-20  7:40 ` Greg Kroah-Hartman
2017-12-20  7:40   ` Greg Kroah-Hartman

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.