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

On Tue, 25 Apr 2023 10:00:45 +0200,
Oswald Buddenhagen wrote:
> 
> On Mon, Apr 24, 2023 at 12:32:58PM +0200, Oswald Buddenhagen wrote:
> > so i'd postulate that these enums are effectively dead, and both the
> > risk and the gain of this change are about zero.
> 
> 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. and of course it's entirely
> inconsistent (with just about every combination present), because it
> obviously works without this. how would you feel about a patch that
> just removes all these?

The dev_class and info_flags initializations to zero aren't entirely
pointless, IMO.  It explicitly shows that the default value is used.
OTOH, dev_sub_class is always 0 for the existing drivers, hence
dropping the explicit initialization would be an acceptable cleanup.


thanks,

Takashi

  reply	other threads:[~2023-04-25  8:17 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 [this message]
2023-04-25  8:29         ` Oswald Buddenhagen

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=87ildkv0lz.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=oswald.buddenhagen@gmx.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.