]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: ath6kl: Cast variable to size_t to avoid compile warning
authorJavier Martinez Canillas <martinez.javier@gmail.com>
Fri, 11 Mar 2011 02:55:28 +0000 (18:55 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Mar 2011 22:31:46 +0000 (14:31 -0800)
The min() macro does strict type-checking so use min_t() instead
to silence a compile warning.

Cc: Naveen Singh <naveen.singh@atheros.com>
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c

index 67e6d5edfa51b2e91352862d351ad6781cc4d36d..55b0633af9ee831ded64561605ec793add2155ff 100644 (file)
@@ -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);