All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: Markus Elfring <Markus.Elfring@web.de>,
	Julia Lawall <julia.lawall@inria.fr>
Cc: cocci@inria.fr
Subject: Re: [cocci] Searching for special function implementations with SmPL
Date: Sun, 29 Jan 2023 18:41:35 +0200	[thread overview]
Message-ID: <ec785e8b99b513594f894fd7a546423c87fc829a.camel@coelho.fi> (raw)
In-Reply-To: <a47bc3c9-0d72-6fc6-03c3-2c124381bd81@web.de>

On Sat, 2023-01-28 at 14:43 +0100, Markus Elfring wrote:
> > @@
> > identifier nested_macros.nm;
> > identifier dev_priv, f;
> > expression e;
> > @@
> > f(...) {
> > 	...
> > -	struct drm_i915_private *dev_priv = e;
> > +	struct drm_i915_private *i915 = e;
> > 
> > 	<+...
> > 	nm(...)
> > 	...+>
> > }
> 
> 
> You would like to rename a local variable.
> How do you think about to check if the chosen variable name will
> actually be used?
> 
> 
> 
> > +++ b/intel_display.c
> > @@ -3943,7 +3943,7 @@ static bool bxt_get_dsi_transcoder_state
> >  					 struct
> > intel_display_power_domain_set *power_domain_set)
> >  {
> >  	struct drm_device *dev = crtc->base.dev;
> > -	struct drm_i915_private *dev_priv = to_i915(dev);
> > +	struct drm_i915_private *i915 = to_i915(dev);
> >  	enum transcoder cpu_transcoder;
> >  	enum port port;
> >  	u32 tmp;
> 
> Which function-like macros should be found in such an implementation?
> https://elixir.bootlin.com/linux/v6.2-
> rc5/source/drivers/gpu/drm/i915/display/intel_display.c#L3991
> 
> 
> 
> > Many other files are handled, but there are no matches, though I
> > believe there should be.
> 
> Would you like to split the SmPL search patterns for another test
> so that your expectations can be clarified better?

Hi Markus,

Thanks for all the input.  I explained what I want to do (hopefully) a
bit more clearly in reply to Julia's latest email.

--
Cheers,
Luca.

      reply	other threads:[~2023-01-29 17:26 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 17:07 [cocci] Nested macros Luca Coelho
2023-01-27 18:34 ` [cocci] Checking selected macro calls with SmPL Markus Elfring
2023-01-27 20:52 ` [cocci] Nested macros Julia Lawall
2023-01-27 22:00   ` Luca Coelho
2023-01-28  9:19     ` Julia Lawall
2023-01-28  9:25       ` Luca Coelho
2023-01-28  9:46     ` [cocci] Searching for special function implementations with SmPL Markus Elfring
2023-01-28  9:49       ` Julia Lawall
2023-01-28 10:03         ` Luca Coelho
2023-01-28 13:33           ` Julia Lawall
2023-01-29 16:39             ` Luca Coelho
2023-01-29 17:28               ` Julia Lawall
2023-01-29 17:55                 ` Luca Coelho
2023-01-29 19:15                   ` Luca Coelho
2023-01-29 20:09                     ` Julia Lawall
2023-01-30  6:32                       ` Luca Coelho
2023-01-30  8:37                         ` Julia Lawall
2023-01-30  8:50                           ` Luca Coelho
2023-01-30  8:56                             ` Julia Lawall
2023-01-30  9:05                               ` Luca Coelho
2023-01-30  9:34                             ` Markus Elfring
2023-01-30  9:41                               ` Luca Coelho
2023-01-30  9:50                                 ` Markus Elfring
2023-01-30  9:52                                   ` Luca Coelho
2023-01-30  9:55                                     ` Julia Lawall
2023-01-30 10:07                                     ` Markus Elfring
2023-01-30 10:47                                     ` Julia Lawall
2023-01-30 10:59                                       ` Luca Coelho
2023-01-30 11:25                                         ` Markus Elfring
2023-01-31 15:57                                         ` Luca Coelho
2023-01-31 15:59                                           ` Luca Coelho
2023-01-31 16:08                                           ` Julia Lawall
2023-01-31 16:10                                             ` Luca Coelho
2023-01-31 16:20                                               ` Julia Lawall
2023-01-29 18:01               ` [cocci] Adding a parameter for special macro calls " Markus Elfring
2023-01-29 19:11                 ` Luca Coelho
2023-01-28 13:43           ` [cocci] Searching for special function implementations " Markus Elfring
2023-01-29 16:41             ` Luca Coelho [this message]

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=ec785e8b99b513594f894fd7a546423c87fc829a.camel@coelho.fi \
    --to=luca@coelho.fi \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@inria.fr \
    --cc=julia.lawall@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.