Skip to content

Commit

Permalink
staging: ath6kl: Cast variable to size_t to avoid compile warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Javier Martinez Canillas authored and Greg Kroah-Hartman committed Mar 11, 2011
1 parent e49c459 commit 7702c36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7702c36

Please sign in to comment.