[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tl4a27hxop6avr25bimieet4zcoy35lvmt6rmqe74wdg6si4lk@vlm4osda5y53>
Date: Thu, 8 Jan 2026 22:26:57 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Rob Clark <robin.clark@....qualcomm.com>,
Dmitry Baryshkov <lumag@...nel.org>,
Abhinav Kumar <abhinav.kumar@...ux.dev>,
Jessica Zhang <jesszhan0024@...il.com>, Sean Paul <sean@...rly.run>,
Marijn Suijten <marijn.suijten@...ainline.org>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
freedreno@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] drm/msm: remove some dead code
On Thu, Jan 08, 2026 at 10:57:22PM +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.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
> drivers/gpu/drm/msm/msm_gem_vma.c | 8 +-------
> 1 file changed, 1 insertions(+), 7 deletions(-)
Fixes: 2e6a8a1fe2b2 ("drm/msm: Add VM_BIND ioctl")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
--
With best wishes
Dmitry
Powered by blists - more mailing lists