[PATCH] media: dvb-frontends/cxd2099: Make en_templ constant

2019-08-19 Thread Nishka Dasgupta
Static structure en_templ, of type dvb_ca_en50221, is not used except to be copied into a local variable. Hence make it const to prevent unintended modification of the original fields. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/media/dvb-frontends/cxd2099.c | 2

[PATCH] media: ec168: Make structure ec168_props constant

2019-08-19 Thread Nishka Dasgupta
fields. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/media/usb/dvb-usb-v2/ec168.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb-v2/ec168.c b/drivers/media/usb/dvb-usb-v2/ec168.c index 0c1fef118be4..e30305876840 100644 --- a

[PATCH] media: firewire: Make structure fdtv_ca constant

2019-08-19 Thread Nishka Dasgupta
. Signed-off-by: Nishka Dasgupta --- drivers/media/firewire/firedtv-ci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/firewire/firedtv-ci.c b/drivers/media/firewire/firedtv-ci.c index a960a0ce9deb..9363d005e2b6 100644 --- a/drivers/media/firewire/firedtv-ci.c +++ b

[PATCH] media: dvb-bt8xx: Make variable dst_config constant

2019-08-19 Thread Nishka Dasgupta
dst_config const as well. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/media/pci/bt8xx/dvb-bt8xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/bt8xx/dvb-bt8xx.c b/drivers/media/pci/bt8xx/dvb-bt8xx.c index 64df9d491941

Re: [PATCH v2] staging: media: sunxi: Add bool cast to value

2019-07-22 Thread Nishka Dasgupta
On 22/07/19 5:54 PM, Paul Kocialkowski wrote: Hi, On Mon 22 Jul 19, 12:12, Jeremy Sowden wrote: On 2019-07-22, at 11:36:51 +0530, Nishka Dasgupta wrote: Typecast as bool the return value of cedrus_find_format in cedrus_check_format as the return value of cedrus_check_format is always treated

[PATCH RESEND] staging: media: davinci_vpfe: Replace function vpfe_isif_cleanup()

2019-07-22 Thread Nishka Dasgupta
. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- Sorry, I think this may have gotten lost the last time I sent it? .../staging/media/davinci_vpfe/dm365_isif.c | 21 +++ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/drivers/staging/media

[PATCH v2] staging: media: sunxi: Add bool cast to value

2019-07-21 Thread Nishka Dasgupta
Typecast as bool the return value of cedrus_find_format in cedrus_check_format as the return value of cedrus_check_format is always treated like a boolean value. Signed-off-by: Nishka Dasgupta --- Changes in v2: - Add !! to the returned pointer to ensure that the return value is always either

[PATCH] staging: media: sunxi: Add bool cast to value

2019-07-17 Thread Nishka Dasgupta
Typecast as bool the return value of cedrus_find_format in cedrus_check_format as the return value of cedrus_check_format is always treated like a boolean value. Signed-off-by: Nishka Dasgupta --- drivers/staging/media/sunxi/cedrus/cedrus_video.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] media: platform: sti: c8sectpfe: core: Add of_node_put() at goto

2019-07-15 Thread Nishka Dasgupta
label. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- .../platform/sti/c8sectpfe/c8sectpfe-core.c| 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe

[PATCH] media: i2c: tvp5150: Add of_node_put() before goto

2019-07-09 Thread Nishka Dasgupta
Each iteration of for_each_available_child_of_node puts the previous node, but in the case of a goto from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the goto in four places. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta

[PATCH] media: platform: mtk-mdp: mtk_mdp_core: Add of_node_put() before goto

2019-07-09 Thread Nishka Dasgupta
Each iteration of for_each_child_of_node puts the previous node, but in the case of a goto from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the goto in two places. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers

Re: [PATCH 2/2] staging: media: sunxi: Replace function cedrus_check_format()

2019-07-05 Thread Nishka Dasgupta
On 05/07/19 3:56 PM, Paul Kocialkowski wrote: Hi, On Wed 03 Jul 19, 13:43, Nishka Dasgupta wrote: Remove function cedrus_check_format as all it does is call cedrus_find_format. Rename cedrus_find_format to cedrus_check_format to maintain compatibility with call sites. Issue found with

Re: [PATCH 1/2] staging: media: sunxi: Change return type of cedrus_find_format()

2019-07-05 Thread Nishka Dasgupta
On 05/07/19 3:56 PM, Paul Kocialkowski wrote: Hi, On Wed 03 Jul 19, 13:43, Nishka Dasgupta wrote: Change return type of cedrus_find_format to bool as it is only called once, by a function whose return value is bool, and the return value of cedrus_find_format is returned as-is at the call-site

[PATCH] staging: media: davinci_vpfe: Replace function vpfe_isif_cleanup()

2019-07-04 Thread Nishka Dasgupta
. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- .../staging/media/davinci_vpfe/dm365_isif.c | 21 +++ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_isif.c b/drivers/staging/media/davinci_vpfe/dm365_isif.c

[PATCH 2/2] staging: media: sunxi: Replace function cedrus_check_format()

2019-07-03 Thread Nishka Dasgupta
Remove function cedrus_check_format as all it does is call cedrus_find_format. Rename cedrus_find_format to cedrus_check_format to maintain compatibility with call sites. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/staging/media/sunxi/cedrus/cedrus_video.c | 10

[PATCH 1/2] staging: media: sunxi: Change return type of cedrus_find_format()

2019-07-03 Thread Nishka Dasgupta
Change return type of cedrus_find_format to bool as it is only called once, by a function whose return value is bool, and the return value of cedrus_find_format is returned as-is at the call-site. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/staging/media/sunxi/cedrus