Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp6113669ioo; Wed, 1 Jun 2022 22:08:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAFpDjpGxAe662ZWLBGfxPXpIJAeuO2UtCNuCi6mzrIQwbQRvx7OgZ5JofhW8z+01seraP X-Received: by 2002:aa7:cad4:0:b0:428:715f:5ce4 with SMTP id l20-20020aa7cad4000000b00428715f5ce4mr3467830edt.124.1654146520590; Wed, 01 Jun 2022 22:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654146520; cv=none; d=google.com; s=arc-20160816; b=MtrdMZPZqkjJ+x54q07Yn4h4oovPM6qeQu9SOWz4odvarSTlhbwJfkAV92twXookz8 DC0DGIOccv9BjrzZEWE5EAPxEONsfRN2VGmsJpmnrvXJHuYLCexr6qTmfwiuvLCjjvVZ 3lQ9CG5C0HGPUSJ2VXSBarvg3uCON3JIXWHAjO4bVygN3kuM9OtStJ2AyZkgemD7zWvl /BJeNN7BrHqLx1byewA8Gwi0kuj3ubwPd9UGGRW9hqp3CQhjotuynnI7mTLBZyLkxHY7 jTqgS3Q7hLBqtgHflfSWQ6814K45Eex5DSTztsvQY97UY6t5ClwiUv6LlBCuoUGPL4Um 62VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=hQK/DUQZjTQ7XsvXsvUPNgT7QOvNAYN5rC7mbS0noYY=; b=qKl6zAC0s0KkUZSaXVTQfuF+l8dF8iCyuQgoPqNnSPwHPS3xry/Nlj684AHq1GnPnI uQewkLvnnpjmDtnCmOM0qL3421SmTtiWkRcnuw4arptWcc05pBF9GodeqSZO7otvMoRK Cv6sDPfvRORruIQPWtPMiAeNcTVJ3uFm9Tv0flSVApsl0/b1iyFSknpHsV5cRMXmTs2f IYKCmxKGJLc5VFVVmZZwOtXg+qwScMeYg4MQa65Va1WIxSGK+HJEpLwWytYwzDgCmY7n XVecky7XZmAtJ+ue4eSktkDjrwIPTIbfsNoOYKoAtS98mmrV24n9jz70r7a3TmG/c3gd COIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=JWWDpJux; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n13-20020a05640205cd00b0042aeee8687asi4307818edx.326.2022.06.01.22.08.08; Wed, 01 Jun 2022 22:08:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=JWWDpJux; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229845AbiFBEmT (ORCPT + 99 others); Thu, 2 Jun 2022 00:42:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229674AbiFBEmR (ORCPT ); Thu, 2 Jun 2022 00:42:17 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6C10C5C for ; Wed, 1 Jun 2022 21:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID: Sender:Reply-To:Content-ID:Content-Description; bh=hQK/DUQZjTQ7XsvXsvUPNgT7QOvNAYN5rC7mbS0noYY=; b=JWWDpJuxetC2AL4txjIGxjdJTa vWfoBwtp3h/OYEIZh9AGayPq9Ng4gOMO7KJ/yI19HYVkD/JnhrsrwQcAWuBPksDZQQszZuASvKyao Z+uOFwx8DclfKUo0mqvU+bpR8ApPaxDHr2gu1DdVjaKYsCskpFuiltgZqkA0+UTAlJpE3pi6Vv6Ek /1/8sCMeVpnFUO+ZO8qoma3JE2FOf+cCbED8Srk0kq5YtcaaZtMcLEbP0/B2G2pR8mIK7seedFxwL 3B3WXT9PsIO/SBqXT6d/YDcMYOeBAL9LOeCdnLU6Ae1r6kYza2NnXZhPH60Nt/yJQOa34uarrkkMJ TcJq7y3A==; Received: from [2601:1c0:6280:3f0::aa0b] by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwcen-003zne-7A; Thu, 02 Jun 2022 04:42:02 +0000 Message-ID: <0408ae38-235e-ffd1-2743-c37e5c801c28@infradead.org> Date: Wed, 1 Jun 2022 21:41:54 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v3] average: Clarify the restrictions Content-Language: en-US To: Jui-Tse Huang , linux-kernel@vger.kernel.org Cc: Mark Rutland , Johannes Berg , Bruno Randolf , Ching-Chun Huang References: <20220602014557.5657-1-juitse.huang@gmail.com> From: Randy Dunlap In-Reply-To: <20220602014557.5657-1-juitse.huang@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/1/22 18:45, Jui-Tse Huang wrote: > There is several restrictions in the EWMA helper macro that the > developers should take care of, but the comment does not mentioned yet, > thus, this patch clarify the restrictions. > > Signed-off-by: Jui-Tse Huang > --- > > Notes: > v3: fix typo (Randy Dunlap) > v2: fix spelling and wording (Bruno Randolf) Acked-by: Randy Dunlap Thanks. > > include/linux/average.h | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/include/linux/average.h b/include/linux/average.h > index a1a8f09631ce..9c3c8b5b518e 100644 > --- a/include/linux/average.h > +++ b/include/linux/average.h > @@ -11,7 +11,10 @@ > * > * This implements a fixed-precision EWMA algorithm, with both the > * precision and fall-off coefficient determined at compile-time > - * and built into the generated helper funtions. > + * and built into the generated helper functions. > + * > + * This implementation supports up to 30 bits of precision, and only > + * the API for fetching non-fractional part is provided for now. > * > * The first argument to the macro is the name that will be used > * for the struct and helper functions. -- ~Randy