From: Markus Elfring <Markus.Elfring@web.de>
To: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Checking placement of spaces for code changes with SmPL
Date: Sat, 26 Oct 2019 11:46:00 +0200 [thread overview]
Message-ID: <d7b9c6d8-8b67-2a05-188b-0b1b6b7ebc2a@web.de> (raw)
In-Reply-To: <384c6657-5ddc-ff47-14e2-2ffad31295d2@web.de>
> But I find the source code formatting occasionally questionable
> according to the Linux coding style.
elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch ../janitor/use_array_size_for_kmemdup2.cocci task_test6.c
…
@@ -1,6 +1,6 @@
void* my_task(void)
{
void* copy;
-copy = kmemdup(ohs, sizeof(struct omap_hwmod *) * oh_cnt, GFP_KERNEL);
+copy = kmemdup(ohs,array_size( sizeof(*ohs), oh_cnt), GFP_KERNEL);
return copy;
}
How would you like to clarify pretty-printing concerns?
Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
next prev parent reply other threads:[~2019-10-26 9:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-15 12:40 [Cocci] Checking pretty-printing around a transformation for array_size() Markus Elfring
2019-10-26 9:46 ` Markus Elfring [this message]
2019-10-26 12:45 ` [Cocci] Checking placement of spaces for code changes with SmPL Julia Lawall
2019-10-26 13:18 ` 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=d7b9c6d8-8b67-2a05-188b-0b1b6b7ebc2a@web.de \
--to=markus.elfring@web.de \
--cc=cocci@systeme.lip6.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 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 NNTP newsgroup(s).