Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp93824pxf; Wed, 10 Mar 2021 01:04:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVlbML5nCa1jzpjPcKog3qTQkClRBGwwjrEftmDTA3Oj7fqQDptv5vKQanyzTTqgmLBTKx X-Received: by 2002:a17:906:934c:: with SMTP id p12mr2511035ejw.131.1615367081131; Wed, 10 Mar 2021 01:04:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615367081; cv=none; d=google.com; s=arc-20160816; b=dTdo2qOsLIL//LFmXKvTPPP4MGusbd9ypZhD7K0zasoc6s3Wv9VvxtgaGStBddQno5 1k7amlwp9t6h4W6cusi5A1JY8KsYDWZsIHhAo+JZcgxEZHFhPtqrQzn8JnvPEYRY1cLg r9wNX2+sPCyanFTbzyC6qcjEayRGYj+mV5/MquPbzk3JSk/6iKyKgVtOA/MHswziuOIz ghfoVkrSzt3K7ogdaszPx3uKX6Yp+0lI/a2/jKDTqqHVPjapechrJkMF+5e4vh3lwAC0 BSpOEl/oxHrBNyFs5iPI5EesJmJI/Zy60jMsH8m1aYCrrS4fyKHMsEhiyMRhkN6JUz4f am6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=R/HzcXWmzzi2cjj4FFgDEFA2ChulB/kbuiBcDJpsFOQ=; b=Lm6PXbKmTNFkpjqwp8R51msPwJMzA8BFVTANdk3z8DzhR8Rth7WV5AziCsXWMV33kY fY/S24g37fb35Sw4aJN47N4wUI5BdyWI1cBomFF1gfhJw5YZ79Q2Rtw3ZJ8ZRTclYPBl Zu9FxotAHL8YeVLIT0Gc64da58mIN6Ps7a+sPpLqIX6o34PKDepRPS3gF0TJNryG0wQI hrDteoeUe2DoSKtit0nSCAf1NQeqTzgr7LQ97J1R/z9xh07vLFLq7ZBp4E3QKkBQygZC oB0HFqaUS1ajwtmA1wNqwCIC4G1rNJY2o6aHjybAf132yFAApeJlTfVq0fyCyEl6ypSw IXgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t10si10945753ejf.297.2021.03.10.01.04.14; Wed, 10 Mar 2021 01:04:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231492AbhCJJBJ (ORCPT + 99 others); Wed, 10 Mar 2021 04:01:09 -0500 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:58098 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231197AbhCJJAi (ORCPT ); Wed, 10 Mar 2021 04:00:38 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0URGffM1_1615366836; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0URGffM1_1615366836) by smtp.aliyun-inc.com(127.0.0.1); Wed, 10 Mar 2021 17:00:36 +0800 From: Yang Li To: gregkh@linuxfoundation.org Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH v2] char/mwave: turn tp3780I_Cleanup() into void function Date: Wed, 10 Mar 2021 17:00:34 +0800 Message-Id: <1615366834-20545-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Yang Li --- Change in v2: -correct the subject line drivers/char/mwave/tp3780i.c | 6 +----- drivers/char/mwave/tp3780i.h | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/char/mwave/tp3780i.c b/drivers/char/mwave/tp3780i.c index 5e1618a..8588b51 100644 --- a/drivers/char/mwave/tp3780i.c +++ b/drivers/char/mwave/tp3780i.c @@ -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) diff --git a/drivers/char/mwave/tp3780i.h b/drivers/char/mwave/tp3780i.h index 07685b6..8bd976d 100644 --- a/drivers/char/mwave/tp3780i.h +++ b/drivers/char/mwave/tp3780i.h @@ -91,7 +91,7 @@ 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); -- 1.8.3.1