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
11691169
11701170 static int __init aoa_fabric_layout_init(void)
11711171 {
1172− int err;
1173−
1174− err = soundbus_register_driver(&aoa_soundbus_driver);
1175− if (err)
1176− return err;
1177− return 0;
1172+ return soundbus_register_driver(&aoa_soundbus_driver);
11781173 }
11791174
11801175 static 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
23232323 u16 hpi_sample_clock_query_local_rate(const u32 h_clock, const u32 index,
23242324 u32 *prate)
23252325 {
2326− u16 err;
2327− err = hpi_control_query(h_clock, HPI_SAMPLECLOCK_LOCAL_SAMPLERATE,
2328− index, 0, prate);
2329−
2330− return err;
2326+ return hpi_control_query(h_clock, HPI_SAMPLECLOCK_LOCAL_SAMPLERATE,
2327+ index, 0, prate);
23312328 }
23322329
23332330 u16 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
166166 static dma_addr_t
167167 ct_get_ptp_phys(struct ct_vm *vm, int index)
168168 {
169− dma_addr_t addr;
170−
171− addr = (index >= CT_PTP_NUM) ? ~0UL : vm->ptp[index].addr;
172−
173− return addr;
169+ return (index >= CT_PTP_NUM) ? ~0UL : vm->ptp[index].addr;
174170 }
175171
176172 int 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
300300 static int snd_p16v_pcm_hw_params_playback(struct snd_pcm_substream *substream,
301301 struct snd_pcm_hw_params *hw_params)
302302 {
303− int result;
304− result = snd_pcm_lib_malloc_pages(substream,
303+ return snd_pcm_lib_malloc_pages(substream,
305304 params_buffer_bytes(hw_params));
306− return result;
307305 }
308306
309307 /* hw_params callback */
310308 static int snd_p16v_pcm_hw_params_capture(struct snd_pcm_substream *substream,
311309 struct snd_pcm_hw_params *hw_params)
312310 {
313− int result;
314− result = snd_pcm_lib_malloc_pages(substream,
311+ return snd_pcm_lib_malloc_pages(substream,
315312 params_buffer_bytes(hw_params));
316− return result;
317313 }
318314
319315
320316 /* hw_free callback */
321317 static int snd_p16v_pcm_hw_free_playback(struct snd_pcm_substream *substream)
322318 {
323− int result;
324− result = snd_pcm_lib_free_pages(substream);
325− return result;
319+ return snd_pcm_lib_free_pages(substream);
326320 }
327321
328322 /* hw_free callback */
329323 static int snd_p16v_pcm_hw_free_capture(struct snd_pcm_substream *substream)
330324 {
331− int result;
332− result = snd_pcm_lib_free_pages(substream);
333− return result;
325+ return snd_pcm_lib_free_pages(substream);
334326 }
335327
336328
sound/pci/ice1712/ice1724.c+1−3
@@ -620,9 +620,7 @@ static const unsigned int stdclock_rate_list[16] = { · 619 unmodified lines
620620
621621 static unsigned int stdclock_get_rate(struct snd_ice1712 *ice)
622622 {
623− unsigned int rate;
624− rate = stdclock_rate_list[inb(ICEMT1724(ice, RATE)) & 15];
625− return rate;
623+ return stdclock_rate_list[inb(ICEMT1724(ice, RATE)) & 15];
626624 }
627625
628626 static 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
564564
565565 static int snd_ps3_pcm_hw_free(struct snd_pcm_substream *substream)
566566 {
567− int ret;
568− ret = snd_pcm_lib_free_pages(substream);
569− return ret;
567+ return snd_pcm_lib_free_pages(substream);
570568 };
571569
572570 static 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
184184
185185 static inline u64 sst_byt_header(int msg_id, int data, bool large, int str_id)
186186 {
187− u64 header;
188−
189− header = IPC_HEADER_MSG_ID(msg_id) |
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;
187+ return IPC_HEADER_MSG_ID(msg_id) | IPC_HEADER_STR_ID(str_id) |
188+ IPC_HEADER_LARGE(large) | IPC_HEADER_DATA(data) |
189+ SST_BYT_IPCX_BUSY;
196190 }
197191
198192 static 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