Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752314AbdGCEmK (ORCPT ); Mon, 3 Jul 2017 00:42:10 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:32835 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750802AbdGCEmI (ORCPT ); Mon, 3 Jul 2017 00:42:08 -0400 From: Janusz Lisiecki To: Wolfram Sang Cc: Greg Kroah-Hartman , Linux Driver Project Developer List , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Janusz Lisiecki Subject: [PATCH 0/1] Fix cast to restricted __le16 in ks7010 driver Date: Mon, 3 Jul 2017 06:41:38 +0200 Message-Id: <1499056899-1249-1-git-send-email-janusz.lisiecki@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1499005648-28914-1-git-send-email-janusz.lisiecki@gmail.com> References: <1499005648-28914-1-git-send-email-janusz.lisiecki@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 706 Lines: 18 This patch fixes Sparse warining found in ks_wlan_net.c. This seems to be last of it reported by Sparse for that driver. link_ap_info_t structure field 'capability' has native order and is used everywhere in the code in such way (i.e get_ap_information, get_current_ap), so le16_to_cpu() on it is wrong and must be removed. As this is not HW related structure we are free to choose its byte order and it is easier just to remove one wrong casting than rework all other places to treat it as __le16. Janusz Lisiecki (1): staging: ks7010: Fix warning of cast to restricted __le16 in ks_wlan_net.c drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1