Re: [PATCH] drm/msm: remove some dead code

From: Dmitry Baryshkov

Date: Thu Jan 15 2026 - 16:05:55 EST


On Thu, 08 Jan 2026 22:57:22 +0300, Dan Carpenter wrote:
> This is supposed to test for integer overflow but it is wrong and
> unnecessary. The size_add()/mul() macros return SIZE_MAX when there is
> an integer overflow. This code saves the SIZE_MAX to a u64 and then
> tests if the result is greater than SIZE_MAX which it never will be.
> Fortunately, when we try to allocate SIZE_MAX bytes the allocation
> will fail. We even pass __GFP_NOWARN so the allocation fails
> harmlessly and quietly.
>
> [...]

Applied to msm-next, thanks!

[1/1] drm/msm: remove some dead code
https://gitlab.freedesktop.org/lumag/msm/-/commit/37d2e108de4d

Best regards,
--
With best wishes
Dmitry