lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFpMAE9mYXUBEsVSm-9EHAC-o5hTxgKNUjYYvo0dzqfEZg@mail.gmail.com>
Date:   Wed, 6 Apr 2022 15:58:59 +0200
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        linux-mmc@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 08/10] mmc: core: improve API to make clear hw_reset
 from bus_ops is for cards

On Wed, 6 Apr 2022 at 10:02, Wolfram Sang
<wsa+renesas@...g-engineering.com> wrote:
>
>
> > > To make it unambiguous that bus_ops->hw_reset() is for cards and not for
> > > controllers, we a) add 'card' to the function name and b) make the
> > > function argument mmc_card instead of mmc_host. All users are converted,
> > > too.
> >
> > Again b) is sufficient in my opinion. All bus_ops are for cards, while
> > host_ops are for hosts.
>
> Okay, this argument I buy right away.
>
> > Also, there may be some corner cases where b) can't be done, like the
> > ->remove() bus_ops for example. In that case, we either have to make
> > more re-structuring of the code of simply live with that there may be
> > some special cases.
>
> With the above argument, I could even imaging to simply drop this patch?
> That keeps 'host' consistently as the default argument? All given that
> 'bus_ops' are for cards anyway.

I have no strong opinion around this.

Perhaps one simply needs to make a patch to convert them (most of
them) to take a "card" as an in-parameter to really see if that
improves the understanding of code.

Kind regards
Uffe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ