Re: [PATCH 5/7] ALSA: emu10k1: centralize freeing PCM voices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 19 May 2023 12:43:24 +0200,
Oswald Buddenhagen wrote:
> 
> On Thu, May 18, 2023 at 04:53:19PM +0200, Takashi Iwai wrote:
> > On Thu, 18 May 2023 16:09:45 +0200,
> > Oswald Buddenhagen wrote:
> >> -static int snd_emu10k1_pcm_channel_alloc(struct snd_emu10k1_pcm * epcm, int voices)
> >> +static void snd_emu10k1_pcm_free_voices(struct snd_emu10k1_pcm *epcm)
> >>  {
> >> -	int err, i;
> >> -
> >> -	for (i = 0; i < ARRAY_SIZE(epcm->voices); i++) {
> >> +	for (unsigned i = 0; i < ARRAY_SIZE(epcm->voices); i++) {
> > 
> > We don't use this style.  Declare the variable outside the for().
> > 
> ehm ...
> - "we" seems to be mostly true for alsa. but looking at the kernel as
> a   whole, that ship has sailed since the adoption of c11. maybe time
> to   adapt?
> - you're noticing this a bit late, after already merging 8 instances.
> 
> how should i proceed?

I'm not super-strict about it, but as checkpatch complaints, it's
still not so widely adapted.  Unless there is a reason that must be
written in that way, let's avoid it as much as possible.

That said, the already merged stuff, it's OK-ish, and we can correct
only when anyone complains.  For the new stuff, let's be careful from
now on :)

If we want really adapting this style, the coding style rule should be
officially updated at first, followed by the update of tools.


thanks,

Takashi



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux