On Mon, Jun 12, 2017 at 10:45:38PM +0530, sunil.m@xxxxxxxxxxxx wrote: > From: Suniel Mahesh <sunil.m@xxxxxxxxxxxx> > > The following type mismatch warnings reported by sparse > have been amended: > warning: cast to restricted __le16 > warning: incorrect type in assignment (different base types) > > Signed-off-by: Suniel Mahesh <sunil.m@xxxxxxxxxxxx> > --- > drivers/staging/wlan-ng/prism2mgmt.c | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c > index f4d6e48..358b556 100644 > --- a/drivers/staging/wlan-ng/prism2mgmt.c > +++ b/drivers/staging/wlan-ng/prism2mgmt.c > @@ -185,7 +185,7 @@ int prism2mgmt_scan(struct wlandevice *wlandev, void *msgp) > > /* set up the txrate to be 2MBPS. Should be fastest basicrate... */ > word = HFA384x_RATEBIT_2; > - scanreq.tx_rate = cpu_to_le16(word); > + scanreq.tx_rate = (__force u16)cpu_to_le16(word); If you ever find yourself using __force, it is almost always the wrong solution. Please step back and understand what is going on here before making a change like this. good luck! greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel