FROMGIT: iio: hrtimer-trigger: Fix potential integer overflow in iio_hrtimer_store_sampling_frequency

Add suffix ULL to constant 1000 in order to avoid a potential integer
overflow and give the compiler complete information about the proper
arithmetic to use. Notice that this constant is being used in a context
that expects an expression of type unsigned long long, but it's
currently evaluated using 32-bit arithmetic.

Addresses-Coverity-ID: 1503062 ("Unintentional integer overflow")
Fixes: dafcf4ed8392 ("iio: hrtimer: Allow sub Hz granularity")
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20210329205817.GA188755@embeddedor
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit c10f8109f78b4e3722003c923e6aeebc73a6134a
 git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg)

BUG=b:174544536
TEST=compile

Signed-off-by: Gwendal Grignou <gwendal@google.com>
Change-Id: I061bf283984607fcc012192ecf4b655873554787
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2810186
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Commit-Queue: Gwendal Grignou <gwendal@chromium.org>
Tested-by: Gwendal Grignou <gwendal@chromium.org>
Auto-Submit: Gwendal Grignou <gwendal@chromium.org>
(cherry picked from commit 6e27d05c78feb0a5b9847e38e2e662fa8b07270f)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2811881
1 file changed