mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	ALSA: hda: Fix implicit PCM format type conversion
The PCM format type is defined with __bitwise, hence it can't be passed as integer but needs an explicit cast. In this patch, instead of the messy cast flood, define the format argument of snd_hdac_calc_stream_format() to be the proper snd_pcm_format_t type. This fixes sparse warnings like: sound/hda/hdac_device.c:760:38: warning: incorrect type in argument 1 (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
		
							parent
							
								
									d6b340d7cb
								
							
						
					
					
						commit
						a6ea5fe95a
					
				
					 2 changed files with 3 additions and 2 deletions
				
			
		|  | @ -11,6 +11,7 @@ | |||
| #include <linux/pm_runtime.h> | ||||
| #include <linux/timecounter.h> | ||||
| #include <sound/core.h> | ||||
| #include <sound/pcm.h> | ||||
| #include <sound/memalloc.h> | ||||
| #include <sound/hda_verbs.h> | ||||
| #include <drm/i915_component.h> | ||||
|  | @ -133,7 +134,7 @@ int snd_hdac_get_sub_nodes(struct hdac_device *codec, hda_nid_t nid, | |||
| 			   hda_nid_t *start_id); | ||||
| unsigned int snd_hdac_calc_stream_format(unsigned int rate, | ||||
| 					 unsigned int channels, | ||||
| 					 unsigned int format, | ||||
| 					 snd_pcm_format_t format, | ||||
| 					 unsigned int maxbps, | ||||
| 					 unsigned short spdif_ctls); | ||||
| int snd_hdac_query_supported_pcm(struct hdac_device *codec, hda_nid_t nid, | ||||
|  |  | |||
|  | @ -738,7 +738,7 @@ static struct hda_rate_tbl rate_bits[] = { | |||
|  */ | ||||
| unsigned int snd_hdac_calc_stream_format(unsigned int rate, | ||||
| 					 unsigned int channels, | ||||
| 					 unsigned int format, | ||||
| 					 snd_pcm_format_t format, | ||||
| 					 unsigned int maxbps, | ||||
| 					 unsigned short spdif_ctls) | ||||
| { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Takashi Iwai
						Takashi Iwai