Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1251722pxj; Fri, 18 Jun 2021 03:04:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwf/F4cTdxIdb8xGftPZTfYgyPGokr8QZ/0ruKfwtwd6shM5KR64wIrncE1gwDOV2WxtLcA X-Received: by 2002:a05:6402:34cc:: with SMTP id w12mr3741707edc.195.1624010684271; Fri, 18 Jun 2021 03:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624010684; cv=none; d=google.com; s=arc-20160816; b=zO+7jOA/yo85G6wmlWPo56pC6M+XOcZUOh7efFLRFvhg/8mVKeGub+AZBEIwizM0yx S1wtPoxA7KvhkTCR11jWeJ2/Fo+r5a1165UfFSCLJ0cVhORYYLk+dNBlquGBfgD7ZFNN az18twOQ7pY1agbuSWESO5gNerYn2Hy+/22/DD9HGpud6DLzdtkU6UXWtSikZx4RBRGq X/NuEpz5zKdSFGWWnL3k7J4B4MNusIeb6d6p4D3RIzP1vh8wVmX2EB8k7ty3r2dqFz58 nPeoELbhuWNsxXYR6dweaCaUyyu3hkTvvFkcspHFMdje3PG5ZUYIXoflFozPLfMoGP0j kDWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=+A+JhCRrK3RXi05SHmshg3fJe8eKBip61AmLexa0Dyo=; b=N7+wMlwnkdxqina/LabVU+bnU8vsgzc8UU941BdLiPFft0lRGpFcYPIqyiDtJsaE6x JMaLwIxl5p8Z9hCUSUhwe4SRZDf12coWN7YBOmEFpsOLCeUsM0tMftzs3FSizXEnWODU sz8E/E4yb5SStmYXDp8pg7eG5aS4AWivWp/WQ98wxdx5O4a3em8uN9VmJR2jxqK7/nPo H3sa6bI21EyGXg/gJDLKrTq4XNqmaCbMVuC/zpLn9OjdImC9V2j8+imvOxZa3YVD8qIt HhZPm3huusT3hsv/GNmahTPfIdRUnnm/qcyxIS73WC0wQ5GpS8m7qbVHsh53l7DL+piz Ti3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m5si8749198edr.557.2021.06.18.03.04.20; Fri, 18 Jun 2021 03:04:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232016AbhFRKDK (ORCPT + 99 others); Fri, 18 Jun 2021 06:03:10 -0400 Received: from mga02.intel.com ([134.134.136.20]:20412 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232553AbhFRKDG (ORCPT ); Fri, 18 Jun 2021 06:03:06 -0400 IronPort-SDR: /K5YjHuk7cdga+czhL4InLIIpySyQ0tRspGoChJRXfVqhp+RuBBJwRDxmrRG2E/LYrLKV88TeJ ev0CMuwrYbkA== X-IronPort-AV: E=McAfee;i="6200,9189,10018"; a="193659193" X-IronPort-AV: E=Sophos;i="5.83,283,1616482800"; d="scan'208";a="193659193" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210618035855.GB31659@aspeedtech.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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