Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3517416imu; Mon, 7 Jan 2019 04:59:03 -0800 (PST) X-Google-Smtp-Source: ALg8bN7DIaCmdTRT2gMO7Bm6tp0WsbPc0bXY38KBiF4RmXvMV5aDMIEnuOzuT/O6BrrXgj0aw2Kt X-Received: by 2002:a63:42c1:: with SMTP id p184mr10785677pga.202.1546865943763; Mon, 07 Jan 2019 04:59:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546865943; cv=none; d=google.com; s=arc-20160816; b=Xx6py8KzrpGvYy/cJWgiMlzxSyTuLPdKYCv0ZDSRf4+j9GapKaPX+fLRRp/Mw+sTdr obZ5dXv/ZQ4TpTkTgZHmRn45zsTr9LDCZk6Q1n5kXxCrgnLOxXFBvArMKdb6rxiwZYHl EOsVsA94DzzWVXPWC8CM8c7Fbscqe7qeesUZEUvJVPfqA2PXbec//dTmRZrvMLgdBfEB STcTp+X+8D2j7SNRdhk+KECMz7GqkE1HRjTXT6eznB3qpmwoaG36974/uhiN3xyMbDKw M6jF+79uklFMNK5uNSr2DivwI+sbXltJcIA9HWdvB/ynEeYhIIKLBDrRIx85cIOHf7ys UBnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=uz4LkBO1vBAjKUDA/RMmMBcHEt2I72G1OKaBaDKEfBE=; b=kQS1ntlq5UKWZXZKfKuS7IsPPJFm5e6FyAyYBD34REZBSnP/vR4kcC8X5I3AGnyufg 91FWnRiXl62aoPhYVVR78/v6bDuKoIL1BQ/4ExsdsHaZuenmEzE+O00COxlTH1shEwiY iM+AN4CJ5cE6/MD93hqaDn3xKoRYYQ0wem019FPnmw7KI2cCIzaJzNFRRjcBUdSu/npe arcaf21iTtAJwwx2xfE4kkOCHoCRP8aqr65EQfYSm/aHXq4EzEy4a39+nOot+UK0m+IX eOMhNWyLkJ52IKpbmtti1ZhMU+Lp9+lbORyPH6ayjpe0cDw05RJ2byvtlA4BQM/wQphq 2w5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=UCA9puy3; 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=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t17si19617112pfh.267.2019.01.07.04.58.47; Mon, 07 Jan 2019 04:59:03 -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=@oracle.com header.s=corp-2018-07-02 header.b=UCA9puy3; 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=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729261AbfAGMzq (ORCPT + 99 others); Mon, 7 Jan 2019 07:55:46 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:60954 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727022AbfAGMzn (ORCPT ); Mon, 7 Jan 2019 07:55:43 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id x07CnSss030048; Mon, 7 Jan 2019 12:55:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : content-transfer-encoding : in-reply-to; s=corp-2018-07-02; bh=uz4LkBO1vBAjKUDA/RMmMBcHEt2I72G1OKaBaDKEfBE=; b=UCA9puy3aEQtXmNRB+yUtFbvRRzYIp1qH58yIJlwfb3n3fIMSL45I/oLpeRXOW1qkRNy 0yfA4xm8usflhZDbPg3fgRj0vAYsEZnL5lZjUJl25mxuQz3sEUGqywSDLnLn37icl5zc zqDnq3e5WXR9IUWoMTwHtgvlqYX9Da7/OvVKbbuA+jOU9pYwv7NxwePE/+d/QBhFEiqi ohHx513+3nnOhHS6J+mc346VQw2WuaXUOrOiX8RAYpU1+x1vxYCswFQbNgz72ptSEaUt OVmzz/I/AmRJyG6BHHnF5xZ23neHB137urLB6YrLLcW0Lwykm6tiuzr1BwGmWjdvG/3G wA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2ptm0twk7s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 07 Jan 2019 12:55:36 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x07CtZfq013551 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Jan 2019 12:55:35 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x07CtZ3P013565; Mon, 7 Jan 2019 12:55:35 GMT Received: from kadam (/197.157.0.45) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 07 Jan 2019 04:55:34 -0800 Date: Mon, 7 Jan 2019 15:54:37 +0300 From: Dan Carpenter To: =?iso-8859-1?Q?J=FAlius?= Milan , kbuild test robot 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 Message-ID: <20190107125437.GA3200@kadam> References: <20190105082323.GA27838@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190105082323.GA27838@localhost.localdomain> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9128 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901070114 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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] > > Fixes: 147ccfd451024 ("staging: wilc1000: handle mgmt_frame_register ops from cfg82011 context") > Signed-off-by: J?lius Milan > --- > 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