diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2025-08-13 22:55:02 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-08-14 08:39:54 +0200 |
| commit | c308bb4190a8f6f09270b541457d6ae905d2f7bc (patch) | |
| tree | d394a120cb881c46d8abae73a7204cfca56b9c8c /include/sound | |
| parent | 113e9a284d4372322da90c05f1dc36e0a52e5fca (diff) | |
| download | linux-c308bb4190a8f6f09270b541457d6ae905d2f7bc.tar.gz | |
ALSA: hda: Use min() to simplify snd_hda_get_devices()
Use min() to simplify snd_hda_get_devices() and improve its readability.
Change the function parameter 'max_devices' from 'int' to 'unsigned int'
to avoid a min() signedness error. Update all related local variables
and the function's return type to 'unsigned int' accordingly.
No functional changes intended.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250813205507.215658-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
| -rw-r--r-- | include/sound/hda_codec.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h index ddc9c392f93f6d..006d4e4a8195d0 100644 --- a/include/sound/hda_codec.h +++ b/include/sound/hda_codec.h @@ -360,8 +360,8 @@ int snd_hda_override_conn_list(struct hda_codec *codec, hda_nid_t nid, int nums, int snd_hda_get_conn_index(struct hda_codec *codec, hda_nid_t mux, hda_nid_t nid, int recursive); unsigned int snd_hda_get_num_devices(struct hda_codec *codec, hda_nid_t nid); -int snd_hda_get_devices(struct hda_codec *codec, hda_nid_t nid, - u8 *dev_list, int max_devices); +unsigned int snd_hda_get_devices(struct hda_codec *codec, hda_nid_t nid, + u8 *dev_list, unsigned int max_devices); int snd_hda_get_dev_select(struct hda_codec *codec, hda_nid_t nid); int snd_hda_set_dev_select(struct hda_codec *codec, hda_nid_t nid, int dev_id); |
