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=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 91D0DC48BE8 for ; Fri, 18 Jun 2021 10:02:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 54E5B613EB for ; Fri, 18 Jun 2021 10:02:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 54E5B613EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4p/azH+v4CH/SPaqC90B60yiPj9MmyrzaGxQUaeIpdE=; b=fjkEwTfCLV3Urf UcAUSFta26msSRNh6LUSjtF8XWnz+dH5FVLAB5GeYGcs/rZjph7gqVhjh3rPuz1M4zBGcR5+GoG4z dAhzm+S4qdffDYoigOfAXAbOhC42Lklrsfq2YmnIineRaORY0DrQr4w7HCnzNMBtKSZICdeGYRS0B EJ6RRq82ItFASzMHnzthFdqMt+nO7mZs6RBqn75za6HpgqzxSJfHgRBP+i0ZztSMk8CldazMzmHyA XB718gMI7pJbQ5ubCDwFekSd0oApB9QGjynQw+Uzu0xZSbCOFWyO6XbEYJbVl6XgZPZyS6K8ld8q5 DVxlOkXuOh+AUrg0EKNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1luBJ8-00Dh9A-Pk; Fri, 18 Jun 2021 10:01:04 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1luBJ3-00Dh7H-Qo for linux-arm-kernel@lists.infradead.org; Fri, 18 Jun 2021 10:00:59 +0000 IronPort-SDR: FHfNiabTzfRspeS15YSDAkAtkVALY/rnruNSfwQAqkfx9k2XOGovvyMRNk3SPITi2CY6w2bEGQ k5BmvWPjzhQg== X-IronPort-AV: E=McAfee;i="6200,9189,10018"; a="204699596" X-IronPort-AV: E=Sophos;i="5.83,283,1616482800"; d="scan'208";a="204699596" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2021 03:00:57 -0700 IronPort-SDR: 5gdfw7IuCHm/YLPTg4K/dBM62CuMxNb7JWSCYMa71bVWYnVFOyYu4OCNjIT6DXZ8053gWgdzHe xoIJAgLxSW1w== X-IronPort-AV: E=Sophos;i="5.83,283,1616482800"; d="scan'208";a="416401095" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2021 03:00:51 -0700 Received: from andy by smile with local (Exim 4.94.2) (envelope-from ) id 1luBIt-003ZLy-Lb; Fri, 18 Jun 2021 13:00:47 +0300 Date: Fri, 18 Jun 2021 13:00:47 +0300 From: Andy Shevchenko To: Jamin Lin Cc: Rob Herring , Joel Stanley , Andrew Jeffery , Philipp Zabel , Wolfram Sang , Arnd Bergmann , Jean Delvare , Jarkko Nikula , Khalil Blaiech , Krzysztof Kozlowski , Geert Uytterhoeven , Bence =?iso-8859-1?B?Q3Pza+Fz?= , Yicong Yang , Mike Rapoport , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , 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: References: <20210617094424.27123-1-jamin_lin@aspeedtech.com> <20210617094424.27123-4-jamin_lin@aspeedtech.com> <20210618035855.GB31659@aspeedtech.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210618035855.GB31659@aspeedtech.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210618_030057_945001_FF6B7343 X-CRM114-Status: GOOD ( 19.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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! > > - 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel