Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

char/mwave: turn tp3780I_Cleanup() into void function

This function always return '0' and no callers use the return value.
So make it a void function.

This eliminates the following coccicheck warning:
./drivers/char/mwave/tp3780i.c:182:5-11: Unneeded variable: "retval".
Return "0" on line 187

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/1615366834-20545-1-git-send-email-yang.lee@linux.alibaba.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Yang Li and committed by
Greg Kroah-Hartman
f6d706dd 1c15b334

+2 -6
+1 -5
drivers/char/mwave/tp3780i.c
··· 177 177 return retval; 178 178 } 179 179 180 - int tp3780I_Cleanup(THINKPAD_BD_DATA * pBDData) 180 + void tp3780I_Cleanup(THINKPAD_BD_DATA *pBDData) 181 181 { 182 - int retval = 0; 183 - 184 182 PRINTK_2(TRACE_TP3780I, 185 183 "tp3780i::tp3780I_Cleanup entry and exit pBDData %p\n", pBDData); 186 - 187 - return retval; 188 184 } 189 185 190 186 int tp3780I_CalcResources(THINKPAD_BD_DATA * pBDData)
+1 -1
drivers/char/mwave/tp3780i.h
··· 91 91 int tp3780I_ResetDSP(THINKPAD_BD_DATA * pBDData); 92 92 int tp3780I_StartDSP(THINKPAD_BD_DATA * pBDData); 93 93 int tp3780I_QueryAbilities(THINKPAD_BD_DATA * pBDData, MW_ABILITIES * pAbilities); 94 - int tp3780I_Cleanup(THINKPAD_BD_DATA * pBDData); 94 + void tp3780I_Cleanup(THINKPAD_BD_DATA *pBDData); 95 95 int tp3780I_ReadWriteDspDStore(THINKPAD_BD_DATA * pBDData, unsigned int uOpcode, 96 96 void __user *pvBuffer, unsigned int uCount, 97 97 unsigned long ulDSPAddr);