Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1999900pxj; Sun, 13 Jun 2021 05:35:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweDAN0056XjpsWkjB+MXabX9gejRw1KFbin0YovseegNPzMOcwY6vdclQ2entmnTcGh1xu X-Received: by 2002:a17:906:c2d6:: with SMTP id ch22mr11265548ejb.227.1623587748617; Sun, 13 Jun 2021 05:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623587748; cv=none; d=google.com; s=arc-20160816; b=HLJCH62zHft1p6rUrXGXieTnaR6CqbTVl1sZRiejyvYJICx98msiDHv8ysABXT6ChR FJ+6uP325jXysecW3pjnqVP8QZDuwQyMYivnYnNjXpv8emb4rhIBVfrSeRQ+8xWvbmZH Y7hu+D2CpVZfJNmaOv4125SV8kLcSYepvY09ghArpHbeulQ+x3WuSJljIVYOi1LjqF1c 8+lI7CHnDxl2V9gKDNc+F5tw5QZiFEiG/wTjHGLFrZYqlrHxBn9EdLxFUO88riv6RtNq teaxfrPXLvVS20umDQlpfKT6mO9PXfBcIYMEAxb0PazKg4jyc7wKQvjvZU8b/q6WU8aM Bp5w== ARC-Message-Signature: i=1; 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=R49fAV5Y0VB8T9HiDBR2wkAFnrKXBsHpgSTG3UwwW4E=; b=Ow8gTp+Fa1SAUz8e7ZyWVlkV9Qaw5CwJ6bGvvEfd5HeUb9r1wNJjhs36jGmJfODuxt JUeFw7xqVyFGD+WAkTiBZEq0rJVsqolAp9Hu+bxQrPk2kRTKuSngElDj/Dr05WTeWG5e z5oR1Ab2zRgT3vxc50IQex7A++1tQBRk4IS69dgKN3ACG0pBIF/bC+gvbCnFB4gDa/02 twWZrVu8r1cdbYG9CGLWRVNMFjBvjFY/ylNgN/wu+zHU46ysT2V/ut28wESIypDqLHl4 3QUvmNe5cKPWce9QtJFPeUhrFuwlgyimR7A8zfGJadnDqXncTkC1cJvntefSH7bR8JmE 1Z7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=u9JyDikh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bh7si9141881ejb.383.2021.06.13.05.35.25; Sun, 13 Jun 2021 05:35:48 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=u9JyDikh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231760AbhFMMgg (ORCPT + 99 others); Sun, 13 Jun 2021 08:36:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:46378 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231733AbhFMMgf (ORCPT ); Sun, 13 Jun 2021 08:36:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7B9E96120E; Sun, 13 Jun 2021 12:34:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623587660; bh=Uo6KONhUM11rl9mF6xj85ye4nwHE9oZO9QBwRDhb8p4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=u9JyDikhxDstULDFDS0ugvs71ttab4Nqo2saxD5cWbYp65d48E5YVyZ2vr1w3m2T3 yEoic68Qzhb9u2+8hhI4YoPs5SOkkmXmHBhI5vbJx0aR24TZDVdoCfJbqNevWyvu7Y eM6oX2KiYQErdnlSgjs2JuLL0FfHuBM9VRPN4210= Date: Sun, 13 Jun 2021 14:34:17 +0200 From: Greg KH To: Jhih-Ming Huang Cc: fabioaiuto83@gmail.com, ross.schm.dev@gmail.com, maqianga@uniontech.com, marcocesati@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] rtw_security: fix cast to restricted __le32 Message-ID: References: <20210613122858.1433252-1-fbihjmeric@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210613122858.1433252-1-fbihjmeric@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 13, 2021 at 08:28:58PM +0800, Jhih-Ming Huang wrote: > This patch fixes the sparse warning of fix cast to restricted __le32. > > Last month, there was a change for replacing private CRC-32 routines with > in-kernel ones. > In that patch, we replaced getcrc32 with crc32_le in calling le32_to_cpu. > le32_to_cpu accepts __le32 type as arg, but crc32_le returns unsigned int. > That how it introduced the sparse warning. As crc32_le returns a u32 which is in native-endian format, how can you cast it to le32? Why do you cast it to le32? Isn't that going to be incorrect for big endian systems? thanks, greg k-h