Re: [PATCH 0/9] drm/i915/gvt: Constify static structs

2021-12-12 Thread Rikard Falkeborn
On Fri, Dec 10, 2021 at 09:00:56AM +, Wang, Zhi A wrote: > On 12/4/2021 12:55 PM, Rikard Falkeborn wrote: > > Constify a number of static structs that are never modified to allow the > > compiler to put them in read-only memory. In order to do this, constify a > > numb

Re: [PATCH 7/9] drm/i915/gvt: Constify formats

2021-12-12 Thread Rikard Falkeborn
On Fri, Dec 10, 2021 at 08:20:22AM +, Wang, Zhi A wrote: > On 12/4/2021 12:55 PM, Rikard Falkeborn wrote: > > These are never modified, so make them const to allow the compiler to > > put them in read-only memory. WHile at it, make the description const > > char* since

[PATCH 7/9] drm/i915/gvt: Constify formats

2021-12-06 Thread Rikard Falkeborn
These are never modified, so make them const to allow the compiler to put them in read-only memory. WHile at it, make the description const char* since it is never modified. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/i915/gvt/fb_decoder.c | 24 1 file changed

[PATCH 6/9] drm/i915/gvt: Constify cmd_interrupt_events

2021-12-06 Thread Rikard Falkeborn
It is never modified, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/i915/gvt/cmd_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915

[PATCH 4/9] drm/i915/gvt: Constify intel_gvt_sched_policy_ops

2021-12-06 Thread Rikard Falkeborn
These are never modified, so make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/i915/gvt/sched_policy.c | 2 +- drivers/gpu/drm/i915/gvt/scheduler.h| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 3/9] drm/i915/gvt: Constify intel_gvt_irq_ops

2021-12-06 Thread Rikard Falkeborn
These are never modified, so make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/i915/gvt/interrupt.c | 10 +- drivers/gpu/drm/i915/gvt/interrupt.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff

[PATCH 0/9] drm/i915/gvt: Constify static structs

2021-12-06 Thread Rikard Falkeborn
structs are placed first in the series. Rikard Falkeborn (9): drm/i915/gvt: Constify intel_gvt_gtt_pte_ops drm/i915/gvt: Constify intel_gvt_gtt_pte_ops drm/i915/gvt: Constify intel_gvt_irq_ops drm/i915/gvt: Constify intel_gvt_sched_policy_ops drm/i915/gvt: Constify gvt_mmio_block drm/i915/gvt

[PATCH 9/9] drm/i915/gvt: Constify vgpu_types

2021-12-06 Thread Rikard Falkeborn
It is never modified, so make it const to allow the compiler to put it in read-only memory. While at it, make name a const char*. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/i915/gvt/vgpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt

[PATCH 1/9] drm/i915/gvt: Constify intel_gvt_gtt_pte_ops

2021-12-06 Thread Rikard Falkeborn
These are never modified, so make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/i915/gvt/gtt.c | 4 ++-- drivers/gpu/drm/i915/gvt/gtt.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 2/9] drm/i915/gvt: Constify intel_gvt_gtt_pte_ops

2021-12-06 Thread Rikard Falkeborn
These are never modified, so make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/i915/gvt/gtt.c | 62 +- drivers/gpu/drm/i915/gvt/gtt.h | 2 +- 2 files changed, 32 insertions(+), 32 deletions

[PATCH 5/9] drm/i915/gvt: Constify gvt_mmio_block

2021-12-06 Thread Rikard Falkeborn
These are never modified, so make them const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/i915/gvt/gvt.h | 2 +- drivers/gpu/drm/i915/gvt/handlers.c | 12 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH 8/9] drm/i915/gvt: Constify gtt_type_table_entry

2021-12-06 Thread Rikard Falkeborn
It is never modified, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/i915/gvt/gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c

[PATCH] drm/etnaviv: constify static struct cooling_ops

2021-11-28 Thread Rikard Falkeborn
The only usage of cooling_ops is to pass its address to thermal_of_cooling_device_register(), which takes a pointer to const struct thermal_cooling_device_ops as input. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/etnaviv

[PATCH] drm: msm: hdmi: Constify static structs

2021-09-20 Thread Rikard Falkeborn
-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c index a8f3b2cbfdc5..99c7853353fd 100644 --- a/drivers

[PATCH 1/3] drm/amdgpu/ttm: constify static vm_operations_struct

2021-02-09 Thread Rikard Falkeborn
The only usage of amdgpu_ttm_vm_ops is to assign its address to the vm_ops field in the vm_area_struct struct. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 2/3] drm/radeon/ttm: constify static vm_operations_struct

2021-02-09 Thread Rikard Falkeborn
The only usage of radeon_ttm_vm_ops is to assign its address to the vm_ops field in the vm_area_struct struct. Make it const to allow the compiler to put it in read-only memory Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 3/3] drm/nouveau/ttm: constify static vm_operations_struct

2021-02-09 Thread Rikard Falkeborn
The only usage of nouveau_ttm_vm_ops is to assign its address to the vm_ops field in the vm_area_struct struct. Make it const to allow the compiler to put it in read-only memory Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1

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

2021-02-09 Thread Rikard Falkeborn
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

[PATCH] drm/msm: dsi: Constify dsi_host_ops

2020-11-08 Thread Rikard Falkeborn
The only usage of dsi_host_ops is to assign its address to the ops field in the mipi_dsi_host struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 1 file changed, 1

[PATCH] drm: bridge: dw-hdmi: Constify dw_hdmi_i2s_ops

2020-10-05 Thread Rikard Falkeborn
The only usage of dw_hdmi_i2s_ops is to assign its address to the ops field in the hdmi_codec_pdata struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 2

[PATCH] drm/gma500: Constify static structs

2020-08-31 Thread Rikard Falkeborn
The only usage of these is to assign their address to the fbops field in the fb_info struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/gma500/framebuffer.c | 6 +++--- 1 file changed, 3

[PATCH 1/3] drm/amd/display: Constify dcn20_res_pool_funcs

2020-08-05 Thread Rikard Falkeborn
The only usage of dcn20_res_pool_funcs is to assign its address to a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] drm/sun4i: Constify static structs

2020-08-05 Thread Rikard Falkeborn
A number of static variables are not modified and can be made const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- Perhaps it should be split up? If so, some guidance on how would be appreciated. drivers/gpu/drm/sun4i/sun4i_backend.c | 2

[PATCH 2/3] drm/amd/display: Constify dcn21_res_pool_funcs

2020-08-05 Thread Rikard Falkeborn
The only usage of dcn21_res_pool_funcs is to assign its address to a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 3/3] drm/amd/display: Constify dcn30_res_pool_funcs

2020-08-05 Thread Rikard Falkeborn
The only usage of dcn30_res_pool_funcs is to assign its address to a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 0/3] drm/amd/display: Constify static resource_funcs

2020-08-05 Thread Rikard Falkeborn
Constify a couple of instances of resource_funcs that are never modified to allow the compiler to put it in read-only memory. The other drivers in drivers/gpu/drm/amd/display/dc already have these as const. Rikard Falkeborn (3): drm/amd/display: Constify dcn20_res_pool_funcs drm/amd/display

[PATCH] video: fbdev: vt8623fb: Constify static vga_regsets

2020-07-02 Thread Rikard Falkeborn
64 3350182dd drivers/video/fbdev/vt8623fb.o Signed-off-by: Rikard Falkeborn --- drivers/video/fbdev/vt8623fb.c | 36 +- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/video/fbdev/vt8623fb.c b/drivers/video/fbdev/vt8623fb.c index

Re: [PATCH v2] linux/bits.h: adjust GENMASK_INPUT_CHECK() check

2020-05-25 Thread Rikard Falkeborn
On Fri, May 22, 2020 at 07:50:19PM +0100, Emil Velikov wrote: > Hi Rikard, > > > On 2020/05/19, Rikard Falkeborn wrote: > > + Andrew et al who recieved mail from the build robot this morning about > > the same issue. > > > > On Tue, May 19, 2020 at

Re: [PATCH v2] linux/bits.h: adjust GENMASK_INPUT_CHECK() check

2020-05-20 Thread Rikard Falkeborn
n. > > v2: drop accidental ! > > Fixes: 295bcca84916 ("linux/bits.h: add compile time sanity check of > GENMASK inputs") > Cc: Rikard Falkeborn > Cc: Linus Torvalds > Cc: Chris Wilson > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Emil Velikov &