From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (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 49F6930FF20 for ; Tue, 27 Jan 2026 12:35:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769517331; cv=none; b=FWtXSop9SKZkt60ZFqSSbIDec+522fqV/8BB8oZlCRVcHwErR6zIhj3XNZVjnPvfzbI9xPcaQKxnsj39xy8Cy1NM/5sVKNOxBOsQw5/Pre77+1NFSNNVTbpfiloVhPzNgiZOPTo8scq2v7v6H8hGrV4Xz6bwIxuDP0Cz7w6wTtg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769517331; c=relaxed/simple; bh=CuvpcluLyNLc6SVhyS/gTS6TYlFSi/9ZuOs6HBvdp0Q=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DKPUDyOqNxtFUjEWHMWgmR1awI6ZMDwVwhz9j1iywBPjYZtwDcEVbPG2Ji8DqJ7JRf2OrjJKBzC/l3s3JktENMsAucmuA3MkpuzcS8wkS390KU/TWG+M+REN7RnfazybVp4Ctgf4wuUgrpj8Wyl0Xl1+47sVwX8SSee9Y+3X1FI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=Iz7BLs76; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Iz7BLs76" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1769517328; bh=CuvpcluLyNLc6SVhyS/gTS6TYlFSi/9ZuOs6HBvdp0Q=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Iz7BLs76YwfKgDYYLs8xYBwZik6ELyr7gTIB3oUT/ZrsVwPHehi/0QUlYWgHW6SO0 MBe5tKWu29E+lE2mjjqG27EL2n2c+M7wurOz3Zjb+/O8kmaD3Ql1nezp0Rw1wObF/h 6h+deiJvICMByHJtGEJVYwDRrv/IviolpyE2KW5HNQw3jaG4+4PCiui472qUR5hJRz wv2Qz3eM2epsmrWHX+RZXsDJJZ1pcsstWsfE3zfZDsg/lvGy+gKew/+O+rjP1uFwOc JQGrhLCqIiFj7XuJNEcoARP9+cJ4b6DYbToj/UXoN1N3O3ZzqrD7M4lsWU+pq1XfqN KcS9i0uVfBg6Q== Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by bali.collaboradmins.com (Postfix) with ESMTPSA id DD18E17E0182; Tue, 27 Jan 2026 13:35:27 +0100 (CET) Message-ID: <9abe64bb-a398-4e8e-ac7e-397fee0eded5@collabora.com> Date: Tue, 27 Jan 2026 13:35:27 +0100 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 v5 1/4] uapi: Provide DIV_ROUND_CLOSEST() To: Cristian Ciocaltea , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Sandy Huang , =?UTF-8?Q?Heiko_St=C3=BCbner?= , Andy Yan , Louis Chauvet , Haneen Mohammed , Melissa Wen Cc: Robert Mader , kernel@collabora.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Diederik de Haas References: <20260127-rk3588-bgcolor-v5-0-b25aa8613211@collabora.com> <20260127-rk3588-bgcolor-v5-1-b25aa8613211@collabora.com> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <20260127-rk3588-bgcolor-v5-1-b25aa8613211@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Il 27/01/26 09:45, Cristian Ciocaltea ha scritto: > Currently DIV_ROUND_CLOSEST() is only available for the kernel via > include/linux/math.h. > > Expose it to userland as well by adding __KERNEL_DIV_ROUND_CLOSEST() as > a common definition in uapi. > > Additionally, ensure it allows building ISO C applications by switching > from the 'typeof' GNU extension to the ISO-friendly __typeof__. > > Reviewed-by: NĂ­colas F. R. A. Prado > Tested-by: Diederik de Haas > Signed-off-by: Cristian Ciocaltea Reviewed-by: AngeloGioacchino Del Regno