]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: ks7010: change uint8_t casts to u8 in ks_wlan_set_rate
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Sun, 13 May 2018 18:35:41 +0000 (20:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 May 2018 12:07:06 +0000 (14:07 +0200)
There are some casts to uint8_t in ks_wlan_set_rate function to
assign values of the bitrate. Just change it to u8 which is the one
defined for the field 'body' of the struct which is in use.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_wlan_net.c

index 6d5ac6258d9939361cbad4d1b9828bba57d2120f..1cd690a0b7ab19581f490794954a305fea459b93 100644 (file)
@@ -406,12 +406,12 @@ static int ks_wlan_set_rate(struct net_device *dev,
                        case 11000000:
                        case 5500000:
                                priv->reg.rate_set.body[0] =
-                                   (uint8_t)(vwrq->bitrate.value / 500000);
+                                   (u8)(vwrq->bitrate.value / 500000);
                                break;
                        case 2000000:
                        case 1000000:
                                priv->reg.rate_set.body[0] =
-                                   ((uint8_t)(vwrq->bitrate.value / 500000)) |
+                                   ((u8)(vwrq->bitrate.value / 500000)) |
                                    BASIC_RATE;
                                break;
                        default:
@@ -466,7 +466,7 @@ static int ks_wlan_set_rate(struct net_device *dev,
                        case 18000000:
                        case 9000000:
                                priv->reg.rate_set.body[0] =
-                                   (uint8_t)(vwrq->bitrate.value / 500000);
+                                   (u8)(vwrq->bitrate.value / 500000);
                                break;
                        case 24000000:
                        case 12000000:
@@ -476,7 +476,7 @@ static int ks_wlan_set_rate(struct net_device *dev,
                        case 2000000:
                        case 1000000:
                                priv->reg.rate_set.body[0] =
-                                   ((uint8_t)(vwrq->bitrate.value / 500000)) |
+                                   ((u8)(vwrq->bitrate.value / 500000)) |
                                    BASIC_RATE;
                                break;
                        default: