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
>
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
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
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:
> >
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
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,
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
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:
> > >>
> >
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
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:
> > > >
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
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
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 |
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
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/
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 +
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/
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
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
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
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
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
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
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
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
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
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?
" 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
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
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
>
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
>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 <=
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
;
@@
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
;
@@
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
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
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
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
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
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
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
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
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 !
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..
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.
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
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:
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
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
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
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
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
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,
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
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
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
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:/
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
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
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
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
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
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\|
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 !=
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
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
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
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
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
101 - 200 of 332 matches
Mail list logo