[PATCH] latencystats: fix missing f suffix on literal float
Thomas Monjalon
thomas at monjalon.net
Wed May 29 16:38:55 CEST 2024
16/04/2024 01:14, Tyler Retzlaff:
> On Mon, Apr 15, 2024 at 03:17:38PM -0700, Stephen Hemminger wrote:
> > On Mon, 15 Apr 2024 14:32:26 -0700
> > Tyler Retzlaff <roretzla at linux.microsoft.com> wrote:
> >
> > > Add missing f suffix to floating point literal to avoid warning about
> > > truncation from double to float.
> > >
> > > Fixes: 5cd3cac9ed22 ("latency: added new library for latency stats")
> > > Cc: reshma.pattan at intel.com
> > > Cc: stable at dpdk.org
> > >
> > > Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> > > ---
> > > - const float alpha = 0.2;
> > > + const float alpha = 0.2f;
> >
> > The use of floating point in fast path here is unnecessary.
> > Even without doing the full per-core values, this could just change
> > to an alpha of .25 and use fast fixed point math.
>
> agree, though my thoughts are make this code correct optimization is for
> the maintainer. if they submit an alternate series i can withdraw this
> patch. otherwise i think we should take it as-is.
OK to fix build warning now.
Applied, thanks.
More information about the dev
mailing list