mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Ajay.Kathat@microchip.com>
To: <tsu.yubo@gmail.com>, <Adham.Abozaeid@microchip.com>,
	<gregkh@linuxfoundation.org>, <linux-kernel@vger.kernel.org>,
	<yuzibode@126.com>
Cc: <linux-wireless@vger.kernel.org>, <devel@driverdev.osuosl.org>
Subject: Re: [PATCH V2] staging: wilc1000: fix incorrent type assignment
Date: Tue, 26 Feb 2019 08:24:37 +0000	[thread overview]
Message-ID: <8bc95d6e-3350-a6a3-fb63-f9da9e0b8c0b@microchip.com> (raw)
In-Reply-To: <20190226072556.26745-1-tsu.yubo@gmail.com>

Thanks.

On 2/26/2019 12:55 PM, Bo YU wrote:
> 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 <tsu.yubo@gmail.com>

Reviewed-by: Ajay Singh <ajay.kathat@microchip.com>

> ---
> 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);
> 

      reply	other threads:[~2019-02-26  8:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26  7:25 Bo YU
2019-02-26  8:24 ` Ajay.Kathat [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8bc95d6e-3350-a6a3-fb63-f9da9e0b8c0b@microchip.com \
    --to=ajay.kathat@microchip.com \
    --cc=Adham.Abozaeid@microchip.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=tsu.yubo@gmail.com \
    --cc=yuzibode@126.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®