Remove unneeded variables and assignments.
Unified · Split
| @@ -1169,12 +1169,7 @@ static struct soundbus_driver aoa_soundbus_driver = { · 1168 unmodified lines | |||
| 1169 | 1169 | ||
| 1170 | static int __init aoa_fabric_layout_init(void) | 1170 | static 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 | ||
| 1180 | static void __exit aoa_fabric_layout_exit(void) | 1175 | static void __exit aoa_fabric_layout_exit(void) |
| @@ -2323,11 +2323,8 @@ u16 hpi_sample_clock_get_source_index(u32 h_control, u16 *pw_source_index) · 2322 unmodified lines | |||
| 2323 | u16 hpi_sample_clock_query_local_rate(const u32 h_clock, const u32 index, | 2323 | u16 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 | ||
| 2333 | u16 hpi_sample_clock_set_local_rate(u32 h_control, u32 sample_rate) | 2330 | u16 hpi_sample_clock_set_local_rate(u32 h_control, u32 sample_rate) |
| @@ -166,11 +166,7 @@ static void ct_vm_unmap(struct ct_vm *vm, struct ct_vm_block *block) · 165 unmodified lines | |||
| 166 | static dma_addr_t | 166 | static dma_addr_t |
| 167 | ct_get_ptp_phys(struct ct_vm *vm, int index) | 167 | ct_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 | ||
| 176 | int ct_vm_create(struct ct_vm **rvm, struct pci_dev *pci) | 172 | int ct_vm_create(struct ct_vm **rvm, struct pci_dev *pci) |
| @@ -300,37 +300,29 @@ static int snd_p16v_pcm_open_capture(struct snd_pcm_substream *substream) · 299 unmodified lines | |||
| 300 | static int snd_p16v_pcm_hw_params_playback(struct snd_pcm_substream *substream, | 300 | static 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 */ |
| 310 | static int snd_p16v_pcm_hw_params_capture(struct snd_pcm_substream *substream, | 308 | static 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 */ |
| 321 | static int snd_p16v_pcm_hw_free_playback(struct snd_pcm_substream *substream) | 317 | static 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 */ |
| 329 | static int snd_p16v_pcm_hw_free_capture(struct snd_pcm_substream *substream) | 323 | static 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 | ||
| @@ -620,9 +620,7 @@ static const unsigned int stdclock_rate_list[16] = { · 619 unmodified lines | |||
| 620 | 620 | ||
| 621 | static unsigned int stdclock_get_rate(struct snd_ice1712 *ice) | 621 | static 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 | ||
| 628 | static void stdclock_set_rate(struct snd_ice1712 *ice, unsigned int rate) | 626 | static void stdclock_set_rate(struct snd_ice1712 *ice, unsigned int rate) |
| @@ -564,9 +564,7 @@ static int snd_ps3_pcm_hw_params(struct snd_pcm_substream *substream, · 563 unmodified lines | |||
| 564 | 564 | ||
| 565 | static int snd_ps3_pcm_hw_free(struct snd_pcm_substream *substream) | 565 | static 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 | ||
| 572 | static int snd_ps3_delay_to_bytes(struct snd_pcm_substream *substream, | 570 | static int snd_ps3_delay_to_bytes(struct snd_pcm_substream *substream, |
| @@ -184,15 +184,9 @@ struct sst_byt { · 183 unmodified lines | |||
| 184 | 184 | ||
| 185 | static inline u64 sst_byt_header(int msg_id, int data, bool large, int str_id) | 185 | static 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 | ||
| 198 | static inline u16 sst_byt_header_msg_id(u64 header) | 192 | static inline u16 sst_byt_header_msg_id(u64 header) |