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: <20210408205551.GD1900@kunai>
Date:   Thu, 8 Apr 2021 22:55:51 +0200
From:   Wolfram Sang <wsa@...nel.org>
To:     Yicong Yang <yangyicong@...ilicon.com>
Cc:     andriy.shevchenko@...ux.intel.com, linux-i2c@...r.kernel.org,
        Sergey.Semin@...kalelectronics.ru, linux-kernel@...r.kernel.org,
        digetx@...il.com, treding@...dia.com,
        jarkko.nikula@...ux.intel.com, rmk+kernel@...linux.org.uk,
        song.bao.hua@...ilicon.com, john.garry@...wei.com,
        mika.westerberg@...ux.intel.com, prime.zeng@...wei.com,
        linuxarm@...wei.com
Subject: Re: [PATCH v7 2/5] i2c: core: add api to provide frequency mode
 strings


> +const char *i2c_freq_mode_string(u32 bus_freq_hz)
> +{
> +	switch (bus_freq_hz) {
> +	case I2C_MAX_STANDARD_MODE_FREQ:
> +		return "Standard Mode (100 kHz)";

Sorry, I just noticed just now. Shouldn't we also support lower
frequencies than the maximum one? I.e.

	if (bus_freq_hz <= I2C_MAX_STANDARD_MODE_FREQ)
 		return "Standard Mode (max 100 kHz)";
	else if (bus_freq_hz <= ... )

?


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ