Re: [PATCH v3 02/19] coccinelle: misc: Add secs_to_jiffies script

2024-12-17 Thread Julia Lawall
On Tue, 17 Dec 2024, Alexander Gordeev wrote: > On Tue, Dec 10, 2024 at 10:02:33PM +, Easwar Hariharan wrote: > > Hi Easwar, > > > This script finds and suggests conversions of timeout patterns that > > result in seconds-denominated timeouts to use the new secs_to_jiffies() > > API in inclu

Re: [PATCH v2 05/21] powerpc/papr_scm: Convert timeouts to secs_to_jiffies()

2024-11-16 Thread Julia Lawall
Sent from my iPhone > On 16 Nov 2024, at 05:40, Dan Carpenter wrote: > > On Sat, Nov 16, 2024 at 11:06:55AM +0100, Christophe Leroy wrote: >>> diff --git a/arch/powerpc/platforms/pseries/papr_scm.c >>> b/arch/powerpc/platforms/pseries/papr_scm.c >>> index >>> 9e297f88adc5d97d4dc7b267b0bfebd

Re: [PATCH] drm/panthor: Fix access to uninitialized variable in tick_ctx_cleanup()

2024-09-30 Thread Julia Lawall
ing to some random place above the list_head at the start of the list in the last element of the array? julia > > Fixes: d72f049087d4 ("drm/panthor: Allow driver compilation") > Reported-by: kernel test robot > Reported-by: Julia Lawall > Closes: https://lore.kernel.or

Re: [PATCH 29/35] drivers/gpu/drm: Reorganize kerneldoc parameter names

2024-09-30 Thread Julia Lawall
On Mon, 30 Sep 2024, Christian König wrote: > Am 30.09.24 um 13:21 schrieb Julia Lawall: > > Reorganize kerneldoc parameter names to match the parameter > > order in the function header. > > Please split that up by driver, apart from that looks good to me. Thanks for the f

[PATCH 25/35] drm/amd/display: Reorganize kerneldoc parameter names

2024-09-30 Thread Julia Lawall
Reorganize kerneldoc parameter names to match the parameter order in the function header. Problems identified using Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/amd/display/dc/core/dc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd

[PATCH 20/35] drivers/gpu/drm: Reorganize kerneldoc parameter names

2024-09-30 Thread Julia Lawall
Reorganize kerneldoc parameter names to match the parameter order in the function header. Problems identified using Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/drm_gem_framebuffer_helper.c |3 +-- drivers/gpu/drm/drm_gpuvm.c |2 +- 2 files changed, 2

[PATCH 29/35] drivers/gpu/drm: Reorganize kerneldoc parameter names

2024-09-30 Thread Julia Lawall
Reorganize kerneldoc parameter names to match the parameter order in the function header. Problems identified using Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c |2 +- drivers/gpu/drm/radeon/radeon_ib.c |2 +- 2 files changed, 2 insertions

[PATCH 00/35] Reorganize kerneldoc parameter names

2024-09-30 Thread Julia Lawall
Reorganize kerneldoc parameter names to match the parameter order in the function header. The misordered cases were identified using the following Coccinelle semantic patch: // @initialize:ocaml@ @@ let parse_doc l = let pieces = List.map String.trim (String.split_on_char '*' l) in let l =

Re: [PATCH] staging: fb_tinylcd Alignment to open parenthesis

2024-05-02 Thread Julia Lawall
On Thu, 2 May 2024, Ashok Kumar wrote: > Corrected coding style CHECK: Alignment should match open parenthesis Ashok, I think the code is nicer as is, because it has all the constant numbers lined up. julia > > Signed-off-by: Ashok Kumar > --- > drivers/staging/fbtft/fb_tinylcd.c | 2 +- >

Re: [PATCH] backlight: sky81452-backlight: replace of_node_put with __free

2024-05-01 Thread Julia Lawall
On Wed, 1 May 2024, Daniel Thompson wrote: > On Wed, May 01, 2024 at 06:21:46PM +0530, R Sundar wrote: > > Use the new cleanup magic to replace of_node_put() with > > __free(device_node) marking to auto release when they get out of scope. > > > > Suggested-by: Juli

Re: [PATCH 1/6] drm/bridge: aux-hpd: fix OF node leaks

2024-02-20 Thread Julia Lawall
On Tue, 20 Feb 2024, Dmitry Baryshkov wrote: > On Tue, 20 Feb 2024 at 13:52, Julia Lawall wrote: > > > > > > > > On Tue, 20 Feb 2024, Johan Hovold wrote: > > > > > On Mon, Feb 19, 2024 at 06:48:30PM +0100, Markus Elfring wrote: > > > > &g

Re: [PATCH 1/6] drm/bridge: aux-hpd: fix OF node leaks

2024-02-20 Thread Julia Lawall
On Tue, 20 Feb 2024, Johan Hovold wrote: > On Mon, Feb 19, 2024 at 06:48:30PM +0100, Markus Elfring wrote: > > > The two device node references taken during allocation need to be > > > dropped when the auxiliary device is freed. > > … > > > +++ b/drivers/gpu/drm/bridge/aux-hpd-bridge.c > > … > >

Re: [PATCH Resend] Fix line Length

2023-10-29 Thread Julia Lawall
On Mon, 30 Oct 2023, Bagas Sanjaya wrote: > On Sun, Oct 29, 2023 at 04:11:01PM +0100, Julia Lawall wrote: > > > > > > On Sun, 29 Oct 2023, Dorine Tipo wrote: > > > > > Signed-off-by: Dorine Tipo > > > > > > Fix the line lengths of lines

[PATCH 09/11] drm/mediatek: add missing of_node_put

2023-09-07 Thread Julia Lawall
for_each_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. This was done using the Coccinelle semantic patch iterators/for_each_child.cocci Signed-off-by: Julia Lawall --- drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c |4

[PATCH 00/11] add missing of_node_put

2023-09-07 Thread Julia Lawall
Add of_node_put on a break out of an of_node loop. --- arch/powerpc/kexec/file_load_64.c|8 ++-- arch/powerpc/platforms/powermac/low_i2c.c|4 +++- arch/powerpc/platforms/powermac/smp.c|4 +++- drivers/bus/arm-cci.c

Re: [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-12 Thread Julia Lawall
On Wed, 12 Jul 2023, Uwe Kleine-König wrote: > On Wed, Jul 12, 2023 at 12:46:33PM +0200, Christian König wrote: > > Am 12.07.23 um 11:46 schrieb Uwe Kleine-König: > > > Hello, > > > > > > while I debugged an issue in the imx-lcdc driver I was constantly > > > irritated about struct drm_device po

Re: [PATCH 20/26] drm/vmwgfx: use array_size

2023-06-27 Thread Julia Lawall
On Fri, 23 Jun 2023, Julia Lawall wrote: > Use array_size to protect against multiplication overflows. > > The changes were done using the following Coccinelle semantic patch: > > // > @@ > size_t e1,e2; > expression COUNT; > identifier alloc = {vmallo

[PATCH v2 16/24] drm/i915/gvt: use vmalloc_array and vcalloc

2023-06-27 Thread Julia Lawall
t:ocaml(alloc) { rename alloc }; @@ ( alloc(x1*x2*x3) | alloc(C1 * C2) | alloc((sizeof(t)) * (COUNT), ...) | - alloc((e1) * (e2)) + realloc(e1, e2) | - alloc((e1) * (COUNT)) + realloc(COUNT, e1) | - alloc((E1) * (E2)) + realloc(E1, E2) ) // Signed-o

[PATCH v2 03/24] drm/gud: use vmalloc_array and vcalloc

2023-06-27 Thread Julia Lawall
t:ocaml(alloc) { rename alloc }; @@ ( alloc(x1*x2*x3) | alloc(C1 * C2) | alloc((sizeof(t)) * (COUNT), ...) | - alloc((e1) * (e2)) + realloc(e1, e2) | - alloc((e1) * (COUNT)) + realloc(COUNT, e1) | - alloc((E1) * (E2)) + realloc(E1, E2) ) // Signed-o

[PATCH v2 06/24] dma-buf: system_heap: use vmalloc_array and vcalloc

2023-06-27 Thread Julia Lawall
t:ocaml(alloc) { rename alloc }; @@ ( alloc(x1*x2*x3) | alloc(C1 * C2) | alloc((sizeof(t)) * (COUNT), ...) | - alloc((e1) * (e2)) + realloc(e1, e2) | - alloc((e1) * (COUNT)) + realloc(COUNT, e1) | - alloc((E1) * (E2)) + realloc(E1, E2) ) // Signed-o

[PATCH v2 15/24] habanalabs: use vmalloc_array and vcalloc

2023-06-27 Thread Julia Lawall
t:ocaml(alloc) { rename alloc }; @@ ( alloc(x1*x2*x3) | alloc(C1 * C2) | alloc((sizeof(t)) * (COUNT), ...) | - alloc((e1) * (e2)) + realloc(e1, e2) | - alloc((e1) * (COUNT)) + realloc(COUNT, e1) | - alloc((E1) * (E2)) + realloc(E1, E2) ) // Signed-o

[PATCH v2 00/24] use vmalloc_array and vcalloc

2023-06-27 Thread Julia Lawall
The functions vmalloc_array and vcalloc were introduced in commit a8749a35c399 ("mm: vmalloc: introduce array allocation functions") but are not used much yet. This series introduces uses of these functions, to protect against multiplication overflows. The changes were done using the following

[PATCH 00/26] use array_size

2023-06-23 Thread Julia Lawall
Use array_size to protect against multiplication overflows. This follows up on the following patches by Kees Cook from 2018. 42bc47b35320 ("treewide: Use array_size() in vmalloc()") fad953ce0b22 ("treewide: Use array_size() in vzalloc()") The changes were done using the following Coccinelle sema

[PATCH 15/26] habanalabs: use array_size

2023-06-23 Thread Julia Lawall
) + array_size(E1, E2) ,...) ) // Signed-off-by: Julia Lawall --- drivers/accel/habanalabs/common/device.c |3 ++- drivers/accel/habanalabs/common/state_dump.c |6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/accel/habanalabs/common

[PATCH 20/26] drm/vmwgfx: use array_size

2023-06-23 Thread Julia Lawall
) + array_size(e1, e2) ,...) | alloc( - (e1) * (COUNT) + array_size(COUNT, e1) ,...) ) // Signed-off-by: Julia Lawall --- drivers/gpu/drm/vmwgfx/vmwgfx_devcaps.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vmwgfx

[PATCH 06/26] dma-buf: system_heap: use array_size

2023-06-23 Thread Julia Lawall
) + array_size(e1, e2) ,...) | alloc( - (e1) * (COUNT) + array_size(COUNT, e1) ,...) ) // Signed-off-by: Julia Lawall --- drivers/dma-buf/heaps/system_heap.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma-buf/heaps/system_heap.c

[PATCH 16/26] drm/i915/gvt: use array_size

2023-06-23 Thread Julia Lawall
) + array_size(E1, E2) ,...) ) // Signed-off-by: Julia Lawall --- drivers/gpu/drm/i915/gvt/gtt.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c index 4ec85308379a..df52385ad436 100644

[PATCH 03/26] drm/gud: use array_size

2023-06-23 Thread Julia Lawall
) + array_size(E1, E2) ,...) ) // Signed-off-by: Julia Lawall --- drivers/gpu/drm/gud/gud_pipe.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gud/gud_pipe.c b/drivers/gpu/drm/gud/gud_pipe.c index dc16a92625d4..34df847bd829 100644 --- a

Re: [PATCH] drm/i915/fbc: Avoid full proxy f_ops for FBC debug attributes

2023-01-05 Thread Julia Lawall
> Hi Julia, thanks for helping here. > > So, my question is why this > > make coccicheck M=drivers/gpu/drm/i915/ MODE=context > COCCI=./scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci > > didn't catch this chunck: > > - debugfs_create_file("i915_fbc_false_color", 0644, parent,

Re: [PATCH] drm/i915/fbc: Avoid full proxy f_ops for FBC debug attributes

2023-01-04 Thread Julia Lawall
On Tue, 3 Jan 2023, Deepak R Varma wrote: > On Wed, Dec 28, 2022 at 06:18:12AM -0500, Rodrigo Vivi wrote: > > On Tue, Dec 27, 2022 at 11:36:13PM +0530, Deepak R Varma wrote: > > > On Tue, Dec 27, 2022 at 12:13:56PM -0500, Rodrigo Vivi wrote: > > > > On Tue, Dec 27, 2022 at 01:30:53PM +0530, Dee

Re: [PATCH] staging: fbtft: Use ARRAY_SIZE() to get argument count

2022-10-31 Thread Julia Lawall
On Mon, 31 Oct 2022, Deepak R Varma wrote: > On Mon, Oct 31, 2022 at 12:41:40PM +0530, Deepak Varma wrote: > > On Sat, Oct 29, 2022 at 07:34:26PM +0200, Julia Lawall wrote: > > > > > > > > > On Sat, 29 Oct 2022, Deepak R Varma wrote: > > > > >

Re: [PATCH] staging: fbtft: Use ARRAY_SIZE() to get argument count

2022-10-29 Thread Julia Lawall
On Sat, 29 Oct 2022, Deepak R Varma wrote: > On Sat, Oct 29, 2022 at 09:32:50AM +0200, Greg Kroah-Hartman wrote: > > On Fri, Oct 28, 2022 at 07:00:05PM +0530, Deepak R Varma wrote: > > > The ARRAY_SIZE(foo) macro should be preferred over sizeof operator > > > based computation such as sizeof(fo

Re: [PATCH v4 2/6] treewide: use prandom_u32_max() when possible

2022-10-08 Thread Julia Lawall
> >> @minus_one@ > >> expression FULL; > >> @@ > >> > >> - (get_random_int() & ((FULL) - 1) > >> + prandom_u32_max(FULL) > > > >Ahh, well, okay, this is the example I mentioned above. Only works if > >FULL is saturated. Any clever way to get coccinelle to prove that? Can > >it look at the value of

[PATCH] drm: fix device_node_continue.cocci warnings (fwd)

2022-06-12 Thread Julia Lawall
The of_node_put does not seem to be needed. Note that there is none at the preceeding continues. julia -- Forwarded message -- Date: Sat, 11 Jun 2022 06:02:45 +0800 From: kernel test robot To: kbu...@lists.01.org Cc: l...@intel.com, Julia Lawall Subject: [PATCH] drm: fix

Re: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers")

2022-05-30 Thread Julia Lawall
> On 30 May 2022, at 15:27, Arnd Bergmann wrote: > > On Mon, May 30, 2022 at 4:08 PM Jani Nikula wrote: >>> On Mon, 30 May 2022, Arnd Bergmann wrote: >>> struct my_driver_priv { >>> struct device dev; >>> u8 causes_misalignment; >>> spinlock_t lock; >>> atomic_t coun

[PATCH] drm/amdkfd: fix typo in comment

2022-05-21 Thread Julia Lawall
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b

[PATCH] drm/amdgpu/gfx: fix typos in comments

2022-05-21 Thread Julia Lawall
Spelling mistakes (triple letters) in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c |2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c |4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c |2 +- 3 files changed, 4

[PATCH] drm/i915: fix typos in comments

2022-05-21 Thread Julia Lawall
Spelling mistakes (triple letters) in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/i915/display/intel_color.c |2 +- drivers/gpu/drm/i915/display/intel_pps.c |2 +- drivers/gpu/drm/i915/gt

[PATCH] drm/nouveau/mmu: fix typo in comment

2022-05-21 Thread Julia Lawall
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c b/drivers/gpu

[PATCH] drm/i915/gvt: fix typo in comment

2022-05-21 Thread Julia Lawall
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall --- 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 index

[PATCH] drm/etnaviv: fix typo in comment

2022-05-21 Thread Julia Lawall
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv

[PATCH] drm/amdgpu/powerplay/vega10: fix minmax.cocci warnings

2022-04-16 Thread Julia Lawall
From: kernel test robot Use max to simplify the code. Generated by: scripts/coccinelle/misc/minmax.cocci CC: Denis Efremov Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds

Re: [Intel-gfx] [PATCH 18/22] drm/i915: Use drm_mode_init() for on-stack modes

2022-03-21 Thread Julia Lawall
On Mon, 21 Mar 2022, Ville Syrjälä wrote: > On Wed, Mar 16, 2022 at 10:00:06AM +0200, Jani Nikula wrote: > > On Fri, 18 Feb 2022, Ville Syrjala wrote: > > > From: Ville Syrjälä > > > > > > Initialize on-stack modes with drm_mode_init() to guarantee > > > no stack garbage in the list head, or t

[PATCH 23/30] drm/amdgpu/dc: fix typos in comments

2022-03-14 Thread Julia Lawall
Various spelling mistakes in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/amd/display/dc/bios/command_table.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table.c b

[PATCH 06/30] drm/bridge: analogix_dp: fix typos in comments

2022-03-14 Thread Julia Lawall
Various spelling mistakes in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b

[PATCH 00/30] fix typos in comments

2022-03-14 Thread Julia Lawall
Various spelling mistakes in comments. Detected with the help of Coccinelle. --- drivers/base/devres.c |4 ++-- drivers/clk/qcom/gcc-sm6125.c |2 +- drivers/clk/ti/clkctrl.c|2 +- drivers/gpu/drm/amd/amdg

[PATCH 29/30] drm/amdgpu: fix typos in comments

2022-03-14 Thread Julia Lawall
Various spelling mistakes in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 16/30] drm/sti: fix typos in comments

2022-03-14 Thread Julia Lawall
Various spelling mistakes in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/sti/sti_gdp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c index 3db3768a3241

[PATCH 01/30] drm/amd/pm: fix typos in comments

2022-03-14 Thread Julia Lawall
Various spelling mistakes in comments. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/amd/pm/amdgpu_pm.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index

Re: [Intel-gfx] [PATCH] drm/i915: Add ww context to intel_dpt_pin (fwd)

2021-09-11 Thread Julia Lawall
iomem, because vma has already been tested. julia -- Forwarded message -- Date: Sat, 11 Sep 2021 09:14:18 +0800 From: kernel test robot To: kbu...@lists.01.org Cc: l...@intel.com, Julia Lawall Subject: Re: [Intel-gfx] [PATCH] drm/i915: Add ww context to intel_dpt_pin CC: k

[PATCH] drm/of: free the right object

2021-07-09 Thread Julia Lawall
* of_node_put(x); ... } // Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order") Signed-off-by: Julia Lawall --- drivers/gpu/drm/drm_of.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_

Re: [Outreachy kernel] [PATCH 1/2] drm/amd/amdgpu/amdgpu_device.c: Replace drm_modeset_*_all with DRM_MODESET_LOCK_ALL_*

2021-04-19 Thread Julia Lawall
On Mon, 19 Apr 2021, Fabio M. De Francesco wrote: > On Monday, April 19, 2021 3:08:51 PM CEST Julia Lawall wrote: > > On Mon, 19 Apr 2021, Fabio M. De Francesco wrote: > > > Replace the deprecated API with new helpers, according to the TODO list > > > of the DRM su

Re: [Outreachy kernel] [PATCH 1/2] drm/amd/amdgpu/amdgpu_device.c: Replace drm_modeset_*_all with DRM_MODESET_LOCK_ALL_*

2021-04-19 Thread Julia Lawall
On Mon, 19 Apr 2021, Fabio M. De Francesco wrote: > Replace the deprecated API with new helpers, according to the TODO list > of the DRM subsystem. The commit message will perhaps not be very meaningful one year from now. You could say for example DRM_MODESET_LOCK_ALL_BEGIN was introduced in c

Re: [Outreachy kernel] [PATCH Resend] drm/drm_bufs.c: In switch, add break in default case

2021-04-17 Thread Julia Lawall
On Sat, 17 Apr 2021, Fabio M. De Francesco wrote: > On Saturday, April 17, 2021 5:45:46 PM CEST Julia Lawall wrote: > > On Sat, 17 Apr 2021, Fabio M. De Francesco wrote: > > > Added a 'break' in the default case of a switch selection statement. > > > >

Re: [Outreachy kernel] [PATCH Resend] drm/drm_bufs.c: In switch, add break in default case

2021-04-17 Thread Julia Lawall
On Sat, 17 Apr 2021, Fabio M. De Francesco wrote: > Added a 'break' in the default case of a switch selection statement. Why? julia > > Signed-off-by: Fabio M. De Francesco > --- > drivers/gpu/drm/drm_bufs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/g

Re: [Outreachy kernel] [PATCH] drm: nouveau: dispnv50: disp.c: Remove set but unused variables

2021-04-15 Thread Julia Lawall
On Thu, 15 Apr 2021, Fabio M. De Francesco wrote: > On Thursday, April 15, 2021 9:57:07 PM CEST Julia Lawall wrote: > > On Thu, 15 Apr 2021, Fabio M. De Francesco wrote: > > > Removed two set but unused variables. > > > > Would it be useful to use the values? &

Re: [Outreachy kernel] [PATCH] drm: nouveau: dispnv50: disp.c: Remove set but unused variables

2021-04-15 Thread Julia Lawall
On Thu, 15 Apr 2021, Fabio M. De Francesco wrote: > Removed two set but unused variables. Would it be useful to use the values? julia > > Signed-off-by: Fabio M. De Francesco > --- > drivers/gpu/drm/nouveau/dispnv50/disp.c | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) > >

Re: [Outreachy kernel] Re: [PATCH 1/2] gpu: drm: Replace "unsigned" with "unsigned int"

2021-04-12 Thread Julia Lawall
On Mon, 12 Apr 2021, Daniel Vetter wrote: > On Mon, Apr 12, 2021 at 2:21 PM Fabio M. De Francesco > wrote: > > > > Replaced "unsigned with "unsigned int" since the latter is preferred. > > > > Signed-off-by: Fabio M. De Francesco > > Nit for the subjects: In drm we generally don't have the gp

[PATCH] drm/amdgpu: fix semicolon.cocci warnings

2021-04-02 Thread Julia Lawall
From: kernel test robot Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 37439a51ff17 ("drm/amdgpu: Add mode2 reset support for aldebaran") CC: Lijo Lazar Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Ju

Re: [PATCH] video: use getter/setter functions

2021-02-10 Thread Julia Lawall
On Wed, 10 Feb 2021, Daniel Vetter wrote: > On Wed, Feb 10, 2021 at 08:23:41AM +, Lee Jones wrote: > > On Tue, 09 Feb 2021, Julia Lawall wrote: > > > > > Use getter and setter functions, for platform_device structures and a > > > spi_device structure. > &

[PATCH] drm: use getter/setter functions

2021-02-09 Thread Julia Lawall
Use getter and setter functions, for platform_device structures and a mipi_dsi_device structure. Signed-off-by: Julia Lawall --- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c |2 +- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c |2 +- drivers/gpu/drm/panel/panel-lvds.c

[PATCH] video: use getter/setter functions

2021-02-09 Thread Julia Lawall
Use getter and setter functions, for platform_device structures and a spi_device structure. Signed-off-by: Julia Lawall --- drivers/video/backlight/qcom-wled.c |2 +- drivers/video/fbdev/amifb.c |4 ++-- drivers

Re: [Outreachy kernel] [PATCH] drm/amdgpu: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe()

2020-11-01 Thread Julia Lawall
On Fri, 30 Oct 2020, Greg KH wrote: > On Fri, Oct 30, 2020 at 01:47:05PM +0530, Sumera Priyadarsini wrote: > > On Fri, 30 Oct, 2020, 1:32 PM Greg KH, wrote: > > > > > On Fri, Oct 30, 2020 at 01:27:16PM +0530, Deepak R Varma wrote: > > > > On Fri, Oct 30, 2020 at 08:11:20AM +0100, Greg KH wrote

Re: [Outreachy kernel] [PATCH] drm/amdgpu: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe()

2020-11-01 Thread Julia Lawall
On Sat, 31 Oct 2020, Joe Perches wrote: > On Fri, 2020-10-30 at 09:03 +0100, Greg KH wrote: > > On Fri, Oct 30, 2020 at 01:27:16PM +0530, Deepak R Varma wrote: > > > On Fri, Oct 30, 2020 at 08:11:20AM +0100, Greg KH wrote: > > > > On Fri, Oct 30, 2020 at 08:52:45AM +0530, Deepak R Varma wrote:

Re: [Cocci] [RFC] treewide: cleanup unreachable breaks

2020-10-17 Thread Julia Lawall
On Sat, 17 Oct 2020, Joe Perches wrote: > On Sat, 2020-10-17 at 09:09 -0700, t...@redhat.com wrote: > > From: Tom Rix > > > > This is a upcoming change to clean up a new warning treewide. > > I am wondering if the change could be one mega patch (see below) or > > normal patch per file about 10

Re: [kbuild-all] Re: [PATCH] coccinelle: api: fix device_attr_show.cocci warnings

2020-09-09 Thread Julia Lawall
On Tue, 8 Sep 2020, Bartlomiej Zolnierkiewicz wrote: > > Hi, > > On 8/10/20 11:21 AM, kernel test robot wrote: > > From: kernel test robot > > > > drivers/video/fbdev/core/fbcon.c:3509:8-16: WARNING: use scnprintf or > > sprintf > > drivers/video/fbdev/core/fbcon.c:3484:8-16: WARNING: use scn

Re: [PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings

2020-08-28 Thread Julia Lawall
On Thu, 27 Aug 2020, Markus Elfring wrote: > > Generated by: scripts/coccinelle/api/kobj_to_dev.cocci > > > > Fixes: a2fc3718bc22 ("coccinelle: api: add kobj_to_dev.cocci script") > > I wonder about such a combination of information. > > I find it reasonable that two function implementations sho

[PATCH] coccinelle: api: fix kobj_to_dev.cocci warnings

2020-08-26 Thread Julia Lawall
From: kernel test robot Use kobj_to_dev() instead of container_of() Generated by: scripts/coccinelle/api/kobj_to_dev.cocci Fixes: a2fc3718bc22 ("coccinelle: api: add kobj_to_dev.cocci script") CC: Denis Efremov Signed-off-by: kernel test robot Signed-off-by: Julia Lawall

Re: [PATCH v2] drm/amdkfd: Fix memory leaks according to error branches

2020-06-22 Thread Julia Lawall
On Sat, 20 Jun 2020, Markus Elfring wrote: > > The function kobject_init_and_add alloc memory like: > > kobject_init_and_add->kobject_add_varg->kobject_set_name_vargs > > ->kvasprintf_const->kstrdup_const->kstrdup->kmalloc_track_caller > > ->kmalloc_slab, in err branch this memory not free. If u

Re:Re: [PATCH v2] drm/amdkfd: Fix memory leaks according to error branches

2020-06-22 Thread Julia Lawall
On Sat, 20 Jun 2020, Bernard wrote: > > > From: Julia Lawall > Date: 2020-06-20 17:37:19 > To: Markus Elfring > Cc: Bernard Zhao > ,opensource.ker...@vivo.com,amd-...@lists.freedesktop.org,dri-devel@lists.freedesktop.org,kernel-janit...@vger.kernel.org,linux-ker...

Re: [PATCH v3] drm/amd: Fix memory leak according to error branch

2020-06-22 Thread Julia Lawall
On Sat, 20 Jun 2020, Markus Elfring wrote: > > The function kobject_init_and_add alloc memory like: > > kobject_init_and_add->kobject_add_varg->kobject_set_name_vargs > > ->kvasprintf_const->kstrdup_const->kstrdup->kmalloc_track_caller > > ->kmalloc_slab, in err branch this memory not free. If u

Re: [bug report] drm/xen-front: Add support for Xen PV display frontend

2020-04-21 Thread Julia Lawall
On Tue, 21 Apr 2020, Dan Carpenter wrote: > Hi Kernel Janitors, > > Here is another idea that someone could work on, fixing the > IS_ERR_OR_NULL() checks in the xen driver. > > The patch c575b7eeb89f: "drm/xen-front: Add support for Xen PV > display frontend" from Apr 3, 2018, leads to the foll

Re: [bug report] drm/xen-front: Add support for Xen PV display frontend

2020-04-21 Thread Julia Lawall
On Tue, 21 Apr 2020, Dan Carpenter wrote: > On Tue, Apr 21, 2020 at 05:29:02PM +0200, Julia Lawall wrote: > > > > > > On Tue, 21 Apr 2020, Dan Carpenter wrote: > > > > > Hi Kernel Janitors, > > > > > > Here is another idea that someone coul

Re: [Outreachy kernel] [PATCH] staging: android: ion: Fix parenthesis alignment

2020-04-02 Thread Julia Lawall
On Wed, 1 Apr 2020, John B. Wyatt IV wrote: > Fix 2 parenthesis alignment issues. Please try to find a way to describe what you have done that doesn't involve the word "Fix". What have you done and why? julia > > Reported by checkpatch. > > Signed-off-by: John B. Wyatt IV > --- > drivers

Re: [PATCH] drm: fix ifnullfree.cocci warnings

2020-04-01 Thread Julia Lawall
On Tue, 31 Mar 2020, Daniel Vetter wrote: > On Fri, Mar 27, 2020 at 09:11:44AM +0100, Julia Lawall wrote: > > NULL check before kfree is not needed. > > > > Generated by: scripts/coccinelle/free/ifnullfree.cocci > > > > Fixes: c6603c740e0e ("drm: ad

Re: [Outreachy kernel] [PATCH] staging: fbtft: Replace udelay with preferred usleep_range

2020-03-30 Thread Julia Lawall
n that it is easy to address the problem. julia > > More clarification on this issue will be helpful. > > On Sun, 29 Mar 2020, 15:17 Julia Lawall, wrote: > > > On Sun, 29 Mar 2020, John Wyatt wrote: > > > On Sun, 2020-03-29 at 11:28 +0200, Julia Law

Re: [Outreachy kernel] [PATCH] staging: fbtft: Replace udelay with preferred usleep_range

2020-03-30 Thread Julia Lawall
On Sun, 29 Mar 2020, John Wyatt wrote: > On Sun, 2020-03-29 at 11:28 +0200, Julia Lawall wrote: > > > > On Sun, 29 Mar 2020, John B. Wyatt IV wrote: > > > > > Fix style issue with usleep_range being reported as preferred over > > > udelay. &

Re: [Outreachy kernel] [PATCH] staging: fbtft: Replace udelay with preferred usleep_range

2020-03-30 Thread Julia Lawall
On Sun, 29 Mar 2020, John B. Wyatt IV wrote: > Fix style issue with usleep_range being reported as preferred over > udelay. > > Issue reported by checkpatch. > > Please review. > > As written in Documentation/timers/timers-howto.rst udelay is the > generally preferred API. hrtimers, as noted in

[PATCH] drm: fix ifnullfree.cocci warnings

2020-03-30 Thread Julia Lawall
NULL check before kfree is not needed. Generated by: scripts/coccinelle/free/ifnullfree.cocci Fixes: c6603c740e0e ("drm: add managed resources tied to drm_device") Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: git://anongit.freedesktop.org/drm/drm-misc drm

[PATCH] video: fbdev: mmp: fix platform_get_irq.cocci warnings

2020-01-06 Thread Julia Lawall
t;) Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: git://anongit.freedesktop.org/drm/drm-misc for-linux-next head: 80805774fc354f9ae7755a8e649a01dedfd0dcf8 commit: dd90e9ae55a1e7efd3ac036afe9f7ae7bb64d39d [2/16] video: fbdev: mmp: add COMPILE_TEST support :: b

[PATCH 00/10] use resource_size

2020-01-02 Thread Julia Lawall
Use resource_size rather than a verbose computation on the end and start fields. The semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) @@ struct resource ptr; @@ - ((ptr.end) - (ptr.start) + 1) + resource_size(&ptr) @@ struct resource *ptr; @@ - ((ptr->end) -

[PATCH 07/10] video: fbdev: use resource_size

2020-01-02 Thread Julia Lawall
Use resource_size rather than a verbose computation on the end and start fields. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) @@ struct resource ptr; @@ - (ptr.end - ptr.start + 1) + resource_size(&ptr) Signed-off-by: Julia Lawall --- drivers/v

[PATCH 03/10] fbdev: s1d13xxxfb: use resource_size

2020-01-02 Thread Julia Lawall
Use resource_size rather than a verbose computation on the end and start fields. The semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) @@ struct resource ptr; @@ - (ptr.end - ptr.start + 1) + resource_size(&ptr) Signed-off-by: Julia Lawall --- dri

[PATCH 15/16] drm: bridge: dw-hdmi: constify copied structure

2020-01-01 Thread Julia Lawall
The dw_hdmi_hw structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 07/16] video: sa1100fb: constify copied structure

2020-01-01 Thread Julia Lawall
The monspecs structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall --- drivers/video/fbdev/sa1100fb.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev

[PATCH 00/16] constify copied structure

2020-01-01 Thread Julia Lawall
Make const static structures that are just copied into other structures. The semantic patch that detects the opportunity for this change is as follows: (http://coccinelle.lip6.fr/) @r disable optional_qualifier@ identifier i,j; position p; @@ static struct i j@p = { ... }; @upd@ position p1; id

Re: [PATCH] drm/vmwgfx: Replace deprecated PTR_RET

2019-12-10 Thread Julia Lawall
> De: "Lukas Bulwahn" > À: "Thomas Hellstrom" , dri-devel@lists.freedesktop.org > Cc: "David Airlie" , "Daniel Vetter" , > "Sinclair Yeh" , > linux-graphics-maintai...@vmware.com, kernel-janit...@vger.kernel.org, > linux-ker...@vger.kernel.org, "Lukas Bulwahn" > > Envoyé: Dimanche 8 Décembre 20

Re: [PATCH 0/2] drm/tegra: Use PTR_ERR_OR_ZERO() to simplify code

2019-11-19 Thread Julia Lawall
On Tue, 19 Nov 2019, Jani Nikula wrote: > On Tue, 19 Nov 2019, Jani Nikula wrote: > > On Mon, 18 Nov 2019, Thierry Reding wrote: > >> On Mon, Nov 18, 2019 at 07:46:10PM +0800, zhengbin wrote: > >>> zhengbin (2): > >>> drm/tegra: Use PTR_ERR_OR_ZERO() to simplify code in > >>> tegra_bo_du

Re: [Outreachy kernel] [Outreachy][PATCH] drm: use DIV_ROUND_UP helper macro for calculations

2019-10-25 Thread Julia Lawall
> | > - ((n + (d - 1)) / d) > + DIV_ROUND_UP(n,d) > ) > > Signed-off-by: Wambui Karuga Acked-by: Julia Lawall > --- > drivers/gpu/drm/drm_agpsupport.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_agpsupport.c > b/driv

Re: [Outreachy kernel] [PATCH] drm: remove unnecessary return variable

2019-10-19 Thread Julia Lawall
On Sat, 19 Oct 2019, Wambui Karuga wrote: > From: Wambui Karuga > > Remove unnecessary variable `ret` in drm_dp_atomic_find_vcpi_slots() > only used to hold the function return value and have the function > return the value directly. This patch applies for me, but with a huge offset. What tr

Re: [PATCH 1/2] drm/imx: Fix error handling for a kmemdup() call in imx_pd_bind()

2019-10-12 Thread Julia Lawall
On Sat, 12 Oct 2019, Navid Emamdoost wrote: > On Sat, Oct 12, 2019 at 4:07 AM Markus Elfring wrote: > > > > From: Markus Elfring > > Date: Sat, 12 Oct 2019 10:30:21 +0200 > > > > The return value from a call of the function “kmemdup” was not checked > > in this function implementation. Thus ad

Re: [PATCH v6 2/2] drm/bridge: Add NWL MIPI DSI host controller support (fwd)

2019-09-22 Thread Julia Lawall
Hello, Color_format is unsigned, so it won't be less than 0 on line 272. julia -- Forwarded message -- Date: Mon, 23 Sep 2019 02:29:34 +0800 From: kbuild test robot To: kbu...@01.org Cc: Julia Lawall Subject: Re: [PATCH v6 2/2] drm/bridge: Add NWL MIPI DSI host contr

[PATCH] UNCLEAN: fix semicolon.cocci warnings

2019-09-20 Thread Julia Lawall
From: kbuild test robot Remove unneeded semicolons. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 841b04751dc0 ("UNCLEAN: add HDMI TX driver") CC: Lucas Stach Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: git://git.infradead.org/users

[PATCH] UNCLEAN: fix semicolon.cocci warnings

2019-09-20 Thread Julia Lawall
From: kbuild test robot Remove unneeded semicolons. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 841b04751dc0 ("UNCLEAN: add HDMI TX driver") CC: Lucas Stach Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: git://git.infradead.org/users

[PATCH] drm/panfrost: fix odd_ptr_err.cocci warnings

2019-04-01 Thread Julia Lawall
From: kbuild test robot PTR_ERR should access the value just tested by IS_ERR Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci Fixes: 10f21de123ac ("drm/panfrost: add support for reset lines") CC: Neil Armstrong Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall

[PATCH] drm/amd/powerplay: fix memdup.cocci warnings

2019-03-01 Thread Julia Lawall
test robot Signed-off-by: Julia Lawall --- tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-5.2-wip head: 25752e1fc83e9f983b11d680fc7bfc129b4eaae6 commit: 76760fe3c00d04f25cc1a6115294310d4effeb77 [161/226] drm/amd/powerplay: add function to store overdrive information for smu11 :::

[radeon-alex:drm-next-5.2-wip 214/226] drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:1204:3-9: preceding lock on line 1065 (fwd)

2019-03-01 Thread Julia Lawall
Hello, It looks like line 1204 needs a break rather than a return, like in the aborts from the other cases. julia -- Forwarded message -- Date: Sat, 2 Mar 2019 14:36:31 +0800 From: kbuild test robot To: kbu...@01.org Cc: Julia Lawall Subject: [radeon-alex:drm-next-5.2-wip 214

[PATCH 06/12] omapfb: add missing of_node_put after of_device_is_available

2019-02-23 Thread Julia Lawall
any if (<+...of_device_is_available(e)...+>) { ... when != of_node_put(e) ( return e; | + of_node_put(e); return ...; ) } // Fixes: f76ee892a99e6 ("omapfb: copy omapdss & displays for omapfb") Signed-off-by: Julia Lawall --- drivers/video/fbdev/omap2/omapfb/dss/omapds

[PATCH 07/12] drm: omapdrm: add missing of_node_put after of_device_is_available

2019-02-23 Thread Julia Lawall
any if (<+...of_device_is_available(e)...+>) { ... when != of_node_put(e) ( return e; | + of_node_put(e); return ...; ) } // Fixes: f2dd36ac9974c ("OMAPDSS: move 'compatible' converter to omapdss driver") Signed-off-by: Julia Lawall --- drivers/gpu/drm/omapdrm/dss/

[PATCH 02/12] drm/tegra: rgb: add missing of_node_put after of_device_is_available

2019-02-23 Thread Julia Lawall
any if (<+...of_device_is_available(e)...+>) { ... when != of_node_put(e) ( return e; | + of_node_put(e); return ...; ) } // Fixes: d8f4a9eda0067 ("drm: Add NVIDIA Tegra20 support") Signed-off-by: Julia Lawall --- drivers/gpu/drm/tegra/rgb.c |4 +++- 1 file changed, 3

  1   2   3   4   >