From: Todd Poynor <toddpoynor@gmail.com>
To: Rob Springer <rspringer@google.com>,
John Joseph <jnjoseph@google.com>,
Ben Chan <benchan@chromium.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Zhongze Hu <frankhu@chromium.org>, Simon Que <sque@chromium.org>,
Dmitry Torokhov <dtor@chromium.org>,
Guenter Roeck <groeck@chromium.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Todd Poynor <toddpoynor@google.com>
Subject: [PATCH 13/32] staging: gasket: gasket_wait_with_reschedule use 32 bits of retry count
Date: Tue, 17 Jul 2018 13:56:53 -0700 [thread overview]
Message-ID: <20180717205712.29495-14-toddpoynor@gmail.com> (raw)
In-Reply-To: <20180717205712.29495-1-toddpoynor@gmail.com>
From: Todd Poynor <toddpoynor@google.com>
Don't need a 64-bit retry counter.
Reported-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Zhongze Hu <frankhu@chromium.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
---
drivers/staging/gasket/gasket_core.c | 4 ++--
drivers/staging/gasket/gasket_core.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/gasket/gasket_core.c b/drivers/staging/gasket/gasket_core.c
index 5ae3d44f6166e..94e64b900380d 100644
--- a/drivers/staging/gasket/gasket_core.c
+++ b/drivers/staging/gasket/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/drivers/staging/gasket/gasket_core.h b/drivers/staging/gasket/gasket_core.h
index 94a5537bff2c2..50ad0c8853183 100644
--- a/drivers/staging/gasket/gasket_core.h
+++ b/drivers/staging/gasket/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__ */
--
2.18.0.203.gfac676dfb9-goog
next prev parent reply other threads:[~2018-07-17 21:05 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 20:56 [PATCH 00/32 v3] staging: gasket: sundry fixes and fixups Todd Poynor
2018-07-17 20:56 ` [PATCH 01/32] staging: gasket: remove X86 Kconfig restriction Todd Poynor
2018-07-17 20:56 ` [PATCH 02/32] staging: gasket: fix typo in apex_enter_reset Todd Poynor
2018-07-17 20:56 ` [PATCH 03/32] staging: gasket: fix typo in gasket_core.h comments Todd Poynor
2018-07-17 20:56 ` [PATCH 04/32] staging: gasket: whitespace fix in gasket_page_table_init Todd Poynor
2018-07-17 20:56 ` [PATCH 05/32] staging: gasket: remove driver registration on class creation failure Todd Poynor
2018-07-17 20:56 ` [PATCH 06/32] staging: gasket: hold mutex on gasket driver unregistration Todd Poynor
2018-07-17 20:56 ` [PATCH 07/32] staging: gasket: Return EBUSY on mapping create when already in use Todd Poynor
2018-07-17 20:56 ` [PATCH 08/32] staging: gasket: Remove stale pointers on error allocating attr array Todd Poynor
2018-07-17 20:56 ` [PATCH 09/32] staging: gasket: convert gasket_mmap_has_permissions to bool return Todd Poynor
2018-07-17 20:56 ` [PATCH 10/32] staging: gasket: fix gasket_wait_with_reschedule timeout return code Todd Poynor
2018-07-17 20:56 ` [PATCH 11/32] staging: gasket: gasket_wait_with_reschedule use msleep Todd Poynor
2018-07-17 20:56 ` [PATCH 12/32] staging: gasket: gasket_wait_with_reschedule simplify logic Todd Poynor
2018-07-17 20:56 ` Todd Poynor [this message]
2018-07-17 20:56 ` [PATCH 14/32] staging: gasket: bail out of reset sequence on device callback error Todd Poynor
2018-07-17 20:56 ` [PATCH 15/32] staging: gasket: drop gasket_cdev_get_info, use container_of Todd Poynor
2018-07-17 20:56 ` [PATCH 16/32] staging: gasket: always allow root open for write Todd Poynor
2018-07-19 9:29 ` Greg Kroah-Hartman
2018-07-19 23:47 ` Todd Poynor
2018-07-17 20:56 ` [PATCH 17/32] staging: gasket: annotate ioctl arg with __user Todd Poynor
2018-07-19 9:37 ` Greg Kroah-Hartman
2018-07-20 2:44 ` Todd Poynor
2018-07-20 5:43 ` Greg Kroah-Hartman
2018-07-30 7:00 ` Dan Carpenter
2018-07-17 20:56 ` [PATCH 18/32] staging: gasket: gasket_enable_dev remove unnecessary variable Todd Poynor
2018-07-17 20:56 ` [PATCH 19/32] staging: gasket: remove code for no physical device Todd Poynor
2018-07-17 20:57 ` [PATCH 20/32] staging: gasket: fix class create bug handling Todd Poynor
2018-07-17 20:57 ` [PATCH 21/32] staging: gasket: remove unnecessary code in coherent allocator Todd Poynor
2018-07-17 20:57 ` [PATCH 22/32] staging: gasket: don't treat no device reset callback as an error Todd Poynor
2018-07-17 20:57 ` [PATCH 23/32] staging: gasket: gasket_mmap return error instead of valid BAR index Todd Poynor
2018-07-17 20:57 ` [PATCH 24/32] staging: gasket: apex_clock_gating simplify logic, reduce indentation Todd Poynor
2018-07-17 20:57 ` [PATCH 25/32] staging: gasket: apex_ioctl_check_permissions use bool return type Todd Poynor
2018-07-17 20:57 ` [PATCH 26/32] staging: gasket: gasket page table functions " Todd Poynor
2018-07-17 20:57 ` [PATCH 27/32] staging: gasket: remove else clause after return in if clause Todd Poynor
2018-07-17 20:57 ` [PATCH 28/32] staging: gasket: fix comment syntax in apex.h Todd Poynor
2018-07-17 20:57 ` [PATCH 29/32] staging: gasket: remove unnecessary parens in page table code Todd Poynor
2018-07-17 20:57 ` [PATCH 30/32] staging: gasket: gasket_mmap use PAGE_MASK Todd Poynor
2018-07-17 20:57 ` [PATCH 31/32] staging: gasket: remove extra parens in gasket_write_mappable_regions Todd Poynor
2018-07-17 20:57 ` [PATCH 32/32] staging: gasket: fix multi-line comment syntax in gasket_core.h Todd Poynor
-- strict thread matches above, loose matches on Subject: below --
2018-07-17 2:08 [PATCH 00/32 v2] staging: gasket: sundry fixes and fixups Todd Poynor
2018-07-17 2:09 ` [PATCH 13/32] staging: gasket: gasket_wait_with_reschedule use 32 bits of retry count Todd Poynor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180717205712.29495-14-toddpoynor@gmail.com \
--to=toddpoynor@gmail.com \
--cc=benchan@chromium.org \
--cc=devel@driverdev.osuosl.org \
--cc=dtor@chromium.org \
--cc=frankhu@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=groeck@chromium.org \
--cc=jnjoseph@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rspringer@google.com \
--cc=sque@chromium.org \
--cc=toddpoynor@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox