Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3584059ybe; Sun, 8 Sep 2019 17:23:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAH2XqiC/H/NrH3u+2QvCJ3OnhzNxrVh+cXcl2jXLPBkJ8hdxxaTgIjcgrsDz1H0FfA56u X-Received: by 2002:a17:906:8406:: with SMTP id n6mr17335171ejx.138.1567988598629; Sun, 08 Sep 2019 17:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567988598; cv=none; d=google.com; s=arc-20160816; b=M6vstKya/SwEhdSElVk59sCWGyVRFjjSmQsnrUT0jL3cMUO8S6xOivjWH+kGOWxDQV 2Ovi9FR9oJ2gmLByXZIlQDhxqZcko1hWU2/1jKXJip4hBafNa1rdbueDwVhm9u+5RQoT gEC3jANqgyuJ5Diul7KbK0mY5JBXD0D9vOHIomNDTqDwGQhay4aoMicH37TkCFtSHAEm A+4q5ihcpxKXdGIw5uS1NbfODAmSg7ixKmiF5aXlPxpGFXYrEnbT8bs9ARKs1b1FW/Jm +xkjFg0POQYTOAQc8ThsEmzvu7gkeLCO4n7cOHm3ORxtqU5g88nsz+LAgO7+G3Jge1Yd s5PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BPFXfTuuawVcjqRBXwYB+uvmu3LaIBpabNB/L8tEuH4=; b=R933a9Xw4DjkdVjnxHHvpDJJxLJvSIxi7DWPYGOTI5MvQbMtijhmzIYPrmszsMdvH1 98fwo02XiO1k1dpxG5J1qfsHgXlUCmamoSF5qkPUBLxwy6crcrjDkA+GJ6rZ34oMFW19 0Xq2Vdm9CqWn/GVXIp8vQahSfkTlOdQu7W+HIztna/YCWhHZTCthl0MaRGQnMy58jQyH itu+U6mo/L0UosIOcjfdm603YvkLxI7hl9YJIudVaSjPS5bn19VyKhJJ31qPvG3KxhYJ e+CACzjjV7syA94kebnR3Uq7Y8I0G5G4ywy7m01QP6pbUpwkIkC+yn/c28k7+F+dLsNN sOtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=SgzlbGJd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u23si4759480eja.305.2019.09.08.17.22.41; Sun, 08 Sep 2019 17:23:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=SgzlbGJd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394760AbfIGP6M (ORCPT + 99 others); Sat, 7 Sep 2019 11:58:12 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:33204 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389788AbfIGP6L (ORCPT ); Sat, 7 Sep 2019 11:58:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=BPFXfTuuawVcjqRBXwYB+uvmu3LaIBpabNB/L8tEuH4=; b=SgzlbGJd4j88MtGVS43gBMnuLu XKe4CVre5r5GJddgaZVQi1ahyys42kNPIRfYtUqus9TOytgAJLnx+bF8qftjE4+PGzmRyFrETbfbV Gm65NRetYptC8o2hohyjqIKhIFErcabz0tRZC9eI6/GGRJLY5jketl66+TSVy4al1gi8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1i6d6D-0006Bx-KJ; Sat, 07 Sep 2019 17:58:05 +0200 Date: Sat, 7 Sep 2019 17:58:05 +0200 From: Andrew Lunn To: zhong jiang Cc: davem@davemloft.net, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ethernet: micrel: Use DIV_ROUND_CLOSEST directly to make it readable Message-ID: <20190907155805.GE21922@lunn.ch> References: <1567698828-26825-1-git-send-email-zhongjiang@huawei.com> <20190906194050.GB2339@lunn.ch> <5D732078.6080902@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5D732078.6080902@huawei.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 07, 2019 at 11:14:00AM +0800, zhong jiang wrote: > On 2019/9/7 3:40, Andrew Lunn wrote: > > On Thu, Sep 05, 2019 at 11:53:48PM +0800, zhong jiang wrote: > >> The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d > >> but is perhaps more readable. > > Hi Zhong > > > > Did you find this by hand, or did you use a tool. If a tool is used, > > it is normal to give some credit to the tool. > With the following help of Coccinelle. It is good to mention Coccinelle or other such tools. They often exist because of university research work, and funding for such tools does depend on publicity of the tools, getting the credit they deserve. Andrew