]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging: ks7010: change two parameter types in hostif_mic_failure_request
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Sun, 13 May 2018 18:35:56 +0000 (20:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 May 2018 12:07:07 +0000 (14:07 +0200)
Parameters 'failure_count' and 'timer' was declared as unsigned
short and then there was being casted to u16 inside cpu_to_le16
to make the assignation. Just declare them as 'u16' and avoid
casting at all.

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

index 5e7d3fa00ed483d70abadf2de3ea108489f2656e..1cb5d90403a5a7ff806b65dbbe5b467ae93e5c47 100644 (file)
@@ -1501,8 +1501,7 @@ void hostif_bss_scan_request(struct ks_wlan_private *priv,
 
 static
 void hostif_mic_failure_request(struct ks_wlan_private *priv,
-                               unsigned short failure_count,
-                               unsigned short timer)
+                               u16 failure_count, u16 timer)
 {
        struct hostif_mic_failure_request *pp;
 
@@ -1510,8 +1509,8 @@ void hostif_mic_failure_request(struct ks_wlan_private *priv,
        if (!pp)
                return;
 
-       pp->failure_count = cpu_to_le16((uint16_t)failure_count);
-       pp->timer = cpu_to_le16((uint16_t)timer);
+       pp->failure_count = cpu_to_le16(failure_count);
+       pp->timer = cpu_to_le16(timer);
 
        send_request_to_device(priv, pp, hif_align_size(sizeof(*pp)));
 }