Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5863716ioo; Wed, 1 Jun 2022 14:23:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzosekKprC6W+nOBeBo/Hc8OgHMpGxU3+9QZo/giPJ7wwJd11knU7xI9h3TL10npLyU03Eo X-Received: by 2002:a05:6a00:c84:b0:518:e0f6:f1af with SMTP id a4-20020a056a000c8400b00518e0f6f1afmr1545795pfv.47.1654118609440; Wed, 01 Jun 2022 14:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654118609; cv=none; d=google.com; s=arc-20160816; b=Jk4k7PypicUFe2Bvrp3mhCI5ih0SvU8DGHRehN8tP7dfPmcPvIIivIvD71OqtYgkXt neA3/ZRyRIf4/kUJyGFI6nEczoCrLrvceKayY73pWGJAeelLPbSRdN0z8cnHk4+XvMIR wZSjpA+qWlA1Uk+FuDYb/cSJkGE63ydGPIZxZDsHDiEXaky37zFhXxkiDgDsmX8Rr2bj noHd0weLm+GRFWZv7SZgC2gvjW2SuoWAIpEH5/GnPRfju+3t3OgIYLxVx1Pgv7wEgOHz U+U42oxf39sOy10SbD103z7g3zMN0tjdzKGz881cA4cUflanhwraGJrgR49iFvF/eQiN LFzg== 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:dkim-signature; bh=8YCkdC30YH1NQT1nteqzBL0uHfjNN9j3pN+keJRnp5M=; b=cv9Ien0ZgQCFm0A2L9palOumY919CWBJWABWdz/A8/Rfr30oFEQRdnP7+0gcTchM1a DaVrA1XsSUney1RtphFSDMUgjAXY/aljygHF703XbUv0R3LPKevX+4+qKkgH6zpBeIWh R3Js5Ah7yDlzroTbAhgJnM5WWK9FWvGab1OZk39aFevNptUb5rGeAPvu/e3uaKck5cim 17OfO2uht7gHhppGs8oy16vfqg6S4vSy3tx/s9/mKc39W8HMOl3XTMDbRqKvfccQ4I4X UiCiQcdxGm8zB9ylt7vumnWZhEV20qZV2rVGBBEFFMkhBFcQ8f/sC9X4RP6z3/vT/J0j Rbeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@einfach.org header.s=mail header.b="T/vUQp3F"; dkim=pass header.i=@einfach.org header.s=mail header.b="T/vUQp3F"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=einfach.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c4-20020a056a000ac400b0050d429bb67esi3775102pfl.82.2022.06.01.14.23.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:23:29 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@einfach.org header.s=mail header.b="T/vUQp3F"; dkim=pass header.i=@einfach.org header.s=mail header.b="T/vUQp3F"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=einfach.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9805F2FC0DD; Wed, 1 Jun 2022 13:13:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345857AbiFAHOt (ORCPT + 99 others); Wed, 1 Jun 2022 03:14:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350298AbiFAHOk (ORCPT ); Wed, 1 Jun 2022 03:14:40 -0400 X-Greylist: delayed 593 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 01 Jun 2022 00:14:22 PDT Received: from postler.einfach.org (postler.einfach.org [IPv6:2a01:4f8:151:8388::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 07087996B6 for ; Wed, 1 Jun 2022 00:14:21 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by postler.einfach.org (Postfix) with ESMTP id DA471364FEFB; Wed, 1 Jun 2022 07:04:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=einfach.org; s=mail; t=1654067065; bh=8YCkdC30YH1NQT1nteqzBL0uHfjNN9j3pN+keJRnp5M=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=T/vUQp3FYLmSw+MK35Jbb5ePJGNvgq92AhaXsgcj5qpymTW/N3bNNXpfEnW6gvYvP NFKwafLb4PN3VkDiPwSXx/a36naci8YhFey3cOW8TiepT0ERoUnDpOTu6nJ0XGeVtU XKOSD2TPBNPQgfop1gLyxq94eJbaiNlaiZodQ/RE= X-Virus-Scanned: amavisd-new at postler.einfach.org Received: from postler.einfach.org ([127.0.0.1]) by localhost (postler.einfach.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y_pkQy3yqosu; Wed, 1 Jun 2022 07:04:25 +0000 (UTC) Received: from [IPV6:2001:8a0:eece:d600:d02:7d0e:76a1:908b] (unknown [IPv6:2001:8a0:eece:d600:d02:7d0e:76a1:908b]) by postler.einfach.org (Postfix) with ESMTPSA id 15D3C3616726; Wed, 1 Jun 2022 07:04:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=einfach.org; s=mail; t=1654067065; bh=8YCkdC30YH1NQT1nteqzBL0uHfjNN9j3pN+keJRnp5M=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=T/vUQp3FYLmSw+MK35Jbb5ePJGNvgq92AhaXsgcj5qpymTW/N3bNNXpfEnW6gvYvP NFKwafLb4PN3VkDiPwSXx/a36naci8YhFey3cOW8TiepT0ERoUnDpOTu6nJ0XGeVtU XKOSD2TPBNPQgfop1gLyxq94eJbaiNlaiZodQ/RE= Message-ID: Date: Wed, 1 Jun 2022 08:04:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] average: Clarify the restrictions Content-Language: en-US To: Jui-Tse Huang , linux-kernel@vger.kernel.org Cc: Mark Rutland , Johannes Berg , Ching-Chun Huang References: <20220601065746.18426-1-juitse.huang@gmail.com> From: Bruno Randolf In-Reply-To: <20220601065746.18426-1-juitse.huang@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 01/06/2022 07:57, 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 > --- > include/linux/average.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/include/linux/average.h b/include/linux/average.h > index a1a8f09631ce..1618f6519c3d 100644 > --- a/include/linux/average.h > +++ b/include/linux/average.h > @@ -13,6 +13,10 @@ > * precision and fall-off coefficient determined at compile-time > * and built into the generated helper funtions. > * > + * This implementation supports upto 30 bits of precition, and for spelling: up to ... precision > + * usage concern, only the api of fetching non-fractional part is > + * provided for now. spelling: "API for" wording: remove "and for usage concern", just ", and only the API for" would be enough. Thank you, bruno