Re: [PATCH v2 1/9] drm/vc4: Switch to container_of_const

2023-02-21 Thread Hans Verkuil
On 2/21/23 12:38, Maxime Ripard wrote: > Hi Hans, > > On Sat, Feb 18, 2023 at 11:45:04AM +0100, Hans Verkuil wrote: >>> diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c >>> index 86d629e45307..d0a00ed42cb0 100644 >>> --- a/drivers/gpu/drm/vc4/vc4_bo.c >>> +++ b/drivers/gpu/

Re: [PATCH v2 1/9] drm/vc4: Switch to container_of_const

2023-02-21 Thread Maxime Ripard
Hi Hans, On Sat, Feb 18, 2023 at 11:45:04AM +0100, Hans Verkuil wrote: > > diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c > > index 86d629e45307..d0a00ed42cb0 100644 > > --- a/drivers/gpu/drm/vc4/vc4_bo.c > > +++ b/drivers/gpu/drm/vc4/vc4_bo.c > > @@ -609,7 +609,7 @@ stat

Re: [PATCH v2 1/9] drm/vc4: Switch to container_of_const

2023-02-18 Thread Hans Verkuil
Hi Maxime, On 26/01/2023 14:46, Maxime Ripard wrote: > container_of_const() allows to preserve the pointer constness and is > thus more flexible than inline functions. > > Let's switch all our instances of container_of() to > container_of_const(). > > Signed-off-by: Maxime Ripard > --- > drive