summaryrefslogtreecommitdiff
path: root/drivers/net/can/usb
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-07-28 17:32:05 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-07-28 20:23:27 -0700
commitcb04e8b1d2f24c4c2c92f7b7529031fc35a16fed (patch)
tree78d27543d36ecb38102070bf5e640551f4ebfdae /drivers/net/can/usb
parent9f499b8c791d2983c0a31a543c51d1b2f15e8755 (diff)
downloadlwn-cb04e8b1d2f24c4c2c92f7b7529031fc35a16fed.tar.gz
lwn-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/net/can/usb')
-rw-r--r--drivers/net/can/usb/etas_es58x/es58x_devlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/usb/etas_es58x/es58x_devlink.c b/drivers/net/can/usb/etas_es58x/es58x_devlink.c
index 635edeb8f68c..eee20839d96f 100644
--- a/drivers/net/can/usb/etas_es58x/es58x_devlink.c
+++ b/drivers/net/can/usb/etas_es58x/es58x_devlink.c
@@ -215,7 +215,7 @@ static int es58x_devlink_info_get(struct devlink *devlink,
struct es58x_sw_version *fw_ver = &es58x_dev->firmware_version;
struct es58x_sw_version *bl_ver = &es58x_dev->bootloader_version;
struct es58x_hw_revision *hw_rev = &es58x_dev->hardware_revision;
- char buf[max(sizeof("xx.xx.xx"), sizeof("axxx/xxx"))];
+ char buf[MAX(sizeof("xx.xx.xx"), sizeof("axxx/xxx"))];
int ret = 0;
if (es58x_sw_version_is_valid(fw_ver)) {