2021-02-10 01:44:30

by Rikard Falkeborn

[permalink] [raw]
Subject: [PATCH 0/3] drm/ttm: constify static vm_operations_structs

Constify a few static vm_operations_struct that are never modified. Their
only usage is to assign their address to the vm_ops field in the
vm_area_struct, which is a pointer to const vm_operations_struct. Make them
const to allow the compiler to put them in read-only memory.

With this series applied, all static struct vm_operations_struct in the
kernel tree are const.

Rikard Falkeborn (3):
drm/amdgpu/ttm: constify static vm_operations_struct
drm/radeon/ttm: constify static vm_operations_struct
drm/nouveau/ttm: constify static vm_operations_struct

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +-
drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

--
2.30.0


2021-02-10 08:46:15

by Christian König

[permalink] [raw]
Subject: Re: [PATCH 0/3] drm/ttm: constify static vm_operations_structs

Reviewed-by: Christian König <[email protected]> for the series.

Am 10.02.21 um 00:48 schrieb Rikard Falkeborn:
> Constify a few static vm_operations_struct that are never modified. Their
> only usage is to assign their address to the vm_ops field in the
> vm_area_struct, which is a pointer to const vm_operations_struct. Make them
> const to allow the compiler to put them in read-only memory.
>
> With this series applied, all static struct vm_operations_struct in the
> kernel tree are const.
>
> Rikard Falkeborn (3):
> drm/amdgpu/ttm: constify static vm_operations_struct
> drm/radeon/ttm: constify static vm_operations_struct
> drm/nouveau/ttm: constify static vm_operations_struct
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +-
> drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +-
> drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>

2021-02-10 13:18:15

by Daniel Vetter

[permalink] [raw]
Subject: Re: [PATCH 0/3] drm/ttm: constify static vm_operations_structs

On Wed, Feb 10, 2021 at 08:45:56AM +0100, Christian K?nig wrote:
> Reviewed-by: Christian K?nig <[email protected]> for the series.

Smash it into -misc?
-Daniel

>
> Am 10.02.21 um 00:48 schrieb Rikard Falkeborn:
> > Constify a few static vm_operations_struct that are never modified. Their
> > only usage is to assign their address to the vm_ops field in the
> > vm_area_struct, which is a pointer to const vm_operations_struct. Make them
> > const to allow the compiler to put them in read-only memory.
> >
> > With this series applied, all static struct vm_operations_struct in the
> > kernel tree are const.
> >
> > Rikard Falkeborn (3):
> > drm/amdgpu/ttm: constify static vm_operations_struct
> > drm/radeon/ttm: constify static vm_operations_struct
> > drm/nouveau/ttm: constify static vm_operations_struct
> >
> > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +-
> > drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +-
> > drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
> > 3 files changed, 3 insertions(+), 3 deletions(-)
> >
>

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

2021-02-23 20:33:34

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH 0/3] drm/ttm: constify static vm_operations_structs

On Wed, Feb 10, 2021 at 8:14 AM Daniel Vetter <[email protected]> wrote:
>
> On Wed, Feb 10, 2021 at 08:45:56AM +0100, Christian König wrote:
> > Reviewed-by: Christian König <[email protected]> for the series.
>
> Smash it into -misc?

@Christian Koenig did these ever land? I don't see them in drm-misc.

Alex

> -Daniel
>
> >
> > Am 10.02.21 um 00:48 schrieb Rikard Falkeborn:
> > > Constify a few static vm_operations_struct that are never modified. Their
> > > only usage is to assign their address to the vm_ops field in the
> > > vm_area_struct, which is a pointer to const vm_operations_struct. Make them
> > > const to allow the compiler to put them in read-only memory.
> > >
> > > With this series applied, all static struct vm_operations_struct in the
> > > kernel tree are const.
> > >
> > > Rikard Falkeborn (3):
> > > drm/amdgpu/ttm: constify static vm_operations_struct
> > > drm/radeon/ttm: constify static vm_operations_struct
> > > drm/nouveau/ttm: constify static vm_operations_struct
> > >
> > > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +-
> > > drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +-
> > > drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
> > > 3 files changed, 3 insertions(+), 3 deletions(-)
> > >
> >
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2021-02-26 07:55:18

by Christian König

[permalink] [raw]
Subject: Re: [PATCH 0/3] drm/ttm: constify static vm_operations_structs

Am 23.02.21 um 18:31 schrieb Alex Deucher:
> On Wed, Feb 10, 2021 at 8:14 AM Daniel Vetter <[email protected]> wrote:
>> On Wed, Feb 10, 2021 at 08:45:56AM +0100, Christian König wrote:
>>> Reviewed-by: Christian König <[email protected]> for the series.
>> Smash it into -misc?
> @Christian Koenig did these ever land? I don't see them in drm-misc.

I've just pushed them to drm-misc-next. Sorry for the delay, totally
forgot about them.

Christian.

>
> Alex
>
>> -Daniel
>>
>>> Am 10.02.21 um 00:48 schrieb Rikard Falkeborn:
>>>> Constify a few static vm_operations_struct that are never modified. Their
>>>> only usage is to assign their address to the vm_ops field in the
>>>> vm_area_struct, which is a pointer to const vm_operations_struct. Make them
>>>> const to allow the compiler to put them in read-only memory.
>>>>
>>>> With this series applied, all static struct vm_operations_struct in the
>>>> kernel tree are const.
>>>>
>>>> Rikard Falkeborn (3):
>>>> drm/amdgpu/ttm: constify static vm_operations_struct
>>>> drm/radeon/ttm: constify static vm_operations_struct
>>>> drm/nouveau/ttm: constify static vm_operations_struct
>>>>
>>>> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +-
>>>> drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +-
>>>> drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
>>>> 3 files changed, 3 insertions(+), 3 deletions(-)
>>>>
>> --
>> Daniel Vetter
>> Software Engineer, Intel Corporation
>> https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.ffwll.ch%2F&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C9d730e56efe54d3215ee08d8d820d642%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637496982837619645%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=b4UU8bzeX%2Ba1VfObe8mta7fwtjVv%2F1wo4%2FPVuGZFW8Q%3D&amp;reserved=0
>> _______________________________________________
>> dri-devel mailing list
>> [email protected]
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fdri-devel&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C9d730e56efe54d3215ee08d8d820d642%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637496982837629638%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=RKJh6p%2BTxaD0lH6M%2B0s3nah3tBatRFqoTvy3Mh7Lz5M%3D&amp;reserved=0