Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/7] ALSA: Remove redundant open helper return checks
@ 2026-07-02  8:44 phucduc.bui
  2026-07-02  8:44 ` [PATCH v2 1/7] ALSA: control: Drop redundant stream_open() return check phucduc.bui
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: phucduc.bui @ 2026-07-02  8:44 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: cassiogabrielcontato, Cezary Rojewski, Kees Cook, Ziqing Chen,
	HariKrishna Sagala, Dan Carpenter, Cen Zhang, Len Bao, HanQuan,
	Kyle Zeng, Dewei Meng, Maoyi Xie, Mehul Rao,
	Sebastian Andrzej Siewior, Nathan Chancellor, linux-sound,
	linux-kernel, bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

Hi all,

This series removes redundant error checks after calls to
nonseekable_open() and stream_open() in the ALSA core.

nonseekable_open() always returns 0, so checking its return value is
unnecessary.

Several users were later converted from nonseekable_open() to
stream_open(), but the original error checks were retained.
Since stream_open() also always returns 0, those checks are likewise
unnecessary.

As a result, all patches simply remove dead error handling paths with no
functional change.

Change in v2 : 
 - Drop the unnecessary assignment of the return value from
   nonseekable_open()/stream_open(), as suggested by Takashi.
 - Merge the individual patches into a single patch series.

Best regards,
Phuc

bui duc phuc (7):
  ALSA: control: Drop redundant stream_open() return check
  ALSA: mixer: oss: Drop redundant nonseekable_open() return check
  ALSA: pcm: oss: Drop redundant nonseekable_open() return check
  ALSA: pcm: Drop redundant nonseekable_open() return check
  ALSA: rawmidi: Drop redundant stream_open() return check
  ALSA: seq: Drop redundant stream_open() return check
  ALSA: timer: Drop redundant stream_open() return check

 sound/core/control.c           |  4 +---
 sound/core/oss/mixer_oss.c     |  4 +---
 sound/core/oss/pcm_oss.c       |  4 +---
 sound/core/pcm_native.c        | 14 ++++++++------
 sound/core/rawmidi.c           |  4 +---
 sound/core/seq/seq_clientmgr.c |  5 +----
 sound/core/timer.c             |  5 +----
 7 files changed, 14 insertions(+), 26 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-07-03 11:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02  8:44 [PATCH v2 0/7] ALSA: Remove redundant open helper return checks phucduc.bui
2026-07-02  8:44 ` [PATCH v2 1/7] ALSA: control: Drop redundant stream_open() return check phucduc.bui
2026-07-02  8:44 ` [PATCH v2 2/7] ALSA: mixer: oss: Drop redundant nonseekable_open() " phucduc.bui
2026-07-02  8:44 ` [PATCH v2 3/7] ALSA: pcm: " phucduc.bui
2026-07-02  8:44 ` [PATCH v2 4/7] ALSA: pcm: " phucduc.bui
2026-07-02  8:44 ` [PATCH v2 5/7] ALSA: rawmidi: Drop redundant stream_open() " phucduc.bui
2026-07-02  8:44 ` [PATCH v2 6/7] ALSA: seq: " phucduc.bui
2026-07-02  8:44 ` [PATCH v2 7/7] ALSA: timer: " phucduc.bui
2026-07-02  9:31 ` [PATCH v2 0/7] ALSA: Remove redundant open helper return checks Cezary Rojewski
2026-07-03 11:06 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox