linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Wen Yang <wenyang@linux.alibaba.com>,
	cocci@systeme.lip6.fr, kernel-janitors@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	"Gilles Muller" <Gilles.Muller@lip6.fr>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Julia Lawall" <Julia.Lawall@lip6.fr>,
	"Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Matthias Männich" <maennich@google.com>,
	"Michal Marek" <michal.lkml@markovi.net>,
	"Nicolas Palix" <nicolas.palix@imag.fr>,
	"Thomas Gleixner" <tglx@linutronix.de>
Subject: Re: [v3] coccinelle: semantic patch to check for inappropriate do_div() calls
Date: Sat, 11 Jan 2020 08:30:18 +0100	[thread overview]
Message-ID: <5a9f1ad1-3881-2004-2a7b-d61f1d201cf9@web.de> (raw)
In-Reply-To: <c4ada2f2-19b0-91ef-ddf3-a1999f4209ea@linux.alibaba.com>

>> * I suggest once more to adjust the dependency specifications for the usage
>>   of these functions by SmPL rules.
>
> Most of the functions here are for all operation modes.

I got an other understanding for this software.

You added the information “also filter out safe consts for context mode”
to the patch change log.


>> * Can the local variable “msg” be omitted?

I would appreciate another fine-tuning also at this place.


>>> +coccilib.org.print_todo(p[0], construct_warnings("div64_ul"))
>>
>> I suggest again to move the prefix “div64_” into the string literal
>> of the function implementation.
>
> “div64_ul” indicates the function name we recommend.

The intention can be fine.


> If we delete the prefix "div64_",

I suggest to use the text at an other place.


> it may reduce readability.

I find an other code variant also readable good enough.


> +*do_div(f, \( l \| ul \| ul64 \| sl64 \) );
>
> We agree with Julia:
> I don't se any point to this.

Can the avoidance of duplicate source code (according to SmPL disjunctions)
trigger positive effects on run time characteristics and software maintenance?

Regards,
Markus

  reply	other threads:[~2020-01-11  7:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10 13:15 [PATCH v3] coccinelle: semantic patch to check for inappropriate do_div() calls Wen Yang
2020-01-10 16:35 ` Markus Elfring
2020-01-11  5:06   ` Wen Yang
2020-01-11  7:30     ` Markus Elfring [this message]
2020-01-11  7:44       ` [v3] " Julia Lawall
2020-01-11  8:03         ` Markus Elfring
2020-01-11 15:36 ` [PATCH v3] " Julia Lawall
2020-01-12  8:30 ` Markus Elfring
2020-01-12  8:42   ` Julia Lawall
2020-01-12  8:49     ` [v3] " 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=5a9f1ad1-3881-2004-2a7b-d61f1d201cf9@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=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 \
    --cc=yamada.masahiro@socionext.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).