Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2983981pxb; Fri, 12 Feb 2021 06:32:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0bdkwxa7wuK/FBRsUTzcsCdqslMW7ksWAAZk6A3dJpW4Luz9HmVkwZHCJUQq/0HUXUPwy X-Received: by 2002:a17:906:2bd7:: with SMTP id n23mr3343636ejg.502.1613140344722; Fri, 12 Feb 2021 06:32:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1613140344; cv=pass; d=google.com; s=arc-20160816; b=GGFx6dJAZYiraX18DkIDPOtseXQ/UsrFt/Rzi919Fuvg7uHYRegQnWOnab6hrB5J9N H80P4SlYJANTlzaN992NObI4e9qiuisLe4jcAGT6GSNqE3uBy0bIHg5r0g8R4MJrKSjB Gsg/fVZVJkbjHDZgLEXzoZMw05/C34ChcFVfhgcIc2J9X1iHEbtEH//5aTuxlbvmrC/g 724JeqHbix05BP3pDq2rzqwRPssuhIaPhegBEkc0aZDYovBKBR98E3MA+oQbNxlyM1mR 7ZDedDKQehydEqPRBlE46rxNe3bwEaFKMy9/BufaUPHb8zAG7qh3pngaOHU6ZSfarDza w6qQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Q8O5Qs3111yoIb9wYiJMFK7cbtbsKWkl/sUb8tdzYTg=; b=ck3O2e+LwFerVksciQqC/tJ31TyUCyNvnyoC/RhybBYDCHUVJH8pfVu5TSY7NeX2+Z V1HTagXSKcliJ1+xuLSvc1bYkmmaNYTLfK/WNqYEMMC8ny5H+dTFGeC/11Hfpwj0fbqX VmIWwKi8WzYrHoHPPHlHEYI/fcqrUyWz8ZLeT2MjVWs+t5A3HoIl354MSyGVj7KKmINk V9bD4kw1C0NXxMl1OkxuI+BjbkjY2d1IAtSLhlpVxQGTHwHkjGiTE69zCIfodGQ4vZMW 9xz7U1mX5ZnbajqT7F7FUNzuxzXXfghlltgjTMASXybTpFKuSHRySCkkpxAdj7uVTUlc 7m7g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@anirudhrb.com header.s=zoho header.b=oErKEv2O; arc=pass (i=1 spf=pass spfdomain=anirudhrb.com dkim=pass dkdomain=anirudhrb.com dmarc=pass fromdomain=anirudhrb.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hk6si6321077ejb.204.2021.02.12.06.31.58; Fri, 12 Feb 2021 06:32:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@anirudhrb.com header.s=zoho header.b=oErKEv2O; arc=pass (i=1 spf=pass spfdomain=anirudhrb.com dkim=pass dkdomain=anirudhrb.com dmarc=pass fromdomain=anirudhrb.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229583AbhBLOb3 (ORCPT + 99 others); Fri, 12 Feb 2021 09:31:29 -0500 Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21303 "EHLO sender4-of-o53.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229558AbhBLOb2 (ORCPT ); Fri, 12 Feb 2021 09:31:28 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1613140236; cv=none; d=zohomail.com; s=zohoarc; b=Ondve+616aga3AP+JJu9qmuv9Y4zDGq37O7hDNUoa5d/GbqXgPHlhsFJHf8P0o/Vu0S1eZBTMK3Mr28sASaFggYICAveYCwPU75K4fhX5vV/F7BZpAR5UaPg1dD/fzsxik3sbdfsR7Jv54HO9Xo+273OKkJVLwFpKWBxwq4/L9w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613140236; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=Q8O5Qs3111yoIb9wYiJMFK7cbtbsKWkl/sUb8tdzYTg=; b=bw1doOuHka2+cOHF/fO3vFUdGUR/LSQAWM2GNzy0/rAkMpOkq8ibsHuAQGwosA+ATf0OdY1BJgO/YomsGQqACzztSSD4IizUD4HfpcikQFb584SAlt7TolOWkKlr2bKi2wFNH10APcCwEDn3YyV0JOd9Jy0foprnhHLmVY83Q5k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=anirudhrb.com; spf=pass smtp.mailfrom=mail@anirudhrb.com; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1613140236; s=zoho; d=anirudhrb.com; i=mail@anirudhrb.com; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:In-Reply-To; bh=Q8O5Qs3111yoIb9wYiJMFK7cbtbsKWkl/sUb8tdzYTg=; b=oErKEv2OVnJC35kqOKFhd3R34X/1p7jVTlqT5SgD1C1AwVG/91y4GktQEOer9nUa +sK8sQ0JGs8abhekaaSHJHtIqQPuzwHD/4slS6L+9R7QL6XukmLK2GIntUsyfGoB+B4 svfOdOq00JOtITE39F9JQNk+9m0zehNH87FA5Ldo= Received: from anirudhrb.com (106.51.107.38 [106.51.107.38]) by mx.zohomail.com with SMTPS id 1613140233736897.9350951376649; Fri, 12 Feb 2021 06:30:33 -0800 (PST) Date: Fri, 12 Feb 2021 20:00:25 +0530 From: Anirudh Rayabharam To: Greg KH Cc: lee.jones@linaro.org, kuba@kernel.org, johannes@sipsolutions.net, colin.king@canonical.com, arnd@arndb.de, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: wimax/i2400m: fix some byte order issues found by sparse Message-ID: References: <20210211202908.4604-1-mail@anirudhrb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ZohoMailClient: External Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 11, 2021 at 09:35:27PM +0100, Greg KH wrote: > On Fri, Feb 12, 2021 at 01:59:08AM +0530, Anirudh Rayabharam wrote: > > Fix sparse byte-order warnings in the i2400m_bm_cmd_prepare() > > function: > > > > wimax/i2400m/fw.c:194:36: warning: restricted __le32 degrades to integer > > wimax/i2400m/fw.c:195:34: warning: invalid assignment: += > > wimax/i2400m/fw.c:195:34: left side has type unsigned int > > wimax/i2400m/fw.c:195:34: right side has type restricted __le32 > > wimax/i2400m/fw.c:196:32: warning: restricted __le32 degrades to integer > > wimax/i2400m/fw.c:196:47: warning: restricted __le32 degrades to integer > > wimax/i2400m/fw.c:196:66: warning: restricted __le32 degrades to integer > > > > Signed-off-by: Anirudh Rayabharam > > --- > > drivers/staging/wimax/i2400m/fw.c | 14 +++++++++----- > > 1 file changed, 9 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/staging/wimax/i2400m/fw.c b/drivers/staging/wimax/i2400m/fw.c > > index b2fd4bd2c5f9..bce651a6b543 100644 > > --- a/drivers/staging/wimax/i2400m/fw.c > > +++ b/drivers/staging/wimax/i2400m/fw.c > > @@ -189,12 +189,16 @@ void i2400m_bm_cmd_prepare(struct i2400m_bootrom_header *cmd) > > { > > if (i2400m_brh_get_use_checksum(cmd)) { > > int i; > > - u32 checksum = 0; > > + __le32 checksum = 0; > > __le32 is only for when the data crosses the kernel/user boundry, just > use le32 in the kernel for stuff like this. > But that throws a compile error. Also, I don't see le32 defined in any common header. It is defined in fs/ntfs/types.h but that's not accessible here. > > const u32 *checksum_ptr = (void *) cmd->payload; > > Add a blank line here, right? It wasn't there before but makes sense. I'll send v2 with this change. Thanks! - Anirudh.