All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] coccinelle: misc: minmax: Suppress reports for err returns
@ 2024-04-15 21:15 ` Ricardo Ribalda
  0 siblings, 0 replies; 16+ messages in thread
From: Ricardo Ribalda @ 2024-04-15 21:15 UTC (permalink / raw)
  To: Julia Lawall, Nicolas Palix
  Cc: Denis Efremov, cocci, linux-kernel, Ricardo Ribalda

Most of the people prefer:

return ret < 0 ? ret: 0;

than:

return min(ret, 0);

Let's tweak the cocci file to ignore those lines completely.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
Following discussion at:
https://lore.kernel.org/linux-media/20240415203304.GA3460978@ragnatech.se/T/#m4dce34572312bd8a02542d798f21af7e4fc05fe8
---
 scripts/coccinelle/misc/minmax.cocci | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/scripts/coccinelle/misc/minmax.cocci b/scripts/coccinelle/misc/minmax.cocci
index fcf908b34f27..ca4830ae3042 100644
--- a/scripts/coccinelle/misc/minmax.cocci
+++ b/scripts/coccinelle/misc/minmax.cocci
@@ -50,11 +50,26 @@ func(...)
 	...>
 }
 
+// Ignore errcode returns.
+@errcode@
+position p;
+identifier func;
+expression x;
+binary operator cmp = {<, <=};
+@@
+
+func(...)
+{
+	<...
+	return ((x) cmp@p 0 ? (x) : 0);
+	...>
+}
+
 @rmin depends on !patch@
 identifier func;
 expression x, y;
 binary operator cmp = {<, <=};
-position p;
+position p != errcode.p;
 @@
 
 func(...)
@@ -116,21 +131,6 @@ func(...)
 	...>
 }
 
-// Don't generate patches for errcode returns.
-@errcode depends on patch@
-position p;
-identifier func;
-expression x;
-binary operator cmp = {<, <=};
-@@
-
-func(...)
-{
-	<...
-	return ((x) cmp@p 0 ? (x) : 0);
-	...>
-}
-
 @pmin depends on patch@
 identifier func;
 expression x, y;

---
base-commit: 71b3ed53b08d87212fbbe51bdc3bf44eb8c462f8
change-id: 20240415-minimax-1e9110d4697b

Best regards,
-- 
Ricardo Ribalda <ribalda@chromium.org>


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [cocci] [PATCH] coccinelle: misc: minmax: Suppress reports for err returns
@ 2024-04-15 21:15 ` Ricardo Ribalda
  0 siblings, 0 replies; 16+ messages in thread
From: Ricardo Ribalda @ 2024-04-15 21:15 UTC (permalink / raw)
  To: Julia Lawall, Nicolas Palix
  Cc: Denis Efremov, cocci, linux-kernel, Ricardo Ribalda

Most of the people prefer:

return ret < 0 ? ret: 0;

than:

return min(ret, 0);

Let's tweak the cocci file to ignore those lines completely.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
Following discussion at:
https://lore.kernel.org/linux-media/20240415203304.GA3460978@ragnatech.se/T/#m4dce34572312bd8a02542d798f21af7e4fc05fe8
---
 scripts/coccinelle/misc/minmax.cocci | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/scripts/coccinelle/misc/minmax.cocci b/scripts/coccinelle/misc/minmax.cocci
index fcf908b34f27..ca4830ae3042 100644
--- a/scripts/coccinelle/misc/minmax.cocci
+++ b/scripts/coccinelle/misc/minmax.cocci
@@ -50,11 +50,26 @@ func(...)
 	...>
 }
 
+// Ignore errcode returns.
+@errcode@
+position p;
+identifier func;
+expression x;
+binary operator cmp = {<, <=};
+@@
+
+func(...)
+{
+	<...
+	return ((x) cmp@p 0 ? (x) : 0);
+	...>
+}
+
 @rmin depends on !patch@
 identifier func;
 expression x, y;
 binary operator cmp = {<, <=};
-position p;
+position p != errcode.p;
 @@
 
 func(...)
@@ -116,21 +131,6 @@ func(...)
 	...>
 }
 
-// Don't generate patches for errcode returns.
-@errcode depends on patch@
-position p;
-identifier func;
-expression x;
-binary operator cmp = {<, <=};
-@@
-
-func(...)
-{
-	<...
-	return ((x) cmp@p 0 ? (x) : 0);
-	...>
-}
-
 @pmin depends on patch@
 identifier func;
 expression x, y;

---
base-commit: 71b3ed53b08d87212fbbe51bdc3bf44eb8c462f8
change-id: 20240415-minimax-1e9110d4697b

Best regards,
-- 
Ricardo Ribalda <ribalda@chromium.org>


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] coccinelle: misc: minmax: Suppress reports for err returns
  2024-04-15 21:15 ` [cocci] " Ricardo Ribalda
@ 2024-04-16  8:32   ` Julia Lawall
  -1 siblings, 0 replies; 16+ messages in thread
From: Julia Lawall @ 2024-04-16  8:32 UTC (permalink / raw)
  To: Ricardo Ribalda; +Cc: Nicolas Palix, Denis Efremov, cocci, linux-kernel



On Mon, 15 Apr 2024, Ricardo Ribalda wrote:

> Most of the people prefer:
>
> return ret < 0 ? ret: 0;
>
> than:
>
> return min(ret, 0);
>
> Let's tweak the cocci file to ignore those lines completely.
>
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>

I agree.  Thanks for the patch.

julia

> ---
> Following discussion at:
> https://lore.kernel.org/linux-media/20240415203304.GA3460978@ragnatech.se/T/#m4dce34572312bd8a02542d798f21af7e4fc05fe8
> ---
>  scripts/coccinelle/misc/minmax.cocci | 32 ++++++++++++++++----------------
>  1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/scripts/coccinelle/misc/minmax.cocci b/scripts/coccinelle/misc/minmax.cocci
> index fcf908b34f27..ca4830ae3042 100644
> --- a/scripts/coccinelle/misc/minmax.cocci
> +++ b/scripts/coccinelle/misc/minmax.cocci
> @@ -50,11 +50,26 @@ func(...)
>  	...>
>  }
>
> +// Ignore errcode returns.
> +@errcode@
> +position p;
> +identifier func;
> +expression x;
> +binary operator cmp = {<, <=};
> +@@
> +
> +func(...)
> +{
> +	<...
> +	return ((x) cmp@p 0 ? (x) : 0);
> +	...>
> +}
> +
>  @rmin depends on !patch@
>  identifier func;
>  expression x, y;
>  binary operator cmp = {<, <=};
> -position p;
> +position p != errcode.p;
>  @@
>
>  func(...)
> @@ -116,21 +131,6 @@ func(...)
>  	...>
>  }
>
> -// Don't generate patches for errcode returns.
> -@errcode depends on patch@
> -position p;
> -identifier func;
> -expression x;
> -binary operator cmp = {<, <=};
> -@@
> -
> -func(...)
> -{
> -	<...
> -	return ((x) cmp@p 0 ? (x) : 0);
> -	...>
> -}
> -
>  @pmin depends on patch@
>  identifier func;
>  expression x, y;
>
> ---
> base-commit: 71b3ed53b08d87212fbbe51bdc3bf44eb8c462f8
> change-id: 20240415-minimax-1e9110d4697b
>
> Best regards,
> --
> Ricardo Ribalda <ribalda@chromium.org>
>
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [PATCH] coccinelle: misc: minmax: Suppress reports for err returns
@ 2024-04-16  8:32   ` Julia Lawall
  0 siblings, 0 replies; 16+ messages in thread
From: Julia Lawall @ 2024-04-16  8:32 UTC (permalink / raw)
  To: Ricardo Ribalda; +Cc: Nicolas Palix, Denis Efremov, cocci, linux-kernel



On Mon, 15 Apr 2024, Ricardo Ribalda wrote:

> Most of the people prefer:
>
> return ret < 0 ? ret: 0;
>
> than:
>
> return min(ret, 0);
>
> Let's tweak the cocci file to ignore those lines completely.
>
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>

I agree.  Thanks for the patch.

julia

> ---
> Following discussion at:
> https://lore.kernel.org/linux-media/20240415203304.GA3460978@ragnatech.se/T/#m4dce34572312bd8a02542d798f21af7e4fc05fe8
> ---
>  scripts/coccinelle/misc/minmax.cocci | 32 ++++++++++++++++----------------
>  1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/scripts/coccinelle/misc/minmax.cocci b/scripts/coccinelle/misc/minmax.cocci
> index fcf908b34f27..ca4830ae3042 100644
> --- a/scripts/coccinelle/misc/minmax.cocci
> +++ b/scripts/coccinelle/misc/minmax.cocci
> @@ -50,11 +50,26 @@ func(...)
>  	...>
>  }
>
> +// Ignore errcode returns.
> +@errcode@
> +position p;
> +identifier func;
> +expression x;
> +binary operator cmp = {<, <=};
> +@@
> +
> +func(...)
> +{
> +	<...
> +	return ((x) cmp@p 0 ? (x) : 0);
> +	...>
> +}
> +
>  @rmin depends on !patch@
>  identifier func;
>  expression x, y;
>  binary operator cmp = {<, <=};
> -position p;
> +position p != errcode.p;
>  @@
>
>  func(...)
> @@ -116,21 +131,6 @@ func(...)
>  	...>
>  }
>
> -// Don't generate patches for errcode returns.
> -@errcode depends on patch@
> -position p;
> -identifier func;
> -expression x;
> -binary operator cmp = {<, <=};
> -@@
> -
> -func(...)
> -{
> -	<...
> -	return ((x) cmp@p 0 ? (x) : 0);
> -	...>
> -}
> -
>  @pmin depends on patch@
>  identifier func;
>  expression x, y;
>
> ---
> base-commit: 71b3ed53b08d87212fbbe51bdc3bf44eb8c462f8
> change-id: 20240415-minimax-1e9110d4697b
>
> Best regards,
> --
> Ricardo Ribalda <ribalda@chromium.org>
>
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [PATCH] coccinelle: misc: minmax: Suppress reports for err returns
  2024-04-15 21:15 ` [cocci] " Ricardo Ribalda
@ 2024-04-16 11:30   ` Markus Elfring
  -1 siblings, 0 replies; 16+ messages in thread
From: Markus Elfring @ 2024-04-16 11:30 UTC (permalink / raw)
  To: Ricardo Ribalda, Julia Lawall, cocci; +Cc: LKML, Denis Efremov, Nicolas Palix

…
> +++ b/scripts/coccinelle/misc/minmax.cocci
> @@ -50,11 +50,26 @@ func(...)
>  	...>
>  }
>
> +// Ignore errcode returns.
> +@errcode@
…

I see that you would like to omit the specification “depends on patch”
from the previous SmPL rule location.

Would you really like to influence and adjust SmPL code any more
according to affected coccicheck operation modes?

Regards,
Markus

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] coccinelle: misc: minmax: Suppress reports for err returns
@ 2024-04-16 11:30   ` Markus Elfring
  0 siblings, 0 replies; 16+ messages in thread
From: Markus Elfring @ 2024-04-16 11:30 UTC (permalink / raw)
  To: Ricardo Ribalda, Julia Lawall, cocci; +Cc: LKML, Denis Efremov, Nicolas Palix

…
> +++ b/scripts/coccinelle/misc/minmax.cocci
> @@ -50,11 +50,26 @@ func(...)
>  	...>
>  }
>
> +// Ignore errcode returns.
> +@errcode@
…

I see that you would like to omit the specification “depends on patch”
from the previous SmPL rule location.

Would you really like to influence and adjust SmPL code any more
according to affected coccicheck operation modes?

Regards,
Markus

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] coccinelle: misc: minmax: Suppress reports for err returns
  2024-04-16 11:30   ` Markus Elfring
@ 2024-04-16 11:32     ` Ricardo Ribalda
  -1 siblings, 0 replies; 16+ messages in thread
From: Ricardo Ribalda @ 2024-04-16 11:32 UTC (permalink / raw)
  To: Markus Elfring; +Cc: Julia Lawall, cocci, LKML, Denis Efremov, Nicolas Palix

Hi Markus

On Tue, 16 Apr 2024 at 13:30, Markus Elfring <Markus.Elfring@web.de> wrote:
>
> …
> > +++ b/scripts/coccinelle/misc/minmax.cocci
> > @@ -50,11 +50,26 @@ func(...)
> >       ...>
> >  }
> >
> > +// Ignore errcode returns.
> > +@errcode@
> …
>
> I see that you would like to omit the specification “depends on patch”
> from the previous SmPL rule location.
>
> Would you really like to influence and adjust SmPL code any more
> according to affected coccicheck operation modes?

I probably do not know what I am doing :), it is my first .cocci patch.

If I leave the "depends on patch", then the change is ignored in report mode.

I think errcode needs to be executed in report and in patch mode, but
there might be a better way to do it.

>
> Regards,
> Markus



-- 
Ricardo Ribalda

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [PATCH] coccinelle: misc: minmax: Suppress reports for err returns
@ 2024-04-16 11:32     ` Ricardo Ribalda
  0 siblings, 0 replies; 16+ messages in thread
From: Ricardo Ribalda @ 2024-04-16 11:32 UTC (permalink / raw)
  To: Markus Elfring; +Cc: Julia Lawall, cocci, LKML, Denis Efremov, Nicolas Palix

Hi Markus

On Tue, 16 Apr 2024 at 13:30, Markus Elfring <Markus.Elfring@web.de> wrote:
>
> …
> > +++ b/scripts/coccinelle/misc/minmax.cocci
> > @@ -50,11 +50,26 @@ func(...)
> >       ...>
> >  }
> >
> > +// Ignore errcode returns.
> > +@errcode@
> …
>
> I see that you would like to omit the specification “depends on patch”
> from the previous SmPL rule location.
>
> Would you really like to influence and adjust SmPL code any more
> according to affected coccicheck operation modes?

I probably do not know what I am doing :), it is my first .cocci patch.

If I leave the "depends on patch", then the change is ignored in report mode.

I think errcode needs to be executed in report and in patch mode, but
there might be a better way to do it.

>
> Regards,
> Markus



-- 
Ricardo Ribalda

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] coccinelle: misc: minmax: Suppress reports for err returns
  2024-04-16 11:32     ` [cocci] " Ricardo Ribalda
@ 2024-04-16 11:50       ` Markus Elfring
  -1 siblings, 0 replies; 16+ messages in thread
From: Markus Elfring @ 2024-04-16 11:50 UTC (permalink / raw)
  To: Ricardo Ribalda, Julia Lawall, cocci; +Cc: LKML, Denis Efremov, Nicolas Palix

> I think errcode needs to be executed in report and in patch mode,

Adjustments for functionality of coccicheck operation modes can be clarified further.


> but there might be a better way to do it.

Corresponding design options depend on varying development efforts and resources.

Regards,
Markus

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [PATCH] coccinelle: misc: minmax: Suppress reports for err returns
@ 2024-04-16 11:50       ` Markus Elfring
  0 siblings, 0 replies; 16+ messages in thread
From: Markus Elfring @ 2024-04-16 11:50 UTC (permalink / raw)
  To: Ricardo Ribalda, Julia Lawall, cocci; +Cc: LKML, Denis Efremov, Nicolas Palix

> I think errcode needs to be executed in report and in patch mode,

Adjustments for functionality of coccicheck operation modes can be clarified further.


> but there might be a better way to do it.

Corresponding design options depend on varying development efforts and resources.

Regards,
Markus

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] coccinelle: misc: minmax: Suppress reports for err returns
  2024-04-16 11:50       ` [cocci] " Markus Elfring
  (?)
@ 2024-04-17 11:13       ` Ricardo Ribalda
  2024-04-17 13:02           ` [cocci] " Markus Elfring
  -1 siblings, 1 reply; 16+ messages in thread
From: Ricardo Ribalda @ 2024-04-17 11:13 UTC (permalink / raw)
  To: Markus Elfring; +Cc: Julia Lawall, cocci, LKML, Denis Efremov, Nicolas Palix

Hi "Markus"

On Tue, 16 Apr 2024 at 13:50, Markus Elfring <Markus.Elfring@web.de> wrote:
>
> > I think errcode needs to be executed in report and in patch mode,
>
> Adjustments for functionality of coccicheck operation modes can be clarified further.

https://lore.kernel.org/lkml/2024041643-unshaven-happiest-1405@gregkh/


>
>
> > but there might be a better way to do it.
>
> Corresponding design options depend on varying development efforts and resources.
>
> Regards,
> Markus



-- 
Ricardo Ribalda

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: coccinelle: misc: minmax: Suppress reports for err returns
  2024-04-17 11:13       ` Ricardo Ribalda
@ 2024-04-17 13:02           ` Markus Elfring
  0 siblings, 0 replies; 16+ messages in thread
From: Markus Elfring @ 2024-04-17 13:02 UTC (permalink / raw)
  To: Ricardo Ribalda, Julia Lawall, cocci; +Cc: LKML, Denis Efremov, Nicolas Palix

>> Adjustments for functionality of coccicheck operation modes can be clarified further.
>
> https://lore.kernel.org/lkml/2024041643-unshaven-happiest-1405@gregkh/

I hope that remaining communication difficulties can be resolved in more constructive ways.


Do you get further development ideas from previous contributions on presented topics?

Regards,
Markus

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] coccinelle: misc: minmax: Suppress reports for err returns
@ 2024-04-17 13:02           ` Markus Elfring
  0 siblings, 0 replies; 16+ messages in thread
From: Markus Elfring @ 2024-04-17 13:02 UTC (permalink / raw)
  To: Ricardo Ribalda, Julia Lawall, cocci; +Cc: LKML, Denis Efremov, Nicolas Palix

>> Adjustments for functionality of coccicheck operation modes can be clarified further.
>
> https://lore.kernel.org/lkml/2024041643-unshaven-happiest-1405@gregkh/

I hope that remaining communication difficulties can be resolved in more constructive ways.


Do you get further development ideas from previous contributions on presented topics?

Regards,
Markus

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [PATCH] coccinelle: misc: minmax: Suppress reports for err returns
  2024-04-15 21:15 ` [cocci] " Ricardo Ribalda
                   ` (2 preceding siblings ...)
  (?)
@ 2024-04-18 20:55 ` Julia Lawall
  2024-04-19  6:51   ` Markus Elfring
  -1 siblings, 1 reply; 16+ messages in thread
From: Julia Lawall @ 2024-04-18 20:55 UTC (permalink / raw)
  To: Ricardo Ribalda; +Cc: Nicolas Palix, Denis Efremov, cocci, linux-kernel



On Mon, 15 Apr 2024, Ricardo Ribalda wrote:

> Most of the people prefer:
>
> return ret < 0 ? ret: 0;
>
> than:
>
> return min(ret, 0);
>
> Let's tweak the cocci file to ignore those lines completely.
>
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>

Applied, thanks. (Coccinelle for-6.10 branch).

julia

> ---
> Following discussion at:
> https://lore.kernel.org/linux-media/20240415203304.GA3460978@ragnatech.se/T/#m4dce34572312bd8a02542d798f21af7e4fc05fe8
> ---
>  scripts/coccinelle/misc/minmax.cocci | 32 ++++++++++++++++----------------
>  1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/scripts/coccinelle/misc/minmax.cocci b/scripts/coccinelle/misc/minmax.cocci
> index fcf908b34f27..ca4830ae3042 100644
> --- a/scripts/coccinelle/misc/minmax.cocci
> +++ b/scripts/coccinelle/misc/minmax.cocci
> @@ -50,11 +50,26 @@ func(...)
>  	...>
>  }
>
> +// Ignore errcode returns.
> +@errcode@
> +position p;
> +identifier func;
> +expression x;
> +binary operator cmp = {<, <=};
> +@@
> +
> +func(...)
> +{
> +	<...
> +	return ((x) cmp@p 0 ? (x) : 0);
> +	...>
> +}
> +
>  @rmin depends on !patch@
>  identifier func;
>  expression x, y;
>  binary operator cmp = {<, <=};
> -position p;
> +position p != errcode.p;
>  @@
>
>  func(...)
> @@ -116,21 +131,6 @@ func(...)
>  	...>
>  }
>
> -// Don't generate patches for errcode returns.
> -@errcode depends on patch@
> -position p;
> -identifier func;
> -expression x;
> -binary operator cmp = {<, <=};
> -@@
> -
> -func(...)
> -{
> -	<...
> -	return ((x) cmp@p 0 ? (x) : 0);
> -	...>
> -}
> -
>  @pmin depends on patch@
>  identifier func;
>  expression x, y;
>
> ---
> base-commit: 71b3ed53b08d87212fbbe51bdc3bf44eb8c462f8
> change-id: 20240415-minimax-1e9110d4697b
>
> Best regards,
> --
> Ricardo Ribalda <ribalda@chromium.org>
>
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [PATCH] coccinelle: misc: minmax: Suppress reports for err returns
  2024-04-18 20:55 ` [cocci] [PATCH] " Julia Lawall
@ 2024-04-19  6:51   ` Markus Elfring
  2024-04-19  7:01     ` Julia Lawall
  0 siblings, 1 reply; 16+ messages in thread
From: Markus Elfring @ 2024-04-19  6:51 UTC (permalink / raw)
  To: Julia Lawall, Ricardo Ribalda, Denis Efremov, Nicolas Palix,
	cocci, kernel-janitors
  Cc: LKML

>> Most of the people prefer:
>>
>> return ret < 0 ? ret: 0;
>>
>> than:
>>
>> return min(ret, 0);
>>
>> Let's tweak the cocci file to ignore those lines completely.
> Applied, thanks. (Coccinelle for-6.10 branch).

Was a planned code adjustment published?


…
>> +++ b/scripts/coccinelle/misc/minmax.cocci
>> @@ -50,11 +50,26 @@ func(...)
>>  	...>
>>  }
>>
>> +// Ignore errcode returns.
>> +@errcode@
>> -// Don't generate patches for errcode returns.
>> -@errcode depends on patch@
…

How does such a change fit to the usability of the coccicheck operation modes
“context” and “org”?

Should dependencies be reconsidered any more for the desired consistency
of involved rules for scripts of the semantic patch language?

Regards,
Markus

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [cocci] [PATCH] coccinelle: misc: minmax: Suppress reports for err returns
  2024-04-19  6:51   ` Markus Elfring
@ 2024-04-19  7:01     ` Julia Lawall
  0 siblings, 0 replies; 16+ messages in thread
From: Julia Lawall @ 2024-04-19  7:01 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Julia Lawall, Ricardo Ribalda, Denis Efremov, Nicolas Palix,
	cocci, kernel-janitors, LKML

[-- Attachment #1: Type: text/plain, Size: 980 bytes --]



On Fri, 19 Apr 2024, Markus Elfring wrote:

> >> Most of the people prefer:
> >>
> >> return ret < 0 ? ret: 0;
> >>
> >> than:
> >>
> >> return min(ret, 0);
> >>
> >> Let's tweak the cocci file to ignore those lines completely.
> …
> > Applied, thanks. (Coccinelle for-6.10 branch).
>
> Was a planned code adjustment published?

There is no "planned code adjustment" if there is no patch.

I can check the dependencies again.

julia

>
>
> …
> >> +++ b/scripts/coccinelle/misc/minmax.cocci
> >> @@ -50,11 +50,26 @@ func(...)
> >>  	...>
> >>  }
> >>
> >> +// Ignore errcode returns.
> >> +@errcode@
> …
> >> -// Don't generate patches for errcode returns.
> >> -@errcode depends on patch@
> …
>
> How does such a change fit to the usability of the coccicheck operation modes
> “context” and “org”?
>
> Should dependencies be reconsidered any more for the desired consistency
> of involved rules for scripts of the semantic patch language?
>
> Regards,
> Markus
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-04-19  7:01 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-15 21:15 [PATCH] coccinelle: misc: minmax: Suppress reports for err returns Ricardo Ribalda
2024-04-15 21:15 ` [cocci] " Ricardo Ribalda
2024-04-16  8:32 ` Julia Lawall
2024-04-16  8:32   ` [cocci] " Julia Lawall
2024-04-16 11:30 ` Markus Elfring
2024-04-16 11:30   ` Markus Elfring
2024-04-16 11:32   ` Ricardo Ribalda
2024-04-16 11:32     ` [cocci] " Ricardo Ribalda
2024-04-16 11:50     ` Markus Elfring
2024-04-16 11:50       ` [cocci] " Markus Elfring
2024-04-17 11:13       ` Ricardo Ribalda
2024-04-17 13:02         ` Markus Elfring
2024-04-17 13:02           ` [cocci] " Markus Elfring
2024-04-18 20:55 ` [cocci] [PATCH] " Julia Lawall
2024-04-19  6:51   ` Markus Elfring
2024-04-19  7:01     ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.