From patchwork Thu Aug 18 04:38:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12946762 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E45E9C00140 for ; Thu, 18 Aug 2022 04:40:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=FzFj7YbNro36SUNCQrH/h1pXdgJZHqA7oso8ySwBcek=; b=J1iEeEjK6qRJSb jV6C5XP6Iz7owt1F/o67d7cpupzghq7gZ/3+NTd445cdsopF1i0lv4+gy1fBiMksjkGwRj1GqF5VX Za2qbunEaj1iFQEZoJLJXQ2KpGg09P8O0FIZsuob/Sm5f4Gykus4AgSl3XGcrXyt61I6iJGeFH3bV rhq9FItIH/ye9jOU9oc4YeE6ha6SXjxMw0kNW05Lgyj0XI667u/arAFmQZGJbRG5C8N8fTCxJEBHG WalX7rsxEt90J37ULgU43ndt37lgtbtJuVIpwZVL/gzHfUJxB3U1XI9fL+VMwMJCep2tXDiDwrE96 ZxQ9Af08+ehAUcwQ+dDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOXJC-00EgCc-PI; Thu, 18 Aug 2022 04:39:06 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOXJ9-00Eg0l-13 for linux-arm-kernel@lists.infradead.org; Thu, 18 Aug 2022 04:39:04 +0000 Received: by mail-ej1-x62d.google.com with SMTP id kb8so1118396ejc.4 for ; Wed, 17 Aug 2022 21:39:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=yBqmSxAnRcpqm2zz2lw8eRpO4QXcSuMNWxiW1NaJjwA=; b=BCGfQPTgbND5UntMt01CBViwPYlvr3aykgQQ0zaAU4i0VCMB3wDiWH2BT8AUonyfa7 gt+ERfvJajWt053YMCsAiu8Jwtr/sYkOqd4Ub15XKDd4SYUra0p8vtYrEsCBHfmVHaGO kwwlGR4GKbAtov7vWGXJH/EJYwWkDTwXsOITpV/sBQe0sQWW/EhZN+Xh8vBBsQi1i0+s bhbb8i6y2rHp/lzHyYSiwjxOfdgwRTdDmMg0K6KyAQjivGdhJ9KXzBOSdMv7Q46FNTqv WcCYFOj2Qy5W+v20sKIMCFRho1fM6Py6K1hjcTlmg4PuWZFNm1AS3YlQ/KZWFIa2FpwC RW4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=yBqmSxAnRcpqm2zz2lw8eRpO4QXcSuMNWxiW1NaJjwA=; b=SxKHL5ZLGAED268a6CMXsAfD5pV2EpMIEwLsCHyqznr4MN428rZrd6Cgo30kKB2axz oNSJX+qfxFRi1481fAenWm7hNBXb96sXW6OLX3QdL9dwcTqlD3ENcBmxAdKkhho5W8Pl 3Ku3gRxwe4qosvDSNJUOcUECbaGoYmDQUbHwJ+mIev7YZbQ+7ZaZzbloC/CKYOqZGn5G n75qS8YVjt+mNwTIABm1FiD+997swOr+Pw5C2c6QkqEzABCyH3xEyE8jbgN0JJUnA8wY kSXItU+ZyPlOkAaR6N+wEQOHjyqvTwdzMf8pg3uk1Oq9vjQy8BnWEk42DrnizSD+GD8j gSjQ== X-Gm-Message-State: ACgBeo1Gmdke8FNXmDVFchnkzmdHYv0A6vOz/LWJNxmLsDOX2/Ruh9l5 pLTCCEN7Fe0xcLeQRaMCo2Q= X-Google-Smtp-Source: AA6agR7PkllIscon00WWO9oLgUxoi5xF6WfCjFW4Kg2XhNdBhRf6w7M85RrfgJRwg/RWVhqoCPoWqw== X-Received: by 2002:a17:907:6288:b0:72f:90ba:f0b2 with SMTP id nd8-20020a170907628800b0072f90baf0b2mr728137ejc.696.1660797539767; Wed, 17 Aug 2022 21:38:59 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id 5-20020a170906310500b00718e4e64b7bsm244738ejx.79.2022.08.17.21.38.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 21:38:59 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Srinivas Kandagatla Cc: Tom Rini , Ahmad Fatoum , linux-arm-kernel@lists.infradead.org, u-boot@lists.denx.de, linux-kernel@vger.kernel.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , kernel test robot Subject: [PATCH] nvmem: u-boot-env: fix crc32 casting type Date: Thu, 18 Aug 2022 06:38:37 +0200 Message-Id: <20220818043837.28698-1-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220817_213903_118854_F229C335 X-CRM114-Status: GOOD ( 12.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Rafał Miłecki This fixes: drivers/nvmem/u-boot-env.c:141:17: sparse: sparse: cast to restricted __le32 Reported-by: kernel test robot Fixes: f955dc1445069 ("nvmem: add driver handling U-Boot environment variables") Signed-off-by: Rafał Miłecki --- drivers/nvmem/u-boot-env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvmem/u-boot-env.c b/drivers/nvmem/u-boot-env.c index 9b9abfb8f187..fb993ef4249f 100644 --- a/drivers/nvmem/u-boot-env.c +++ b/drivers/nvmem/u-boot-env.c @@ -138,7 +138,7 @@ static int u_boot_env_parse(struct u_boot_env *priv) data_offset = offsetof(struct u_boot_env_image_redundant, data); break; } - crc32 = le32_to_cpu(*(uint32_t *)(buf + crc32_offset)); + crc32 = le32_to_cpu(*(__le32 *)(buf + crc32_offset)); crc32_data_len = priv->mtd->size - crc32_data_offset; data_len = priv->mtd->size - data_offset;