All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] ALSA: emu10k1: fix multi-channel playback device class
Date: Tue, 25 Apr 2023 10:29:58 +0200	[thread overview]
Message-ID: <ZEePhjS/s+8KGEsl@ugly> (raw)
In-Reply-To: <87ildkv0lz.wl-tiwai@suse.de>

On Tue, Apr 25, 2023 at 10:15:36AM +0200, Takashi Iwai wrote:
>On Tue, 25 Apr 2023 10:00:45 +0200,
>Oswald Buddenhagen wrote:
>> speaking of dead code, lots of drivers explicitly assign info_flags =
>> 0, dev_class = SNDRV_PCM_CLASS_GENERIC, and dev_subclass =
>> SNDRV_PCM_SUBCLASS_GENERIC_MIX, which are all technically pointless,
>> as the pcm struct is kzalloc'd anyway.
>
>The dev_class and info_flags initializations to zero aren't entirely
>pointless, IMO.  It explicitly shows that the default value is used.
>
that can be said about many other fields as well. but defaults are there 
for a reason, to reduce the noise. not even the example in the docu 
includes it. and if we were consistent about the "be explicit" approach, 
we should add it to a lot of drivers which lack it - which feels just 
wrong.

regards

      reply	other threads:[~2023-04-25  8:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-22 16:10 [PATCH] ALSA: emu10k1: fix multi-channel playback device class Oswald Buddenhagen
2023-04-23  7:30 ` Takashi Iwai
2023-04-24 10:32   ` Oswald Buddenhagen
2023-04-25  8:00     ` Oswald Buddenhagen
2023-04-25  8:15       ` Takashi Iwai
2023-04-25  8:29         ` Oswald Buddenhagen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZEePhjS/s+8KGEsl@ugly \
    --to=oswald.buddenhagen@gmx.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.