LKML Archive on
 help / color / Atom feed
From: "Enrico Weigelt, metux IT consult" <>
To: Markus Elfring <>,
	Greg Kroah-Hartman <>,
	"Rafael J. Wysocki" <>,
	Bartosz Golaszewski <>
	Andy Shevchenko <>,
	Gilles Muller <>,
	Himanshu Jha <>,
	Linus Walleij <>,
	Masahiro Yamada <>,
	Michal Marek <>,
	Nicolas Palix <>
Subject: Re: drivers: Inline code in devm_platform_ioremap_resource() from two functions
Date: Tue, 18 Jun 2019 11:35:34 +0200
Message-ID: <> (raw)
In-Reply-To: <>

On 18.06.19 07:37, Markus Elfring wrote:
>>> Two function calls were combined in this function implementation.
>>> Inline corresponding code so that extra error checks can be avoided here.
>> What exactly is the purpose of this ?
> I suggest to take another look at the need and relevance of involved
> error checks in the discussed function combination.

Sorry, don't have the time for guessing and trying to reproduce your
thoughts. That's why we have patch descriptions / commit messages.
It would be a lot easier for all of us if you just desribe the exact
problem you'd like to solve and your approach to do so.

>> Looks like a notable code duplication ...
> This can be.

I doubt that code duplication is appreciated, as this increases the
maintenance overhead. (actually, we're usually trying to reduce that,
eg. by using lots of generic helpers).

>> I thought we usually try to reduce this, instead of introducing new ones.
> 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 - you'd have to
tell us, what exactly you've got in mind.

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.

What's the exact scenario you're trying to optimize ? Any actual
measurements on how your patch improves that ?

Look, I understand that you'd like to squeeze out maximum performance,
but this has to be practically maintainable. I could list a lot of
things that I don't need in particular use cases and would like to
introduce build knobs for, but I have to understand that maintainers
have to be pretty reluctant towards those things.


Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering -- +49-151-27565287

  reply index

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-06  6:11 [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     ` [Cocci] " Masahiro Yamada
2019-07-06 13:39       ` Julia Lawall
2019-07-07  9:55         ` Coccinelle: " Markus Elfring
2019-07-07 12:38           ` Masahiro Yamada
2019-04-06 12:36 ` [PATCH] coccinelle: " Markus Elfring
2019-06-08 15:24 ` 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         ` [PATCH] drivers: Inline code in devm_platform_ioremap_resource() from two functions Markus Elfring
2019-06-14  9:27           ` [Cocci] " Julia Lawall
2019-06-15 11:00             ` Markus Elfring
2019-06-14 10:07           ` [PATCH] " Greg Kroah-Hartman
2019-06-17 20:21           ` Enrico Weigelt, metux IT consult
2019-06-18  5:37             ` Markus Elfring
2019-06-18  9:35               ` Enrico Weigelt, metux IT consult [this message]
2019-06-18 10:21                 ` Dan Carpenter
2019-06-18 11:44                 ` Markus Elfring

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox