[PATCH] drm/bridge: dw-hdmi: Delete unnecessary assignment for the field "owner"

2016-08-16 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 16 Aug 2016 13:52:19 +0200 The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring --- drivers/gpu/drm/bridge/dw-hdmi-ahb-audio.c | 1 - 1 file c

[PATCH] drm/rockchip: Delete unnecessary assignment for the field "owner"

2016-08-16 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 16 Aug 2016 14:25:35 +0200 The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring --- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 1 - dri

[PATCH 0/2] GPU-DRM-Savage: Fine-tuning for savage_bci_cmdbuf()

2016-08-18 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 18 Aug 2016 21:38:37 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (2): Use memdup_user() rather than duplicating its implementation Less function calls after error detection drivers/gpu/drm/savage/sa

[PATCH 1/2] GPU-DRM-Savage: Use memdup_user() rather than duplicating

2016-08-18 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 18 Aug 2016 18:12:03 +0200 Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpu/drm/savage/savage_state.c | 12 +++--

[PATCH 2/2] GPU-DRM-Savage: Less function calls in savage_bci_cmdbuf() after error detection

2016-08-18 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 18 Aug 2016 21:28:58 +0200 The kfree() function was called in a few cases by the savage_bci_cmdbuf() function during error handling even if a passed variable contained a null pointer. Adjust jump targets according to the Linux coding style convention. Signed-off-

[PATCH] virtio-gpu: Use memdup_user() rather than duplicating its implementation

2016-08-18 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 18 Aug 2016 22:35:14 +0200 Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 13

[patch] drm/savage: dereferencing an error pointer

2016-10-12 Thread SF Markus Elfring
> A recent cleanup changed the kmalloc() + copy_from_user() to > memdup_user() but the error handling wasn't updated so we might call > kfree(-EFAULT) and crash. > > Fixes: a6e3918bcdb1 ('GPU-DRM-Savage: Use memdup_user() rather than > duplicating') > Signed-off-by: Dan Carpenter > > diff --git

GPU-DRM-Savage: Less function calls in savage_bci_cmdbuf() after error detection

2016-10-12 Thread SF Markus Elfring
>> Date: Thu, 18 Aug 2016 21:28:58 +0200 >> >> The kfree() function was called in a few cases by the >> savage_bci_cmdbuf() function during error handling >> even if a passed variable contained a null pointer. >> >> Adjust jump targets according to the Linux coding style convention. >> >> Signed-of

[PATCH 1/4] drm/dp: Use seq_putc() in drm_dp_mst_dump_topology()

2017-05-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 May 2017 17:08:56 +0200 A few single characters (line breaks) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpu/drm/drm_dp_mst

[PATCH 3/4] drm/dp: Replace six seq_printf() calls by seq_puts() in drm_dp_mst_dump_topology()

2017-05-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 May 2017 17:23:24 +0200 Strings which did not contain data format specifications should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers

[PATCH 4/4] drm/dp: Adjust four checks for null pointers

2017-05-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 May 2017 18:22:52 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code plac

[PATCH 0/4] drm/dp: Fine-tuning for three function implementations

2017-05-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 May 2017 18:38:08 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): Use seq_putc() in drm_dp_mst_dump_topology() Combine two seq_printf() calls into one call in drm_dp_mst_dump_topology() Replace s

[PATCH 2/4] drm/dp: Combine two seq_printf() calls into one call in drm_dp_mst_dump_topology()

2017-05-01 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 1 May 2017 17:15:43 +0200 Some data were put into a sequence by two separate function calls. Print the same data by a single function call instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpu/drm/drm_d

[PATCH 0/3] GPU-DRM-Radeon: Fine-tuning for three function implementations

2017-05-02 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 2 May 2017 22:00:02 +0200 Three update suggestions were taken into account from static source code analysis. Markus Elfring (3): Use seq_putc() in radeon_sa_bo_dump_debug_info() Use seq_puts() in radeon_debugfs_pm_info() Use seq_puts() in r100_debugfs_cp_csq

[PATCH 3/3] GPU-DRM-Radeon: Use seq_puts() in r100_debugfs_cp_csq_fifo()

2017-05-02 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 2 May 2017 21:54:49 +0200 Strings which did not contain data format specifications should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers

[PATCH 2/3] GPU-DRM-Radeon: Use seq_puts() in radeon_debugfs_pm_info()

2017-05-02 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 2 May 2017 21:50:14 +0200 Two strings which did not contain data format specifications should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- dri

[PATCH 1/3] GPU-DRM-Radeon: Use seq_putc() in radeon_sa_bo_dump_debug_info()

2017-05-02 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 2 May 2017 21:35:48 +0200 A few single characters should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpu/drm/radeon/radeon_sa.c | 9 +

[PATCH 1/9] drm/i915: Replace ten seq_puts() calls by seq_putc()

2017-05-04 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 4 May 2017 11:04:45 +0200 Some single characters should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpu/drm/i915/i915_debugfs.c | 32

[PATCH 2/9] drm/i915: Combine five seq_printf() calls in i915_display_info()

2017-05-04 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 4 May 2017 13:17:10 +0200 Some text was put into a sequence by separate function calls. Print the same data by two single function calls instead. Signed-off-by: Markus Elfring --- drivers/gpu/drm/i915/i915_debugfs.c | 7 ++- 1 file changed, 2 insertions(+),

[PATCH 4/9] drm/i915: Delete unnecessary braces in three functions

2017-05-04 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 4 May 2017 13:40:53 +0200 Do not use curly brackets at some source code places where a single statement should be sufficient. Signed-off-by: Markus Elfring --- drivers/gpu/drm/i915/i915_debugfs.c | 19 --- 1 file changed, 8 insertions(+), 11 dele

[PATCH 5/9] drm/i915: Adjust seven checks for null pointers

2017-05-04 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 4 May 2017 13:52:19 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix affected source code places.

[PATCH 6/9] drm/i915: Add spaces for better code readability

2017-05-04 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 4 May 2017 14:04:38 +0200 Use space characters at some source code places according to the Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/gpu/drm/i915/i915_debugfs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) di

[PATCH 7/9] drm/i915: Combine substrings for a message in gen6_drpc_info()

2017-05-04 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 4 May 2017 14:15:00 +0200 The script "checkpatch.pl" pointed information out like the following. WARNING: quoted string split across lines Thus fix the affected source code place. Signed-off-by: Markus Elfring --- drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--

[PATCH 3/9] drm/i915: Replace 14 seq_printf() calls by seq_puts()

2017-05-04 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 4 May 2017 13:20:47 +0200 Some strings which did not contain data format specifications should be put into a sequence. Thus use the corresponding function "seq_puts". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- dr

[PATCH 8/9] drm/i915: Replace a seq_puts() call by seq_putc() in two functions

2017-05-04 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 4 May 2017 14:23:32 +0200 Two single characters (line breaks) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpu/drm/i915/i915_ge

[PATCH 9/9] drm/i915: Combine substrings for two messages in i915_ggtt_probe_hw()

2017-05-04 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 4 May 2017 14:30:37 +0200 The script "checkpatch.pl" pointed information out like the following. WARNING: quoted string split across lines Thus fix the affected source code place. Signed-off-by: Markus Elfring --- drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++

Re: [PATCH 7/9] drm/i915: Combine substrings for a message in gen6_drpc_info()

2017-05-04 Thread SF Markus Elfring
>> +++ b/drivers/gpu/drm/i915/i915_debugfs.c >> @@ -1529,8 +1529,8 @@ static int gen6_drpc_info(struct seq_file *m) >> >> forcewake_count = >> READ_ONCE(dev_priv->uncore.fw_domain[FW_DOMAIN_ID_RENDER].wake_count); >> if (forcewake_count) { >> -seq_puts(m, "RC information in

[PATCH 0/5] GPU-DRM-STI: Fine-tuning for some function implementations

2017-05-05 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 5 May 2017 15:45:45 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (5): Reduce function calls for sequence output at five places Replace 17 seq_puts() calls by seq_putc() Fix a typo in a comment line

[PATCH 1/5] drm/sti: Reduce function calls for sequence output at five places

2017-05-05 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 5 May 2017 14:54:52 +0200 Some data were put into a sequence by separate function calls. Print the same data by five single function calls instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpu/drm/sti/s

[PATCH 2/5] drm/sti: Replace 17 seq_puts() calls by seq_putc()

2017-05-05 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 5 May 2017 15:00:46 +0200 Single characters should be put into a sequence at several places. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpu/drm/sti/sti_curs

[PATCH 3/5] drm/sti: Fix a typo in a comment line

2017-05-05 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 5 May 2017 15:30:44 +0200 Add a missing character in this description for a data structure. Signed-off-by: Markus Elfring --- drivers/gpu/drm/sti/sti_cursor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sti/sti_cursor.c b/

[PATCH 4/5] drm/sti: Fix typos in a comment line

2017-05-05 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 5 May 2017 15:32:08 +0200 Adjust this description for a function call. Signed-off-by: Markus Elfring --- drivers/gpu/drm/sti/sti_tvout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti

[PATCH 5/5] drm/sti: Adjust two checks for null pointers in sti_hqvdp_probe()

2017-05-05 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 5 May 2017 15:33:19 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written !… Thus fix the affected source code pla

Re: GPU-DRM-STI: Fine-tuning for some function implementations

2017-05-05 Thread SF Markus Elfring
> It seems like you're back to submitting cocci patches again :) My contribution activities are varying also for Linux software over time. ;-) The corresponding source code search patterns get different popularity. > I don't want to waste your time by ignoring your patches, so please ensure

Re: GPU-DRM-STI: Fine-tuning for some function implementations

2017-05-06 Thread SF Markus Elfring
> Generally speaking, I don't care about checkpatch/cocci changes that aren't > tested. I find this view interesting only to some degree. 1. I suggest to combine a few functions into fewer ones. * Do you spot any programming mistakes in these concrete cases? * Can such code reduction resul

Re: GPU-DRM-STI: Fine-tuning for some function implementations

2017-05-06 Thread SF Markus Elfring
>> 1. I suggest to combine a few functions into fewer ones. >>* Do you spot any programming mistakes in these concrete cases? > > Not in the patches I skimmed. Thanks for such feedback. > However, your history of breaking code tells me that there have been mistakes > missed in the past. I

[PATCH 0/4] DMA-buf: Fine-tuning for four function implementations

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 11:05:05 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): Combine two function calls into one in dma_buf_debug_show() Improve a size determination in dma_buf_attach() Adjust a null pointe

[PATCH 1/4] dma-buf: Combine two function calls into one in dma_buf_debug_show()

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 10:32:44 +0200 A bit of data was put into a sequence by two separate function calls. Print the same data by a single function call instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/dma-buf/dm

[PATCH 2/4] dma-buf: Improve a size determination in dma_buf_attach()

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 10:50:09 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Mark

[PATCH 3/4] dma-buf: Adjust a null pointer check in dma_buf_attach()

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 10:54:17 +0200 The script "checkpatch.pl" pointed information out like the following. Comparison to NULL could be written "!attach" Thus adjust this expression. Signed-off-by: Markus Elfring --- drivers/dma-buf/dma-buf.c | 2 +- 1 file changed, 1 in

[PATCH 4/4] dma-buf: Use seq_putc() in two functions

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 10:55:42 +0200 Three single characters (line breaks) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/dma-buf/sync_debug

[PATCH 0/2] GPU-DRM-Etnaviv: Fine-tuning for two function implementations

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 13:16:15 +0200 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Use seq_putc() in etnaviv_buffer_dump() Delete an error message for a failed memory allocation in etnaviv_bind() drivers/gpu/drm/et

[PATCH 1/2] drm/etnaviv: Use seq_putc() in etnaviv_buffer_dump()

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 13:00:28 +0200 Two single characters (line breaks) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpu/drm/etnaviv/etna

[PATCH 2/2] drm/etnaviv: Delete an error message for a failed memory allocation in etnaviv_bind()

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 13:08:11 +0200 The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such a statement here. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Ref

[PATCH] tinydrm: mipi-dbi: Use seq_putc() in mipi_dbi_debugfs_command_show()

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 13:42:03 +0200 A single character (line break) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/gpu/drm/tinydrm/mipi-dbi

[PATCH] tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show()

2017-05-10 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 10 May 2017 17:03:20 +0200 * Use a special format string specification for the desired output of the array "val" into a sequence. * Adjust two local variables accordingly. This refactoring supersedes the update suggestion "tinydrm: mipi-dbi: Use seq_putc() in m

[PATCH 0/5] drm/amdgpu: Fine-tuning for several function implementations

2016-09-18 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 18 Sep 2016 18:38:48 +0200 Some update suggestions were taken into account from static source code analysis. Markus Elfring (5): Use kmalloc_array() in amdgpu_debugfs_gca_config_read() Improve determination of sizes in two functions Rename a jump label in am

[PATCH 1/5] drm/amdgpu: Use kmalloc_array() in amdgpu_debugfs_gca_config_read()

2016-09-18 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 18 Sep 2016 17:00:52 +0200 A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software.

[PATCH 2/5] drm/amdgpu: Improve determination of sizes in two functions

2016-09-18 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 18 Sep 2016 17:24:47 +0200 Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Marku

[PATCH 3/5] drm/amdgpu: Rename a jump label in amdgpu_debugfs_regs_read()

2016-09-18 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 18 Sep 2016 17:35:24 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/

[PATCH 4/5] drm/amdgpu: Rename a jump label in amdgpu_device_init()

2016-09-18 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 18 Sep 2016 17:50:09 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff

[PATCH 5/5] drm/amdgpu: Adjust checks for null pointers in nine functions

2016-09-18 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 18 Sep 2016 18:32:28 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * The script "checkpatch.pl" can point information out like the following. Comparison to NULL could be written !… Thus fix the affected sour

[PATCH 0/5] GPU-DRM: Fine-tuning for four function implementations

2016-09-19 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 19 Sep 2016 17:47:37 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (5): Use kmalloc_array() in drm_legacy_addbufs_pci() Replace two kzalloc() calls by kcalloc() in drm_legacy_addbufs_pci() Replace a k

[PATCH 1/5] GPU-DRM: Use kmalloc_array() in drm_legacy_addbufs_pci()

2016-09-19 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 19 Sep 2016 17:07:06 +0200 A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software.

[PATCH 2/5] GPU-DRM: Replace two kzalloc() calls by kcalloc() in drm_legacy_addbufs_pci()

2016-09-19 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 19 Sep 2016 17:17:34 +0200 The script "checkpatch.pl" can point information out like the following. WARNING: Prefer kcalloc over kzalloc with multiply Thus fix the affected source code places. Signed-off-by: Markus Elfring --- drivers/gpu/drm/drm_bufs.c | 4 ++

[PATCH 3/5] GPU-DRM: Replace a kzalloc() call by kcalloc() in drm_legacy_addbufs_agp()

2016-09-19 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 19 Sep 2016 17:24:20 +0200 The script "checkpatch.pl" can point information out like the following. WARNING: Prefer kcalloc over kzalloc with multiply Thus fix the affected source code place. Signed-off-by: Markus Elfring --- drivers/gpu/drm/drm_bufs.c | 2 +-

[PATCH 4/5] GPU-DRM: Replace a kzalloc() call by kcalloc() in drm_legacy_addbufs_sg()

2016-09-19 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 19 Sep 2016 17:30:31 +0200 The script "checkpatch.pl" can point information out like the following. WARNING: Prefer kcalloc over kzalloc with multiply Thus fix the affected source code place. Signed-off-by: Markus Elfring --- drivers/gpu/drm/drm_bufs.c | 3 +--

[PATCH 5/5] GPU-DRM: Rename a jump label in drm_legacy_mapbufs()

2016-09-19 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 19 Sep 2016 17:37:27 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/gpu/drm/drm_bufs.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH 0/6] GPU-DRM-GMA500: Fine-tuning for two function implementations

2016-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 20 Sep 2016 10:48:04 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (6): Use kmalloc_array() in mid_get_vbt_data_r10() Rename a jump label in mid_get_vbt_data_r10() Move a variable assignment in mid_ge

[PATCH 1/6] GPU-DRM-GMA500: Use kmalloc_array() in mid_get_vbt_data_r10()

2016-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 20 Sep 2016 08:54:07 +0200 A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software.

[PATCH 2/6] GPU-DRM-GMA500: Rename a jump label in mid_get_vbt_data_r10()

2016-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 20 Sep 2016 09:09:10 +0200 Adjust a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/gpu/drm/gma500/mid_bios.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/gma

[PATCH 3/6] GPU-DRM-GMA500: Move a variable assignment in mid_get_vbt_data_r10()

2016-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 20 Sep 2016 10:32:12 +0200 One local variable was set to an error code before a concrete error situation was detected. Thus move the corresponding assignment into an if branch to indicate a software failure there. Signed-off-by: Markus Elfring --- drivers/gpu/dr

[PATCH 4/6] GPU-DRM-GMA500: Fix indentation for a function call parameter in mid_get_vbt_data_r10()

2016-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 20 Sep 2016 10:34:28 +0200 Adjust the indentation for a single function call parameter here. Signed-off-by: Markus Elfring --- drivers/gpu/drm/gma500/mid_bios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/mid_bios.c

[PATCH 5/6] GPU-DRM-GMA500: One error message less for a GCT revision mismatch in mid_get_vbt_data()

2016-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 20 Sep 2016 10:36:19 +0200 A single error message should be sufficient to inform about the detection of an unknown GCT revision at the end. Thus return after the logging call in this case directly. Signed-off-by: Markus Elfring --- drivers/gpu/drm/gma500/mid_bio

[PATCH 6/6] GPU-DRM-GMA500: Rename a jump label in mid_get_vbt_data()

2016-09-20 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 20 Sep 2016 10:40:22 +0200 * Adjust a jump target. * Delete the explicit initialisation for the local variable "ret" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring --- drivers/gpu/drm/gma500/mid_bios.c | 11 +-- 1 file c

GPU-DRM-GMA500: Use kmalloc_array() in mid_get_vbt_data_r10()

2016-09-20 Thread SF Markus Elfring
>> A multiplication for the size determination of a memory allocation >> indicated that an array data structure should be processed. >> Thus use the corresponding function "kmalloc_array". >> >> This issue was detected by using the Coccinelle software. > > Did you test this running on the hardware

GPU-DRM-GMA500: One error message less for a GCT revision mismatch in mid_get_vbt_data()

2016-09-20 Thread SF Markus Elfring
>> A single error message should be sufficient to inform about >> the detection of an unknown GCT revision at the end. >> Thus return after the logging call in this case directly. > > Did you test this? What is your software development opinion for this update suggestion? Regards, Markus

[PATCH 1/5] GPU-DRM-nouveau: Use kmalloc_array() in nvbios_iccsense_parse()

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 20 Sep 2016 22:22:14 +0200 * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle s

GPU-DRM-GMA500: One error message less for a GCT revision mismatch in mid_get_vbt_data()

2016-09-20 Thread SF Markus Elfring
>>> A single error message should be sufficient to inform about >>> the detection of an unknown GCT revision at the end. >>> Thus return after the logging call in this case directly. >> >> Did you test this? >> > > Don't be a dummy... This is easy to review an it fixes a bug. Thanks for this kin

GPU-DRM-GMA500: One error message less for a GCT revision mismatch in mid_get_vbt_data()

2016-09-20 Thread SF Markus Elfring
> If you restricted yourself to only sending bug fixes and not sending > any more cleanups that would be good. Thanks for another bit of constructive feedback. > Please stop sending clean up patches. This will not happen for a while. I am in the process of informing various developers about so

[PATCH 4/5] GPU-DRM-nouveau: Adjust a kzalloc() call in gt215_ram_new()

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 08:44:38 +0200 The script "checkpatch.pl" can point out that assignments should usually not be performed within condition checks. Thus move the assignment for one local variable to a separate statement in this function. Signed-off-by: Markus Elfring -

[PATCH 3/5] GPU-DRM-nouveau: Delete unnecessary braces

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 08:28:08 +0200 Do not use curly brackets at four source code places where a single statement should be sufficient. Signed-off-by: Markus Elfring --- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c | 14 +- 1 file changed, 5 insertions(+

[PATCH 5/5] GPU-DRM-nouveau: Add space after an "if"

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 08:58:41 +0200 Use another space character behind the keyword "if" according to the Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

[PATCH 0/5] GPU-DRM-nouveau: Fine-tuning for five function implementations

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 09:09:09 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (5): Use kmalloc_array() in nvbios_iccsense_parse() Use kmalloc_array() in gt215_link_train() Delete unnecessary braces Adjust a kz

[PATCH 2/5] GPU-DRM-nouveau: Use kmalloc_array() in gt215_link_train()

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 20 Sep 2016 22:32:14 +0200 * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle s

GPU-DRM-nouveau: Delete unnecessary braces

2016-09-21 Thread SF Markus Elfring
> The original style was correct, the new style is wrong. I find your feedback interesting for further clarifications. > Multi-line indents get curly braces for readability. How do you think about to transform such an information into an official specification for the the document "CodingStyle"

[PATCH 00/14] GPU-DRM-OMAP: Fine-tuning for several function implementations

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 18:28:38 +0200 Several update suggestions were taken into account from static source code analysis. Markus Elfring (14): Use kmalloc_array() in tiler_map_show() Replace another kmalloc() call by kmalloc_array() in tiler_map_show() Less function c

[PATCH 01/14] GPU-DRM-OMAP: Use kmalloc_array() in tiler_map_show()

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 12:23:46 +0200 A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software.

[PATCH 02/14] GPU-DRM-OMAP: Replace another kmalloc() call by kmalloc_array() in tiler_map_show()

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 12:54:07 +0200 A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array" at another place. Signed-off-by: Markus Elfring --- driv

[PATCH 03/14] GPU-DRM-OMAP: Less function calls in tiler_map_show() after error detection

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 13:16:20 +0200 The kfree() function was called in up to two cases by the tiler_map_show() function during error handling even if the passed variable contained a null pointer. * Adjust jump targets according to the Linux coding style convention. * Spli

[PATCH 05/14] GPU-DRM-OMAP: Improve a size determination in dmm_txn_append()

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 13:53:11 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Mar

[PATCH 06/14] GPU-DRM-OMAP: Improve a size determination in omap_dmm_probe()

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 17:21:57 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Mar

[PATCH 07/14] GPU-DRM-OMAP: Rename a jump label in omap_dmm_probe()

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 17:30:25 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) di

[PATCH 08/14] GPU-DRM-OMAP: Rename a jump label in dmm_txn_commit()

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 17:32:42 +0200 Adjust a jump target so that redundant checks can be avoided at the end. Signed-off-by: Markus Elfring --- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/d

[PATCH 04/14] GPU-DRM-OMAP: Delete an unnecessary variable initialisation in tiler_map_show()

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 13:31:45 +0200 The local variable "map" will be set to an appropriate pointer a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 2 +- 1 file changed, 1 in

[PATCH 09/14] GPU-DRM-OMAP: Delete an unnecessary variable initialisation in dmm_txn_commit()

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 17:34:40 +0200 The local variable "ret" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 2 +- 1 file changed, 1 inse

[PATCH 10/14] GPU-DRM-OMAP: Use kmalloc_array() in omap_gem_attach_pages()

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 17:37:04 +0200 A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software.

[PATCH 11/14] GPU-DRM-OMAP: Replace a kzalloc() call by kcalloc() in omap_gem_attach_pages()

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 17:40:20 +0200 The script "checkpatch.pl" can point information out like the following. WARNING: Prefer kcalloc over kzalloc with multiply Thus fix the affected source code place. Signed-off-by: Markus Elfring --- drivers/gpu/drm/omapdrm/omap_gem.c

[PATCH 12/14] GPU-DRM-OMAP: Move a variable assignment in omap_gem_attach_pages()

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 17:42:28 +0200 Move one assignment for the local variable "npages" so that its setting will only be performed after a call of the function "drm_gem_get_pages" succeeded by this function. Signed-off-by: Markus Elfring --- drivers/gpu/drm/omapdrm/omap_

[PATCH 13/14] GPU-DRM-OMAP: Rename a jump label in omap_gem_new_dmabuf()

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 17:45:04 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/gpu/drm/omapdrm/omap_gem.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/dr

[PATCH 14/14] GPU-DRM-OMAP: Rename a jump label in four functions

2016-09-21 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 18:00:23 +0200 Adjust jump labels according to the current Linux coding style convention. Thus replace the identifier "fail" by "unlock" for this refactoring. Signed-off-by: Markus Elfring --- drivers/gpu/drm/omapdrm/omap_gem.c | 27 +++--

GPU-DRM-QXL: Move three assignments in qxl_device_init()

2016-09-22 Thread SF Markus Elfring
> Guys, please stop accepting patches from Markus! I would appreciate a bit more explanation for this request. > Markus, you always introduce bugs. I find the wording "always" exaggerated. It can also happen that I make another programming mistake occasionally. > I have asked you over and ov

GPU-DRM-OMAP: Fine-tuning for several function implementations

2016-09-22 Thread SF Markus Elfring
>> For the next pile of driver patches _please_ talk with driver maintainers >> before starting to create&submit patches. Did the software development discussion start a bit here? Would you like to support an other "talking style" on a conference like in Berlin next month? >> Like I said I won'

[PATCH 0/4] GPU-DRM-QXL: Fine-tuning for three function implementations

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 08:08:08 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): Use kmalloc_array() in qxl_device_init() Move three assignments in qxl_device_init() Improve a size determination in qxl_driver_

[PATCH 3/4] GPU-DRM-TILCDC: Less function calls in tilcdc_convert_slave_node() after error detection

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 10:06:50 +0200 The of_node_put() function was called in some cases by the tilcdc_convert_slave_node() function during error handling even if the passed variable contained a null pointer. * Adjust jump targets according to the Linux coding style convent

[PATCH 1/4] GPU-DRM-TILCDC: Use kmalloc_array() in kfree_table_init()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 09:05:14 +0200 A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle software.

[PATCH 0/4] GPU-DRM-TILCDC: Fine-tuning for two function implementations

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 10:25:43 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): Use kmalloc_array() Return directly after a failed kfree_table_init() in tilcdc_convert_slave_node() Less function calls in til

[PATCH 2/4] GPU-DRM-TILCDC: Return directly after a failed kfree_table_init() in tilcdc_convert_slave_node()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 09:29:23 +0200 Return directly after a memory allocation failed in this function at the beginning. Signed-off-by: Markus Elfring --- drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driv

[PATCH 4/4] GPU-DRM-TILCDC: Delete unnecessary variable initialisations in tilcdc_convert_slave_node()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 10:15:36 +0200 Four local variables will be set to an appropriate pointer a bit later. Thus omit the explicit initialisation which became unnecessary with a previous update step. Signed-off-by: Markus Elfring --- drivers/gpu/drm/tilcdc/tilcdc_slave_c

[PATCH 1/4] GPU-DRM-QXL: Use kmalloc_array() in qxl_device_init()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 22:26:08 +0200 * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle s

  1   2   3   4   >