Coccinelle archive mirror
 help / color / mirror / Atom feed
From: Anusha Srivatsa <asrivats@redhat.com>
To: cocci@inria.fr, Maxime Ripard <mripard@redhat.com>
Subject: [cocci] Ellipses usage in line addition
Date: Tue, 14 Jan 2025 11:42:50 -0500	[thread overview]
Message-ID: <CAN9Xe3T2LjcD9Xr8vAGQWu5MUvVjr-eEaMhB-JauL5DW0aA9QQ@mail.gmail.com> (raw)

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

Hi all,
Wanted to know if ellipses usage is not allowed in the lines that we want
to add in the code. To be more precise,I want to replace
mipi_dsi_generic_write_seq() usage with mipi_dsi_generic_write_seq_multi()
. the coccinelle semantic patch that I am using is:








*//rule_1
->s/mipi_dsi_generic_write_seq/mipi_dsi_generic_write_seq_multi@@identifier
dsi_var,dsi_device;@@struct mipi_dsi_device *dsi_var = dsi_device;+struct
mipi_dsi_multi_context dsi_ctx = { .dsi = dsi_var
};...-mipi_dsi_dcs_write_seq(dsi_var,...);+mipi_dsi_dcs_write_seq_multi(&dsi_ctx,...);*

this throws:




*init_defs_builtins: /usr/lib64/coccinelle/standard.hlexical error: invalid
in a + context: ...  File "mipi.cocci", line 9, column 39, charpos = 298
around = '...',  whole content =
+mipi_dsi_dcs_write_seq_multi(&dsi_ctx,...);*

Just commenting out the function replacing the snippet (i.e having only
dsi_ctx being populated) works just fine. But the intended change is ofc
the proper usage of the _multi API.

Would be nice to know what is going wrong with this approach.

Regards,
Anusha

[-- Attachment #2: Type: text/html, Size: 1386 bytes --]

             reply	other threads:[~2025-01-14 17:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-14 16:42 Anusha Srivatsa [this message]
2025-01-14 17:49 ` [cocci] Ellipses usage in line addition Julia Lawall
2025-01-14 17:28   ` Anusha Srivatsa
2025-01-14 18:39     ` Julia Lawall
2025-01-14 21:25       ` Anusha Srivatsa
2025-01-14 22:37         ` Julia Lawall
2025-01-15 15:44           ` Anusha Srivatsa
2025-01-17 21:41         ` Julia Lawall
2025-01-17 21:36     ` Julia Lawall
2025-01-15  8:56 ` Markus Elfring
2025-01-18 10:09 ` 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=CAN9Xe3T2LjcD9Xr8vAGQWu5MUvVjr-eEaMhB-JauL5DW0aA9QQ@mail.gmail.com \
    --to=asrivats@redhat.com \
    --cc=cocci@inria.fr \
    --cc=mripard@redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).