All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: cocci@inria.fr
Subject: [cocci] Checking SmPL support for two special expressions
Date: Tue, 11 Nov 2025 19:23:45 +0100	[thread overview]
Message-ID: <ca1862a2-8a84-49b8-bbfd-fca9f15c6787@web.de> (raw)

Hello,

I constructed another SmPL script variant. It exported some data from
selected function implementations which were found in header files.
Data processing difficulties were detected then.

See also:
https://elixir.bootlin.com/linux/v6.18-rc5/source/include/drm/drm_crtc.h#L48-L55

It seems that contents can usually be handled from such a file.

Markus_Elfring@Sonne:…/Projekte/Linux/next-analyses> /usr/bin/spatch --parse-c include/drm/drm_crtc.h
…
nb good = 1344,  nb bad = 0 =========> 100.00% good or passed


Two SmPL rules were generated accordingly.
Unfortunately, I am wondering about the following information.
Questionable test results (according to the software combination “Coccinelle 1.3.0”):

A)
@r26@
expression val;
@@
-( uint64_t ) * ( ( uint64_t * ) & val )
+I642U64(val)

Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> /usr/bin/spatch --parse-cocci drm_crtc-I642U64-20251111.cocci
…
minus: parse error: 
  File "drm_crtc-I642U64-20251111.cocci", line 4, column 31, charpos = 56
  around = ')',
  whole content = -( uint64_t ) * ( ( uint64_t * ) & val )

B)
@r27@
expression val;
@@
-( int64_t ) * ( ( int64_t * ) & val )
+U642I64(val)

Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> /usr/bin/spatch --parse-cocci drm_crtc-U642I64-20251111.cocci
…
minus: parse error: 
  File "drm_crtc-U642I64-20251111.cocci", line 4, column 29, charpos = 54
  around = ')',
  whole content = -( int64_t ) * ( ( int64_t * ) & val )


Under which circumstances will such data processing become better supported?

Regards,
Markus

             reply	other threads:[~2025-11-11 18:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-11 18:23 Markus Elfring [this message]
2025-11-11 18:29 ` [cocci] Checking SmPL support for two special expressions Julia Lawall
2025-11-11 19:43   ` Markus Elfring
2025-11-11 20:41     ` Julia Lawall
2025-11-12  6:12       ` Markus Elfring
2025-11-12 13:10         ` Julia Lawall
2025-11-12 13:15           ` Markus Elfring
2025-11-13  7:05   ` [cocci] Improving support for casts in SmPL code? Markus Elfring
2025-11-14  0:59     ` Julia Lawall
2025-11-14  8:30       ` 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=ca1862a2-8a84-49b8-bbfd-fca9f15c6787@web.de \
    --to=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.