From: Prasanna Karthik <[email protected]>
simple_strtoul is obsolete, use kstrtoul instead reported by checkpatch.
Signed-off-by: Prasanna Karthik <[email protected]>
---
drivers/bluetooth/bt3c_cs.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
index 7aab654..33b09be 100644
--- a/drivers/bluetooth/bt3c_cs.c
+++ b/drivers/bluetooth/bt3c_cs.c
@@ -453,7 +453,8 @@ static int bt3c_load_firmware(struct bt3c_info *info,
{
char *ptr =3D (char *) firmware;
char b[9];
- unsigned int iobase, size, addr, fcs, tmp;
+ unsigned int iobase, tmp;
+ unsigned long size, addr, fcs;
int i, err =3D 0;
=20
iobase =3D info->p_dev->resource[0]->start;
@@ -478,15 +479,18 @@ static int bt3c_load_firmware(struct bt3c_info *info,
=20
memset(b, 0, sizeof(b));
memcpy(b, ptr + 2, 2);
- size =3D simple_strtoul(b, NULL, 16);
+ if (kstrtoul(b, 16, &size) < 0)
+ return -EINVAL;
=20
memset(b, 0, sizeof(b));
memcpy(b, ptr + 4, 8);
- addr =3D simple_strtoul(b, NULL, 16);
+ if (kstrtoul(b, 16, &addr) < 0)
+ return -EINVAL;
=20
memset(b, 0, sizeof(b));
memcpy(b, ptr + (size * 2) + 2, 2);
- fcs =3D simple_strtoul(b, NULL, 16);
+ if (kstrtoul(b, 16, &fcs) < 0)
+ return -EINVAL;
=20
memset(b, 0, sizeof(b));
for (tmp =3D 0, i =3D 0; i < size; i++) {
--=20
1.7.0.4
Hi Prasanna,
> simple_strtoul is obsolete, use kstrtoul instead reported by checkpatch.
>
> Signed-off-by: Prasanna Karthik <[email protected]>
> ---
> drivers/bluetooth/bt3c_cs.c | 12 ++++++++----
> 1 files changed, 8 insertions(+), 4 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel