From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752493AbdCMNOt (ORCPT ); Mon, 13 Mar 2017 09:14:49 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:36805 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752353AbdCMNOk (ORCPT ); Mon, 13 Mar 2017 09:14:40 -0400 From: Gioh Kim To: gregkh@linuxfoundation.org, sergio.paracuellos@gmail.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, gurugio@hanmail.net, Gioh Kim Subject: [PATCH 0/2] staging: wlan-ng: remove Sparse warnings for reading __le16 Date: Mon, 13 Mar 2017 14:14:24 +0100 Message-Id: <1489410866-19639-1-git-send-email-gi-oh.kim@profitbricks.com> X-Mailer: git-send-email 2.5.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I found that many "warning: cast to restricted __le16" in staging/wlan-ng directory. I don't know why but many structures has u16 type variable, not __le16. And they are read by le16_to_cpu macro. So I introduced a wrapper macro to read u16 type variable without Sparse warning, and convert it into u32 type. I hope this could help. Gioh Kim (2): taging: wlan-ng: introduce a macro read_u16 staging: wlan-ng: prism2sta.c: apply read_u16 macro drivers/staging/wlan-ng/prism2mgmt.h | 3 + drivers/staging/wlan-ng/prism2sta.c | 128 +++++++++++++++++------------------ 2 files changed, 67 insertions(+), 64 deletions(-) -- 2.5.0