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: <b85368d2e3bf829809344406247193ea@kernel.org>
Date:   Tue, 18 Jul 2023 11:28:53 +0200
From:   Michael Walle <mwalle@...nel.org>
To:     Tudor Ambarus <tudor.ambarus@...aro.org>
Cc:     tkuw584924@...il.com, takahiro.kuwano@...ineon.com,
        pratyush@...nel.org, linux-mtd@...ts.infradead.org,
        linux-kernel@...r.kernel.org, bacem.daassi@...ineon.com,
        miquel.raynal@...tlin.com, richard@....at,
        Tudor Ambarus <tudor.ambarus@...aro.org>
Subject: Re: [PATCH] mtd: spi-nor: rename method for enabling or disabling
 octal DTR

Btw. this was threaded within another thread. At least on the
netdev (and spi) ML this is discouraged.

Am 2023-07-14 17:07, schrieb Tudor Ambarus:
> Having an *_enable(..., bool enable) definition was misleading
> as the method is used both to enable and to disable the octal DTR
> mode. Splitting the method in the core in two, one to enable and
> another to disable the octal DTR mode does not make sense as the
> method is straight forward and we'd introduce code duplication.
> 
> Update the core to use:
> int (*set_octal_dtr)(struct spi_nor *nor, bool enable);
> 
> Manufacturer drivers use different sequences of commands to enable
> and disable the octal DTR mode, thus for clarity they shall
> implement it as:
> static int manufacturer_snor_set_octal_dtr(struct spi_nor *nor, bool 
> enable)
> {
> 	return enable ? manufacturer_snor_octal_dtr_enable() :
> 			manufacturer_snor_octal_dtr_disable();
> }
> 

I don't care much for this naming. I've also seen _enable() functions
which take a bool and then actually disable something in the kernel.

So I'm fine either way:

Reviewed-by: Michael Walle <mwalle@...nel.org>

-michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ