[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

[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

[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

[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: Mark

[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 --- drive

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

2016-10-12 Thread SF Markus Elfring
inux coding style convention. >> >> Signed-off-by: Markus Elfring > > Not sure this is worth it, I'll pass. Patch 1 merged. Unfortunately, it seems that this selection of only one update step from this small patch series has got unwanted consequences. Will the update sugges

[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

[PATCH 3/3] drm/vmwgfx: Adjust checks for null pointers in 13 functions

2016-09-23 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 23 Sep 2016 17:53:49 +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 affec

[PATCH 2/3] drm/vmwgfx: Use memdup_user() rather than duplicating its implementation

2016-09-23 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 23 Sep 2016 17:26:02 +0200 * Reuse existing functionality from memdup_user() instead of keeping duplicate source code. * Try this copy operation before allocating memory for the data structure member "offsets". * Delete the local variable "us

[PATCH 1/3] drm/vmwgfx: Use kmalloc_array() in vmw_surface_define_ioctl()

2016-09-23 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 21:54:33 +0200 Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the Coccinell

[PATCH 0/3] drm/vmwgfx: Fine-tuning for 13 function implementations

2016-09-23 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 23 Sep 2016 18:24:32 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (3): Use kmalloc_array() in vmw_surface_define_ioctl() Use memdup_user() rather than duplicating its implementation Adjust checks

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

2016-09-23 Thread SF Markus Elfring
>> I am trying to improve various open issues also in Linux source files. >> > That the fact that you see issues (in these particular cases) while > others do not I guess that the discussed "story" affects more challenges in communication and different opinions about where to invest software devel

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

2016-09-23 Thread SF Markus Elfring
>> Do other identifiers fit better to a specification from the document >> "CodingStyle" >> like the following? >> >> "… >> Choose label names which say what the goto does or why the goto exists. >> …" >> >> >> Does this wording need any more adjustments? > > No. I have got an other impressi

GPU-DRM-TILCDC: Less function calls in tilcdc_convert_slave_node() after error detection

2016-09-23 Thread SF Markus Elfring
>> I see a need to improve not only correctness there but also a bit of >> software efficiency. > > If you can measure any performance difference and present some results > (esp. considering that this is something that just happens when the > driver is loaded), then we'll talk. Are you really int

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

2016-09-23 Thread SF Markus Elfring
> Calling the label "unlock" instead of "out" is arguable a little better, Thanks that you can follow a renaming for this direction in principle. > but nothing I would call a major improvement either. This was not my intention for such an use case. I am proposing some small software updates ac

GPU-DRM-TILCDC: Less function calls in tilcdc_convert_slave_node() after error detection

2016-09-23 Thread SF Markus Elfring
> iirc, there are Coccinelle rules that find code with unnecessary null > checks and removes them. This kind of software change is not needed here. I find that a corresponding return value check happens one function call too late. > Although you probably made this complex enough that cocinelle

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

2016-09-23 Thread SF Markus Elfring
> It's just the names like "out" or "restart" perfectly explain why the labels > exists. I have got an other impression. > So they fulfill this requirement from the coding style as far as I can see. Short identifiers might look more convenient in some cases because they are quicker to type.

GPU-DRM-TILCDC: Less function calls in tilcdc_convert_slave_node() after error detection

2016-09-23 Thread SF Markus Elfring
>> A special view on software simplicity can also lead to questionable >> intermediate >> function implementation, can't it? > > I don't really follow. But in any case I do not see anything > questionable in the current tilcdc_convert_slave_node() implementation. I identified update candidates t

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

2016-09-23 Thread SF Markus Elfring
> Additional to that I don't really see the point in renaming some of the jump > labels, I am suggesting changes for another collateral software evolution. > if you call it "restart" or "lock_restart" doesn't make much difference. Do other identifiers fit better to a specification from the doc

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

2016-09-23 Thread SF Markus Elfring
> Markus, please contact the list in advance in future before posting a bunch > of patches that don't fix any problems. I am trying to improve various open issues also in Linux source files. Unfortunately, some of the proposed changes might not fit to your software development attention at the mo

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

2016-09-23 Thread SF Markus Elfring
> I will refrain from merging any more style/checkpatch/"code cleanup" > patches from Markus until we start getting real, tested, bug fixes. Can such a kind of feedback be also interpreted in the way that you insist to keep some weaknesses which I tried to point in the Linux source code out for an

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

2016-09-23 Thread SF Markus Elfring
>> Would you like to discuss the statistics for my failure (or success) rate >> a bit more so that involved issues can be clarified in a constructive way? > > It should be that you target 20 bug fixes for each new regression > that you add. How do you think about to clarify any concrete "regressi

GPU-DRM-TILCDC: Less function calls in tilcdc_convert_slave_node() after error detection

2016-09-23 Thread SF Markus Elfring
> I think the "if (node)" in the of_node_put() is there on purpose, Yes, of course. Does such an implementation detail correspond to a general software design pattern? > because it potentially saves the caller one extra if()-statement This can occasionally happen. > and keeps the caller cod

GPU-DRM-TILCDC: Less function calls in tilcdc_convert_slave_node() after error detection

2016-09-22 Thread SF Markus Elfring
>> 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 convention. >> >> * Split a condition check for resour

GPU-DRM-TILCDC: Return directly after a failed kfree_table_init() in tilcdc_convert_slave_node()

2016-09-22 Thread SF Markus Elfring
> I'll pick this up, but with your permission I change > the commit subject to follow the current convention. I guess that I can accept the integration of this update suggestion also with an adjusted prefix in the commit title. ;-) Regards, Markus

[PATCH 14/14] GPU-DRM-TTM: Mark an array of text strings as "const" in ttm_dma_pool_init()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 18:46:01 +0200 The local variable "n" was not modified after it was initialized with a few text strings. Thus express this detail also by the data type qualifier "const". Signed-off-by: Markus Elfring --- drivers/gpu/drm/ttm/ttm_

[PATCH 13/14] GPU-DRM-TTM: Delete unnecessary variable initialisations in ttm_dma_pool_init()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 17:37:24 +0200 Two 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/ttm

[PATCH 12/14] GPU-DRM-TTM: Less function calls in ttm_dma_pool_init() after error detection

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 17:30:52 +0200 The kfree() function was called in up to two cases by the ttm_dma_pool_init() function during error handling even if the passed variable contained a null pointer. Adjust jump targets according to the Linux coding style convention

[PATCH 11/14] GPU-DRM-TTM: Return an error code only as a constant in ttm_dma_pool_init()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 17:17:19 +0200 * Return an error code without storing it in a local variable. * Delete the local variable "ret" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring --- drivers/gpu/drm/ttm/ttm_page_alloc

[PATCH 10/14] GPU-DRM-TTM: Return directly after a failed kobject_init_and_add() in ttm_dma_page_alloc_init()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 16:24:43 +0200 * Return directly after a call of the function "kobject_init_and_add" failed here. * Delete the jump target "err" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring ---

[PATCH 09/14] GPU-DRM-TTM: Return directly after a failed kzalloc() in ttm_dma_page_alloc_init()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 16:16:36 +0200 * Return directly after a memory allocation failed in this function at the beginning. * Delete the explicit initialisation for the local variable "ret" which became unnecessary with this refactoring. Signed-off-by: Mark

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

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 16:02:36 +0200 Adjust a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu

[PATCH 07/14] GPU-DRM-TTM: Rename jump labels in ttm_dma_page_pool_free()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 15:32:32 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH 06/14] GPU-DRM-TTM: Rename a jump label in ttm_dma_pool_alloc_new_pages()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 14:54:12 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH 05/14] GPU-DRM-TTM: Use kmalloc_array() in two more functions

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 14:48:39 +0200 * Multiplications for the size determination of memory allocations indicated that array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the

[PATCH 04/14] GPU-DRM-TTM: Rename a jump label in ttm_page_pool_get_pages()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 14:36:47 +0200 Adjust a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 03/14] GPU-DRM-TTM: Rename jump labels in ttm_page_pool_free()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 14:30:12 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH 02/14] GPU-DRM-TTM: Rename a jump label in ttm_alloc_new_pages()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 14:16:05 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu

[PATCH 01/14] GPU-DRM-TTM: Use kmalloc_array() in two functions

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 14:00:31 +0200 * Multiplications for the size determination of memory allocations indicated that array data structure should be processed. Thus use the corresponding function "kmalloc_array". This issue was detected by using the

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

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 19:00:01 +0200 Several update suggestions were taken into account from static source code analysis. Markus Elfring (14): Use kmalloc_array() in two functions Rename a jump label in ttm_alloc_new_pages() Rename jump labels in ttm_page_pool_free

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

2016-09-22 Thread SF Markus Elfring
> For starters make sure the patches land actually on the list. How do you think about to take another look at this update suggestion also by the usual archive interfaces? * https://patchwork.kernel.org/patch/9344521/ * https://lkml.kernel.org/r/ > Only the cover letter arrived here. Would yo

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 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

[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

[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

[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 Coccinell

[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

[PATCH 4/4] GPU-DRM-QXL: Adjust checks for null pointers in three functions

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 22 Sep 2016 08:00:08 +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 affec

[PATCH 3/4] GPU-DRM-QXL: Improve a size determination in qxl_driver_load()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 22:48:34 +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. Sig

[PATCH 2/4] GPU-DRM-QXL: Move three assignments in qxl_device_init()

2016-09-22 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 21 Sep 2016 22:33:54 +0200 Move the assignments for three data structure members to the end so that they will only be performed if the desired resource allocations succeeded by this function. Signed-off-by: Markus Elfring --- drivers/gpu/drm/qxl/qxl_kms.c | 9

[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

[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

[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/oma

[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

[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 --- dri

[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/d

[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 Coccinell

[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

[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

[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

[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. Sig

[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. Sig

[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

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

2016-09-21 Thread 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

[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

[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: Mark

[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 Coccinell

[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

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 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(+),

[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: Mark

[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 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

[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

[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

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

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
>> 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

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

[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 +

[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

[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

[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

[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

[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 Coccinell

[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

[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 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_

[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_

[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_

[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 Coccinell

[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

[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 th

[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

[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 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. Sig

[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 Coccinell

[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

[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

<    1   2   3   4   5   6   7   >