Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1615341ybl; Thu, 5 Dec 2019 04:23:13 -0800 (PST) X-Google-Smtp-Source: APXvYqyATdai6q4wMTC7PGpBurdrxdDmy6huXQtz2QwcRjpUsg0IY9JYiFumHY8OMQoDZixI4Had X-Received: by 2002:a05:6808:197:: with SMTP id w23mr7093337oic.46.1575548593832; Thu, 05 Dec 2019 04:23:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575548593; cv=none; d=google.com; s=arc-20160816; b=FIx+rDUR+Gfjf4hAaPyXx0EjUV2+kqwuVNkp4O48EblZyU8gQCoo6PVhURkhNwz9or FHJIAjUYAT1XvW2q2qpeIGa0OJpUxEPuAzl6O12qbwqEsxzajB6KLm1I7aA/egAhFEmh 9oXSh65CmYhtUF8a+iELLGU97EcAGEX4EgTpSOlZOoqBfIvRzRK/zYllhRb7s3BQLl0V DVwDW4JpgoMrRsgpGZif/EmCvVuI3gZHDUNyz75otqvKWa8xGYXeQJYmjS8aK5hLOc+w 5ZAAYU05pngsqkYc7BI32onJuuefLoFCA0f/b+MkngX4znkfpV2vstXhPzDLvaVhp9+r vkSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=44+H8XpX0XCW5up6FAPs9uLDBP5axwj6VmD7VWuL8tg=; b=IZM55GiDu6EUhCHEQG/fguoNFS5GgFTnQccfHZovLguGvcJhLtlb5UnieBTQwrwHbJ KaFKU+SJsvN31iAOp/M0BU68ht+cAiE91CCMV2GXyhTqqpDSoevCyYGoROdQs8B4IWhQ QH3zd4ArONL8s0k3FYTo1IAIfZ5TTWaFGIYaZ2/rcEgCMB1pXZwzYMpPaDgpWyu+Tdsh JKvsiArAZhKbVDqvEt1Hc1i3NnlP7UFR3/bhOy7n9qdANo3zA2G5Kx7gAtLjbXOMNbt3 fMfK70Ym1E350HD34s6RMBA/pjQ6VB32dyXdAlS6plaOxrnSSMCWIkfyQjKZhb82Bsc/ YvzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wvT3NdlS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p71si4557610oic.138.2019.12.05.04.23.01; Thu, 05 Dec 2019 04:23:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wvT3NdlS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729416AbfLEMWM (ORCPT + 99 others); Thu, 5 Dec 2019 07:22:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:38700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729099AbfLEMWM (ORCPT ); Thu, 5 Dec 2019 07:22:12 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3EB8320707; Thu, 5 Dec 2019 12:22:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575548531; bh=qgGNtF/l7uOobXAo/txHTzrih0m1E3AsFCzTZTO/ES4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wvT3NdlSMcDl6Rrb4U9G+zs8JaI+M3jRNj6qQJZSkFRLzUmnShicwh0sgML9Dyl1a N6qE39Xep1w0X0CiDtm1ODPrxoFb7xNiP+ZL8a7bcc1GJ/7JEPxvlbBKi7VDLbKmD3 /iwctK45uF0Kr2EFObj1QV+dWqjnldQV4184A8P0= Date: Thu, 5 Dec 2019 13:22:08 +0100 From: Greg KH To: Xiongfeng Wang Cc: jslaby@suse.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, huawei.libin@huawei.com Subject: Re: [PATCH] tty: serial: 8250: remove set but unused variable Message-ID: <20191205122208.GB390369@kroah.com> References: <1575547903-52355-1-git-send-email-wangxiongfeng2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1575547903-52355-1-git-send-email-wangxiongfeng2@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 05, 2019 at 08:11:43PM +0800, Xiongfeng Wang wrote: > Fix the following warning: > drivers/tty/serial/8250/serial_cs.c: In function multi_config: > drivers/tty/serial/8250/serial_cs.c:562:7: warning: variable err set but not used [-Wunused-but-set-variable] > > Reported-by: Hulk Robot > Signed-off-by: Xiongfeng Wang > --- > drivers/tty/serial/8250/serial_cs.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/drivers/tty/serial/8250/serial_cs.c b/drivers/tty/serial/8250/serial_cs.c > index c8186a0..eeda6a0 100644 > --- a/drivers/tty/serial/8250/serial_cs.c > +++ b/drivers/tty/serial/8250/serial_cs.c > @@ -559,16 +559,13 @@ static int multi_config(struct pcmcia_device *link) > */ > if (info->manfid == MANFID_OXSEMI || (info->manfid == MANFID_POSSIO && > info->prodid == PRODID_POSSIO_GCC)) { > - int err; > - > if (link->config_index == 1 || > link->config_index == 3) { > - err = setup_serial(link, info, base2, > - link->irq); > + setup_serial(link, info, base2, link->irq); > base2 = link->resource[0]->start; > } else { > - err = setup_serial(link, info, link->resource[0]->start, > - link->irq); > + setup_serial(link, info, link->resource[0]->start, > + link->irq); Again, why ignore the error value? greg k-h