lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171215165125.avkz25eek56i5md4@localhost>
Date:   Fri, 15 Dec 2017 08:51:25 -0800
From:   Richard Cochran <richardcochran@...il.com>
To:     Takashi Iwai <tiwai@...e.de>
Cc:     Sagar Arun Kamble <sagar.a.kamble@...el.com>,
        linux-kernel@...r.kernel.org, alsa-devel@...a-project.org,
        Vinod Koul <vinod.koul@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [alsa-devel] [PATCH 15/27] ALSA: hda - Use
 timecounter_initialize interface

On Fri, Dec 15, 2017 at 12:10:47PM +0100, Takashi Iwai wrote:

> > -	struct cyclecounter *cc = &azx_dev->tc.cc;

> > -	cc->read = azx_cc_read;
> > -	cc->mask = CLOCKSOURCE_MASK(32);

> > -	cc->mult = 125; /* saturation after 195 years */
> > -	cc->shift = 0;

I want to get away from this mess of open coded structure
initialization and use a proper functional interface instead.

> >  	nsec = 0; /* audio time is elapsed time since trigger */
> > -	timecounter_init(tc, nsec);
> > +	timecounter_initialize(tc,
> > +			       azx_cc_read,
> > +			       CLOCKSOURCE_MASK(32),
> > +			       125, /* saturation after 195 years */
> > +			       0,
> > +			       nsec);
> 
> Hmm, a function with so many arguments is difficult to remember and is
> often error-prone.  By this transition, it becomes harder to read
> through.

Please suggest a better way.

Thanks,
Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ