From d7ea69e8a43cc4f7667123e0b877446de9bed210 Mon Sep 17 00:00:00 2001 From: Todd Poynor Date: Tue, 17 Jul 2018 13:56:53 -0700 Subject: [PATCH] staging: gasket: gasket_wait_with_reschedule use 32 bits of retry count Don't need a 64-bit retry counter. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor Signed-off-by: Greg Kroah-Hartman --- gasket_core.c | 4 ++-- gasket_core.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gasket_core.c b/gasket_core.c index 5ae3d44..94e64b9 100644 --- a/gasket_core.c +++ b/gasket_core.c @@ -2089,9 +2089,9 @@ struct device *gasket_get_device(struct gasket_dev *dev) **/ int gasket_wait_with_reschedule( struct gasket_dev *gasket_dev, int bar, u64 offset, u64 mask, u64 val, - u64 max_retries, u64 delay_ms) + uint max_retries, u64 delay_ms) { - u64 retries = 0; + uint retries = 0; u64 tmp; while (retries < max_retries) { diff --git a/gasket_core.h b/gasket_core.h index 94a5537..50ad0c8 100644 --- a/gasket_core.h +++ b/gasket_core.h @@ -702,6 +702,6 @@ struct device *gasket_get_device(struct gasket_dev *dev); /* Helper function, Asynchronous waits on a given set of bits. */ int gasket_wait_with_reschedule( struct gasket_dev *gasket_dev, int bar, u64 offset, u64 mask, u64 val, - u64 max_retries, u64 delay_ms); + uint max_retries, u64 delay_ms); #endif /* __GASKET_CORE_H__ */