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: <YMslyzUKp/7J0ncu@smile.fi.intel.com>
Date:   Thu, 17 Jun 2021 13:36:59 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Jamin Lin <jamin_lin@...eedtech.com>
Cc:     Rob Herring <robh+dt@...nel.org>, Joel Stanley <joel@....id.au>,
        Andrew Jeffery <andrew@...id.au>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Arnd Bergmann <arnd@...db.de>, Jean Delvare <jdelvare@...e.de>,
        Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
        Khalil Blaiech <kblaiech@...lanox.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Bence Csókás <bence98@....bme.hu>,
        Yicong Yang <yangyicong@...ilicon.com>,
        Mike Rapoport <rppt@...nel.org>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        Ryan Chen <ryan_chen@...eedtech.com>,
        "open list:I2C SUBSYSTEM HOST DRIVERS" <linux-i2c@...r.kernel.org>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        "moderated list:ARM/ASPEED MACHINE SUPPORT" 
        <linux-arm-kernel@...ts.infradead.org>,
        "moderated list:ARM/ASPEED MACHINE SUPPORT" 
        <linux-aspeed@...ts.ozlabs.org>,
        open list <linux-kernel@...r.kernel.org>,
        chiawei_wang@...eedtech.com, troy_lee@...eedtech.com,
        steven_lee@...eedtech.com
Subject: Re: [PATCH 3/3] i2c:support new register set for ast2600

On Thu, Jun 17, 2021 at 05:43:40PM +0800, Jamin Lin wrote:
> Add i2c new driver to support new register set for AST2600.
> AST2600 support three modes for data transfer which are
> byte mode, buffer mode and dma mode, respectively.
> The global driver of i2c is used to set the new register
> mode and define the base clock frequency
> of baseclk_1~baseclk_4.
> 
> Signed-off-by: Jamin Lin <jamin_lin@...eedtech.com>
> ---
>  drivers/i2c/busses/Kconfig              |   11 +
>  drivers/i2c/busses/Makefile             |    1 +
>  drivers/i2c/busses/ast2600-i2c-global.c |  205 +++
>  drivers/i2c/busses/ast2600-i2c-global.h |   25 +
>  drivers/i2c/busses/i2c-new-aspeed.c     | 1796 +++++++++++++++++++++++

I commented _something_ (but read comments carefully, they will cover much
more). The overall it seems you have to:
 - shrink the code base by at least ~15% (it's possible), i.e. -200 LOCs
 - rethink how you do calculations and bit operations
 - better code style

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ