cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Enrico Weigelt <lkml@metux.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Michal Marek <michal.lkml@markovi.net>,
	Nicolas Palix <nicolas.palix@imag.fr>,
	Linus Walleij <linus.walleij@linaro.org>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	cocci@systeme.lip6.fr
Subject: Re: [Cocci] drivers: Inline code in devm_platform_ioremap_resource() from two functions
Date: Tue, 18 Jun 2019 13:44:11 +0200	[thread overview]
Message-ID: <8ae16eae-7bb9-3a82-000f-52e16aa1eee0@web.de> (raw)
In-Reply-To: <714a38fe-a733-7264-bb06-d94bd58a245a@metux.net>

>> Would you like to check the software circumstances once more
>> for the generation of a similar code structure by a C compiler
>> (or optimiser)?
>
> As said: unfortunately, I don't have the time to do that

I became curious if you would like to adjust your software development
attention a bit more also in this area.


> - you'd have to tell us, what exactly you've got in mind.

I try to point possibilities out to improve the combination of
two functions.


> If it's just about some error checks which happen to be redundant in a
> particular case, you'll have to show that this case is a *really* hot
> path (eg. irq, syscall, scheduling, etc) - but I don't see that here.

1. May the check “resource_type(res) == IORESOURCE_MEM” be performed
   in a local loop?

2. How hot do you find the null pointer check for the device
   input parameter of the function “devm_ioremap_resource”?


> Any actual measurements on how your patch improves that ?

Not yet. - Which benchmarks would you trust here?


> Look, I understand that you'd like to squeeze out maximum performance,

I hope so.


> but this has to be practically maintainable.

This can be achieved if more contributors would find proposed
adjustments helpful for another software transformation.

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

      parent reply	other threads:[~2019-06-18 11:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-06  6:11 [Cocci] [PATCH] coccinelle: api: add devm_platform_ioremap_resource script Himanshu Jha
2019-04-06  6:31 ` Julia Lawall
2019-04-06  6:34   ` Julia Lawall
2019-07-06 12:16     ` Masahiro Yamada
2019-07-06 13:39       ` Julia Lawall
2019-07-07  9:55         ` [Cocci] Coccinelle: " Markus Elfring
2019-07-07 12:38           ` Masahiro Yamada
2019-09-19  7:21             ` Markus Elfring
2019-04-06 12:36 ` [Cocci] [PATCH] coccinelle: " Markus Elfring
2019-06-08 15:24 ` [Cocci] Coccinelle: " Markus Elfring
2019-06-08 17:26   ` Julia Lawall
2019-06-09  8:55     ` Markus Elfring
2019-06-11 20:40       ` Enrico Weigelt, metux IT consult
2019-06-12  5:28         ` Julia Lawall
2019-06-12  6:24         ` Markus Elfring
2019-06-14  9:22         ` [Cocci] [PATCH] drivers: Inline code in devm_platform_ioremap_resource() from two functions Markus Elfring
2019-06-14  9:27           ` Julia Lawall
2019-06-15 11:00             ` [Cocci] " Markus Elfring
2019-06-14 10:07           ` [Cocci] [PATCH] " Greg Kroah-Hartman
2019-06-17 20:21           ` Enrico Weigelt, metux IT consult
2019-06-18  5:37             ` [Cocci] " Markus Elfring
2019-06-18  9:35               ` Enrico Weigelt, metux IT consult
2019-06-18 10:21                 ` Dan Carpenter
2019-06-18 11:44                 ` 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=8ae16eae-7bb9-3a82-000f-52e16aa1eee0@web.de \
    --to=markus.elfring@web.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=cocci@systeme.lip6.fr \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@metux.net \
    --cc=michal.lkml@markovi.net \
    --cc=nicolas.palix@imag.fr \
    --cc=rafael@kernel.org \
    /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).