All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: cocci@inria.fr
Subject: Re: [cocci] Checking another deletion of redundant null pointer checks (with SmPL)?
Date: Tue, 10 Jun 2025 17:43:52 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2506101739440.4658@hadrien> (raw)
In-Reply-To: <90822099-5434-4421-a611-785511926ecb@web.de>

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

On Tue, 10 Jun 2025, Markus Elfring wrote:

> Hello,
>
> I accidentally noticed an update candidate.
>
> c4iw_rdev_open():
> https://elixir.bootlin.com/linux/v6.15.1/source/drivers/infiniband/hw/cxgb4/device.c#L908-L909
>
> I got into the mood to construct another script variant for the semantic patch language.
>
> @deletion@
> expression e;
> @@
>  if (...
> -    && e
>     )
>     kfree(e);
>
>
> A corresponding patch can be generated accordingly.
>
> Markus_Elfring@Sonne:…/Projekte/Linux/next-analyses> time /usr/bin/spatch --no-loops …/Projekte/Coccinelle/janitor/delete_redundant_checks4.cocci drivers/infiniband/hw/cxgb4/device.c
> …
> @@ -905,7 +905,7 @@ static int c4iw_rdev_open(struct c4iw_rd
>
>         return 0;
>  err_free_status_page_and_wr_log:
> -       if (c4iw_wr_log && rdev->wr_log)
> +       if (c4iw_wr_log)
>                 kfree(rdev->wr_log);
>         free_page((unsigned long)rdev->status_page);
>  destroy_ocqp_pool:
>
> real    0m0,454s
> user    0m0,413s
> sys     0m0,038s
>
>
> I tried another program call out.
>
> Markus_Elfring@Sonne:…/Projekte/Linux/next-analyses> git checkout next-20250606 && time /usr/bin/spatch --no-loops --timeout 45 -j4 --chunksize 1 -dir . …/Projekte/Coccinelle/janitor/delete_redundant_checks4.cocci > …/Projekte/Bau/Linux/scripts/Coccinelle/deletions1/next/20250606/delete_redundant_checks4.diff 2> …/Projekte/Bau/Linux/scripts/Coccinelle/deletions1/next/20250606/delete_redundant_checks4-errors.txt
> …
> real    5m42,692s
> user    20m26,077s
> sys     0m13,532s
>
>
> Now I wonder why the known generated patch was not written into the specified
> diff file for this command variant.
> How will the desired data output become consistent (after the software
> combination “Coccinelle 1.3.0”) for such an use case?

Could yo uplease make a small effort to make your reports understandable?

1) I don't ned to know the paths of your files?  This adds a lot of
clutter that makes it hard to find the important information.

2) The proper scientific method is to cange only one thing at a time.  You
seem tohave changed two things 1: in one case you give the specific file
name andin the second case you use the whole Linux kernel directory, and
2; in one case you are using linux-next from a specific date andin the
other case there is no information about what kernel version you are
using.

In the second test, can you check whether the file you expect to be
considered is included in a HANDLING line in the output?

If it is included in the HANDLING line in the output, can you resend your
report that addresses the above two issues?

julia

  reply	other threads:[~2025-06-10 15:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-10  8:55 [cocci] Checking another deletion of redundant null pointer checks (with SmPL)? Markus Elfring
2025-06-10 15:43 ` Julia Lawall [this message]
2025-06-10 16:15   ` Markus Elfring
2025-06-10 16:32     ` Julia Lawall
2025-06-10 16:40       ` Markus Elfring
     [not found]         ` <alpine.DEB.2.22.394.2506101850030.4658@hadrien>
2025-06-10 17:00           ` Markus Elfring
     [not found]             ` <alpine.DEB.2.22.394.2506101925310.4658@hadrien>
2025-06-10 18:33               ` Markus Elfring
2025-06-11  5:50               ` Markus Elfring
2025-06-12 10:40               ` Markus Elfring
2025-06-11 17:55   ` Markus Elfring
2025-06-12 12:54     ` Markus Elfring
2025-06-12 13:02       ` Julia Lawall
2025-06-12 14:23         ` Markus Elfring
2025-06-12 15:54         ` Keller, Jacob E
2025-06-12 16:04           ` Julia Lawall
2025-06-12 16:13             ` Keller, Jacob E
2025-06-13  8:46       ` Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2506101739440.4658@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.