Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp288369img; Mon, 25 Feb 2019 23:26:48 -0800 (PST) X-Google-Smtp-Source: AHgI3Iam54htSi3CbQx35iX9nk2bipQMutTzloSQ9KAUEP9V9naYq8ZbHMv0O0RuRkMuSAqwqtUA X-Received: by 2002:a17:902:4225:: with SMTP id g34mr25126589pld.152.1551166008418; Mon, 25 Feb 2019 23:26:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551166008; cv=none; d=google.com; s=arc-20160816; b=Y4Q3BmDf6ak9dltoYdJnktrSRXjYtfKUCS97gTBMyjkudipgFdjx/5lN9NbxUHnkHA iyps7zy9w/f3kP4FMotnZFWUXScGm+BsNaUmAwzLkN9ykAGfwy8yUMmabeOqN01rUmlc AEWtGzoMeyVtxSXgiNx23sM0CgFn/zA+yw6VIOOxtjiZqGcrZXN2j0KzUy2KkYk6KOAa MURAJxmNSq7eHXXq2LSfTx4eqN9HiwWAMmzLn34EX6RdZA8uvgCEWiXCTv0vlkGf3v5h YEyUcmfJiZO/ZnPRoSWLFNEh0aPymUFGjslEAqJsqU84UZqwua6jTho5ksthSN/fDLHt gwKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=LZ4DUBnEU88jzCbE5YnRANEXwzzeho3P2WNEh7r15j8=; b=qbtFhFWI/F6ggNmlitGGhaQbOpi0HrVzZN2OcCDZJPSclnPdPL85Qb7kST9fCS7UAR 7ALwSO1/3m+Y2kfcDnHikt8Cad9JA1ra3fQzqK8bZuEestP8QFuIeVECGhXZG8aH04rD Hp5kSwdG4zgAsK0w5K9Go+1rLPbcLpmXgPMbUiBH28HqXDy/HFbJmLjNZ9jV15sIBjRX b0C5kGOKi300sIgBH8Y8slCX89QhDce2Xxjjn77CmTQ1WoGHr2TfLCbKvZFgHnjxsnFg G0+PMhRR0g0DA2otu7JEw5bb670a1rUHPdMq0edSp7T4OpWr+OxAU9z95MyO9UVOlzjZ OU1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="nv/ZdFrV"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f77si12993211pfa.175.2019.02.25.23.26.32; Mon, 25 Feb 2019 23:26:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="nv/ZdFrV"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726718AbfBZH0B (ORCPT + 99 others); Tue, 26 Feb 2019 02:26:01 -0500 Received: from mail-yb1-f194.google.com ([209.85.219.194]:37174 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725901AbfBZH0B (ORCPT ); Tue, 26 Feb 2019 02:26:01 -0500 Received: by mail-yb1-f194.google.com with SMTP id k1so2594160ybf.4; Mon, 25 Feb 2019 23:26:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=LZ4DUBnEU88jzCbE5YnRANEXwzzeho3P2WNEh7r15j8=; b=nv/ZdFrVxYBJAw8uOrb2pQroMNU1ew+d1Nyw64K+nDaElDgigWDJF1qy94T7jm94O1 fEZkyIcJeRvRQ91bqNNEIzHgDo7jxk0lsyjAm77tzeIJWHeo187vszRGP21NDbOGg9jM hJ7oqogcNyBZmyvPtxEqbmZmRaNam6AkXZNdLMxJTqnwtKIG7S3WAc/9j9Bv46NDjV87 aiHBbOpxEUjfu4Xr26SJ7JVk+bhDqudkjceqqkgy+J0TWYxewIAt4mmEeHtJ+/mKqT4z 4W0TM7J0McUu9cYIyUhpJWBFAXOpMcRbqwHaAS1ODDJc1UXiVyAi2bEUBAAam+hIvwGw QNGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=LZ4DUBnEU88jzCbE5YnRANEXwzzeho3P2WNEh7r15j8=; b=BmFNkjAYaIxJK9M6+p8BS4Y3O9LhjedhbJofPTNDscy3DGOE1Z/LTKGFifETsCefGC gF+YI3p8eaE5oI0Gvd0Mq4lYcmYMQTVFdi1CqGWpL7tOdB4qua2qDb9VcuP4L4rMBMJ5 7j1+FnpOOzOmmceA6ccfDf1CFO5tJ+X6QLEeJf5f5E2Kfu3CQBCBng8rhDAwKJ1nygTF QMi1v5KAewzJFWeyTv5zrdswPPtopADlEZlUgsTzd4PRYoKAwBIo9l+Noj5wVWUwNeZk Eg764+8cUzlUbCnisV79j53gat/GD7Dd7KIYTjVJZzRMB9MTr6eYqQS4LzpQw/JvzZEJ cttQ== X-Gm-Message-State: AHQUAuZjM6lboroNZTYrEYtT9QEw3KCXr94KgUSLiKPowg9E02qZSxIz tFI96dfLmV+hYhFI6ky81HM= X-Received: by 2002:a25:71c2:: with SMTP id m185mr16730018ybc.162.1551165960493; Mon, 25 Feb 2019 23:26:00 -0800 (PST) Received: from localhost.localdomain ([191.101.9.198]) by smtp.gmail.com with ESMTPSA id m67sm3951777ywe.56.2019.02.25.23.25.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Feb 2019 23:26:00 -0800 (PST) From: Bo YU To: adham.abozaeid@microchip.com, ajay.kathat@microchip.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, yuzibode@126.com Cc: Bo YU , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org Subject: [PATCH V2] staging: wilc1000: fix incorrent type assignment Date: Tue, 26 Feb 2019 02:25:56 -0500 Message-Id: <20190226072556.26745-1-tsu.yubo@gmail.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix sparse warning: drivers/staging/wilc1000/host_interface.c:450:30: warning: incorrect type in assignment (different base types) drivers/staging/wilc1000/host_interface.c:450:30: expected restricted __le16 [usertype] beacon_period drivers/staging/wilc1000/host_interface.c:450:30: got unsigned short [usertype] beacon_interval drivers/staging/wilc1000/host_interface.c:451:25: warning: incorrect type in assignment (different base types) drivers/staging/wilc1000/host_interface.c:451:25: expected restricted __le16 [usertype] cap_info drivers/staging/wilc1000/host_interface.c:451:25: got unsigned short [usertype] capability Signed-off-by: Bo YU --- V2: use cpu_to_le16 assign valid type according to Ajay's suggestions --- drivers/staging/wilc1000/host_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 50dc2dd942f5..20349af2ed30 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -447,8 +447,8 @@ void *wilc_parse_join_bss_param(struct cfg80211_bss *bss, if (!param) return NULL; - param->beacon_period = bss->beacon_interval; - param->cap_info = bss->capability; + param->beacon_period = cpu_to_le16(bss->beacon_interval); + param->cap_info = cpu_to_le16(bss->capability); param->bss_type = WILC_FW_BSS_TYPE_INFRA; param->ch = ieee80211_frequency_to_channel(bss->channel->center_freq); ether_addr_copy(param->bssid, bss->bssid); -- 2.11.0