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
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
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
> > 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
The fence_ops structures are never modified, so declare this one as const,
as is already done for the others.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
The radeon_asic_ring structures are never modified, so declare them as
const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/radeon/radeon.h |2 -
drivers/gpu/drm/radeon/radeon_asic.c | 38 +--
2 files changed, 20
On Fri, 2 Oct 2015, Daniel Vetter wrote:
> We chase pointers/lists without taking the locks protecting them,
> which isn't that good.
>
> Fix it.
>
> v2: Actually unlock properly, spotted by Julia.
The unlock is still on top of the unlock label?
julia
>
> Cc:
These nvkm_object_func structures are never modified. All other
nvkm_object_func structures are declared as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv04.c |2 +-
drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c
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
;
@@
for_each_matching_node(n,...) {
...
(
of_node_put(n);
|
e = n
|
+ of_node_put(n);
? break;
)
...
}
... when != n
//
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/tegra/dc.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra
;
@@
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/gpu/host1x/bus.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a
Remove unneeded NULL test.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
//
@@ expression x; @@
-if (x != NULL)
\(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x);
//
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/i915/i915_dma.c | 19
Recent commits to kernel/git/torvalds/linux.git have made the following
functions able to tolerate NULL arguments:
kmem_cache_destroy (commit 3942d29918522)
mempool_destroy (commit 4e3ca3e033d1)
dma_pool_destroy (commit 44d7175da6ea)
These patches remove the associated NULL tests for the files th
The ttm_backend_func structures are never modified, so declare them as
const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |2 +-
drivers/gpu/drm/ast/ast_ttm.c |2 +-
drivers/gpu/drm/bochs/bochs_mm.c|2
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
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
>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, 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 concen
The drm_dp_mst_topology_cbs structures are never modified, so declare them
as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/i915/intel_dp_mst.c|2 +-
drivers/gpu/drm/radeon/radeon_dp_mst.c |2 +-
include/drm/drm_dp_mst_helper.h
amp;ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
//
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/msm/edp/edp_ctrl.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/edp/edp_ctrl.c
b/drivers/gpu/drm/msm/edp/edp_ctrl.
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;
...
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;
...
From: Julia Lawall
Propagate the returned error code on failure.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret = 0
)
... w
From: Julia Lawall
Propagate the error code on failure.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret = 0
)
... when != ret =
From: Julia Lawall
Return a negative error code on failure.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret = 0
)
... when !=
ing to some random place above the list_head at
the start of the list in the last element of the array?
julia
>
> Fixes: d72f049087d4 ("drm/panthor: Allow driver compilation")
> Reported-by: kernel test robot
> Reported-by: Julia Lawall
> Closes: https://lore.kernel.or
Reorganize kerneldoc parameter names to match the parameter
order in the function header.
Problems identified using Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/drm_gem_framebuffer_helper.c |3 +--
drivers/gpu/drm/drm_gpuvm.c |2 +-
2 files changed, 2
Reorganize kerneldoc parameter names to match the parameter
order in the function header.
Problems identified using Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/amd/display/dc/core/dc.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd
Reorganize kerneldoc parameter names to match the parameter
order in the function header.
The misordered cases were identified using the following
Coccinelle semantic patch:
//
@initialize:ocaml@
@@
let parse_doc l =
let pieces = List.map String.trim (String.split_on_char '*' l) in
let l =
Reorganize kerneldoc parameter names to match the parameter
order in the function header.
Problems identified using Coccinelle.
Signed-off-by: Julia Lawall
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c |2 +-
drivers/gpu/drm/radeon/radeon_ib.c |2 +-
2 files changed, 2 insertions
On Mon, 30 Sep 2024, Christian König wrote:
> Am 30.09.24 um 13:21 schrieb Julia Lawall:
> > Reorganize kerneldoc parameter names to match the parameter
> > order in the function header.
>
> Please split that up by driver, apart from that looks good to me.
Thanks for the f
Sent from my iPhone
> On 16 Nov 2024, at 05:40, Dan Carpenter wrote:
>
> On Sat, Nov 16, 2024 at 11:06:55AM +0100, Christophe Leroy wrote:
>>> diff --git a/arch/powerpc/platforms/pseries/papr_scm.c
>>> b/arch/powerpc/platforms/pseries/papr_scm.c
>>> index
>>> 9e297f88adc5d97d4dc7b267b0bfebd
On Tue, 17 Dec 2024, Alexander Gordeev wrote:
> On Tue, Dec 10, 2024 at 10:02:33PM +, Easwar Hariharan wrote:
>
> Hi Easwar,
>
> > This script finds and suggests conversions of timeout patterns that
> > result in seconds-denominated timeouts to use the new secs_to_jiffies()
> > API in inclu
301 - 335 of 335 matches
Mail list logo