public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sound/pci/ctxfi/ctdaio.c: duplicate function removal question
@ 2024-12-24 23:16 Ethan Carter Edwards
  2024-12-29  8:32 ` Takashi Iwai
  2024-12-29  9:02 ` David Laight
  0 siblings, 2 replies; 8+ messages in thread
From: Ethan Carter Edwards @ 2024-12-24 23:16 UTC (permalink / raw)
  To: wychay@ctl.creative.com, ryan_richards@creativelabs.com,
	tiwai@suse.de
  Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org

Hello all,

First of all, happy holidays. 

I was browsing the ctdaio.c code and I noticed a lot of 
duplicate code and functions, specifically:

dao_set_{right,left}_input and
dao_clear_{right,left}_input functions.

The functions are pretty much identical. They only 
differ in the side (left, right). What was the original
idea in doing this? Wouldn't it make more since to just
have an ENUM (left, right) as an argument that would 
determine the side and just reduce the function to 
dao_set_input and dao_clear_input. 

I would be more than happy to send in a patch doing
these changes, but before I did I wanted to ask if
there was a reason the code was written in this way.
I am pretty new to kernel development.

Thanks,
Ethan
--
Ethan Carter Edwards
CompTIA A+, Security+, and ISC2 (CC)
Ham Radio: AE4CE
Website: https://ethancedwards.com


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

end of thread, other threads:[~2024-12-30 15:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-24 23:16 sound/pci/ctxfi/ctdaio.c: duplicate function removal question Ethan Carter Edwards
2024-12-29  8:32 ` Takashi Iwai
2024-12-29  9:02 ` David Laight
2024-12-29  9:10   ` Takashi Iwai
2024-12-29 10:57     ` David Laight
2024-12-29 12:03       ` Takashi Iwai
2024-12-29 13:34         ` David Laight
2024-12-30 15:53           ` Ethan Carter Edwards

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