Re: [linux-review:Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-media-usb-drivers/20161011-182408 3/31] drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line 169

2016-10-11 Thread Julia Lawall
On Tue, 11 Oct 2016, Julia Lawall wrote: > It looks like a lock may be needed before line 174. Sorry, an unlock. > > julia > > -- Forwarded message -- > Date: Tue, 11 Oct 2016 21:06:18 +0800 > From: kbuild test robot > To: kbu...@01.org >

[linux-review:Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-media-usb-drivers/20161011-182408 3/31] drivers/media/usb/dvb-usb/cinergyT2-core.c:174:2-8: preceding lock on line 169

2016-10-11 Thread Julia Lawall
It looks like a lock may be needed before line 174. julia -- Forwarded message -- Date: Tue, 11 Oct 2016 21:06:18 +0800 From: kbuild test robot To: kbu...@01.org Cc: Julia Lawall Subject: [linux-review:Mauro-Carvalho-Chehab/Don-t-use-stack-for-DMA-transers-on-medi a-usb

Re: kernel-doc-rst-lint (was: Re: [PATCH 00/15] improve function-level documentation)

2016-10-05 Thread Julia Lawall
On Wed, 5 Oct 2016, Jani Nikula wrote: > On Wed, 05 Oct 2016, Daniel Vetter wrote: > > Jani Nikula has a patch with a scrip to make the one kernel-doc parser > > into a lint/checker pass over the entire kernel. I think that'd would > > be more robust instead of trying to approximate the real ke

Re: [PATCH 00/15] improve function-level documentation

2016-10-05 Thread Julia Lawall
parameters etc. But the set of patches is not exhaustive with respect to the remaining interesting ones either. julia > > Jani, can you pls digg out these patches? Can't find them right now ... > -Daniel > > > On Sat, Oct 1, 2016 at 9:46 PM, Julia Lawall wrote: > >

Re: [PATCH 00/15] improve function-level documentation

2016-10-01 Thread Julia Lawall
On Sat, 1 Oct 2016, Joe Perches wrote: > On Sat, 2016-10-01 at 21:46 +0200, Julia Lawall wrote: > > These patches fix cases where the documentation above a function definition > > is not consistent with the function header. Issues are detected using the > > seman

[PATCH 00/15] improve function-level documentation

2016-10-01 Thread Julia Lawall
These patches fix cases where the documentation above a function definition is not consistent with the function header. Issues are detected using the semantic patch below (http://coccinelle.lip6.fr/). Basically, the semantic patch parses a file to find comments, then matches each function header,

[PATCH 05/15] dma-buf/sw_sync: improve function-level documentation

2016-10-01 Thread Julia Lawall
Adjust the documentation to use the names that appear in the function parameter list. Issue detected using Coccinelle (http://coccinelle.lip6.fr/) Signed-off-by: Julia Lawall --- drivers/dma-buf/sw_sync.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma

Re: [PATCH 00/26] constify local structures

2016-09-12 Thread Julia Lawall
On Mon, 12 Sep 2016, Jarkko Sakkinen wrote: > On Mon, Sep 12, 2016 at 04:43:58PM +0300, Felipe Balbi wrote: > > > > Hi, > > > > Jarkko Sakkinen writes: > > > On Mon, Sep 12, 2016 at 10:54:07AM +0200, Julia Lawall wrote: > > >> > >

Re: [PATCH 00/26] constify local structures

2016-09-12 Thread Julia Lawall
On Mon, 12 Sep 2016, Felipe Balbi wrote: > > Hi, > > Jarkko Sakkinen writes: > > On Mon, Sep 12, 2016 at 10:54:07AM +0200, Julia Lawall wrote: > >> > >> > >> On Sun, 11 Sep 2016, Jarkko Sakkinen wrote: > >> > >> > On Sun, Sep 1

Re: [PATCH 00/26] constify local structures

2016-09-12 Thread Julia Lawall
On Mon, 12 Sep 2016, Jarkko Sakkinen wrote: > On Mon, Sep 12, 2016 at 10:54:07AM +0200, Julia Lawall wrote: > > > > > > On Sun, 11 Sep 2016, Jarkko Sakkinen wrote: > > > > > On Sun, Sep 11, 2016 at 03:05:42PM +0200, Julia Lawall wrote: > > > >

Re: [PATCH 00/26] constify local structures

2016-09-12 Thread Julia Lawall
On Sun, 11 Sep 2016, Jarkko Sakkinen wrote: > On Sun, Sep 11, 2016 at 03:05:42PM +0200, Julia Lawall wrote: > > Constify local structures. > > > > The semantic patch that makes this change is as follows: > > (http://coccinelle.lip6.fr/) > > Just my two cents b

Re: [PATCH 00/26] constify local structures

2016-09-11 Thread Julia Lawall
On Sun, 11 Sep 2016, Joe Perches wrote: > On Sun, 2016-09-11 at 15:05 +0200, Julia Lawall wrote: > > Constify local structures. > > Thanks Julia. > > A few suggestions & questions: > > Perhaps the script should go into scripts/coccinelle/ > so that future cases

[PATCH 2/3] [media] tuners: constify dvb_tuner_ops structures

2016-09-11 Thread Julia Lawall
ruct dvb_tuner_ops i = { ... }; // Signed-off-by: Julia Lawall --- drivers/media/tuners/mt2063.c |2 +- drivers/media/tuners/mt20xx.c |4 ++-- drivers/media/tuners/mxl5007t.c |2 +- drivers/media/tuners/tda827x.c |4 ++-- drivers/media/tuners/tea5761.c |

[PATCH 3/3] [media] mxl111sf-tuner: constify dvb_tuner_ops structures

2016-09-11 Thread Julia Lawall
ruct dvb_tuner_ops i = { ... }; // Signed-off-by: Julia Lawall --- drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c b/drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c index 7d16252..f14

[PATCH 0/3] constify dvb_tuner_ops structures

2016-09-11 Thread Julia Lawall
Constify dvb_tuner_ops structures --- drivers/media/dvb-frontends/ascot2e.c |2 +- drivers/media/dvb-frontends/dvb-pll.c |2 +- drivers/media/dvb-frontends/helene.c |4 ++-- drivers/media/dvb-frontends/horus3a.c |2 +- drivers/media/dvb-frontends/

[PATCH 1/3] [media] dvb-frontends: constify dvb_tuner_ops structures

2016-09-11 Thread Julia Lawall
ruct dvb_tuner_ops i = { ... }; // Signed-off-by: Julia Lawall --- drivers/media/dvb-frontends/ascot2e.c |2 +- drivers/media/dvb-frontends/dvb-pll.c |2 +- drivers/media/dvb-frontends/helene.c |4 ++-- drivers/media/dvb-frontends/horus3a.c |2 +- drivers/m

[PATCH 00/26] constify local structures

2016-09-11 Thread Julia Lawall
Constify local structures. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // // The first rule ignores some cases that posed problems @r disable optional_qualifier@ identifier s != {peri_clk_data,threshold_attr,tracer_flags,tracer}; identifier i != {s5k5baf

[PATCH 13/26] [media]: constify local structures

2016-09-11 Thread Julia Lawall
in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches . Signed-off-by: Julia Lawall --- The semantic patch seems too long for a commit log, but is in the cover letter. drivers/media/i2c/tvp514x.c

Re: [PATCH] [media] pci: constify vb2_ops structures

2016-09-09 Thread Julia Lawall
On Fri, 9 Sep 2016, Andrey Utkin wrote: > On Fri, Sep 09, 2016 at 10:31:30PM +0800, Julia Lawall wrote: > > Will this soon reach linux-next? > > No idea. Indeed it's simpler if you leave your patch as is, and then > later we patch this new driver separately. O

Re: [PATCH] [media] pci: constify vb2_ops structures

2016-09-09 Thread Julia Lawall
On Fri, 9 Sep 2016, Andrey Utkin wrote: > On Fri, Sep 09, 2016 at 01:59:18AM +0200, Julia Lawall wrote: > > Check for vb2_ops structures that are only stored in the ops field of a > > vb2_queue structure. That field is declared const, so vb2_ops structures > > that have

Re: [PATCH] [media] pci: constify vb2_ops structures

2016-09-09 Thread Julia Lawall
Le 09.09.2016 17:17, Andrey Utkin a écrit : On Fri, Sep 09, 2016 at 01:59:18AM +0200, Julia Lawall wrote: Check for vb2_ops structures that are only stored in the ops field of a vb2_queue structure. That field is declared const, so vb2_ops structures that have this property can be declared

[PATCH] [media] pci: constify vb2_ops structures

2016-09-08 Thread Julia Lawall
r.i; @@ static +const struct vb2_ops i = { ... }; // Signed-off-by: Julia Lawall --- drivers/media/pci/cx23885/cx23885-417.c|2 +- drivers/media/pci/cx23885/cx23885-dvb.c|2 +- drivers/media/pci/cx23885/cx23885-video.c |2 +- drivers/media/pci/cx2

[PATCH] [media] platform: constify vb2_ops structures

2016-09-08 Thread Julia Lawall
r.i; @@ static +const struct vb2_ops i = { ... }; // Signed-off-by: Julia Lawall --- drivers/media/platform/exynos-gsc/gsc-m2m.c |2 +- drivers/media/platform/exynos4-is/fimc-capture.c |2 +- drivers/media/platform/exynos4-is/fimc-m2m.c |2 +- dri

[PATCH] [media] usb: constify vb2_ops structures

2016-09-08 Thread Julia Lawall
r.i; @@ static +const struct vb2_ops i = { ... }; // Signed-off-by: Julia Lawall --- drivers/media/usb/airspy/airspy.c |2 +- drivers/media/usb/au0828/au0828-video.c |2 +- drivers/media/usb/em28xx/em28xx-video.c |2 +- drivers/media/usb/go7007/go7007-v4l2.c |2 +- dri

Re: [PATCH] [media] pci: constify snd_pcm_ops structures

2016-09-07 Thread Julia Lawall
On Thu, 8 Sep 2016, Andrey Utkin wrote: > Thanks for looking into this. > I have tested that it compiles and passes checks (C=2) cleanly after > this patch. > > Acked-by: Andrey Utkin > > While we're at it, what about constification of > *-core.c:static struct pci_driver *_pci_driver = { > *-vi

[PATCH] [media] usb: constify snd_pcm_ops structures

2016-09-07 Thread Julia Lawall
fier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // Signed-off-by: Juli

[PATCH] [media] pci: constify snd_pcm_ops structures

2016-09-07 Thread Julia Lawall
fier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // Signed-off-by: Juli

[PATCH] vcodec: mediatek: fix odd_ptr_err.cocci warnings

2016-09-06 Thread Julia Lawall
PTR_ERR should access the value just tested by IS_ERR Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci CC: Tiffany Lin Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- mtk_vcodec_dec_drv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media

[PATCH] [media]: constify i2c_algorithm structures

2016-08-29 Thread Julia Lawall
hm i = { ... }; // Signed-off-by: Julia Lawall --- drivers/media/pci/cx23885/cx23885-i2c.c |2 +- drivers/media/pci/cx25821/cx25821-i2c.c |2 +- drivers/media/pci/ivtv/ivtv-i2c.c |2 +- drivers/media/pci/saa7134/saa7134-i2c.c |2 +- drivers/media

[PATCH] [media] mtk-vcodec: constify venc_common_if structures

2016-08-09 Thread Julia Lawall
The venc_common_if structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h|2 +- drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c |6 +++--- drivers/media

Re: [PATCH 0/7] fix typo

2016-05-17 Thread Julia Lawall
On Tue, 17 May 2016, Kalle Valo wrote: > Julia Lawall writes: > > > firmare -> firmware > > > > --- > > > > drivers/media/dvb-frontends/mn88473.c |2 +- > > drivers/net/wireless/ath/ath6kl/core.h |2 +- > > drivers/net/wir

[PATCH 3/7] [media] mn88472: fix typo

2016-05-17 Thread Julia Lawall
firmare -> firmware Signed-off-by: Julia Lawall --- drivers/staging/media/mn88472/mn88472.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/mn88472/mn88472.c b/drivers/staging/media/mn88472/mn88472.c index 7ea749c..5cfa22a 100644 --- a/driv

[PATCH 0/7] fix typo

2016-05-17 Thread Julia Lawall
firmare -> firmware --- drivers/media/dvb-frontends/mn88473.c |2 +- drivers/net/wireless/ath/ath6kl/core.h |2 +- drivers/net/wireless/marvell/mwifiex/pcie.c |2 +- drivers/scsi/pm8001/pm8001_init.c |2 +- drivers/scsi/snic/snic_fwint.h |2 +

[PATCH 2/7] [media] mn88473: fix typo

2016-05-17 Thread Julia Lawall
firmare -> firmware Signed-off-by: Julia Lawall --- drivers/media/dvb-frontends/mn88473.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/mn88473.c b/drivers/media/dvb-frontends/mn88473.c index 6c5d5921..8f7b68f 100644 --- a/drivers/media/

[PATCH] VPU: mediatek: fix simple_open.cocci warnings

2016-04-22 Thread Julia Lawall
Remove an open coded simple_open() function and replace file operations references to the function with simple_open() instead. Generated by: scripts/coccinelle/api/simple_open.cocci CC: Andrew-CT Chen Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- I'm just passing this

[PATCH] VPU: mediatek: fix platform_no_drv_owner.cocci warnings

2016-04-22 Thread Julia Lawall
Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Andrew-CT Chen Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- base: git://linuxtv.org/media_tree.git master mtk_vpu.c |1 - 1 file

[PATCH] atmel-isc: fix compare_const_fl.cocci warnings

2016-04-13 Thread Julia Lawall
Move constants to the right of binary operators. Generated by: scripts/coccinelle/misc/compare_const_fl.cocci CC: Songjun Wu Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- Up to you. Seems a tiny bit more readable to me not to have ISC_DCTRL and ISC_DCTRL_IE_IS right together

[PATCH] atmel-isc: fix platform_no_drv_owner.cocci warnings

2016-04-13 Thread Julia Lawall
Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Songjun Wu Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- atmel-isc.c |1 - 1 file changed, 1 deletion(-) --- a/drivers/media/platform

[PATCH] media: bt8xx: constify sp887x_config structure

2016-01-03 Thread Julia Lawall
This sp887x_config structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- This patch and the previous one on the same file can be applied in any order. drivers/media/pci/bt8xx/dvb-bt8xx.c |2 +- 1 file changed, 1 insertion

[PATCH] media: bt8xx: constify or51211_config structure

2016-01-03 Thread Julia Lawall
The or51211_config structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- 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

[PATCH] drivers/media/usb/dvb-usb-v2: constify mxl111sf_tuner_config structure

2016-01-03 Thread Julia Lawall
This mxl111sf_tuner_config structure is never modified, so declare it as const. There are some indentation changes to remain within 80 columns. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c |6 +++--- drivers/media/usb/dvb

[PATCH] av7110: constify sp8870_config structure

2016-01-03 Thread Julia Lawall
This sp8870_config structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/pci/ttpci/av7110.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media

Re: On Lindent shortcomings and massive style fixing

2015-12-29 Thread Julia Lawall
On Tue, 29 Dec 2015, Andrey Utkin wrote: > On Tue, Dec 29, 2015 at 9:32 AM, Mauro Carvalho Chehab > wrote: > > IMHO, there are two problems by letting indent breaking long > > lines: > > > > 1) indent would break strings on printks. This is something that we don't > > want to break strings on m

Re: [media] m88rs6000t: Better exception handling in five functions

2015-12-28 Thread Julia Lawall
On Mon, 28 Dec 2015, SF Markus Elfring wrote: > >> Move the jump label directly before the desired log statement > >> so that the variable "ret" will not be checked once more > >> after a function call. > > > > This commit message fits with the previous change. > > Do you prefer an other wording?

Re: [PATCH 1/2] [media] m88rs6000t: Better exception handling in five functions

2015-12-28 Thread Julia Lawall
" will not be checked once more > after a function call. This commit message fits with the previous change. It could be nice to put a blank line before the error handling code. See what is done elsewhere in the file. julia > > Suggested-by: Julia Lawall > Signed-off-by: Ma

Re: [media] tuners: One check less in m88rs6000t_get_rf_strength() after error detection

2015-12-28 Thread Julia Lawall
On Mon, 28 Dec 2015, SF Markus Elfring wrote: > >> Move the jump label directly before the desired log statement > >> so that the variable "ret" will not be checked once more > >> after it was determined that a function call failed. > > > > Why not avoid both unnecessary ifs > > I would find suc

Re: [PATCH] [media] tuners: One check less in m88rs6000t_get_rf_strength() after error detection

2015-12-28 Thread Julia Lawall
On Mon, 28 Dec 2015, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 28 Dec 2015 10:10:34 +0100 > > This issue was detected by using the Coccinelle software. > > Move the jump label directly before the desired log statement > so that the variable "ret" will not be checked once more >

Re: [Cocci] [PATCH v2] coccinelle: api: check for propagation of error from platform_get_irq

2015-12-27 Thread Julia Lawall
On Sun, 27 Dec 2015, SF Markus Elfring wrote: > > The error return value of platform_get_irq seems to often get dropped. > > How do you think about any more fine-tuning here? > > Commit message: > * … of the platform_get_irq() function seems to get dropped too often. > > * Why do you concentr

Re: [PATCH v2] coccinelle: api: check for propagation of error from platform_get_irq

2015-12-26 Thread Julia Lawall
>Well, looking again, the patch should be good. I just thought its goal was > to fix the code as well... I could do that for the irq < 0 case, but I think that in that case, kbuild will only run the patch version, and the <= cases will not be reported on. I don't have a general fix for the <=

Re: [PATCH v2] coccinelle: api: check for propagation of error from platform_get_irq

2015-12-26 Thread Julia Lawall
On Sun, 27 Dec 2015, Sergei Shtylyov wrote: > On 12/26/2015 11:58 PM, Julia Lawall wrote: > > > The error return value of platform_get_irq seems to often get dropped. > > > > Signed-off-by: Julia Lawall > > > > --- > > > > v2: Check for the di

[PATCH v2] coccinelle: api: check for propagation of error from platform_get_irq

2015-12-26 Thread Julia Lawall
The error return value of platform_get_irq seems to often get dropped. Signed-off-by: Julia Lawall --- v2: Check for the direct return case also. Added some mailing lists of common offenders. diff --git a/scripts/coccinelle/api/platform_get_irq_return.cocci b/scripts/coccinelle/api

[PATCH] [media] go7007: constify go7007_hpi_ops structures

2015-12-11 Thread Julia Lawall
The go7007_hpi_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/pci/saa7134/saa7134-go7007.c |2 +- drivers/media/usb/go7007/go7007-priv.h |2 +- drivers/media/usb/go7007/go7007-usb.c

[PATCH] drivers/media/usb/as102: constify as102_priv_ops_t structure

2015-12-06 Thread Julia Lawall
The as102_priv_ops_t structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/usb/as102/as102_drv.h |2 +- drivers/media/usb/as102/as102_usb_drv.c |2 +- 2 files changed, 2 insertions(+), 2 deletions

[PATCH] [media] constify stv6110x_devctl structure

2015-12-06 Thread Julia Lawall
The stv6110x_devctl structure is never modified, so declare is as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/dvb-frontends/stv6110x.c |4 ++-- drivers/media/dvb-frontends/stv6110x.h |4 ++-- drivers/media/dvb

[PATCH] [media] cx231xx: constify cx2341x_handler_ops structures

2015-11-22 Thread Julia Lawall
The cx2341x_handler_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/pci/cx18/cx18-controls.c |2 +- drivers/media/pci/cx18/cx18-controls.h |2 +- drivers/media/pci/ivtv/ivtv-controls.c

[PATCH] media, sound: tea575x: constify snd_tea575x_ops structures

2015-11-22 Thread Julia Lawall
The snd_tea575x_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/pci/bt8xx/bttv-cards.c |2 +- drivers/media/radio/radio-maxiradio.c |2 +- drivers/media/radio/radio-sf16fmr2.c |2

[PATCH] [media] soc_camera: constify v4l2_subdev_sensor_ops structures

2015-11-22 Thread Julia Lawall
The v4l2_subdev_sensor_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/i2c/soc_camera/mt9m001.c |2 +- drivers/media/i2c/soc_camera/mt9t031.c |2 +- drivers/media/i2c/soc_camera/mt9v022.c

[PATCH] [media] s5p-mfc: constify s5p_mfc_codec_ops structures

2015-11-21 Thread Julia Lawall
The s5p_mfc_codec_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/platform/s5p-mfc/s5p_mfc_common.h |2 +- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c|4 ++-- drivers/media/platform/s5p

[PATCH] drivers/media/platform/s5p-tv: constify mxr_layer_ops structures

2015-11-15 Thread Julia Lawall
The mxr_layer_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/platform/s5p-tv/mixer.h |2 +- drivers/media/platform/s5p-tv/mixer_grp_layer.c |2 +- drivers/media/platform/s5p-tv

[PATCH] [media] i2c: constify v4l2_ctrl_ops structures

2015-11-13 Thread Julia Lawall
These v4l2_ctrl_ops structures are never modified, like all the other v4l2_ctrl_ops structures, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/i2c/mt9m032.c |2 +- drivers/media/i2c/mt9p031.c |2 +- drivers/media/i2c/mt9t001.c

[PATCH] [media] ttusb-dec: constify ttusbdecfe_config structure

2015-11-13 Thread Julia Lawall
The ttusbdecfe_config structure is never modified, so declare it as const. Other references to this structure type were already declared as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/usb/ttusb-dec/ttusb_dec.c |2 +- 1 file changed, 1 insertion

[PATCH] drivers/media/usb/dvb-usb-v2: constify mxl111sf_demod_config structure

2015-11-13 Thread Julia Lawall
The mxl111sf_demod_config structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/usb/dvb-usb-v2/mxl111sf-demod.c |4 ++-- drivers/media/usb/dvb-usb-v2/mxl111sf-demod.h |4 ++-- drivers/media/usb/dvb-usb-v2

[PATCH] [media] radio-shark2: constify radio_tea5777_ops structures

2015-11-13 Thread Julia Lawall
The radio_tea5777_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/radio/radio-shark2.c |2 +- drivers/media/radio/radio-tea5777.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

[PATCH] [media] media: videobuf2: fix compare_const_fl.cocci warnings

2015-11-13 Thread Julia Lawall
Move constants to the right of binary operators. Generated by: scripts/coccinelle/misc/compare_const_fl.cocci CC: Junghak Sung Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- !b->m.planes could also be possible. Up to you. videobuf2-v4l2.c |2 +- 1 file changed

[PATCH 5/8] [media] v4l: xilinx-vipp: add missing of_node_put

2015-10-25 Thread Julia Lawall
; @@ for_each_child_of_node(root, child) { ... when != of_node_put(child) when != e = child ( return child; | + of_node_put(child); ? return ...; ) ... } // Signed-off-by: Julia Lawall --- drivers/media/platform/xilinx/xilinx-vipp.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion

[PATCH 6/8] [media] v4l: xilinx-tpg: add missing of_node_put

2015-10-25 Thread Julia Lawall
; @@ for_each_child_of_node(root, child) { ... when != of_node_put(child) when != e = child ( return child; | + of_node_put(child); ? return ...; ) ... } // Signed-off-by: Julia Lawall --- drivers/media/platform/xilinx/xilinx-tpg.c |2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH 0/8] add missing of_node_put

2015-10-25 Thread Julia Lawall
The various for_each device_node iterators performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. The complete semantic patch that fixes this problem is (http://coccinelle.lip6.fr): // @r@ local idexpression n; expression e1,e2; iterator name for_each_node

[PATCH 2/2] [media] netup_unidvb: delete null dereference

2015-10-17 Thread Julia Lawall
The calls to dev_dbg will not work properly when spi is NULL. Just use pr_debug instead. Problem found using scripts/coccinelle/null/deref_null.cocci Signed-off-by: Julia Lawall --- drivers/media/pci/netup_unidvb/netup_unidvb_spi.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions

[PATCH 0/2] delete null dereference

2015-10-17 Thread Julia Lawall
These patches delete NULL dereferences, as detected by scripts/coccinelle/null/deref_null.cocci. --- drivers/media/pci/netup_unidvb/netup_unidvb_spi.c |6 ++ net/nfc/netlink.c |6 ++ 2 files changed, 4 insertions(+), 8 deletions(-) -- To unsubscrib

[PATCH] [media] mt9t001: constify v4l2_subdev_internal_ops structure

2015-10-11 Thread Julia Lawall
This v4l2_subdev_internal_ops structure is never modified. All other v4l2_subdev_internal_ops structures are declared as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/i2c/mt9t001.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH 0/9] drop unneeded goto

2015-05-28 Thread Julia Lawall
These patches drop gotos that jump to a label that is at the next instruction, in the case that the label is not used elsewhere in the function. The complete semantic patch that performs this transformation is as follows: // @r@ position p; identifier l; @@ if (...) goto l@p; l: @script:ocaml

[PATCH 7/9] drivers/media/tuners/e4000.c: drop unneeded goto

2015-05-28 Thread Julia Lawall
From: Julia Lawall Delete jump to a label on the next line, when that label is not used elsewhere. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier l; @@ -if (...) goto l; -l: // Signed-off-by: Julia Lawall

[PATCH 1/9] drivers/media/usb/airspy/airspy.c: drop unneeded goto

2015-05-28 Thread Julia Lawall
From: Julia Lawall Delete jump to a label on the next line, when that label is not used elsewhere. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier l; @@ -if (...) goto l; -l: // Signed-off-by: Julia Lawall

[PATCH 0/16] fix error return code

2015-04-05 Thread Julia Lawall
The complate semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @ok exists@ identifier f,ret,i; expression e; constant c; @@ // identify a function that returns a negative return value at least once. f(...) { ... when any ( return -c@i; | ret = -c@i; ... when !

[PATCH 4/16] [media] as102: fix error return code

2015-04-05 Thread Julia Lawall
amp;ret *if(...) { ... when != ret = e2 when forall return ret; } // Signed-off-by: Julia Lawall --- drivers/media/usb/as102/as102_drv.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/usb/as102/as102_drv.c b/drivers/media/usb/as102/as102_drv.c index 8be1474..

[PATCH 2/16] [media] si4713: fix error return code

2015-04-05 Thread Julia Lawall
amp;ret *if(...) { ... when != ret = e2 when forall return ret; } // Signed-off-by: Julia Lawall --- drivers/media/radio/si4713/si4713.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/radio/si4713/si4713.c b/drivers/media/radio/si4713/si4713.

[PATCH 3/16] [media] radio: fix error return code

2015-04-05 Thread Julia Lawall
amp;ret *if(...) { ... when != ret = e2 when forall return ret; } // Signed-off-by: Julia Lawall --- drivers/media/radio/radio-timb.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/radio/radio-timb.c b/drivers/media/radio/radio-timb.c index

Re: drivers/media/usb/au0828/au0828-video.c:1741:1-3: WARNING: end returns can be simpified if negative or 0 value

2015-03-25 Thread Julia Lawall
The function does only return 0 or a negative constant, but it seems like a matter of personal prefernce - shorter vs more explicit. julia On Wed, 25 Mar 2015, kbuild test robot wrote: > TO: Shuah Khan > CC: Mauro Carvalho Chehab > CC: linux-media@vger.kernel.org > CC: Hans Verkuil > > tree:

[PATCH 0/15] don't export static symbol

2015-03-11 Thread Julia Lawall
These patches remove EXPORT_SYMBOL or EXPORT_SYMBOL_GPL declarations on static functions. This was done using the following semantic patch: (http://coccinelle.lip6.fr/) // @r@ type T; identifier f; @@ static T f (...) { ... } @@ identifier r.f; declarer name EXPORT_SYMBOL; @@ -EXPORT_SYMBOL(f

[PATCH 7/15] media: pci: cx23885: don't export static symbol

2015-03-11 Thread Julia Lawall
From: Julia Lawall The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @r@ type T; identifier f; @@ static T f (...) { ... } @@ identifier r.f; declarer name EXPORT_SYMBOL; @@ -EXPORT_SYMBOL(f); // Signed-off-by: Julia Lawall --- drivers/media/pci

[PATCH 2/27] [media] au0828: Use setup_timer

2014-12-26 Thread Julia Lawall
a = d; -init_timer(&t); +setup_timer(&t,f,d); // Signed-off-by: Julia Lawall --- drivers/media/usb/au0828/au0828-video.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c

[PATCH 19/27] [media] pvrusb2: Use setup_timer

2014-12-26 Thread Julia Lawall
tup_timer(&t,f,d); -t.data = d; -t.function = f; // Signed-off-by: Julia Lawall --- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 26 ++ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c b/drivers/media/usb/pv

[PATCH 1/27] [media] s2255drv: Use setup_timer

2014-12-26 Thread Julia Lawall
tup_timer(&t,f,d); -t.function = f; -t.data = d; // Signed-off-by: Julia Lawall --- drivers/media/usb/s2255/s2255drv.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c index de55e96..0f3c34d

[PATCH 0/27] Use setup_timer

2014-12-26 Thread Julia Lawall
These patches group a call to init_timer and initialization of the function and data fields into a call to setup_timer. Is there is no initialization of the data field before add_timer is called, the the data value is set to 0UL. If the data value has a cast to something other than unsigned long,

[PATCH 5/27] [media] usbvision: Use setup_timer

2014-12-26 Thread Julia Lawall
tup_timer(&t,f,d); -t.data = d; -t.function = f; // The semantic patch also changes the cast to long to a cast to unsigned long in the data initializer, as unsigned long is the type of the data field. Signed-off-by: Julia Lawall --- drivers/media/usb/usbvision/usbvision-core.c |5

Re: [linuxtv-media:master 489/499] drivers/media/usb/cx231xx/cx231xx-audio.c:445:16-20: ERROR: dev is NULL but dereferenced.

2014-11-03 Thread Julia Lawall
Clearly a bug. On Tue, 4 Nov 2014, kbuild test robot wrote: > TO: Mauro Carvalho Chehab > CC: linux-media@vger.kernel.org > > tree: git://linuxtv.org/media_tree.git master > head: ed3da2bf2e1800e7c6e31e7d31917dacce599458 > commit: b7085c08647598aafbf8f6223ebcdd413745449c [489/499] [media] c

Re: [patch] [media] em28xx-input: NULL dereference on error

2014-09-25 Thread Julia Lawall
On Thu, 25 Sep 2014, Frank Schäfer wrote: > Hi Dan, > > Am 25.09.2014 um 13:39 schrieb Dan Carpenter: > > We call "kfree(ir->i2c_client);" in the error handling and that doesn't > > work if "ir" is NULL. > > > > Fixes: 78e719a5f30b ('[media] em28xx-input: i2c IR decoders: improve > > i2c_client h

Re: [linuxtv-media:devel 497/499] drivers/media/platform/s5p-mfc/s5p_mfc.c:454:2-5: WARNING: Use BUG_ON

2014-08-27 Thread Julia Lawall
The bug_on one doesn't look like a good idea, but the returnvar one would make the code a little simpler. julia On Thu, 28 Aug 2014, kbuild test robot wrote: > TO: Mauro Carvalho Chehab > CC: linux-media@vger.kernel.org > > Hi Mauro, > > First bad commit (maybe != root cause): > > tree: git:/

[PATCH 1/9] [media] v4l: ti-vpe: use c99 initializers in structures

2014-08-23 Thread Julia Lawall
From: Julia Lawall Use c99 initializers for structures. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @decl@ identifier i1,fld; type T; field list[n] fs; @@ struct i1 { fs T fld; ...}; @bad@ identifier decl.i1,i2

[PATCH 0/9] use c99 initializers in structures

2014-08-23 Thread Julia Lawall
These patches add labels in the initializations of structure fields (c99 initializers). The complete semantic patch thta makes this change is shown below. This rule ignores cases where the initialization is just 0 or NULL, where some of the fields already use labels, and where there are nested st

[PATCH 0/9] use correct structure type name in sizeof

2014-07-29 Thread Julia Lawall
These patches fix typos in the name of a type referenced in a sizeof command. These problems are not caught by the compiler, because they have no impact on execution - the size of a pointer is independent of the size of the pointed value. The semantic patch that finds these problems is shown belo

[PATCH 1/9] drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c: use correct structure type name in sizeof

2014-07-29 Thread Julia Lawall
From: Julia Lawall Correct typo in the name of the type given to sizeof. Because it is the size of a pointer that is wanted, the typo has no impact on compilation or execution. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). The semantic patch used can be found in

[PATCH 0/25] fix error return code

2013-12-29 Thread Julia Lawall
These patches fix cases where the return variable is not set to an error code in an error case. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 3/25] fix error return code

2013-12-29 Thread Julia Lawall
From: Julia Lawall The rest of the function uses ret to store the return value, even setting ret to i a few lines before this, so return ret instead of i. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|

[PATCH 20/25] fix error return code

2013-12-29 Thread Julia Lawall
From: Julia Lawall Set the return variable to an error code as done elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when !=

question about drivers/media/usb/gspca/kinect.c

2013-12-25 Thread Julia Lawall
The following code, in the function send_cmd, looks too concise: do { actual_len = kinect_read(udev, ibuf, 0x200); } while (actual_len == 0); PDEBUG(D_USBO, "Control reply: %d", res); if (actual_len < sizeof(*rhdr)) { pr_err("send_cmd

[PATCH 0/29] simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
devm_ioremap_resource often uses the result of a call to platform_get_resource as its last argument. devm_ioremap_resource does appropriate error handling on this argument, so error handling can be removed from the call site. To make the connection between the call to platform_get_resource and th

[PATCH 11/29] marvell-ccic/mmp-driver.c: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1

[PATCH 26/29] drivers/media/platform/coda.c: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1

Re: [PATCH] trivial: adjust code alignment

2013-08-05 Thread Julia Lawall
On Mon, 5 Aug 2013, Dan Carpenter wrote: On Mon, Aug 05, 2013 at 04:47:39PM +0200, Julia Lawall wrote: diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c index e8a1ce2..4a5a5dc 100644 --- a/drivers/media/i2c/ov7670.c +++ b/drivers/media/i2c/ov7670.c @@ -1369,8 +1369,8

<    1   2   3   4   >