From: Javier Martinez Canillas Date: Fri, 11 Mar 2011 02:55:28 +0000 (-0800) Subject: staging: ath6kl: Cast variable to size_t to avoid compile warning X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7702c36072072427db2166cc6e68bfc52b4209bb;p=linux-beck.git staging: ath6kl: Cast variable to size_t to avoid compile warning The min() macro does strict type-checking so use min_t() instead to silence a compile warning. Cc: Naveen Singh Signed-off-by: Javier Martinez Canillas Signed-off-by: Luis R. Rodriguez Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c index 67e6d5edfa51..55b0633af9ee 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c +++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c @@ -360,7 +360,7 @@ int PSSendOps(void *arg) status = 1; goto complete; } - len = min(firmware->size, MAX_BDADDR_FORMAT_LENGTH - 1); + len = min_t(size_t, firmware->size, MAX_BDADDR_FORMAT_LENGTH - 1); memcpy(config_bdaddr, firmware->data, len); config_bdaddr[len] = '\0'; write_bdaddr(hdev,config_bdaddr,BDADDR_TYPE_STRING);