From: Al Viro Date: Wed, 1 Feb 2006 11:42:28 +0000 (-0500) Subject: [PATCH] type-safe min() in prism54 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bf82a44949339c9af7bd61bb58847774e42e531e;p=linux-beck.git [PATCH] type-safe min() in prism54 we do min() on u8 and small integer constant; cast the latter to u8. Signed-off-by: Al Viro --- diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index c5cd61c7f927..e5bb9f5ae429 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c @@ -748,7 +748,7 @@ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info, if (essid->length) { dwrq->flags = 1; /* set ESSID to ON for Wireless Extensions */ /* if it is to big, trunk it */ - dwrq->length = min(IW_ESSID_MAX_SIZE, essid->length); + dwrq->length = min((u8)IW_ESSID_MAX_SIZE, essid->length); } else { dwrq->flags = 0; dwrq->length = 0;