mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: cocci@inria.fr, LKML <linux-kernel@vger.kernel.org>,
	 kernel-janitors@vger.kernel.org
Subject: Re: Improving output for single characters (with SmPL)?
Date: Sat, 1 Aug 2026 10:18:39 +0200 (CEST)	[thread overview]
Message-ID: <9e187875-e472-911-c280-59dff6b7c80@inria.fr> (raw)
In-Reply-To: <9f8ce18d-67bc-4c01-b3fa-8605c9856b82@web.de>



On Sat, 1 Aug 2026, Markus Elfring wrote:

> >> Which implementation details should be reconsidered here for an affected macro?
> >> https://elixir.bootlin.com/linux/v7.2-rc4/source/tools/bpf/bpftool/netlink_dumper.h#L25
> >
> > The shown source code transformation approach can be repeated on demand
> > for selected areas.
>
> I would like to add that only a single diff hunk is generated for the following script variant
> of the semantic patch language (as it would usually be expected for the mentioned software component).
>
> @replacement@
> @@
> -fprintf
> +putchar
>  (
> -stdout, "\n"
> +'\n'
>  )
>
>
> > Now I wonder about the following information.
> >
> > Markus_Elfring@Sonne:/home/altes_Heim2/elfring/Projekte/Linux/next-analyses> grep 'diff -u -p a/netlink_dumper.h b/netlink_dumper.h' /home/altes_Heim2/elfring/Projekte/Bau/Linux/scripts/Coccinelle/tuning1/next/20260721/use_fputc-bpftool-2.diff | wc -l
> > 2
>
> How can the generation of duplicate difference output be avoided here
> for other SmPL script variations?

I don't know the details o what you are doing, but if you have duplicated
output about herder files, it would be because the header file is included
in other files.  If there is no need to process the header file
specifically based on a given .c file (which would be the case for the rul
shown above), then you can use the option --no-includes.  If you want some
type information from header files but you don't want to transform them in
a way that is specific to the .c file in which they are included then you
can also use --include-headers-for-types.

julia


>
> Regards,
> Markus
>
>

  reply	other threads:[~2026-08-01  8:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22 17:03 Markus Elfring
2026-07-23 19:26 ` Markus Elfring
2026-07-24  9:02 ` Markus Elfring
2026-08-01  8:10   ` Markus Elfring
2026-08-01  8:18     ` Julia Lawall [this message]
2026-08-01 12:00       ` [cocci] " Markus Elfring
2026-08-02 10:06       ` Markus Elfring
2026-08-03  5:40         ` [cocci] Improving parallel data processing for hierarchical structures? 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=9e187875-e472-911-c280-59dff6b7c80@inria.fr \
    --to=julia.lawall@inria.fr \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@inria.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®