From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 172B5C48BE5 for ; Mon, 21 Jun 2021 05:15:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F07B161042 for ; Mon, 21 Jun 2021 05:15:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229567AbhFUFSK (ORCPT ); Mon, 21 Jun 2021 01:18:10 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:29808 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbhFUFSK (ORCPT ); Mon, 21 Jun 2021 01:18:10 -0400 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 15L50DTC006012; Mon, 21 Jun 2021 13:00:13 +0800 (GMT-8) (envelope-from jamin_lin@aspeedtech.com) Received: from aspeedtech.com (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 21 Jun 2021 13:14:48 +0800 Date: Mon, 21 Jun 2021 13:14:46 +0800 From: Jamin Lin To: Andy Shevchenko CC: Rob Herring , Joel Stanley , "Andrew Jeffery" , Philipp Zabel , "Wolfram Sang" , Arnd Bergmann , "Jean Delvare" , Jarkko Nikula , Khalil Blaiech , Krzysztof Kozlowski , Geert Uytterhoeven , Bence =?utf-8?B?Q3PDs2vDoXM=?= , Yicong Yang , Mike Rapoport , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Ryan Chen , "open list:I2C SUBSYSTEM HOST DRIVERS" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list , ChiaWei Wang , Troy Lee , Steven Lee Subject: Re: [PATCH 3/3] i2c:support new register set for ast2600 Message-ID: <20210621051446.GB27876@aspeedtech.com> References: <20210617094424.27123-1-jamin_lin@aspeedtech.com> <20210617094424.27123-4-jamin_lin@aspeedtech.com> <20210618035855.GB31659@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 15L50DTC006012 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The 06/18/2021 10:00, Andy Shevchenko wrote: > On Fri, Jun 18, 2021 at 11:58:55AM +0800, Jamin Lin wrote: > > The 06/17/2021 10:36, Andy Shevchenko wrote: > > > 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. > > > > - shrink the code base by at least ~15% (it's possible), i.e. -200 LOCs > > Can you describe it more detail? > > Do you mean I should separate the patch file to fix size limitation? > > No. Based on my brief review you introduce to many redundant LOCs (lines of > code). Remove them, refactor the code, make it small and neat and easy to read > and understand. It is possible to achieve! > Will fix Thanks > > > - rethink how you do calculations and bit operations > > > - better code style > > > > > Thanks for your review and very good suggestion > > I will update them and sent patch again. > > By the way, I received test failed email from Robot due to compiling > > warning. I will fix them, too. > > -- > With Best Regards, > Andy Shevchenko > >