Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp281634rbe; Wed, 28 Feb 2024 22:01:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXU4F+a1Wn7MwvtHrz3Imp5mUhdZEwoWIbULrqqBaHhPL1YqOPOGNkB2Baky7wbLZM+49l8fL2vKlu3xrPbllS6AzSox3FMNYam2RURMw== X-Google-Smtp-Source: AGHT+IElunu3phhh0rvzTbh4SeyWtR2CLv+RQSd1u156zHmpoyfFR4JKHLuwss4kcMjxuYsktTx2 X-Received: by 2002:a05:620a:2186:b0:787:ec14:8537 with SMTP id g6-20020a05620a218600b00787ec148537mr1172364qka.41.1709186490640; Wed, 28 Feb 2024 22:01:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709186490; cv=pass; d=google.com; s=arc-20160816; b=REZqv45JByXgCOZmlbI/fdAH2xLMO8Q+OzA5zL5qgHcEjH9K5GLEzZ5owcuVtnhER9 0iWTrceI8k+sY5DB/vV7XH8SimhPalhzQ/78/fTi1rAKsQ4yhtWUhtgnnDdHo4ZivBlk qxQdkvvpp2mIR1JiQ4pC8Zfv4EENOssoStgg0Gpt5TMCPwqoPdP8Say72EPaoePvQMZX PnyZfiOOBFJoqbgyIie04dXtLRUbYfbe6AgdtOiWzFeIqHpjfUZduJOlHwlT3Cojw49T DG2AVS1XRAgBuaU8MGoe6iv9N68l/b5SQLT0tWX+HuD2ofPbv62k/CzRkOKgBgI/98RI CnCA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=QEuKH/6UaYJl1Hnh7XRGcIuXUwl+r1LjxXzwV62HuyM=; fh=++uh5oamkymai5PCLZwuTECmxamg8wZAWhcsVSHd9dY=; b=aXVsxD7Rku02HMkkE1bLQI73yqTE54gouCcETwM5pbDFU3JT79UITp7VcvwNWbem+o rnZYw4Rh29hFvHbYBXBaqEqM4MHdlmB3ZOdpeM1hLO7ZJVNaQlQZ27VWEbb1YlNcbDSI SCOQ7NHCtyRYpAV6+1t3ZDKm8CZlkQnz3w5Zf+YxRB102xfzt5MYu5Z4omzV+qP8ZCXn h7opy5HQTqkXMazkRWsb3gQuNR11L3Qnk7Q3ZVMUU+MXlH1PHpsTydMER1bWArAxnOWd Np5glysLkv9LJ0VluFR9DMPodBm1ForM6j+2TTHQxCaLOjrSoqGufGqHKjsjhqzx8gL3 MRCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=svmXMS1Y; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-86151-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86151-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id wh25-20020a05620a56d900b00787711230c3si751122qkn.512.2024.02.28.22.01.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 22:01:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86151-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=svmXMS1Y; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-86151-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86151-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 648921C219A3 for ; Thu, 29 Feb 2024 06:01:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1179F3BBFB; Thu, 29 Feb 2024 06:01:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="svmXMS1Y" 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.subspace.kernel.org (Postfix) with ESMTPS id 1047A3BBF8 for ; Thu, 29 Feb 2024 06:01:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709186485; cv=none; b=LKnA3qeiNM0X7+1d/7O05jMSkRjbCyuA8TQWCVot4ZKWAyXqj6cPPKjXBAM5N8OnFi8VhGZYgHskpn6ZQYeowOeftxO05WK1Zf245Qmqb3FlSA63QKc68muiBZanV9+wd+3f91ggrrGdlH9mGzVt3gSBqKMKtZByeT0H4Zg/F+0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709186485; c=relaxed/simple; bh=v+/7/M/RuPdphWURBIjWGwRpw8jH8l+KVqLoWubjNR8=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=nUKVpxCh5uHqSgemYYxaXahwIUK/on/t0oSAECApLXUJiS3hD459VFFEt0hJx+zbhh9yBUn4e14C+pzSlju8OWQaUQnKjcNwCBpRPyNnZcOtlL5rU4H1PGqgph8c0kvS1GeBYWr5I8DE0i6rz27QpyxEhtCrNL6T5j9nUGlp55M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=svmXMS1Y; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Cc:Content-ID:Content-Description; bh=QEuKH/6UaYJl1Hnh7XRGcIuXUwl+r1LjxXzwV62HuyM=; b=svmXMS1YKaYv59dF3qCqvwhRG9 v3qFPGJiCkQSGqM++SlB/0zlyuxZjVu2ls+SWrfVEc+fRPHImPecO4JOC3otKpRAVxa+G8mC2yPG8 2FfVfUHmRsj9Wab+rR5+Qoc55a4x0JWMDfm/JYyKKAO2T25DeWWz3dIBH12R6OjrC6yW0YqFmfWzu CDMSwPZbeJNWHOo8lLSEyZ0caZ7DEXpmcRLw9aNrH2enjFGv15mmkst2oEvk+7iz/kSGwPOvdigEp GVHOLyrIfqTNLIiHEm6YCEyDuUJ1IZ69n6J9sXCWCfgMwnoW+e/NKEFSZq0rZmgao6Pd8AyHry/VM HTJC3OIQ==; Received: from [50.53.50.0] (helo=[192.168.254.15]) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfZTo-0000000CE9N-28XB; Thu, 29 Feb 2024 06:01:16 +0000 Message-ID: Date: Wed, 28 Feb 2024 22:01:16 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] mtd: ubi: fix NVMEM over UBI volumes on 32-bit systems Content-Language: en-US To: Daniel Golle , Richard Weinberger , Zhihao Cheng , Miquel Raynal , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org References: From: Randy Dunlap In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/28/24 19:47, Daniel Golle wrote: > A compiler warning related to sizeof(int) != 8 when calling do_div() > is triggered when building on 32-bit platforms. > Address this by using integer types having a well-defined size. > > Fixes: 3ce485803da1 ("mtd: ubi: provide NVMEM layer over UBI volumes") > Signed-off-by: Daniel Golle > --- > v3: use size_t also for 'to_read' variable to avoid truncation > (no problem in practise beyond the compiler warning) > v2: use size_t for 'bytes_left' variable to match parameter type > > drivers/mtd/ubi/nvmem.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > Works for me. Thanks. Tested-by: Randy Dunlap -- #Randy