Re: [PATCH 6/6] staging: media: atomisp: use printk with KERN facility level

2021-04-20 Thread Deepak R Varma
On Tue, Apr 20, 2021 at 10:35:23AM +0200, Fabio Aiuto wrote: > Hi Deepak, > > On Tue, Apr 20, 2021 at 12:46:40AM +0530, Deepak R Varma wrote: > > printk() without KERN_ facility is flagged by checkpatch as a > > warning. It is better to use pr_info() which comes with an

Re: [PATCH 4/6] staging: media: atomisp: reformat code comment blocks

2021-04-20 Thread Deepak R Varma
On Tue, Apr 20, 2021 at 10:44:48AM +0200, Fabio Aiuto wrote: > On Tue, Apr 20, 2021 at 12:45:04AM +0530, Deepak R Varma wrote: > > Reformat code comment blocks according to the coding style guidelines. > > This resolves different checkpatch script WARNINGs around block comments.

Re: [PATCH 1/6] staging: media: atomisp: improve function argument alignment

2021-04-20 Thread Deepak R Varma
On Tue, Apr 20, 2021 at 03:24:32PM +0200, Hans Verkuil wrote: > On 19/04/2021 21:12, Deepak R Varma wrote: > > Improve multi-line function argument alignment according to the code style > > guidelines. Resolves checkpatch feedback: "Alignment should match > > open parenth

Re: [PATCH 3/3] gpio: zynq: Check return value of irq_get_irq_data

2021-04-17 Thread Deepak R Varma
On Fri, Apr 09, 2021 at 07:38:06PM +0530, Srinivas Neeli wrote: > In two different instances the return value of "irq_get_irq_data" > API was neither captured nor checked. > Fixed it by capturing the return value and then checking for any error. > > Addresses-Coverity: "returned_null" > Signed-off

[PATCH 0/6] staging: media: atomisp: code cleanup fixes

2021-04-19 Thread Deepak R Varma
This patch set addresses different kinds of checkpatch WARNING and CHECK complaints. Note: The patches should be applied in the ascending order. Deepak R Varma (6): staging: media: atomisp: improve function argument alignment staging: media: atomisp: balance braces around if...else block

[PATCH 1/6] staging: media: atomisp: improve function argument alignment

2021-04-19 Thread Deepak R Varma
Improve multi-line function argument alignment according to the code style guidelines. Resolves checkpatch feedback: "Alignment should match open parenthesis". Signed-off-by: Deepak R Varma --- drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 4 ++-- drivers/staging/media/a

[PATCH 2/6] staging: media: atomisp: balance braces around if...else block

2021-04-19 Thread Deepak R Varma
Balance braces around the if else blocks as per the code style guidelines. Resolves checkpatch script CHECK / WARNING feedback messages. Signed-off-by: Deepak R Varma --- drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 4 ++-- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 4

[PATCH 3/6] staging: media: atomisp: use __func__ over function names

2021-04-19 Thread Deepak R Varma
Replace hard coded function names from the debug print strings by standard __func__ predefined identifier. This resolves following checkpatch script WARNING: Prefer using '"%s...", __func__' to using function's name, in a string. Signed-off-by: Deepak R Varma --- .../

[PATCH 4/6] staging: media: atomisp: reformat code comment blocks

2021-04-19 Thread Deepak R Varma
Reformat code comment blocks according to the coding style guidelines. This resolves different checkpatch script WARNINGs around block comments. Signed-off-by: Deepak R Varma --- .../media/atomisp/i2c/atomisp-gc2235.c| 8 +++ .../atomisp/i2c/atomisp-libmsrlisthelper.c| 3

[PATCH 5/6] staging: media: atomisp: fix CamelCase variable naming

2021-04-19 Thread Deepak R Varma
Mixed case variable names are discouraged and they result in checkpatch script "Avoid CamelCase" warnings. Replace such CamelCase variable names by lower case strings according to the coding style guidelines. Signed-off-by: Deepak R Varma --- .../media/atomisp/i2c/atomisp-mt9m114.c

[PATCH 6/6] staging: media: atomisp: use printk with KERN facility level

2021-04-19 Thread Deepak R Varma
printk() without KERN_ facility is flagged by checkpatch as a warning. It is better to use pr_info() which comes with an inbuilt KERN_INFO level. Signed-off-by: Deepak R Varma --- drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 1/2] drm: msm: adreno: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe()

2020-10-29 Thread Deepak R Varma
Issue reported by Coccinelle script: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma --- Please Note: This is project task specific patch. drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/

[PATCH 2/2] drm: msm: adreno: improve code indentation & alignment

2020-10-29 Thread Deepak R Varma
Align instructions split across multiple lines as per the coding standards. Issue flagged by checkpatch script. Signed-off-by: Deepak R Varma --- Please note: This is a project task specific patch. drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 10 +- 1 file changed, 5 insertions(+), 5

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

2020-10-29 Thread Deepak R Varma
Issue reported by Coccinelle script: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma --- Please Note: This is a Outreachy project task patch. drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 20 ++-- 1 file changed, 10 insertions(+), 10 del

[PATCH] drm/amd/pm: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe()

2020-10-29 Thread Deepak R Varma
Issue reported by Coccinelle script: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma --- Please Note: This is a Outreachy project task patch. .../gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c | 5 ++--- 1 file changed, 2 insertions(+), 3 del

[PATCH] drm/i915/gvt: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe()

2020-10-29 Thread Deepak R Varma
Issue reported by Coccinelle script: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma --- Please Note: This is a Outreachy project task patch. drivers/gpu/drm/i915/gvt/debugfs.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/

[PATCH] drm/panel: st7703: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe()

2020-10-29 Thread Deepak R Varma
Issue reported by Coccinelle script: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma --- Please Note: This is a Outreachy project task patch. drivers/gpu/drm/panel/panel-sitronix-st7703.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff

[PATCH] drm/sti: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe()

2020-10-29 Thread Deepak R Varma
Issue reported by Coccinelle script: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma --- Please Note: This is a Outreachy project task patch. drivers/gpu/drm/sti/sti_drv.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/driv

[PATCH v2] drm/amd/pm: replace kmalloc+memcpy by kmemdup

2020-10-29 Thread Deepak R Varma
Use kmemdup() for instructions using kmalloc() + memcpy(). More information here: https://lwn.net/Articles/198928/ Issue reported by coccinelle script: scripts/coccinelle/api/memdup.cocci Signed-off-by: Deepak R Varma --- Changes since v1: - Update patch subject and log message to match

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

2020-10-30 Thread Deepak R Varma
On Fri, Oct 30, 2020 at 08:11:20AM +0100, Greg KH wrote: > On Fri, Oct 30, 2020 at 08:52:45AM +0530, Deepak R Varma wrote: > > Using DEFINE_DEBUGFS_ATTRIBUTE macro with debugfs_create_file_unsafe() > > function in place of the debugfs_create_file() function will make the > >

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

2020-10-30 Thread Deepak R Varma
; Am 30.10.20 um 08:57 schrieb Deepak R Varma: > > > > > On Fri, Oct 30, 2020 at 08:11:20AM +0100, Greg KH wrote: > > > > > > On Fri, Oct 30, 2020 at 08:52:45AM +0530, Deepak R Varma wrote: > > > > > > > Using DEFINE_DEBUGFS_ATTRIBUTE macro wit

[PATCH] drm/vgm: replace idr_init() by idr_init_base()

2020-11-04 Thread Deepak R Varma
Signed-off-by: Deepak R Varma --- drivers/gpu/drm/vgem/vgem_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vgem/vgem_fence.c b/drivers/gpu/drm/vgem/vgem_fence.c index 17f32f550dd9..2902dc6e64fa 100644 --- a/drivers/gpu/drm/vgem/vgem_fence.c +++ b/drive

[PATCH] drm/i915/gvt: replace idr_init() by idr_init_base()

2020-11-04 Thread Deepak R Varma
Signed-off-by: Deepak R Varma --- drivers/gpu/drm/i915/gvt/gvt.c | 2 +- drivers/gpu/drm/i915/gvt/vgpu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c index c7c561237883..45b492edbb19 100644 --- a/drivers/gp

[PATCH] drm/i915/perf: replace idr_init() by idr_init_base()

2020-11-04 Thread Deepak R Varma
Signed-off-by: Deepak R Varma --- drivers/gpu/drm/i915/i915_perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c index e94976976571..2d033255b7cf 100644 --- a/drivers/gpu/drm/i915/i915_perf.c +++ b/drivers/gp

[PATCH] drm/amdkfd: replace idr_init() by idr_init_base()

2020-11-04 Thread Deepak R Varma
Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c index ba2c2ce0c55a..b3

[PATCH] drm/amdgpu: replace idr_init() by idr_init_base()

2020-11-04 Thread Deepak R Varma
Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/

Re: [PATCH] drm/vgm: replace idr_init() by idr_init_base()

2020-11-05 Thread Deepak R Varma
On Thu, Nov 05, 2020 at 10:42:15AM +0100, Daniel Vetter wrote: > On Wed, Nov 04, 2020 at 04:53:38PM +0530, Deepak R Varma wrote: > > idr_init() uses base 0 which is an invalid identifier. The new function > > idr_init_base allows IDR to set the ID lookup from base 1. This avoids

Re: [PATCH] drm/amdkfd: replace idr_init() by idr_init_base()

2020-11-05 Thread Deepak R Varma
On Wed, Nov 04, 2020 at 03:01:17PM -0500, Felix Kuehling wrote: > On 2020-11-04 10:13 a.m., Deepak R Varma wrote: > > idr_init() uses base 0 which is an invalid identifier. The new function > > idr_init_base allows IDR to set the ID lookup from base 1. This avoids > > all l

[PATCH v2] drm/vgem: replace idr_init() by idr_init_base()

2020-11-05 Thread Deepak R Varma
Signed-off-by: Deepak R Varma --- Changes since v1: - Changes suggested by Daniel Vetter: 1. Correct typo in patch summary 2. cc intel-gfx to get the patch through CI bot test drivers/gpu/drm/vgem/vgem_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

Re: [PATCH] drm/vgm: replace idr_init() by idr_init_base()

2020-11-05 Thread Deepak R Varma
On Thu, Nov 05, 2020 at 12:16:34PM +0100, Daniel Vetter wrote: > On Thu, Nov 5, 2020 at 11:31 AM Deepak R Varma wrote: > > > > On Thu, Nov 05, 2020 at 10:42:15AM +0100, Daniel Vetter wrote: > > > On Wed, Nov 04, 2020 at 04:53:38PM +0530, Deepak R Varma wrote: > > &g

[PATCH] drm/tegra: replace idr_init() by idr_init_base()

2020-11-05 Thread Deepak R Varma
cient") Signed-off-by: Deepak R Varma --- drivers/gpu/drm/tegra/drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index ba9d1c3e7cac..e4baf07992a4 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu

[PATCH] drm/vc4: replace idr_init() by idr_init_base()

2020-11-05 Thread Deepak R Varma
from 0 since 0 is always unused / available. References: commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient") Signed-off-by: Deepak R Varma --- drivers/gpu/drm/vc4/vc4_perfmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_pe

[PATCH] drm/qxl: replace idr_init() by idr_init_base()

2020-11-05 Thread Deepak R Varma
/ available. References: commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient") Signed-off-by: Deepak R Varma --- drivers/gpu/drm/qxl/qxl_kms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index dc

[PATCH] drm/vmwgfx: replace idr_init() by idr_init_base()

2020-11-05 Thread Deepak R Varma
/ available. References: commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient") Signed-off-by: Deepak R Varma --- drivers/gpu/drm/vmwgfx/ttm_object.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/

Re: [PATCH] drm/vc4: replace idr_init() by idr_init_base()

2020-11-05 Thread Deepak R Varma
On Thu, Nov 05, 2020 at 11:25:11AM -0800, Eric Anholt wrote: > On Thu, Nov 5, 2020 at 10:25 AM Deepak R Varma wrote: > > > > idr_init() uses base 0 which is an invalid identifier for this driver. > > The idr_alloc for this driver uses VC4_PERFMONID_MIN as start value for &

[PATCH v2] drm/vc4: replace idr_init() by idr_init_base()

2020-11-05 Thread Deepak R Varma
from 0 since 0 is always unused / available. References: commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient") Signed-off-by: Deepak R Varma --- Changes since v1: - Change suggested by Eric Anholt 1. Use VC4_PERFMONID_MIN instead of magic number 1 drivers/g

[PATCH 1/6] drm/amdgpu/dce: improve code indentation and alignment

2020-11-02 Thread Deepak R Varma
General code indentation and alignment changes such as replace spaces by tabs or align function arguments as per the coding style guidelines. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu

[PATCH 2/6] drm/amdgpu/gfx: improve code indentation and alignment

2020-11-02 Thread Deepak R Varma
General code indentation and alignment changes such as replace spaces by tabs or align function arguments as per the coding style guidelines. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 10 +- drivers/gpu/drm/amd/amdgpu

[PATCH 3/6] drm/amdgpu/vcn: improve code indentation and alignment

2020-11-02 Thread Deepak R Varma
General code indentation and alignment changes such as replace spaces by tabs or align function arguments as per the coding style guidelines. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_5

[PATCH 4/6] drm/amdgpu/nbio: improve code indentation and alignment

2020-11-02 Thread Deepak R Varma
General code indentation and alignment changes such as replace spaces by tabs or align function arguments as per the coding style guidelines. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 4 ++-- drivers/gpu/drm/amd/amdgpu

[PATCH 5/6] drm/amdgpu/amdgpu: improve code indentation and alignment

2020-11-02 Thread Deepak R Varma
General code indentation and alignment changes such as replace spaces by tabs or align function arguments as per the coding style guidelines. The patch corrects issues for various amdgpu_*.c files for this driver. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma --- drivers

[PATCH 6/6] drm/amdgpu: improve code indentation and alignment

2020-11-02 Thread Deepak R Varma
General code indentation and alignment changes such as replace spaces by tabs or align function arguments as per the coding style guidelines. The patch covers various .c files for this driver. Issue reported by checkpatch script. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amdgpu: do not initialise global variables to 0 or NULL

2020-11-02 Thread Deepak R Varma
Initializing global variable to 0 or NULL is not necessary and should be avoided. Issue reported by checkpatch script as: ERROR: do not initialise globals to 0 (or NULL). Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 46 - drivers/gpu/drm

[PATCH 1/6] drm/amdgpu/vcn: use "*" adjacent to data name

2020-11-02 Thread Deepak R Varma
quot; should be "foo *bar" ERROR: "foo*bar" should be "foo *bar" ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c

[PATCH 2/6] drm/amdgpu/umc: use "*" adjacent to data name

2020-11-02 Thread Deepak R Varma
should be "foo *bar" ERROR: "foo*bar" should be "foo *bar" ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/amdgpu/umc_v6_1.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/umc_v8_7.c | 4 ++--

[PATCH 3/6] drm/amdgpu/jpeg: use "*" adjacent to data name

2020-11-02 Thread Deepak R Varma
should be "foo *bar" ERROR: "foo*bar" should be "foo *bar" ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c

[PATCH 5/6] drm/amdgpu/amdgpu: use "*" adjacent to data name

2020-11-02 Thread Deepak R Varma
should be "foo *bar" ERROR: "foo*bar" should be "foo *bar" ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ato

[PATCH 4/6] drm/amdgpu/sdma: use "*" adjacent to data name

2020-11-02 Thread Deepak R Varma
should be "foo *bar" ERROR: "foo*bar" should be "foo *bar" ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 6

[PATCH 6/6] drm/amdgpu: use "*" adjacent to data name

2020-11-02 Thread Deepak R Varma
should be "foo *bar" ERROR: "foo*bar" should be "foo *bar" ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/amdgpu/atom.c | 16 drivers/gpu/drm/amd/amdgpu/at

Re: [PATCH v2] drm/vc4: replace idr_init() by idr_init_base()

2020-11-08 Thread Deepak R Varma
On Fri, Nov 06, 2020 at 11:52:49AM +0100, Maxime Ripard wrote: > On Thu, Nov 05, 2020 at 01:24:14PM -0800, Eric Anholt wrote: > > On Thu, Nov 5, 2020 at 12:21 PM Deepak R Varma wrote: > > > > > > idr_init() uses base 0 which is an invalid identifier for this driver. &