ALSA: squash lines for simple wrapper functions
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 6 Sep 2016 11:41:19 +0000 (20:41 +0900)
committerTakashi Iwai <tiwai@suse.de>
Wed, 7 Sep 2016 18:35:29 +0000 (20:35 +0200)
Remove unneeded variables and assignments.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/aoa/fabrics/layout.c
sound/pci/asihpi/hpifunc.c
sound/pci/ctxfi/ctvmem.c
sound/pci/emu10k1/p16v.c
sound/pci/ice1712/ice1724.c
sound/ppc/snd_ps3.c
sound/soc/intel/baytrail/sst-baytrail-ipc.c

index edc868196e117f68a7e66409cb6d0a71368aa9d6..a0c4a5de809c0e43f8a213d401ab7679869502b8 100644 (file)
@@ -1169,12 +1169,7 @@ static struct soundbus_driver aoa_soundbus_driver = {
 
 static int __init aoa_fabric_layout_init(void)
 {
-       int err;
-
-       err = soundbus_register_driver(&aoa_soundbus_driver);
-       if (err)
-               return err;
-       return 0;
+       return soundbus_register_driver(&aoa_soundbus_driver);
 }
 
 static void __exit aoa_fabric_layout_exit(void)
index 510e56cffd31b6b71664c2b381b424e15b93888b..f9b57647b3197de7eaa8b8268bf8aa960bcf64db 100644 (file)
@@ -2323,11 +2323,8 @@ u16 hpi_sample_clock_get_source_index(u32 h_control, u16 *pw_source_index)
 u16 hpi_sample_clock_query_local_rate(const u32 h_clock, const u32 index,
        u32 *prate)
 {
-       u16 err;
-       err = hpi_control_query(h_clock, HPI_SAMPLECLOCK_LOCAL_SAMPLERATE,
-               index, 0, prate);
-
-       return err;
+       return hpi_control_query(h_clock, HPI_SAMPLECLOCK_LOCAL_SAMPLERATE,
+                                index, 0, prate);
 }
 
 u16 hpi_sample_clock_set_local_rate(u32 h_control, u32 sample_rate)
index 419306ef825f61c51c50a507c3c249784f613337..520e19bc649ffcfacea2b10703d9a08e9ae9e7e4 100644 (file)
@@ -166,11 +166,7 @@ static void ct_vm_unmap(struct ct_vm *vm, struct ct_vm_block *block)
 static dma_addr_t
 ct_get_ptp_phys(struct ct_vm *vm, int index)
 {
-       dma_addr_t addr;
-
-       addr = (index >= CT_PTP_NUM) ? ~0UL : vm->ptp[index].addr;
-
-       return addr;
+       return (index >= CT_PTP_NUM) ? ~0UL : vm->ptp[index].addr;
 }
 
 int ct_vm_create(struct ct_vm **rvm, struct pci_dev *pci)
index fd9ab44174c2119e8ac7d567359a15060b71aa02..c11f1a29f35d03524cecf6bfe31314ae68366fd3 100644 (file)
@@ -300,37 +300,29 @@ static int snd_p16v_pcm_open_capture(struct snd_pcm_substream *substream)
 static int snd_p16v_pcm_hw_params_playback(struct snd_pcm_substream *substream,
                                      struct snd_pcm_hw_params *hw_params)
 {
-       int result;
-       result = snd_pcm_lib_malloc_pages(substream,
+       return snd_pcm_lib_malloc_pages(substream,
                                        params_buffer_bytes(hw_params));
-       return result;
 }
 
 /* hw_params callback */
 static int snd_p16v_pcm_hw_params_capture(struct snd_pcm_substream *substream,
                                      struct snd_pcm_hw_params *hw_params)
 {
-       int result;
-       result = snd_pcm_lib_malloc_pages(substream,
+       return snd_pcm_lib_malloc_pages(substream,
                                        params_buffer_bytes(hw_params));
-       return result;
 }
 
 
 /* hw_free callback */
 static int snd_p16v_pcm_hw_free_playback(struct snd_pcm_substream *substream)
 {
-       int result;
-       result = snd_pcm_lib_free_pages(substream);
-       return result;
+       return snd_pcm_lib_free_pages(substream);
 }
 
 /* hw_free callback */
 static int snd_p16v_pcm_hw_free_capture(struct snd_pcm_substream *substream)
 {
-       int result;
-       result = snd_pcm_lib_free_pages(substream);
-       return result;
+       return snd_pcm_lib_free_pages(substream);
 }
 
 
index cd68114444a15a320c3a5438a63b8abd43bc345e..e5c52ed9b6747003993d93ff4f1e2f1a760ced3e 100644 (file)
@@ -620,9 +620,7 @@ static const unsigned int stdclock_rate_list[16] = {
 
 static unsigned int stdclock_get_rate(struct snd_ice1712 *ice)
 {
-       unsigned int rate;
-       rate = stdclock_rate_list[inb(ICEMT1724(ice, RATE)) & 15];
-       return rate;
+       return stdclock_rate_list[inb(ICEMT1724(ice, RATE)) & 15];
 }
 
 static void stdclock_set_rate(struct snd_ice1712 *ice, unsigned int rate)
index 368242519279ae56054d1cfe097104f8a1bbd2cc..b84d7d34f1886b6c72f669f17b4a3cef5a196ef0 100644 (file)
@@ -564,9 +564,7 @@ static int snd_ps3_pcm_hw_params(struct snd_pcm_substream *substream,
 
 static int snd_ps3_pcm_hw_free(struct snd_pcm_substream *substream)
 {
-       int ret;
-       ret = snd_pcm_lib_free_pages(substream);
-       return ret;
+       return snd_pcm_lib_free_pages(substream);
 };
 
 static int snd_ps3_delay_to_bytes(struct snd_pcm_substream *substream,
index 5bbaa667bec1c608c35968c983eaeece020ad8db..c8455b47388bcd901290e6a70ec178d4e48aa11a 100644 (file)
@@ -184,15 +184,9 @@ struct sst_byt {
 
 static inline u64 sst_byt_header(int msg_id, int data, bool large, int str_id)
 {
-       u64 header;
-
-       header = IPC_HEADER_MSG_ID(msg_id) |
-                IPC_HEADER_STR_ID(str_id) |
-                IPC_HEADER_LARGE(large) |
-                IPC_HEADER_DATA(data) |
-                SST_BYT_IPCX_BUSY;
-
-       return header;
+       return IPC_HEADER_MSG_ID(msg_id) | IPC_HEADER_STR_ID(str_id) |
+              IPC_HEADER_LARGE(large) | IPC_HEADER_DATA(data) |
+              SST_BYT_IPCX_BUSY;
 }
 
 static inline u16 sst_byt_header_msg_id(u64 header)