From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D7B2C433DF for ; Tue, 30 Jun 2020 07:17:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D28D2073E for ; Tue, 30 Jun 2020 07:17:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730825AbgF3HRu (ORCPT ); Tue, 30 Jun 2020 03:17:50 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40136 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730636AbgF3HRu (ORCPT ); Tue, 30 Jun 2020 03:17:50 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05U73tNK053725; Tue, 30 Jun 2020 03:17:40 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31xkqkcxp5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Jun 2020 03:17:39 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 05U6XBUK058534; Tue, 30 Jun 2020 03:17:38 -0400 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 31xkqkcxnx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Jun 2020 03:17:38 -0400 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 05U7GJ18031819; Tue, 30 Jun 2020 07:17:38 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma03dal.us.ibm.com with ESMTP id 31wwr8kku5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Jun 2020 07:17:38 +0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 05U7Hbna38994374 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 Jun 2020 07:17:37 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2606328059; Tue, 30 Jun 2020 07:17:37 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4082A28064; Tue, 30 Jun 2020 07:17:36 +0000 (GMT) Received: from ltc.linux.ibm.com (unknown [9.16.170.189]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 30 Jun 2020 07:17:36 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 30 Jun 2020 09:17:35 +0200 From: haver To: Lee Jones Cc: arnd@arndb.de, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Michael Jung , Michael Ruettger , Frank Haverkamp , Joerg-Stephan Vogt Subject: Re: [PATCH 16/20] misc: genwqe: card_base: Remove set but unused variable 'rc' In-Reply-To: <20200629140442.1043957-17-lee.jones@linaro.org> References: <20200629140442.1043957-1-lee.jones@linaro.org> <20200629140442.1043957-17-lee.jones@linaro.org> Message-ID: X-Sender: haver@linux.vnet.ibm.com User-Agent: Roundcube Webmail/1.0.1 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-06-30_01:2020-06-30,2020-06-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 bulkscore=0 mlxscore=0 adultscore=0 clxscore=1011 phishscore=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 suspectscore=0 cotscore=-2147483648 spamscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006300048 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-06-29 16:04, Lee Jones wrote: > Variable 'rc' hasn't been checked since the driver's inception > in 2013. If it hasn't caused any issues since then, it's unlikely > to in the future. Let's take it out for now. > > Fixes the following W=1 kernel build warning(s): > > drivers/misc/genwqe/card_base.c: In function > ‘genwqe_health_check_stop’: > > /home/lee/projects/linux/kernel/drivers/misc/genwqe/card_base.c:1046:6: > warning: variable ‘rc’ set but not used > [-Wunused-but-set-variable] > 1046 | int rc; > | ^~ > > Cc: Michael Jung > Cc: Michael Ruettger > Cc: Frank Haverkamp > Cc: Joerg-Stephan Vogt > Signed-off-by: Lee Jones > --- > drivers/misc/genwqe/card_base.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/misc/genwqe/card_base.c > b/drivers/misc/genwqe/card_base.c > index 1dc6c7c5cbce9..bceebf49de2d5 100644 > --- a/drivers/misc/genwqe/card_base.c > +++ b/drivers/misc/genwqe/card_base.c > @@ -1043,12 +1043,10 @@ static int genwqe_health_thread_running(struct > genwqe_dev *cd) > > static int genwqe_health_check_stop(struct genwqe_dev *cd) > { > - int rc; > - > if (!genwqe_health_thread_running(cd)) > return -EIO; > > - rc = kthread_stop(cd->health_thread); > + kthread_stop(cd->health_thread); > cd->health_thread = NULL; > return 0; > } Good idea. Let's remove it Thanks for the contribution. Signed-off-by: Frank Haverkamp