Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp271006pxf; Thu, 8 Apr 2021 02:45:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZocMVxJeZ+yPrqhrV9QX3yE45yglLKz0UnnpcS9asYu0uLEzbiwICy3Sze52wFU1BZdxc X-Received: by 2002:a05:6402:5a:: with SMTP id f26mr3862050edu.285.1617875135521; Thu, 08 Apr 2021 02:45:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617875135; cv=none; d=google.com; s=arc-20160816; b=ZBOVdUyJi8Z/cokGrGAIaWnyv0+rFxw+MlfmOwWZTtoO4zLFOldo8v8jcXfP3JMvra Qb/oMNYAXuc+fXr1FINjwHlB4X2bUasdUVa5/NwW+cqhQdRL6gsO/d8ABErGL9wNpVeG UagdP1eFcZnVqqm29bFVf1RhViYVQErg2wiqfWw8TUcayPgZOl0ZQgBv2MemFrbMTcPv B89oa1Z94J9hvglDacK8aGaFqkc3BQihYgNVBwpvzyJDBQDmiDUoEpm5b9QmfajHiz6P rrHCNAsPSsk+yx4Q+dTHj57i/Jrt1oStJmlB7y07N4M4by0SnYVcdalsRVBpru/TDSie 25DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hXTlbDK9vvFZbVBVbkmf9cc5XE6+3LtqaiUG7W1XCH0=; b=Yy35EWernSoToEKDzXgMQzAGLBbE7s7zeZr7o8C+WhoyMN+elbXGZb8X9J0jg4lCuD 46s4ZMGyq/NgTLpMn6gfYIadJmQDUxjWMHrmIDXn/g19ef/DQxd4kcB42pe+GUtI2Kxo 4I3xN/CVz3AyitEodqAeSqEkjEjFtFgOwzn0ChQPnr+1qqB2Ac/DhxIzH2JkVEie+GGY /uB6XoU6kKwZXl+Htr0e9uliu+30ANp2Dh310fyityRmaHZ4GP0Nor1kVY23UXcHFISD gzSd/tUzTUU0EJ2Un5026xdkqJ+iNlaOsRkWVk1bJU+nPQBmw0+FZ5DPLYqTbmGQfmth yLvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fl73aGuI; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w16si22271003edd.471.2021.04.08.02.45.12; Thu, 08 Apr 2021 02:45:35 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fl73aGuI; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231345AbhDHJoJ (ORCPT + 99 others); Thu, 8 Apr 2021 05:44:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231254AbhDHJoF (ORCPT ); Thu, 8 Apr 2021 05:44:05 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92D99C061760; Thu, 8 Apr 2021 02:43:53 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id a85so951240pfa.0; Thu, 08 Apr 2021 02:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hXTlbDK9vvFZbVBVbkmf9cc5XE6+3LtqaiUG7W1XCH0=; b=fl73aGuIHBBPNVLJyOgdAUXimE2pvcqhUPDQNL/9XB+967BEwY8MKnOdaw7mMqglhG YxLRkHllLm381ozVfhckQHKt+l9ydNkiMItjlNPdrsJQTBa/h5fQGbG0XKdjwiS/AiVZ /GGeon7H9NuPr68dbeFCM5TWcNSUfmU7mgTmaRFIU55+JejKeJomz2Z0XYV0zfukZKeO sG1UKLs+FMzw4YfNUeLRl4nLXyAjw9cXthABlIqPBTNbCTyj8SBtL6UCF5OoAF3ZLBXc FoNRMxkfCQIawoVRDnqUnXc8YYCzrt4zmA2urYotttRjIi5dJVTAYkQD+0JMokbTtt5n Yh3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hXTlbDK9vvFZbVBVbkmf9cc5XE6+3LtqaiUG7W1XCH0=; b=bEdTSkPi6gKuOmiVt7Eyo7kt1m2ha6W4wAIEBFw37hNLHCxdd/f3I2OfXqiZxTJs7i SCSj59ZFqRypjBPD+sApt8cdoYZHNoOD0zLMt2ILmKW74kkzow+GJMgxHD2vcJAQmRnM HBJNU5Uh0PuHRUE7eA8k0oMOhOoV/H8JzMVb1v3+gsREXmDZ6PFmJGqjezWh0z0aA0Lp oNjcu37JaZUoWOaM0wc1yG2k5pkaI9p3JeF5Jhlh5ebvP97CtEC7v32g/bUiadSZlKVP sTQctN728iVpIUdipOnLUz6hM8c+drnFu3ztx35wyL25Gcl0PCBa8pZonqHvCd2l4bqn VJlw== X-Gm-Message-State: AOAM531TCaJUmNxXjUl7j03ZnH1hzGITMzA7nYNOC154yExnFpuGBtQk 9h3EOBO1v5ZU7PBoYo7YpOF15sg0Fzl25xg4/tM= X-Received: by 2002:a63:c48:: with SMTP id 8mr7234159pgm.74.1617875033137; Thu, 08 Apr 2021 02:43:53 -0700 (PDT) MIME-Version: 1.0 References: <1617197790-30627-1-git-send-email-yangyicong@hisilicon.com> <1617197790-30627-4-git-send-email-yangyicong@hisilicon.com> <20210407230421.GB860@kunai> <5c478c9b-fc2a-2dd7-6191-8f68e265c2f7@hisilicon.com> In-Reply-To: <5c478c9b-fc2a-2dd7-6191-8f68e265c2f7@hisilicon.com> From: Andy Shevchenko Date: Thu, 8 Apr 2021 12:43:36 +0300 Message-ID: Subject: Re: [PATCH v6 3/5] i2c: add support for HiSilicon I2C controller To: Yicong Yang Cc: Wolfram Sang , Jarkko Nikula , Andy Shevchenko , linux-i2c , Sergey Semin , Linux Kernel Mailing List , Dmitry Osipenko , Thierry Reding , Russell King , Barry Song , John Garry , Mika Westerberg , prime.zeng@huawei.com, Linuxarm Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 8, 2021 at 10:17 AM Yicong Yang wrote: > On 2021/4/8 7:04, Wolfram Sang wrote: > > > >> Reason for temp variable is for me it's confusing to see statement like > >> "rate_khz = rate_khz / 1000". > > > > Yes. And with this clearer calculation, we can maybe skip the HZ_PER_KHZ > > define completely and just use plain '1000' as a factor/divider because > > it then becomes obvious. I still find the define more confusing than > > helpful TBH. But I'll leave the final decision to Yicong Yang. > > > > HZ_PER_KHZ macro are defined separately in other places of the kernel. > Andy suggested to have this defined and used so that one day we can factor > this macro out to the public. :) Right, and I'm still for the idea to have a macro defined. -- With Best Regards, Andy Shevchenko