History

ALSA: squash lines for simple wrapper functions

Remove unneeded variables and assignments.

Masahiro Yamada committed 10 years ago

Commit 44cc4a01 parent f3f6c617 files · +13 −43Browse files

Unified · Split

7 files
  1. sound/aoa/fabrics/layout.c +1 −6
  2. sound/pci/asihpi/hpifunc.c +2 −5
  3. sound/pci/ctxfi/ctvmem.c +1 −5
  4. sound/pci/emu10k1/p16v.c +4 −12
  5. sound/pci/ice1712/ice1724.c +1 −3
  6. sound/ppc/snd_ps3.c +1 −3
  7. sound/soc/intel/baytrail/sst-baytrail-ipc.c +3 −9
sound/aoa/fabrics/layout.c+1−6
@@ -1169,12 +1169,7 @@ static struct soundbus_driver aoa_soundbus_driver = { · 1168 unmodified lines
1169 1169
1170static int __init aoa_fabric_layout_init(void)1170static int __init aoa_fabric_layout_init(void)
1171{1171{
1172 int err;1172 return soundbus_register_driver(&aoa_soundbus_driver);
1173
1174 err = soundbus_register_driver(&aoa_soundbus_driver);
1175 if (err)
1176 return err;
1177 return 0;
1178}1173}
1179 1174
1180static void __exit aoa_fabric_layout_exit(void)1175static void __exit aoa_fabric_layout_exit(void)
sound/pci/asihpi/hpifunc.c+2−5
@@ -2323,11 +2323,8 @@ u16 hpi_sample_clock_get_source_index(u32 h_control, u16 *pw_source_index) · 2322 unmodified lines
2323u16 hpi_sample_clock_query_local_rate(const u32 h_clock, const u32 index,2323u16 hpi_sample_clock_query_local_rate(const u32 h_clock, const u32 index,
2324 u32 *prate)2324 u32 *prate)
2325{2325{
2326 u16 err;2326 return hpi_control_query(h_clock, HPI_SAMPLECLOCK_LOCAL_SAMPLERATE,
2327 err = hpi_control_query(h_clock, HPI_SAMPLECLOCK_LOCAL_SAMPLERATE,2327 index, 0, prate);
2328 index, 0, prate);
2329
2330 return err;
2331}2328}
2332 2329
2333u16 hpi_sample_clock_set_local_rate(u32 h_control, u32 sample_rate)2330u16 hpi_sample_clock_set_local_rate(u32 h_control, u32 sample_rate)
sound/pci/ctxfi/ctvmem.c+1−5
@@ -166,11 +166,7 @@ static void ct_vm_unmap(struct ct_vm *vm, struct ct_vm_block *block) · 165 unmodified lines
166static dma_addr_t166static dma_addr_t
167ct_get_ptp_phys(struct ct_vm *vm, int index)167ct_get_ptp_phys(struct ct_vm *vm, int index)
168{168{
169 dma_addr_t addr;169 return (index >= CT_PTP_NUM) ? ~0UL : vm->ptp[index].addr;
170
171 addr = (index >= CT_PTP_NUM) ? ~0UL : vm->ptp[index].addr;
172
173 return addr;
174}170}
175 171
176int ct_vm_create(struct ct_vm **rvm, struct pci_dev *pci)172int ct_vm_create(struct ct_vm **rvm, struct pci_dev *pci)
sound/pci/emu10k1/p16v.c+4−12
@@ -300,37 +300,29 @@ static int snd_p16v_pcm_open_capture(struct snd_pcm_substream *substream) · 299 unmodified lines
300static int snd_p16v_pcm_hw_params_playback(struct snd_pcm_substream *substream,300static int snd_p16v_pcm_hw_params_playback(struct snd_pcm_substream *substream,
301 struct snd_pcm_hw_params *hw_params)301 struct snd_pcm_hw_params *hw_params)
302{302{
303 int result;303 return snd_pcm_lib_malloc_pages(substream,
304 result = snd_pcm_lib_malloc_pages(substream,
305 params_buffer_bytes(hw_params));304 params_buffer_bytes(hw_params));
306 return result;
307}305}
308 306
309/* hw_params callback */307/* hw_params callback */
310static int snd_p16v_pcm_hw_params_capture(struct snd_pcm_substream *substream,308static int snd_p16v_pcm_hw_params_capture(struct snd_pcm_substream *substream,
311 struct snd_pcm_hw_params *hw_params)309 struct snd_pcm_hw_params *hw_params)
312{310{
313 int result;311 return snd_pcm_lib_malloc_pages(substream,
314 result = snd_pcm_lib_malloc_pages(substream,
315 params_buffer_bytes(hw_params));312 params_buffer_bytes(hw_params));
316 return result;
317}313}
318 314
319 315
320/* hw_free callback */316/* hw_free callback */
321static int snd_p16v_pcm_hw_free_playback(struct snd_pcm_substream *substream)317static int snd_p16v_pcm_hw_free_playback(struct snd_pcm_substream *substream)
322{318{
323 int result;319 return snd_pcm_lib_free_pages(substream);
324 result = snd_pcm_lib_free_pages(substream);
325 return result;
326}320}
327 321
328/* hw_free callback */322/* hw_free callback */
329static int snd_p16v_pcm_hw_free_capture(struct snd_pcm_substream *substream)323static int snd_p16v_pcm_hw_free_capture(struct snd_pcm_substream *substream)
330{324{
331 int result;325 return snd_pcm_lib_free_pages(substream);
332 result = snd_pcm_lib_free_pages(substream);
333 return result;
334}326}
335 327
336 328
sound/pci/ice1712/ice1724.c+1−3
@@ -620,9 +620,7 @@ static const unsigned int stdclock_rate_list[16] = { · 619 unmodified lines
620 620
621static unsigned int stdclock_get_rate(struct snd_ice1712 *ice)621static unsigned int stdclock_get_rate(struct snd_ice1712 *ice)
622{622{
623 unsigned int rate;623 return stdclock_rate_list[inb(ICEMT1724(ice, RATE)) & 15];
624 rate = stdclock_rate_list[inb(ICEMT1724(ice, RATE)) & 15];
625 return rate;
626}624}
627 625
628static void stdclock_set_rate(struct snd_ice1712 *ice, unsigned int rate)626static void stdclock_set_rate(struct snd_ice1712 *ice, unsigned int rate)
sound/ppc/snd_ps3.c+1−3
@@ -564,9 +564,7 @@ static int snd_ps3_pcm_hw_params(struct snd_pcm_substream *substream, · 563 unmodified lines
564 564
565static int snd_ps3_pcm_hw_free(struct snd_pcm_substream *substream)565static int snd_ps3_pcm_hw_free(struct snd_pcm_substream *substream)
566{566{
567 int ret;567 return snd_pcm_lib_free_pages(substream);
568 ret = snd_pcm_lib_free_pages(substream);
569 return ret;
570};568};
571 569
572static int snd_ps3_delay_to_bytes(struct snd_pcm_substream *substream,570static int snd_ps3_delay_to_bytes(struct snd_pcm_substream *substream,
sound/soc/intel/baytrail/sst-baytrail-ipc.c+3−9
@@ -184,15 +184,9 @@ struct sst_byt { · 183 unmodified lines
184 184
185static inline u64 sst_byt_header(int msg_id, int data, bool large, int str_id)185static inline u64 sst_byt_header(int msg_id, int data, bool large, int str_id)
186{186{
187 u64 header;187 return IPC_HEADER_MSG_ID(msg_id) | IPC_HEADER_STR_ID(str_id) |
188 188 IPC_HEADER_LARGE(large) | IPC_HEADER_DATA(data) |
189 header = IPC_HEADER_MSG_ID(msg_id) |189 SST_BYT_IPCX_BUSY;
190 IPC_HEADER_STR_ID(str_id) |
191 IPC_HEADER_LARGE(large) |
192 IPC_HEADER_DATA(data) |
193 SST_BYT_IPCX_BUSY;
194
195 return header;
196}190}
197 191
198static inline u16 sst_byt_header_msg_id(u64 header)192static inline u16 sst_byt_header_msg_id(u64 header)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t