lkml.org 
[lkml]   [2019]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: drivers: Inline code in devm_platform_ioremap_resource() from two functions
    From
    Date
    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.


    --mtx

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

    \
     
     \ /
      Last update: 2019-06-18 11:36    [W:7.254 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site