Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752002AbdGBTiz (ORCPT ); Sun, 2 Jul 2017 15:38:55 -0400 Received: from mail-qk0-f181.google.com ([209.85.220.181]:33251 "EHLO mail-qk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751863AbdGBTiy (ORCPT ); Sun, 2 Jul 2017 15:38:54 -0400 MIME-Version: 1.0 In-Reply-To: <1499005648-28914-2-git-send-email-janusz.lisiecki@gmail.com> References: <1499005648-28914-1-git-send-email-janusz.lisiecki@gmail.com> <1499005648-28914-2-git-send-email-janusz.lisiecki@gmail.com> From: Luc Van Oostenryck Date: Sun, 2 Jul 2017 21:38:52 +0200 X-Google-Sender-Auth: -KlkX3EIFqOSOZvhQaptdkQTNf4 Message-ID: Subject: Re: [PATCH 1/1] staging: ks7010: Fix cast to restricted __le16 in ks_wlan_net.c To: Janusz Lisiecki Cc: Wolfram Sang , Greg Kroah-Hartman , Linux Driver Project Developer List , devel@driverdev.osuosl.org, open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 594 Lines: 15 On Sun, Jul 2, 2017 at 4:27 PM, Janusz Lisiecki wrote: > This patch fixes the following Sparse warnings in ks_wlan_net.c: > drivers/staging/ks7010/ks_wlan_net.c:1359:24: warning: cast to restricted __le16 > Both sides of assignment are u16 so (as 'ap' is local_ap_t type and 'capability' member, > have the same as local 'capabilities' type of u16) 'le16_to_cpu' is not needed It could be that it's ap->capability's type that is wrong (not annotated with __le16). Isn't it? Is ap->capability supposed to hold a little-endian value or a native order value? -- Luc