Skip to content

Commit

Permalink
char/mwave: turn tp3780I_Cleanup() into void function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yang Li authored and Greg Kroah-Hartman committed Mar 24, 2021
1 parent 1c15b33 commit f6d706d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions drivers/char/mwave/tp3780i.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,10 @@ int tp3780I_InitializeBoardData(THINKPAD_BD_DATA * pBDData)
return retval;
}

int tp3780I_Cleanup(THINKPAD_BD_DATA * pBDData)
void tp3780I_Cleanup(THINKPAD_BD_DATA *pBDData)
{
int retval = 0;

PRINTK_2(TRACE_TP3780I,
"tp3780i::tp3780I_Cleanup entry and exit pBDData %p\n", pBDData);

return retval;
}

int tp3780I_CalcResources(THINKPAD_BD_DATA * pBDData)
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/mwave/tp3780i.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int tp3780I_DisableDSP(THINKPAD_BD_DATA * pBDData);
int tp3780I_ResetDSP(THINKPAD_BD_DATA * pBDData);
int tp3780I_StartDSP(THINKPAD_BD_DATA * pBDData);
int tp3780I_QueryAbilities(THINKPAD_BD_DATA * pBDData, MW_ABILITIES * pAbilities);
int tp3780I_Cleanup(THINKPAD_BD_DATA * pBDData);
void tp3780I_Cleanup(THINKPAD_BD_DATA *pBDData);
int tp3780I_ReadWriteDspDStore(THINKPAD_BD_DATA * pBDData, unsigned int uOpcode,
void __user *pvBuffer, unsigned int uCount,
unsigned long ulDSPAddr);
Expand Down

0 comments on commit f6d706d

Please sign in to comment.