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]
Date:   Thu, 10 Feb 2022 09:01:39 +0100
From:   Michael Walle <michael@...le.cc>
To:     Tudor.Ambarus@...rochip.com
Cc:     linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
        p.yadav@...com, miquel.raynal@...tlin.com, richard@....at,
        vigneshr@...com
Subject: Re: [PATCH v1 02/14] mtd: spi-nor: slightly refactor the
 spi_nor_setup()

Am 2022-02-10 04:00, schrieb Tudor.Ambarus@...rochip.com:
> On 2/2/22 16:58, Michael Walle wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know 
>> the content is safe
>> 
>> Instead of always using a function pointer (and initializing it to our
>> default), just call the default function if the flash didn't set its 
>> own
>> one. That will make the call flow easier to follow.
>> 
>> Also mark the parameter as optional now.
> 
> what should be done in the future?

What do you mean? IMHO the default path should be visible in the
function. Eg.

int spi_nor_bla(nor) {
     if (nor->some_exceptional_cb)
         return nor->some_exceptional_cb(nor);

    return usual_cb(nor);
}

-michael

Powered by blists - more mailing lists