cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@inria.fr>,
	Wen Yang <wenyang@linux.alibaba.com>,
	cocci@systeme.lip6.fr
Cc: "Michal Marek" <michal.lkml@markovi.net>,
	"Julia Lawall" <Julia.Lawall@lip6.fr>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Nicolas Palix" <nicolas.palix@imag.fr>,
	"Gilles Muller" <Gilles.Muller@lip6.fr>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Matthias Männich" <maennich@google.com>,
	"Thomas Gleixner" <tglx@linutronix.de>
Subject: Re: [Cocci] coccinelle: semantic patch to check for inappropriate do_div() calls
Date: Sun, 5 Jan 2020 13:07:35 +0100	[thread overview]
Message-ID: <ac9f19ae-252b-32ce-0bd2-170ecc0ea14e@web.de> (raw)
In-Reply-To: <alpine.DEB.2.21.2001051139010.2579@hadrien>

>>> +(
>>> +* do_div(f, l);
>>> +|
>>> +* do_div(f, ul);
>>> +|
>>> +* do_div(f, ul64);
>>> +|
>>> +* do_div(f, sl64);
>>> +)
>>
>> I suggest to avoid the specification of duplicate SmPL code.
>>
>> +@@
>> +*do_div(f, \( l \| ul \| ul64 \| sl64 \) );
>
> I don't se any point to this.

Can such succinct SmPL code be occasionally desirable?


> The original code is quite readable,

Yes. - I dare to present a coding style alternative.


> without the ugly \( etc.

I wonder about this view.


>> Please improve the message construction.
>
> Please make more precise comments (I already made some suggestions,

Thus I omitted a repetition.


> so it doesn't matter much here, but "please improve" does not provide any
> concrete guidance).

I guess that Wen Yang can know corresponding software design possibilities
from previous development discussions.

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

      reply	other threads:[~2020-01-05 12:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-04  6:44 [Cocci] [PATCH] coccinelle: semantic patch to check for inappropriate do_div() calls Wen Yang
2020-01-04  7:00 ` Julia Lawall
2020-01-04  8:49   ` Wen Yang
2020-01-04  8:55     ` Julia Lawall
2020-01-04 13:50       ` Wen Yang
2020-01-04 13:54         ` Julia Lawall
2020-01-04  7:16 ` Julia Lawall
2020-01-05 10:33 ` Markus Elfring
2020-01-05 10:41   ` Julia Lawall
2020-01-05 12:07     ` Markus Elfring [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=ac9f19ae-252b-32ce-0bd2-170ecc0ea14e@web.de \
    --to=markus.elfring@web.de \
    --cc=Gilles.Muller@lip6.fr \
    --cc=Julia.Lawall@lip6.fr \
    --cc=cocci@systeme.lip6.fr \
    --cc=gregkh@linuxfoundation.org \
    --cc=julia.lawall@inria.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maennich@google.com \
    --cc=michal.lkml@markovi.net \
    --cc=nicolas.palix@imag.fr \
    --cc=tglx@linutronix.de \
    --cc=wenyang@linux.alibaba.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 NNTP newsgroup(s).