diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-07-28 17:32:05 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-07-28 20:23:27 -0700 |
commit | cb04e8b1d2f24c4c2c92f7b7529031fc35a16fed (patch) | |
tree | 78d27543d36ecb38102070bf5e640551f4ebfdae /drivers/input/touchscreen | |
parent | 9f499b8c791d2983c0a31a543c51d1b2f15e8755 (diff) | |
download | linux-cb04e8b1d2f24c4c2c92f7b7529031fc35a16fed.tar.gz linux-cb04e8b1d2f24c4c2c92f7b7529031fc35a16fed.tar.bz2 linux-cb04e8b1d2f24c4c2c92f7b7529031fc35a16fed.zip |
minmax: don't use max() in situations that want a C constant expression
We only had a couple of array[] declarations, and changing them to just
use 'MAX()' instead of 'max()' fixes the issue.
This will allow us to simplify our min/max macros enormously, since they
can now unconditionally use temporary variables to avoid using the
argument values multiple times.
Cc: David Laight <David.Laight@aculab.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r-- | drivers/input/touchscreen/cyttsp4_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c index 7cb26929dc73..9dc25eb2be44 100644 --- a/drivers/input/touchscreen/cyttsp4_core.c +++ b/drivers/input/touchscreen/cyttsp4_core.c @@ -871,7 +871,7 @@ static void cyttsp4_get_mt_touches(struct cyttsp4_mt_data *md, int num_cur_tch) struct cyttsp4_touch tch; int sig; int i, j, t = 0; - int ids[max(CY_TMA1036_MAX_TCH, CY_TMA4XX_MAX_TCH)]; + int ids[MAX(CY_TMA1036_MAX_TCH, CY_TMA4XX_MAX_TCH)]; memset(ids, 0, si->si_ofs.tch_abs[CY_TCH_T].max * sizeof(int)); for (i = 0; i < num_cur_tch; i++) { |