On Thu, 21 Sep 2017, Haneen Mohammed wrote:
> Remove obsolete comment which was initially added in 2008 to annotate
> that idr_find() was used before idr_remove() since idr_remove() didn't
> use to return feedback. The comment now is irrelevant with
> commit f6cd7daecff5 ("drm: Release driver re
On Thu, 21 Sep 2017, Haneen Mohammed wrote:
> On Thu, Sep 21, 2017 at 11:16:44PM +0200, Julia Lawall wrote:
> >
> >
> > On Thu, 21 Sep 2017, Haneen Mohammed wrote:
> >
> > > Remove obsolete comment which was initially added in 2008 to annotate
> > &g
On Sun, 24 Sep 2017, Harsha Sharma wrote:
> Replace all occurences of dev_info/err/dbg with DRM_DEV_INFO/
> ERROR/DEBUG as we have DRM_DEV_* variants of drm print macros
> Done using following coccinelle semantic patch
Some calls after under comments. They could be dropped.
Some calls appear
On Sun, 24 Sep 2017, Harsha Sharma wrote:
> Replace all occurences of dev_info/err/dbg with DRM_DEV_INFO/
> ERROR/DEBUG as we have DRM_DEV_* variants of drm print macros
> Done using following coccinelle semantic patch
>
> @r@
> @@
>
> (
> -dev_info
> +DRM_DEV_INFO
> |
> -dev_err
> +DRM_DEV_ERRO
On Tue, 26 Sep 2017, Daniel Vetter wrote:
> On Tue, Sep 26, 2017 at 12:17:28AM +0530, Aishwarya Pant wrote:
> > The IDR deletion interface now returns the deleted entry or NULL if it was
> > not
> > present. So we don't have to do the extra work of checking if we have a
> > reference on the drm
On Tue, 26 Sep 2017, Daniel Vetter wrote:
> On Tue, Sep 26, 2017 at 10:47 AM, Daniel Vetter wrote:
> > On Tue, Sep 26, 2017 at 10:38 AM, Julia Lawall wrote:
> >>
> >>
> >> On Tue, 26 Sep 2017, Daniel Vetter wrote:
> >>
> >>> On Tu
There are two initializations of .asic_setup in this structure.
julia
-- Forwarded message --
Date: Wed, 27 Sep 2017 10:16:08 +0800
From: kbuild test robot
To: kbu...@01.org
Cc: Julia Lawall
Subject: [radeon-alex:drm-next-4.15-dc 148/1063]
drivers/gpu/drm/amd/amdgpu
Unlock missing on failure of the new call to idr_remove.
julia
-- Forwarded message --
Date: Wed, 27 Sep 2017 15:14:54 +0800
From: kbuild test robot
To: kbu...@01.org
Cc: Julia Lawall
Subject: Re: [PATCH] drm/gem: use new idr deletion interface to cleanup
From: Fengguang Wu
Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
drm_*_unreference() helpers.
Generated by: scripts/coccinelle/api/drm-get-put.cocci
Signed-off-by: Fengguang Wu
Signed-off-by: Julia Lawall
---
tree: https://github.com/thierryreding/linux for-4.16
On Mon, 15 Jan 2018, Thierry Reding wrote:
> On Mon, Jan 15, 2018 at 01:47:07PM +0100, Julia Lawall wrote:
> > From: Fengguang Wu
> >
> > Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
> > drm_*_unreference() helpers.
> >
> > G
From: Fengguang Wu
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
CC: Laurent Pinchart
Signed-off-by: Fengguang Wu
Signed-off-by: Julia Lawall
---
hdmi_connector.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/msm/hdmi
moval")
Signed-off-by: Fengguang Wu
Signed-off-by: Julia Lawall
---
url:
https://github.com/0day-ci/linux/commits/Laurent-Pinchart/Cargo-cult-cleanup-in-atomic-drivers/20180120-183018
base: git://people.freedesktop.org/~airlied/linux.git drm-next
:: branch date: 3 hours ago
:: comm
From: Fengguang Wu
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
CC: Laurent Pinchart
Signed-off-by: Fengguang Wu
Signed-off-by: Julia Lawall
---
url:
https://github.com/0day-ci/linux/commits/Laurent-Pinchart/Cargo-cult-cleanup-in-atomic-drivers/20180120
From: Fengguang Wu
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
CC: Laurent Pinchart
Signed-off-by: Fengguang Wu
Signed-off-by: Julia Lawall
---
url:
https://github.com/0day-ci/linux/commits/Laurent-Pinchart/Cargo-cult-cleanup-in-atomic-drivers/20180120
moval")
Signed-off-by: Fengguang Wu
Signed-off-by: Julia Lawall
---
v2: correct driver name in subject line
url:
https://github.com/0day-ci/linux/commits/Laurent-Pinchart/Cargo-cult-cleanup-in-atomic-drivers/20180120-183018
base: git://people.freedesktop.org/~airlied/linux.git drm-next
:::
From: Fengguang Wu
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
CC: Laurent Pinchart
Signed-off-by: Fengguang Wu
Signed-off-by: Julia Lawall
---
v2: Fix driver name in subject line
url:
https://github.com/0day-ci/linux/commits/Laurent-Pinchart/Cargo
From: Fengguang Wu
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
Signed-off-by: Fengguang Wu
Signed-off-by: Julia Lawall
---
v2: Fix driver name in subject line
url:
https://github.com/0day-ci/linux/commits/Laurent-Pinchart/Cargo-cult-cleanup-in-atomic
,...);
|
y = g(...);
*if (e)
S3 else S4
)
//
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/radeon/radeon_uvd.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c
b/drivers/gpu/drm/radeon/radeon_uvd.c
index d34d1cf..95f4db7 100644
--- a/d
On Tue, 6 Feb 2018, Dan Carpenter wrote:
> On Mon, Feb 05, 2018 at 09:09:57PM +0100, Wolfram Sang wrote:
> > In one Renesas driver, I found a typo which turned an intended bit shift
> > ('<<')
> > into a comparison ('<'). Because this is a subtle issue, I looked tree wide
> > for
> > similar p
On Tue, 6 Feb 2018, Dan Carpenter wrote:
> On Tue, Feb 06, 2018 at 02:15:51PM +0100, Julia Lawall wrote:
> >
> >
> > On Tue, 6 Feb 2018, Dan Carpenter wrote:
> >
> > > On Mon, Feb 05, 2018 at 09:09:57PM +0100, Wolfram Sang wrote:
> > > > In on
On Tue, 6 Feb 2018, Wolfram Sang wrote:
> Hi Julia,
>
> > and got the results below. I can make a version for the kernel shortly.
>
> It should probably take care of right-shifting, too?
I did that too but got no results. Perhaps right shifting constants is
pretty uncommon. I can put that in
On Tue, 6 Feb 2018, Dan Carpenter wrote:
> That found 4 that I think Wolfram's grep missed.
>
> arch/um/drivers/vector_user.h |2 --
> drivers/gpu/drm/mxsfb/mxsfb_regs.h|2 --
> drivers/video/fbdev/mxsfb.c |2 --
> include/drm/drm_scdc_helper.h
The videomode structures are only copied into the vm field of a
panel_drv_data structure, so they can be const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c |2 +-
drivers/gpu/drm/omapdrm/displays/panel-tpo
On Tue, 28 Nov 2017, SF Markus Elfring wrote:
> >> It seems that I got no responses so far for clarification requests
> >> according to the documentation in a direction I hoped for.
> >
> > That's because you are pretty unresponsive to direction.
>
> From which places did you get this impression
On Tue, 28 Nov 2017, SF Markus Elfring wrote:
> It seems that I got no responses so far for clarification requests
> according to the documentation in a direction I hoped for.
> >>>
> >>> That's because you are pretty unresponsive to direction.
> >>
> >> From which places did you get t
On Tue, 28 Nov 2017, SF Markus Elfring wrote:
> > How many times have I told you to include the reason for
> > your patches in your proposed commit message?
>
> It might be useful to look again.
>
>
> > Too often.
>
> I answered this feedback to some degree.
>
>
> > Many people do not know that
This is a false positive, but I wonder if it is really necessary to put
the assignment in the conditional test expression.
julia
-- Forwarded message --
Date: Tue, 28 Nov 2017 13:23:36 +0800
From: kbuild test robot
To: kbu...@01.org
Cc: Julia Lawall
Subject: [PATCH] drm/nouveau
no, it isn't necessary.
Will someone take care of it? I'm just the 0-day proxy :)
julia
> On Tue, Nov 28, 2017 at 1:56 PM, Julia Lawall wrote:
> > This is a false positive, but I wonder if it is really necessary to put
> > the assignment in the conditional test
On Wed, 20 Dec 2017, Joe Perches wrote:
> On Wed, 2017-12-20 at 10:59 +0100, Greg Kroah-Hartman wrote:
> > > > Why you didn't send that patch to the sysfs maintainer is a bit odd...
> > > > :)
> > >
> > > So here's an opportunity for you:
> > >
> > > The sysfs maintainer hasn't added include/l
Drop newline at the end of a message string when the printing function adds
a newline.
The complete semantic patch that detects this issue is as shown below
(http://coccinelle.lip6.fr/). It works in two phases - the first phase
counts how many uses of a function involve a newline and how many don
PP_ASSERT_WITH_CODE prints a newline at the end of the message string,
so the message string does not need to include a newline explicitly.
Done using Coccinelle.
Signed-off-by: Julia Lawall
---
I couldn't figure out how to configure the kernel to get any of this code
to compile.
driver
On Wed, 27 Dec 2017, Michel Dänzer wrote:
> On 2017-12-27 03:51 PM, Julia Lawall wrote:
> > PP_ASSERT_WITH_CODE prints a newline at the end of the message string,
> > so the message string does not need to include a newline explicitly.
> > Done using Coccinelle.
> &g
On Tue, 2 Jan 2018, Bob Peterson wrote:
> - Original Message -
> | Drop newline at the end of a message string when the printing function adds
> | a newline.
>
> Hi Julia,
>
> NACK.
>
> As much as it's a pain when searching the source code for output strings,
> this patch set goes agains
On Tue, 2 Jan 2018, Bob Peterson wrote:
> - Original Message -
> | - Original Message -
> | | Drop newline at the end of a message string when the printing function
> adds
> | | a newline.
> |
> | Hi Julia,
> |
> | NACK.
> |
> | As much as it's a pain when searching the source c
On Tue, 2 Jan 2018, Bart Van Assche wrote:
> On Tue, 2018-01-02 at 15:00 +0100, Julia Lawall wrote:
> > On Tue, 2 Jan 2018, Bob Peterson wrote:
> > > - Original Message -
> > > > - Original Message -
> > > >
> > > Still, the G
Hello,
I am looking at introducing some macros for i2c_msg initialization, and
Ryan Mallon suggested that sometimes it could be useful to at the same
time replace explicit lengths with the size of the associated buffer. But
in some cases the sizes are not the same. An example is as follows, i
Hello,
I am looking at introducing some macros for i2c_msg initialization, and
Ryan Mallon suggested that sometimes it could be useful to at the same
time replace explicit lengths with the size of the associated buffer. But
in some cases the sizes are not the same. An example is as follows,
From: Julia Lawall
Use WARN_ONCE rather than printk followed by WARN_ON_ONCE(1), for conciseness.
A simplified version of the semantic patch that makes this transformation
is as follows: (http://coccinelle.lip6.fr/)
//
@@
expression list es;
@@
-printk(
+WARN_ONCE(1,
es);
-WARN_ON_ONCE(1
In the function compat_drm_getclient, I have the impression that the
structure c32 is copied to user level with the field idx uninitialized?
julia
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/
On Mon, 30 Jan 2012, Dave Airlie wrote:
On Sat, Jan 28, 2012 at 7:28 PM, Julia Lawall wrote:
In the function compat_drm_getclient, I have the impression that the
structure c32 is copied to user level with the field idx uninitialized?
Looks like it alright,
care to send a patch?
What
From: Julia Lawall
The c32 structure is allocated on the stack and its idx field is not
initialized before copying it to user level. This patch takes the value
from the result of the ioctl, as done for the other fields.
Signed-off-by: Julia Lawall
---
An alternative would be to change the
This patch fixes a case where a structure field is not initialized before
the structureis copied to user level.
The semantic match that finds this problem is as follows
(http://coccinelle.lip6.fr/). It uses other references to the same
structure in the current file to find the set of fields that
From: Julia Lawall
The function radeon_cs_parser_init is only called from two places, in
drivers/gpu/drm/radeon/radeon_cs.c and drivers/gpu/drm/radeon/r600_cs.c.
In each case, if the call fails another function is called that frees all
of the kdata and dpage information in the chunks array. So
From: Julia Lawall
Most of the error handling code in this function frees the buffers
kcmd_addr, kvb_addr, and kbox_addr allocated at the beginning of this
function. These two branches are changed to do the same.
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/savage/savage_state.c |5
From: Julia Lawall
The various devm_ functions allocate memory that is released when a driver
detaches. This patch uses devm_kzalloc, devm_request_irq, etc. for data
that is allocated in the probe function of a platform device and is only
freed in the remove function.
This patch changes the
In the function oaktrail_lvds_mode_set, I don't think that the following
code makes any sense:
/* Find the connector we're trying to set up */
list_for_each_entry(connector, &mode_config->connector_list, head) {
if (!connector->encoder || connector->encoder->crtc
From: Julia Lawall
If list_for_each_entry, etc complete a traversal of the list, the iterator
variable ends up pointing to an address at an offset from the list head,
and not a meaningful structure. Thus this value should not be used after
the end of the iterator.
In the first two cases, a a
On Sun, 8 Jul 2012, Alan Cox wrote:
On Sun, 8 Jul 2012 10:39:43 +0200 (CEST)
Julia Lawall wrote:
In the function oaktrail_lvds_mode_set, I don't think that the following
code makes any sense:
/* Find the connector we're trying to set up */
list_for_each_entry
On Sun, 8 Jul 2012, Paul Menzel wrote:
Dear Julia,
Am Sonntag, den 08.07.2012, 13:37 +0200 schrieb Julia Lawall:
From: Julia Lawall
If list_for_each_entry, etc complete a traversal of the list, the iterator
variable ends up pointing to an address at an offset from the list head,
and not a
From: Julia Lawall
If list_for_each_entry, etc complete a traversal of the list, the iterator
variable ends up pointing to an address at an offset from the list head,
and not a meaningful structure. Thus this value should not be used after
the end of the iterator.
A break is added after the
From: Julia Lawall
If list_for_each_entry, etc complete a traversal of the list, the iterator
variable ends up pointing to an address at an offset from the list head,
and not a meaningful structure. Thus this value should not be used after
the end of the iterator.
A break is added after the
From: Julia Lawall
If list_for_each_entry, etc complete a traversal of the list, the iterator
variable ends up pointing to an address at an offset from the list head,
and not a meaningful structure. Thus this value should not be used after
the end of the iterator.
After the iteractor, entry
On Mon, 9 Jul 2012, Patrik Jakobsson wrote:
On Sun, Jul 8, 2012 at 10:16 PM, Alan Cox wrote:
On Sun, 8 Jul 2012 10:39:43 +0200 (CEST)
Julia Lawall wrote:
In the function oaktrail_lvds_mode_set, I don't think that the following
code makes any sense:
/* Find the connector
From: Julia Lawall
Delete successive tests to the same location.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
@s exists@
local idexpression y;
expression x,e;
@@
*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
{ ... when forall
On Thu, 28 Mar 2013, Jesse Barnes wrote:
> On Thu, 28 Mar 2013 05:04:26 -0700
> "Luis R. Rodriguez" wrote:
>
> > The new commit by Jesse that extended the fb_info with a skip_vt_switch
> > element is the simplest example of a data structure expansion. We'd backport
> > this by adding a static inl
On Thu, 28 Mar 2013, Luis R. Rodriguez wrote:
> On Thu, Mar 28, 2013 at 9:19 AM, Julia Lawall wrote:
> > On Thu, 28 Mar 2013, Jesse Barnes wrote:
> >> > - info->skip_vt_switch = true;
> >> > + fb_enable_skip_vt_switch(info);
> >>
On Thu, 28 Mar 2013, Luis R. Rodriguez wrote:
> On Thu, Mar 28, 2013 at 11:10 AM, Julia Lawall wrote:
> > On Thu, 28 Mar 2013, Luis R. Rodriguez wrote:
> >>
> >> Thanks Julia! I'll be sure to try to add this to compat-drivers if the
> >> upstream fb pa
> > I looked in today's linux-next, and there seems to be only one
> > initialization of this field, to true, and one test of this field. So
> > perhaps the case for setting the field to false just isn't needed.
>
> Oh sorry now I get what you mean! I thought about this -- and yes I
> decided to
ession E,E1,E2;
identifier l;
@@
*list_add(&E->l,E1);
... when != E1
when != list_del(&E->l)
when != list_del_init(&E->l)
when != E = E2
*kfree(E);//
Signed-off-by: Julia Lawall
---
I have only verified that the list is not accessed by drm_map_handle by
inspecting the cod
From: Julia Lawall
The cleanup code at the end of the function should also be carried out when
the function only partly completes its work.
A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)
//
@r exists@
local idexpression struct page ** x
From: Julia Lawall
Use kzalloc rather than the combination of kmalloc and memset.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
//
@@
expression x,size,flags;
statement S;
@@
-x = kmalloc(size,flags);
+x = kzalloc(size,flags);
if (x == NULL) S
-memset
From: Julia Lawall
Use kmemdup when some other buffer is immediately copied into the
allocated region.
A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)
//
@@
expression from,to,size,flag;
statement S;
@@
- to = \(kmalloc\|kzalloc
From: Julia Lawall
In each case, is_mobile is defined twice to 1. Drop one initialization.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
//
@r@
identifier I, s, fld;
position p0,p;
expression E;
@@
struct I s =...@p0 { ... @p = E, ...};
@s
From: Julia Lawall
list_for_each_entry binds its first argument to a non-null value, and thus
any null test on the value of that argument is superfluous.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
//
@@
iterator I;
expression x,E;
@@
I(x
From: Julia Lawall
Outdent the code following the if.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
//
@r disable braces4@
position p1,p2;
statement S1,S2;
@@
(
if (...) { ... }
|
if (...) s...@p1 s...@p2
)
@script:python@
p1 << r.p1;
p2 &
;}
...
*if (...)
{... when != S1
return -C2;}
...
*if (...)
{... S1 return -C3;}
//
Signed-off-by: Julia Lawall
---
This is only a suggestion. All of the other ways out of this function call
these two functions. But I don't understand the code well enough to know
why, or whether there
In the function compat_drm_getclient, I have the impression that the
structure c32 is copied to user level with the field idx uninitialized?
julia
On Mon, 30 Jan 2012, Dave Airlie wrote:
> On Sat, Jan 28, 2012 at 7:28 PM, Julia Lawall wrote:
>> In the function compat_drm_getclient, I have the impression that the
>> structure c32 is copied to user level with the field idx uninitialized?
>
> Looks like it alright,
>
From: Julia Lawall
The c32 structure is allocated on the stack and its idx field is not
initialized before copying it to user level. This patch takes the value
from the result of the ioctl, as done for the other fields.
Signed-off-by: Julia Lawall
---
An alternative would be to change the
This patch fixes a case where a structure field is not initialized before
the structureis copied to user level.
The semantic match that finds this problem is as follows
(http://coccinelle.lip6.fr/). It uses other references to the same
structure in the current file to find the set of fields that
In the function oaktrail_lvds_mode_set, I don't think that the following
code makes any sense:
/* Find the connector we're trying to set up */
list_for_each_entry(connector, &mode_config->connector_list, head) {
if (!connector->encoder || connector->encoder->crt
From: Julia Lawall
If list_for_each_entry, etc complete a traversal of the list, the iterator
variable ends up pointing to an address at an offset from the list head,
and not a meaningful structure. Thus this value should not be used after
the end of the iterator.
In the first two cases, a a
From: Julia Lawall
If list_for_each_entry, etc complete a traversal of the list, the iterator
variable ends up pointing to an address at an offset from the list head,
and not a meaningful structure. Thus this value should not be used after
the end of the iterator.
A break is added after the
On Sun, 8 Jul 2012, Alan Cox wrote:
> On Sun, 8 Jul 2012 10:39:43 +0200 (CEST)
> Julia Lawall wrote:
>
>> In the function oaktrail_lvds_mode_set, I don't think that the following
>> code makes any sense:
>>
>> /* Fin
From: Julia Lawall
If list_for_each_entry, etc complete a traversal of the list, the iterator
variable ends up pointing to an address at an offset from the list head,
and not a meaningful structure. Thus this value should not be used after
the end of the iterator.
After the iteractor, entry
On Mon, 9 Jul 2012, Patrik Jakobsson wrote:
> On Sun, Jul 8, 2012 at 10:16 PM, Alan Cox wrote:
>> On Sun, 8 Jul 2012 10:39:43 +0200 (CEST)
>> Julia Lawall wrote:
>>
>>> In the function oaktrail_lvds_mode_set, I don't think that the following
>>> co
On Sun, 8 Jul 2012, Paul Menzel wrote:
> Dear Julia,
>
>
> Am Sonntag, den 08.07.2012, 13:37 +0200 schrieb Julia Lawall:
>> From: Julia Lawall
>>
>> If list_for_each_entry, etc complete a traversal of the list, the iterator
>> variable ends up pointing to a
From: Julia Lawall
If list_for_each_entry, etc complete a traversal of the list, the iterator
variable ends up pointing to an address at an offset from the list head,
and not a meaningful structure. Thus this value should not be used after
the end of the iterator.
A break is added after the
ession E,E1,E2;
identifier l;
@@
*list_add(&E->l,E1);
... when != E1
when != list_del(&E->l)
when != list_del_init(&E->l)
when != E = E2
*kfree(E);//
Signed-off-by: Julia Lawall
---
I have only verified that the list is not accessed by drm_map_handle by
inspecting the cod
From: Julia Lawall
The cleanup code at the end of the function should also be carried out when
the function only partly completes its work.
A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)
//
@r exists@
local idexpression struct page ** x
From: Julia Lawall
In each case, is_mobile is defined twice to 1. Drop one initialization.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
//
@r@
identifier I, s, fld;
position p0,p;
expression E;
@@
struct I s =@p0 { ... .fld at p = E, ...};
@s
From: Julia Lawall
Use kzalloc rather than the combination of kmalloc and memset.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
//
@@
expression x,size,flags;
statement S;
@@
-x = kmalloc(size,flags);
+x = kzalloc(size,flags);
if (x == NULL) S
-memset
From: Julia Lawall
Use kmemdup when some other buffer is immediately copied into the
allocated region.
A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)
//
@@
expression from,to,size,flag;
statement S;
@@
- to = \(kmalloc\|kzalloc
;}
...
*if (...)
{... when != S1
return -C2;}
...
*if (...)
{... S1 return -C3;}
//
Signed-off-by: Julia Lawall
---
This is only a suggestion. All of the other ways out of this function call
these two functions. But I don't understand the code well enough to know
why, or whether there
From: Julia Lawall
list_for_each_entry binds its first argument to a non-null value, and thus
any null test on the value of that argument is superfluous.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
//
@@
iterator I;
expression x,E;
@@
I(x
From: Julia Lawall
Outdent the code following the if.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
//
@r disable braces4@
position p1,p2;
statement S1,S2;
@@
(
if (...) { ... }
|
if (...) S1 at p1 S2 at p2
)
@script:python@
p1 << r.p1;
p2 &
From: Julia Lawall
The function radeon_cs_parser_init is only called from two places, in
drivers/gpu/drm/radeon/radeon_cs.c and drivers/gpu/drm/radeon/r600_cs.c.
In each case, if the call fails another function is called that frees all
of the kdata and dpage information in the chunks array. So
From: Julia Lawall
Most of the error handling code in this function frees the buffers
kcmd_addr, kvb_addr, and kbox_addr allocated at the beginning of this
function. These two branches are changed to do the same.
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/savage/savage_state.c |5
From: Julia Lawall
The various devm_ functions allocate memory that is released when a driver
detaches. This patch uses devm_kzalloc, devm_request_irq, etc. for data
that is allocated in the probe function of a platform device and is only
freed in the remove function.
This patch changes the
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
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
From: Julia Lawall
Use c99 initializers for structures.
Drop 0 initializers in drivers/gpu/drm/sti/sti_vtac.c. A 0x0 initializer
is left in vtac_mode_aux in drivers/gpu/drm/sti/sti_vtac.c to highlight the
relation to vtac_mode_main.
A simplified version of the semantic match that finds the
These patches replace what appears to be a reference to the name of the
current function but is misspelled in some way by either the name of the
function itself, or by %s and then __func__ in an argument list.
//
// sudo apt-get install python-pip
// sudo pip install python-Levenshtein
// spatch
Replace a misspelled function name by %s and then __func__.
This was done using Coccinelle, including the use of Levenshtein distance,
as proposed by Rasmus Villemoes.
Signed-off-by: Julia Lawall
---
The semantic patch is difficult to summarize, but is available in the cover
letter of this
Replace a misspelled function name by %s and then __func__.
This was done using Coccinelle, including the use of Levenshtein distance,
as proposed by Rasmus Villemoes.
Signed-off-by: Julia Lawall
---
The semantic patch is difficult to summarize, but is available in the cover
letter of this
Replace a misspelled function name by %s and then __func__.
This was done using Coccinelle, including the use of Levenshtein distance,
as proposed by Rasmus Villemoes.
Signed-off-by: Julia Lawall
---
The semantic patch is difficult to summarize, but is available in the cover
letter of this
On Mon, 8 Dec 2014, Julian Calaby wrote:
> Hi Julia,
>
> On Mon, Dec 8, 2014 at 6:20 AM, Julia Lawall wrote:
> > These patches replace what appears to be a reference to the name of the
> > current function but is misspelled in some way by either the name of the
> > fu
On Mon, 8 Dec 2014, Alex Deucher wrote:
> On Sun, Dec 7, 2014 at 2:21 PM, Julia Lawall wrote:
> > Replace a misspelled function name by %s and then __func__.
> >
> > This was done using Coccinelle, including the use of Levenshtein distance,
> > as proposed by Rasmus Vi
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 at i;
|
ret = -c at i;
...
amp;ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
//
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/gma500/psb_drv.c |8 ++--
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c |1 +
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/
201 - 300 of 335 matches
Mail list logo