Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1359600lqa; Mon, 29 Apr 2024 06:34:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGKwCHBLb9ay7/wX8X1sKXL9QtKZDJwbIYAYGQmfSxDwvc1lvuaOVBwTazezZKSae5oMZE8tfwPEgt296gqlJvadDZU1CLxfGjZjK8wQ== X-Google-Smtp-Source: AGHT+IFyLHif95hNb6Aq4WVtBmZHqrGJfeNdbl/hRiU7TrD9qpXnHPmoI8/HjtIyRT2w2nCRwBns X-Received: by 2002:a17:902:e852:b0:1e5:2883:6ff6 with SMTP id t18-20020a170902e85200b001e528836ff6mr12561198plg.11.1714397685253; Mon, 29 Apr 2024 06:34:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714397685; cv=pass; d=google.com; s=arc-20160816; b=gnQSDRsqcdYjaorA8+1fnBbSs3exlhmHphekgYDveviW14QGcjLhuLeXfW6Laok3o+ kMoIj7RL4LuaolBkLJgc52b1r66XhwN5C8aiJ0/tVnRVshwcYV54qwEfwVQ9NwfHCqPs h3xwjhGLnEKPhBheQWVpAox7Amwff2QJx0AaClTzwkpPcWIwVDuSBfLutDAzve7GRvKd P+8cWs64VUJGhP8CjKw7DijAQ4EATnEdBmmqkCPnYWfL6e7gzckftPWBqyJpKgMWUqKe hnI6YeGiNNXN1Xy7Bm324X4l0Q1ExmPUEZEu5eNWHna0rSWmpoCSKCtoZkXMBw8RMgLE c1cw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:date:references:in-reply-to:subject:cc:to :from:dkim-signature; bh=HuwXgW7NAThksSmhg4hTLGW7Yhe5mn6OoO0PefRhC5U=; fh=th3QfjSKDYZZfK9gOKtb+EO8uVz1BcM/F3ULK1RrF7Y=; b=svTf40YzJMLgvqXx9+B9qGMhYx01/ADc7++z+DG+Yxlvsvnlwxs5yLzoHUskLmu/WG Pg+pRA7qgvxvOxGKX4+XtX2JlVMG5j7Gp4PfnUf/37PMe3dbphWY74cQ8FSPaCBWwB+V 2SU0Xx4FghT+tv1iVB6ZLPpfi2sLP6C7CqiEvkJoQslrcC0t3uFKKi1zT0WgWff4sPYw OC65cGu33xUYWyCPyj/BLsDbBw23kc6pZYKi/bHprmWJ3IPyCIRlIeIM+wi0WpSMtaWV nvITnaL0MLvwjhjjowy7B7ydkB2XqQBSgjI3yaPnGvKn5A30DWC3FES4ZJG0P5OFDVQB m/IA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QyBy3Dqw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-162367-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162367-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h15-20020a170902680f00b001e3d54989adsi19269213plk.62.2024.04.29.06.34.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 06:34:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162367-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QyBy3Dqw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-162367-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162367-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4B19628C6E4 for ; Mon, 29 Apr 2024 13:27:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47F9467A14; Mon, 29 Apr 2024 13:27:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QyBy3Dqw" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 737A142055 for ; Mon, 29 Apr 2024 13:27:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714397267; cv=none; b=p3mIwOWdb7KrhpNGFo6g6xQigY9SptLdfduoyAryzuNAiQNtwpVF/joZoGmH4mJ4Plxg7+Zik2I8FttXpvVFlMRhyNFradUFhn36OzQWUz41VLU7wBclMyPSRd9k2K+mgtdj+RuPNN1w3xijWD2onsVRLdtQIaQHrcNbkhi7dxg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714397267; c=relaxed/simple; bh=WiGmI+j0Enf5O5AlJU8LIZQyCZ6bZpihfhCn3RhotIQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=lSjINcwanY0LPVbEKvoSruJiOQR9G2LIheey7S0XqV6Gg9mT0/bc4HmOgCdw657/+gMGV7anuvRcyVjpEHlyDnTVsSO77D9/5iOoP0QsOqNZSw3nZ446rNo9gU/Pn/f8kvbKcMNvhjB1exlj8fovs4jIWv8Ovj2BOo2nBN9ekTQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QyBy3Dqw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B657FC113CD; Mon, 29 Apr 2024 13:27:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714397267; bh=WiGmI+j0Enf5O5AlJU8LIZQyCZ6bZpihfhCn3RhotIQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=QyBy3DqwzwIbe4F03tqVf+oGEqmzEU4W+e6WfaZqVy/mt+O90331rfXABnFsQvCRv iVZd1ZC0cyMoLGOdAQRLP4aF3hEIxA1PSMrhQwUYxKQ5LRlCsSu2xKfL+xAYtuP/Op nf/IwspCNSmN8anjeS9+BaNGnDsKSBYGjipFQEXm53nTmoKNsBwZpaQqwue3QR93r4 dn5PY4RvxipgY81ge2k2I+4int4C5vZp2DGsCOECM3KRMZHhJeNgQzRwAHJgPjP/w9 5pkOr69XhejhroptfUODhKhQ7vgvb2qGdgURmCEZ20h1E0cGFovZK54+Q8JwV0fono 2fbxBALUz/GMw== From: Pratyush Yadav To: Michael Walle Cc: Tudor Ambarus , Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Dan Carpenter , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: spi-nor: replace unnecessary div64_u64() with div_u64() In-Reply-To: <20240429121113.803703-1-mwalle@kernel.org> (Michael Walle's message of "Mon, 29 Apr 2024 14:11:13 +0200") References: <20240429121113.803703-1-mwalle@kernel.org> Date: Mon, 29 Apr 2024 15:27:44 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Hi, On Mon, Apr 29 2024, Michael Walle wrote: > Both occurences of div64_u64() just have a u8 or u32 divisor. Use > div_u64() instead. Does this improve performance or is this only for correctness? Patch LGTM otherwise. Reviewed-by: Pratyush Yadav BTW, I also noticed that there is a do_div() call in spi_nor_write() that also uses a u64 dividend and u32 divisor. I was wondering why it uses do_div() and not div_u64() (I am not sure what the difference between the two is) but I suppose it doesn't matter much since your spring cleaning series will delete that code anyway. -- Regards, Pratyush Yadav