linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Július Milan" <julikmilan@gmail.com>,
	"kbuild test robot" <lkp@intel.com>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
	gregkh@linuxfoundation.org, ajay.kathat@microchip.com,
	linux-wireless@vger.kernel.org, adham.abozaeid@microchip.com
Subject: Re: [PATCH] staging: wilc1000: fix cast to restricted __le32
Date: Mon, 7 Jan 2019 15:54:37 +0300	[thread overview]
Message-ID: <20190107125437.GA3200@kadam> (raw)
In-Reply-To: <20190105082323.GA27838@localhost.localdomain>

I'm sort of surprised that the zero day bot didn't complain about this.
It probably should.

The endianness checking is not turned on by default in Sparse.  You have
to do "make C=1 CF=-D__CHECK_ENDIAN__" to turn it on.

regards,
dan carpenter

On Sat, Jan 05, 2019 at 09:23:23AM +0100, Július Milan wrote:
> Fixes the following sparse warnings:
> 
> drivers/staging/wilc1000/host_interface.c:2360:30: warning:
>  incorrect type in assignment (different base types)
>     expected restricted __le32 [addressable] [assigned] [usertype] frame_type
>     got restricted __le16 [usertype] <noident>
> 
> Fixes: 147ccfd451024 ("staging: wilc1000: handle mgmt_frame_register ops from cfg82011 context")
> Signed-off-by: Július Milan <jmilan.dev@gmail.com>
> ---
>  drivers/staging/wilc1000/host_interface.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index 5dae6e7155d3..07c3d6293573 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -2357,7 +2357,7 @@ void wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)
>  	default:
>  		break;
>  	}
> -	reg_frame.frame_type = cpu_to_le16(frame_type);
> +	reg_frame.frame_type = cpu_to_le32(frame_type);
>  	result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
>  				      wilc_get_vif_idx(vif));
>  	if (result)
> -- 
> 2.14.5
> 
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2019-01-07 12:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-05  8:23 [PATCH] staging: wilc1000: fix cast to restricted __le32 Július Milan
     [not found] ` <CAP=P++A1LritztQ1=fHOE7XXJN_0TvNHEjh7tVrpDj1kYFrNTQ@mail.gmail.com>
2019-01-05  8:52   ` Greg KH
2019-01-07 12:54 ` Dan Carpenter [this message]
2019-01-07 13:23   ` Luc Van Oostenryck
2019-01-05  8:32 Július Milan

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=20190107125437.GA3200@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=adham.abozaeid@microchip.com \
    --cc=ajay.kathat@microchip.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=julikmilan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lkp@intel.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;
as well as URLs for NNTP newsgroup(s).