Re: [PATCH v10 6/8] x86/vmware: Correct macro names

2024-05-25 Thread Markus Elfring
> VCPU_RESERVED and LEGACY_X2APIC are not VMware hypercall commands. > These are bits in return value of VMWARE_CMD_GETVCPU_INFO command. > Change VMWARE_CMD_ prefix to GETVCPU_INFO_ one. … Can such information be relevant for the addition of the tag “Fixes”? Regards, Markus

Re: [PATCH 5/7] drm/bridge: cdns-dsi: Support atomic bridge APIs

2024-05-21 Thread Markus Elfring
> Change the existing (and deparacated) bridge hooks, … deprecated? Regards, Markus

Re: [PATCH v11] drm/bridge: it6505: fix hibernate to resume no display issue

2024-05-20 Thread Markus Elfring
> … This patch has been implemented to prevent … Under which circumstances will imperative wordings be applied for another improved change description? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.9#n94 Regards, Markus

Re: [PATCH v9] drm/bridge: it6505: This patch fixes hibernate to resume no display issue

2024-05-17 Thread Markus Elfring
Please omit the word combination “This patch” from the summary phrase. … > But the input FIFO reset will also trigger error interrupts of output > module rising.Thus, it6505 have to wait a period can clear those > expected error interrupts caused by manual hardware reset in one > interrupt

Re: [PATCH 3/3] drm/loongson: Refactor lsdc device initialize and the output port

2024-05-16 Thread Markus Elfring
… > fullfill the implement under the new framework. fulfil the implementation? Please improve your change descriptions another bit. Regards, Markus

Re: [PATCH 2/3] drm/loongson: Introduce component framework support

2024-05-16 Thread Markus Elfring
… > The idea is to devide the exterinal module dependent part … divide | separate the external? Please avoid typos in such a change description. Regards, Markus

Re: [PATCH 1/3] drm/loongson: Add helpers for creating subdevice

2024-05-15 Thread Markus Elfring
> In some display subsystems, the functionality of a PCI(e) device may too … > of the functionality into child devices can helps to achieve better > modularity, eaiser for understand and maintain. > > Add the loongson_create_platform_device() function to pove the way … Please avoid typos in such

Re: [PATCH v8] drm/bridge: it6505: fix hibernate to resume no display issue

2024-05-15 Thread Markus Elfring
I suggest to reconsider the distribution of email addresses over recipient lists once more. … > But the input FIFO reset will also trigger error interrupts of output module > rising. > Thus, it6505 have to wait a period can clear those expected error interrupts > caused by manual hardware reset

Re: [PATCH v8 0/1] drm/bridge: it6505: fix hibernate to resume no display issue

2024-05-15 Thread Markus Elfring
> New patch description for … * How do you think about to omit a cover letter for a single patch? * Would it be helpful to specify any email addresses in the message field “To” (besides “Cc”)? Regards, Markus

Re: [PATCH] drm/amd/pm: Fix error code in vega10_hwmgr_backend_init()

2024-05-04 Thread Markus Elfring
> Return -EINVAL on error instead of success. Also on the success path, > return a literal zero instead of "return result;" How do you think about to omit the initialisation for the variable “result” in another update step? Regards, Markus

Re: [PATCH] drm/virtio: fix memory leak of vbuf

2024-04-29 Thread Markus Elfring
… > Therefore, when upload fails,vbuf needs to be free directly. Please choose a corresponding imperative wording for an improved change description. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.9-rc5#n94 Regards,

Re: [PATCH] drm/amd/display: Fix division by zero in setup_dsc_config

2024-04-22 Thread Markus Elfring
… > +++ b/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c > @@ -1055,7 +1055,12 @@ static bool setup_dsc_config( > if (!is_dsc_possible) > goto done; > > - dsc_cfg->num_slices_v = pic_height/slice_height; > + if (slice_height > 0) > + dsc_cfg->num_slices_v =

Re: [PATCH] drm: bridge: cdns-mhdp8546: Fix missing mutex unlock on error path

2024-04-19 Thread Markus Elfring
… > Add a mutex unlock call. How do you think about a wording variant like the following? Extend the exception handling so that the missed mutex_unlock() call will be performed finally. Regards, Markus

[PATCH] soc: qcom: pmic_glink_altmode: Use common error handling code in pmic_glink_altmode_probe()

2024-02-28 Thread Markus Elfring
From: Markus Elfring Date: Wed, 28 Feb 2024 18:45:13 +0100 Add a jump target so that a bit of exception handling can be better reused at the end of this function implementation. This issue was transformed by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/soc/qcom

[PATCH] drm/msm/a6xx: Improve error handling in a6xx_gmu_rpmh_init()

2024-02-26 Thread Markus Elfring
From: Markus Elfring Date: Mon, 26 Feb 2024 18:46:38 +0100 The label “err” was used as a target for two statements despite of the implementation detail that failure conditions could be handled better. * Thus return directly after a call of the function “a6xx_gmu_get_mmio” failed

Re: [3/6] soc: qcom: pmic_glink_altmode: fix drm bridge use-after-free

2024-02-20 Thread Markus Elfring
>> The function call “fwnode_handle_put(fwnode)” is used in multiple if >> branches. >> https://elixir.bootlin.com/linux/v6.8-rc5/source/drivers/soc/qcom/pmic_glink_altmode.c#L435 >> >> I suggest to add a jump target so that a bit of exception handling >> can be better reused at the end of this

Re: [PATCH 3/6] soc: qcom: pmic_glink_altmode: fix drm bridge use-after-free

2024-02-20 Thread Markus Elfring
… > Specifically, the dp-hpd bridge is currently registered before all > resources have been acquired which means that it can also be > deregistered on probe deferrals. > > In the meantime there is a race window where the new aux bridge driver > (or PHY driver previously) may have looked up the

Re: [PATCH 3/6] soc: qcom: pmic_glink_altmode: fix drm bridge use-after-free

2024-02-20 Thread Markus Elfring
… > Specifically, the dp-hpd bridge is currently registered before all > resources have been acquired which means that it can also be > deregistered on probe deferrals. > > In the meantime there is a race window where the new aux bridge driver > (or PHY driver previously) may have looked up the

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

2024-02-19 Thread Markus Elfring
> 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 … > @@ -74,6 +75,8 @@ struct device *drm_dp_hpd_bridge_register(struct device > *parent, > > ret = auxiliary_device_init(adev);

[PATCH v2] drm/arcpgu: Use devm_platform_ioremap_resource() in arcpgu_load()

2024-02-06 Thread Markus Elfring
From: Markus Elfring Date: Tue, 6 Feb 2024 20:43:10 +0100 A wrapper function is available since the commit 7945f929f1a77a1c8887a97ca07f87626858ff42 ("drivers: provide devm_platform_ioremap_resource()"). * Thus reuse existing functionality instead of keeping duplicate source code.

[PATCH v2] drm/tegra: dsi: Use devm_platform_ioremap_resource() in tegra_dsi_probe()

2024-02-06 Thread Markus Elfring
From: Markus Elfring Date: Tue, 6 Feb 2024 20:22:56 +0100 A wrapper function is available since the commit 7945f929f1a77a1c8887a97ca07f87626858ff42 ("drivers: provide devm_platform_ioremap_resource()"). * Thus reuse existing functionality instead of keeping duplicate source code.

[PATCH v2] drm/hisilicon: Use devm_platform_ioremap_resource() in dsi_parse_dt()

2024-02-06 Thread Markus Elfring
From: Markus Elfring Date: Tue, 6 Feb 2024 19:51:25 +0100 A wrapper function is available since the commit 7945f929f1a77a1c8887a97ca07f87626858ff42 ("drivers: provide devm_platform_ioremap_resource()"). * Thus reuse existing functionality instead of keeping duplicate source code.

[PATCH] drm/arcpgu: Use devm_platform_get_and_ioremap_resource() in arcpgu_load()

2024-02-05 Thread Markus Elfring
From: Markus Elfring Date: Mon, 5 Feb 2024 11:16:27 +0100 A wrapper function is available since the commit 890cc39a879906b63912482dfc41944579df2dc6 ("drivers: provide devm_platform_get_and_ioremap_resource()"). Thus reuse existing functionality instead of keeping duplicate s

[PATCH] drm/tegra: dsi: Use devm_platform_get_and_ioremap_resource() in tegra_dsi_probe()

2024-02-05 Thread Markus Elfring
From: Markus Elfring Date: Mon, 5 Feb 2024 10:51:36 +0100 A wrapper function is available since the commit 890cc39a879906b63912482dfc41944579df2dc6 ("drivers: provide devm_platform_get_and_ioremap_resource()"). Thus reuse existing functionality instead of keeping duplicate s

[PATCH] drm/mediatek: Use devm_platform_get_and_ioremap_resource() in mtk_hdmi_ddc_probe()

2024-02-05 Thread Markus Elfring
From: Markus Elfring Date: Mon, 5 Feb 2024 10:18:47 +0100 A wrapper function is available since the commit 890cc39a879906b63912482dfc41944579df2dc6 ("drivers: provide devm_platform_get_and_ioremap_resource()"). Thus reuse existing functionality instead of keeping duplicate s

[PATCH] drm/hisilicon: Use devm_platform_get_and_ioremap_resource() in dsi_parse_dt()

2024-02-05 Thread Markus Elfring
From: Markus Elfring Date: Mon, 5 Feb 2024 08:58:21 +0100 A wrapper function is available since the commit 890cc39a879906b63912482dfc41944579df2dc6 ("drivers: provide devm_platform_get_and_ioremap_resource()"). Thus reuse existing functionality instead of keeping duplicate s

[PATCH] drm/bridge: analogix_dp: Use devm_platform_get_and_ioremap_resource() in analogix_dp_probe()

2024-02-04 Thread Markus Elfring
From: Markus Elfring Date: Mon, 5 Feb 2024 08:30:57 +0100 A wrapper function is available since the commit 890cc39a879906b63912482dfc41944579df2dc6 ("drivers: provide devm_platform_get_and_ioremap_resource()"). Thus reuse existing functionality instead of keeping duplicate s

[PATCH] drm/imagination: Use memdup_user() rather than duplicating its implementation

2024-01-28 Thread Markus Elfring
From: Markus Elfring Date: Sun, 28 Jan 2024 20:50:36 +0100 * Reuse existing functionality from memdup_user() instead of keeping duplicate source code. Generated by: scripts/coccinelle/api/memdup_user.cocci * Delete labels and statements which became unnecessary with this refactoring

Re: [PATCH] drm/msm/adreno: Add a null pointer check in zap_shader_load_mdt()

2024-01-18 Thread Markus Elfring
>>> kasprintf() returns a pointer to dynamically allocated memory >>> which can be NULL upon failure. Ensure the allocation was successful >>> by checking the pointer validity. >> … >>> +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c >>> @@ -144,6 +144,10 @@ static int zap_shader_load_mdt(struct

Re: [PATCH] drm/msm/adreno: Add a null pointer check in zap_shader_load_mdt()

2024-01-17 Thread Markus Elfring
> kasprintf() returns a pointer to dynamically allocated memory > which can be NULL upon failure. Ensure the allocation was successful > by checking the pointer validity. … > +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c > @@ -144,6 +144,10 @@ static int zap_shader_load_mdt(struct msm_gpu *gpu, >

Re: [PATCH 0/5] drm/amd: Adjustments for three function implementations

2024-01-05 Thread Markus Elfring
> Date: Tue, 11 Apr 2023 14:36:36 +0200 > > Some update suggestions were taken into account > from static source code analysis. > > Markus Elfring (5) > amdgpu: Move a variable assignment behind a null pointer check in > amdgpu_ras_interrupt_dispatch() > d

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

2024-01-05 Thread 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

Re: [1/3] drm: property: One function call less in drm_property_create() after error detection

2024-01-04 Thread Markus Elfring
> The commit log says: > > This issue was detected by using the Coccinelle software. > > Either that's inaccurate then, No. > or you should be able to provide the corresponding output from Coccinelle. Do you find data (like the following) more helpful for the adjustment of affected

Re: [1/3] drm: property: One function call less in drm_property_create() after error detection

2024-01-03 Thread Markus Elfring
>>> Out of curiosity, what exactly did Coccinelle report? >> >> Some SmPL scripts from my own selection tend to point questionable >> implementation details out. > > That doesn't answer my question. It should. > Without seeing the actual Coccinelle report, There is no “official” report

Re: [PATCH 1/3] drm: property: One function call less in drm_property_create() after error detection

2024-01-03 Thread Markus Elfring
>> The kfree() function was called in one case by the >> drm_property_create() function during error handling >> even if the passed data structure member contained a null pointer. >> This issue was detected by using the Coccinelle software. >> >> Thus use another label. … >> +++

[PATCH] drm/vc4: Improve exception handling in vc4_validate_shader()

2023-12-26 Thread Markus Elfring
From: Markus Elfring Date: Tue, 26 Dec 2023 18:22:54 +0100 Memory releases were triggered during error handling only over the label “fail”. 1. Return directly after a call of the function “kcalloc” failed at the beginning. 2. Reduce the data processing at the end to a required kfree() call

[PATCH 2/2] drm/sched: Return an error code only as a constant in drm_sched_init()

2023-12-26 Thread Markus Elfring
From: Markus Elfring Date: Tue, 26 Dec 2023 16:37:37 +0100 Return an error code without storing it in an intermediate variable. Signed-off-by: Markus Elfring --- drivers/gpu/drm/scheduler/sched_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 1/2] drm/sched: One function call less in drm_sched_init() after error detection

2023-12-26 Thread Markus Elfring
From: Markus Elfring Date: Tue, 26 Dec 2023 16:30:25 +0100 The kfree() function was called in one case by the drm_sched_init() function during error handling even if the passed data structure member contained a null pointer. This issue was detected by using the Coccinelle software. Thus adjust

[PATCH 0/2] drm/sched: Adjustments for drm_sched_init()

2023-12-26 Thread Markus Elfring
From: Markus Elfring Date: Tue, 26 Dec 2023 16:48:48 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (2): One function call less after error detection Return an error code only as a constant drivers/gpu/drm/scheduler/sched_main.c

[PATCH 1/3] drm: property: One function call less in drm_property_create() after error detection

2023-12-26 Thread Markus Elfring
From: Markus Elfring Date: Tue, 26 Dec 2023 08:44:37 +0100 The kfree() function was called in one case by the drm_property_create() function during error handling even if the passed data structure member contained a null pointer. This issue was detected by using the Coccinelle software. Thus

[PATCH 3/3] drm: property: Improve four size determinations

2023-12-26 Thread Markus Elfring
From: Markus Elfring Date: Tue, 26 Dec 2023 09:45:36 +0100 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. This issue

[PATCH 2/3] drm: property: Delete an unnecessary initialisation in drm_property_create()

2023-12-26 Thread Markus Elfring
From: Markus Elfring Date: Tue, 26 Dec 2023 08:46:12 +0100 The variable “property” will eventually 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/drm_property.c | 2 +- 1 file changed, 1

[PATCH 0/3] drm: property: Adjustments for three function implementations

2023-12-26 Thread Markus Elfring
From: Markus Elfring Date: Tue, 26 Dec 2023 10:26:36 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (3): One function call less in drm_property_create() after error detection Delete an unnecessary initialisation in drm_property_create

Re: [PATCH] accel/qaic: Fix slicing memory leak

2023-07-21 Thread Markus Elfring
> Slicing configuration data from user is stored in a temporary buffer > which should be freed unconditionally. Are imperative change descriptions still preferred? See also:

Re: [PATCH] drm/panel: nt36523: fix parameter check in nt36523_probe()

2023-07-13 Thread Markus Elfring
> Make IS_ERR() judge the mipi_dsi_device_register_full() function return Would the term “return value” be relevant here? Would you like to improve this change description also according to review comments from other patches? How do you think about to add the tag “Fixes” because of a desirable

Re: [PATCH] drm/panel: novatek-nt35950: fix parameter check in nt35950_probe()

2023-07-13 Thread Markus Elfring
> Make IS_ERR() judge the mipi_dsi_device_register_full() function return Would the term “return value” be relevant here? Would you like to improve this change description also according to review comments from other patches? How do you think about to add the tag “Fixes” because of a desirable

Re: [PATCH] drm/virtio: remove some redundant code

2023-07-11 Thread Markus Elfring
> virtio_gpu_get_vbuf always be successful, > so remove the error judgment. How do you think about to improve this change description any more? Regards, Markus

Re: [PATCH] drm/nouveau/disp/g94: enable HDMI

2023-07-08 Thread Markus Elfring
Would a corresponding imperative description be helpful also for such a small change? See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.4#n94 Regards, Markus

Re: [PATCH] gpu: drm/amd: Fix the bug in list_for_each_entry() loops

2023-06-12 Thread Markus Elfring
> pqn bound in list_for_each_entry loop will not be null, so there is > no need to check whether pqn is NULL or not. Would it be more appropriate to use the wording “Delete an unnecessary check within a list_for_each_entry() loop” instead of “Fix the bug in list_for_each_entry() loops” in the

Re: [PATCH 00/30] fbdev: Make userspace interfaces optional

2023-06-07 Thread Markus Elfring
> Ha! It says 'distrobutions'. Do you tend to prefer any distributions? Regards, Markus

Re: [PATCH 00/30] fbdev: Make userspace interfaces optional

2023-06-07 Thread Markus Elfring
> Modern Linux distrobutions have adopted DRM drivers for graphics > output and use fbdev only for the kernel's framebuffer console. Would you like to avoid a typo in subsequent cover letters? Regards, Markus

Re: [2/4] fbdev: imsttfb: Fix exception handling in imsttfb_probe()

2023-06-07 Thread Markus Elfring
> The exception handling was incomplete. > > The label “error” was used to jump to another pointer check despite of > the detail in the implementation of the function “imsttfb_probe” > that it was determined already that the corresponding variable > contained a null pointer. > > * Thus use more

Re: [1/4] fbdev: imsttfb: Fix error handling in init_imstt()

2023-06-07 Thread Markus Elfring
> I think the return value isn't checked at all, so you could > simply return below "-ENODEV" for all cases (instead of "return ret"). > Then you don't need the e_nodev label and can simplify the flow. I noticed that the software evolution was continued with an other change variant. fbdev:

Re: [1/4] fbdev: imsttfb: Fix error handling in init_imstt()

2023-05-25 Thread Markus Elfring
>> Can it be helpful to distinguish involved error codes better? > > No. I find such a feedback surprising. May the error code be preserved from a failed call of the function “fb_alloc_cmap”? Regards, Markus

Re: [PATCH 1/4] fbdev: imsttfb: Fix error handling in init_imstt()

2023-05-24 Thread Markus Elfring
>> The return value was overlooked from a call of >> the function “fb_alloc_cmap”. >> >> * Thus use a corresponding error check. >> >> * Add two jump targets so that a bit of exception handling >>    can be better reused at the end of this function. … >> +++ b/drivers/video/fbdev/imsttfb.c … >> @@

Re: [PATCH 3/4] fbdev: imsttfb: Move a variable assignment for an error code in imsttfb_probe()

2023-05-24 Thread Markus Elfring
>> The value “-ENOMEM” was assigned to the variable “ret” >> at the beginning. >> Move this statement directly before the first ioremap() call. > > Please do not move such variables without real need. Is there a need to explain desirable effects better? > It makes backporting (of this and maybe

Re: [PATCH 1/2] fbdev: Move two variable assignments in fb_alloc_cmap_gfp()

2023-05-24 Thread Markus Elfring
>> Move the assignment for the local variables “size” and “flags” >> because the computed values were only used in a single if branch. > > Please do not move such variables without real need. Is there a need to explain desirable effects better? > It makes backporting (of this and maybe

[PATCH 2/2] fbdev: Convert a variable initialisation into a later assignment in fb_alloc_cmap_gfp()

2023-05-23 Thread Markus Elfring
From: Markus Elfring Date: Tue, 23 May 2023 21:56:55 +0200 * Assign the value “-ENOMEM” to the local variable “ret” only for the exception handling. * Use an additional label. Signed-off-by: Markus Elfring --- drivers/video/fbdev/core/fbcmap.c | 15 ++- 1 file changed, 10

[PATCH 1/2] fbdev: Move two variable assignments in fb_alloc_cmap_gfp()

2023-05-23 Thread Markus Elfring
From: Markus Elfring Date: Tue, 23 May 2023 21:30:29 +0200 Move the assignment for the local variables “size” and “flags” because the computed values were only used in a single if branch. Signed-off-by: Markus Elfring --- drivers/video/fbdev/core/fbcmap.c | 7 --- 1 file changed, 4

[PATCH 0/2] fbdev: Adjustments for fb_alloc_cmap_gfp()

2023-05-23 Thread Markus Elfring
From: Markus Elfring Date: Tue, 23 May 2023 22:04:33 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (2): Move two variable assignments Convert a variable initialisation into a later assignment drivers/video/fbdev/core/fbcmap.c | 22

[PATCH 4/4] fbdev: imsttfb: Improve a size determination in imsttfb_probe()

2023-05-23 Thread Markus Elfring
From: Markus Elfring Date: Tue, 23 May 2023 18:50:53 +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.

[PATCH 3/4] fbdev: imsttfb: Move a variable assignment for an error code in imsttfb_probe()

2023-05-23 Thread Markus Elfring
From: Markus Elfring Date: Tue, 23 May 2023 18:30:26 +0200 The value “-ENOMEM” was assigned to the variable “ret” at the beginning. Move this statement directly before the first ioremap() call. Signed-off-by: Markus Elfring --- drivers/video/fbdev/imsttfb.c | 2 +- 1 file changed, 1 insertion

[PATCH 2/4] fbdev: imsttfb: Fix exception handling in imsttfb_probe()

2023-05-23 Thread Markus Elfring
From: Markus Elfring Date: Tue, 23 May 2023 15:40:43 +0200 The exception handling was incomplete. The label “error” was used to jump to another pointer check despite of the detail in the implementation of the function “imsttfb_probe” that it was determined already that the corresponding

[PATCH 1/4] fbdev: imsttfb: Fix error handling in init_imstt()

2023-05-23 Thread Markus Elfring
From: Markus Elfring Date: Tue, 23 May 2023 14:32:39 +0200 The return value was overlooked from a call of the function “fb_alloc_cmap”. * Thus use a corresponding error check. * Add two jump targets so that a bit of exception handling can be better reused at the end of this function

[PATCH 0/4] fbdev: imsttfb: Adjustments for two function implementations

2023-05-23 Thread Markus Elfring
From: Markus Elfring Date: Tue, 23 May 2023 19:07:19 +0200 Some update suggestions were taken into account from static source code analysis. Markus Elfring (4): Fix error handling in init_imstt() Fix exception handling in imsttfb_probe() Move a variable assignment for an error code

Re: [PATCH 2/5] drm/amd/display: Move three variable assignments behind condition checks in trigger_hotplug()

2023-05-16 Thread Markus Elfring
>> The address of a data structure member was determined before >> a corresponding null pointer check in the implementation of >> the function “trigger_hotplug”. >> >> Thus avoid the risk for undefined behaviour by moving the assignment >> for three local variables behind some condition checks. >

[PATCH resent] drm/bridge: it6505: Move a variable assignment behind a null pointer check in receive_timing_debugfs_show()

2023-04-28 Thread Markus Elfring
From: Markus Elfring Date: Sun, 16 Apr 2023 17:30:46 +0200 The address of a data structure member was determined before a corresponding null pointer check in the implementation of the function “receive_timing_debugfs_show”. Thus avoid the risk for undefined behaviour by moving the assignment

Re: drm/bridge: it6505: Move a variable assignment behind a null pointer check in receive_timing_debugfs_show()

2023-04-27 Thread Markus Elfring
> Fix the email Sign-off email != Sender email issue, resubmit and I'll > be able to apply this. You can pick the email from my tag “Signed-off-by” up also directly as an ordinary patch author email, can't you? Regards, Markus

Re: drm/bridge: it6505: Move a variable assignment behind a null pointer check in receive_timing_debugfs_show()

2023-04-25 Thread Markus Elfring
> This patch seems to be a part of a series without being marked as such, The mentioned patch affects only a single function implementation. > this causes issues when importing this patch with maintainer tools > like b4 which automatically pull in the entire series and not > just the specific

[PATCH] drm/mm: Adjust input parameter validation in DECLARE_NEXT_HOLE_ADDR()

2023-04-17 Thread Markus Elfring
the null pointer check. This issue was detected by using the Coccinelle software. Fixes: 5fad79fd66ff90b8c0a95319dad0b099008f8347 ("drm/mm: cleanup and improve next_hole_*_addr()") Signed-off-by: Markus Elfring --- drivers/gpu/drm/drm_mm.c | 8 ++-- 1 file changed, 6 insert

[PATCH] drm/bridge: it6505: Move a variable assignment behind a null pointer check in receive_timing_debugfs_show()

2023-04-16 Thread Markus Elfring
” behind the null pointer check. This issue was detected by using the Coccinelle software. Fixes: b5c84a9edcd418cd055becad6a22439e7c5e3bf8 ("drm/bridge: add it6505 driver") Signed-off-by: Markus Elfring --- drivers/gpu/drm/bridge/ite-it6505.c | 3 ++- 1 file changed, 2 insertions(+),

[PATCH 9/9] drm/nouveau/therm: Move an assignment statement behind a null pointer check in two functions

2023-04-16 Thread Markus Elfring
for the data structure member “fan” behind two null pointer checks. This issue was detected by using the Coccinelle software. Fixes: da06b46b720687117178d3ee85a601762f1c36b5 ("drm/nouveau/therm: cosmetic changes") Signed-off-by: Markus Elfring --- drivers/gpu/drm/nouveau/nvkm/subdev/therm/fa

[PATCH 8/9] drm/nouveau/pci: Move an expression into a function call parameter in nvkm_pcie_set_link()

2023-04-16 Thread Markus Elfring
Date: Sun, 16 Apr 2023 08:45:31 +0200 The variable “pbus” was read only once in the implementation of the function “nvkm_pcie_set_link”. Thus move the usage of an expression into a parameter for a function call. Signed-off-by: Markus Elfring --- drivers/gpu/drm/nouveau/nvkm/subdev/pci/pcie.c

[PATCH 7/9] drm/nouveau/pci: Move a variable assignment behind condition checks in nvkm_pcie_set_link()

2023-04-16 Thread Markus Elfring
some condition checks. This issue was detected by using the Coccinelle software. Fixes: bcc19d9bf5cd8d49428c487adced1aa101271b18 ("drm/nouveau/pci: implement generic code for pcie speed change") Signed-off-by: Markus Elfring --- drivers/gpu/drm/nouveau/nvkm/subdev/pci/pcie.c | 3 +

[PATCH 6/9] drm/nouveau/clk: Move a variable assignment behind a null pointer check in nvkm_pstate_new()

2023-04-16 Thread Markus Elfring
the null pointer check. This issue was detected by using the Coccinelle software. Fixes: 7c856522069755ab9d163a24ac332cd3cb35fe30 ("drm/nouveau/clk: implement power state and engine clock control in core") Signed-off-by: Markus Elfring --- drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c

[PATCH 5/9] drm/nouveau/bios/power_budget: Move an expression into a macro call parameter in nvbios_power_budget_header()

2023-04-16 Thread Markus Elfring
into a parameter for a macro call in one if branch. This issue was detected by using the Coccinelle software. Fixes: e5f8eabc0077ea3f77b3362e28d3969ae62e70f0 ("drm/nouveau/bios/power_budget: Add basic power budget parsing") Signed-off-by: Markus Elfring --- drivers/gpu/drm/nouveau/nvkm/s

[PATCH 4/9] drm/nouveau/debugfs: Replace five seq_printf() calls by seq_puts() in nouveau_debugfs_pstate_get()

2023-04-16 Thread Markus Elfring
Date: Sat, 15 Apr 2023 22:02:31 +0200 Five strings which did not contain a data format specification 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/gpu/drm

[PATCH 3/9] drm/nouveau/debugfs: Use seq_putc() in nouveau_debugfs_pstate_get()

2023-04-16 Thread Markus Elfring
Date: Sat, 15 Apr 2023 21:48:47 +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/nouveau/nouveau_debugfs.c | 2 +- 1

[PATCH 2/9] drm/nouveau/debugfs: Move a variable assignment behind a null pointer check in nouveau_debugfs_pstate_get()

2023-04-16 Thread Markus Elfring
” behind the null pointer check. This issue was detected by using the Coccinelle software. Fixes: 6e9fc177399f08446293fec7607913fdbc95e191 ("drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs") Signed-off-by: Markus Elfring --- drivers/gpu/drm/nouveau/nouveau_deb

[PATCH 1/9] drm/nouveau/debugfs: Move an expression into a function call parameter in nouveau_debugfs_pstate_set()

2023-04-16 Thread Markus Elfring
into a parameter for a function call at the end. This issue was detected by using the Coccinelle software. Fixes: 6e9fc177399f08446293fec7607913fdbc95e191 ("drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs") Signed-off-by: Markus Elfring --- drivers/gpu/drm/nouveau/nouveau

[PATCH 0/9] GPU-DRM-nouveau: Adjustments for seven function implementations

2023-04-16 Thread Markus Elfring
Date: Sun, 16 Apr 2023 11:22:23 +0200 Several update suggestions were taken into account from static source code analysis. Markus Elfring (9): debugfs: Move an expression into a function call parameter in nouveau_debugfs_pstate_set() debugfs: Move a variable assignment behind a null

[PATCH] video: au1100fb: Move a variable assignment behind a null pointer check in au1100fb_setmode()

2023-04-13 Thread Markus Elfring
the null pointer check. This issue was detected by using the Coccinelle software. Fixes: 3b495f2bb749b828499135743b9ddec46e34fda8 ("Au1100 FB driver uplift for 2.6.") Signed-off-by: Markus Elfring --- drivers/video/fbdev/au1100fb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletio

[PATCH] drm/msm/dpu: Delete a variable initialisation before a null pointer check in two functions

2023-04-11 Thread Markus Elfring
initialisations for the variable “c” (also because it was already reassigned with the same value behind this pointer check). This issue was detected by using the Coccinelle software. Fixes: 25fdd5933e4c0f5fe2ea5cd59994f8ac5fbe90ef ("drm/msm: Add SDM845 DPU support") Signed-off-by: Mark

Re: [PATCH 1/5] drm/amdgpu: Move a variable assignment behind a null pointer check in amdgpu_ras_interrupt_dispatch()

2023-04-11 Thread Markus Elfring
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c >> @@ -1730,11 +1730,12 @@ int amdgpu_ras_interrupt_dispatch(struct >> amdgpu_device *adev, >>   struct ras_dispatch_if *info) >>   { >>   struct ras_manager *obj = amdgpu_ras_find_obj(adev, >head); >> -    struct ras_ih_data *data =

[PATCH 5/5] drm/amd/display: Move an expression into a return statement in dcn201_link_encoder_create()

2023-04-11 Thread Markus Elfring
statement. This issue was detected by using the Coccinelle software. Fixes: 3f68c01be9a2227de1e190317fe34a6fb835a094 ("drm/amd/display: add cyan_skillfish display support") Signed-off-by: Markus Elfring --- drivers/gpu/drm/amd/display/dc/dcn201/dcn201_resource.c | 4 +--- 1 file

[PATCH 4/5] drm/amd/display: Delete a redundant statement in trigger_hotplug()

2023-04-11 Thread Markus Elfring
-by: Markus Elfring --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c index a37d23a13d7b..4805a482dc49 100644

[PATCH 3/5] drm/amd/display: Delete three unnecessary variable initialisations in trigger_hotplug()

2023-04-11 Thread Markus Elfring
Date: Tue, 11 Apr 2023 12:34:42 +0200 The variables “link”, “wr_buf” and “ret” will eventually be set to appropriate values a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 6

[PATCH 2/5] drm/amd/display: Move three variable assignments behind condition checks in trigger_hotplug()

2023-04-11 Thread Markus Elfring
some condition checks. This issue was detected by using the Coccinelle software. Fixes: 6f77b2ac628073f647041a92b36c824ae3aef16e ("drm/amd/display: Add connector HPD trigger debugfs entry") Signed-off-by: Markus Elfring --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 10 +++

[PATCH 0/5] drm/amd: Adjustments for three function implementations

2023-04-11 Thread Markus Elfring
Date: Tue, 11 Apr 2023 14:36:36 +0200 Some update suggestions were taken into account from static source code analysis. Markus Elfring (5) amdgpu: Move a variable assignment behind a null pointer check in amdgpu_ras_interrupt_dispatch() display: Move three variable assignments behind

[PATCH 1/5] drm/amdgpu: Move a variable assignment behind a null pointer check in amdgpu_ras_interrupt_dispatch()

2023-04-11 Thread Markus Elfring
” behind the null pointer check. This issue was detected by using the Coccinelle software. Fixes: c030f2e4166c3f5597c7e7a70bcd9ab383695de4 ("drm/amdgpu: add amdgpu_ras.c to support ras (v2)") Signed-off-by: Markus Elfring --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++- 1 file

[PATCH] drm/nouveau: Add a jump label in nouveau_gem_ioctl_pushbuf()

2023-04-05 Thread Markus Elfring
because of a failed call of the function “u_memcpya”. Thus use an additional label. This issue was detected by using the Coccinelle software. Fixes: 2be65641642ef423f82162c3a5f28c754d1637d2 ("drm/nouveau: fix relocations applying logic and a double-free") Signed-off-by: Markus Elfring --

Re: [PATCH resent] drm/amd/display: Fix exception handling in dm_validate_stream_and_context()

2023-03-25 Thread Markus Elfring
>> The label “cleanup” was used to jump to another pointer check despite of >> the detail in the implementation of the function >> “dm_validate_stream_and_context” >> that it was determined already that corresponding variables contained >> still null pointers. >> >> 1. Thus return directly if >>  

[PATCH resent] drm/amd/display: Fix exception handling in dm_validate_stream_and_context()

2023-03-25 Thread Markus Elfring
” and “dc_plane_state”) which became unnecessary with this refactoring. This issue was detected by using the Coccinelle software. Fixes: 5468c36d628524effbb89a9503eb1a2318804759 ("drm/amd/display: Filter Invalid 420 Modes for HDMI TMDS") Signed-off-by: Markus Elfring --- .../gpu/drm/a

[PATCH 2/2] drm/amd/display: Use common error handling code in dc_create()

2020-12-20 Thread Markus Elfring
From: Markus Elfring Date: Sat, 19 Dec 2020 18:18:59 +0100 Adjust a jump target so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring --- drivers/gpu/drm/amd/display/dc/core/dc.c | 15 ++- 1 file changed, 6 insertions

[PATCH 0/2] drm/amd/display: Adjustments for dc_create()

2020-12-20 Thread Markus Elfring
From: Markus Elfring Date: Sat, 19 Dec 2020 18:30:56 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Return directly after a failed kzalloc() Use common error handling code drivers/gpu/drm/amd/display/dc/core/dc.c | 21

[PATCH 1/2] drm/amd/display: Return directly after a failed kzalloc() in dc_create()

2020-12-20 Thread Markus Elfring
From: Markus Elfring Date: Sat, 19 Dec 2020 18:04:33 +0100 * Return directly after a call of the function “kzalloc” failed at the beginning. * Delete a label which became unnecessary with this refactoring. Signed-off-by: Markus Elfring --- drivers/gpu/drm/amd/display/dc/core/dc.c | 6

[PATCH] video: hyperv_fb: Reduce scope for the variable “page” in hvfb_get_phymem()

2020-12-11 Thread Markus Elfring
From: Markus Elfring Date: Thu, 10 Dec 2020 17:00:13 +0100 A local variable was used only within an if branch. Thus move the definition for the variable “page” into the corresponding code block. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

Re: [PATCH] drm/amdgpu: Avoid null pointer dereference in soc15_reg_base_init()

2020-10-02 Thread Markus Elfring
> that change, the NULL pointer dereference does not occur: * Please provide a proper tag “Signed-off-by”. * How do you think about to add the tag “Fixes” to the commit message? * Would another imperative wording become helpful for the change description? * Would you like to choose an other

Re: [PATCH] drm/msm/a6xx: Fix a size determination in a6xx_get_indexed_registers()

2020-09-14 Thread Markus Elfring
> It's allocating an array of a6xx_gpu_state_obj structure rathor than > its pointers. * Please avoid a typo here. * Would an other imperative wording become helpful for the change description? > This patch fix it. Please replace this sentence by the tag “Fixes” for a better commit message.

Re: [Intel-gfx] [PATCH] drm/i915/gvt: Fix NULL pointer dereference in intel_vgpu_reg_rw_edid()

2020-09-09 Thread Markus Elfring
> In the function intel_vgpu_reg_rw_edid of gvt/kvmgt.c, pos can get equal to > NULL for GPUs that do not > properly support EDID. … * I propose to reconsider the previous patch subject once more. * Did the script “checkpatch.pl” point any adjustment possibilities out for the change

  1   2   3   4   5   6   >