From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [net-next PATCH 1/2] mlxsw: spectrum_kvdl: use div_u64() for 64-bit division Date: Mon, 26 Feb 2018 11:33:23 -0500 (EST) Message-ID: <20180226.113323.393948046273779787.davem@davemloft.net> References: <20180223131540.1065413-1-arnd@arndb.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: arkadis@mellanox.com, jiri@mellanox.com, idosch@mellanox.com, weiyongjun1@huawei.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: arnd@arndb.de Return-path: In-Reply-To: <20180223131540.1065413-1-arnd@arndb.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Arnd Bergmann Date: Fri, 23 Feb 2018 14:15:31 +0100 > Calculating the number of entries now uses 64-bit arithmetic that > causes a link error on 32-bit architectures: > > drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.o: In function `mlxsw_sp_kvdl_init': > spectrum_kvdl.c:(.text+0x51c): undefined reference to `__aeabi_uldivmod' > > We could probably use a 32-bit division here as before, but since this is > not in a performance critical path, div_u64() seems cleaner here. > > Fixes: 887839e6960d ("mlxsw: spectrum_kvdl: Add support for dynamic partition set") > Signed-off-by: Arnd Bergmann Applied.