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=-8.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 CC226C5DF60 for ; Tue, 5 Nov 2019 15:50:36 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9FDDC2190F for ; Tue, 5 Nov 2019 15:50:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Lw6RcLyV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9FDDC2190F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 66B092000D; Tue, 5 Nov 2019 15:50:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iPw4fjsifN9p; Tue, 5 Nov 2019 15:50:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 6F5B920016; Tue, 5 Nov 2019 15:50:35 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 108FD1BF4E5 for ; Tue, 5 Nov 2019 15:50:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id EA11E8A58D for ; Tue, 5 Nov 2019 15:50:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rYhXsKV1KZ4Q for ; Tue, 5 Nov 2019 15:50:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by hemlock.osuosl.org (Postfix) with ESMTPS id 52D368A546 for ; Tue, 5 Nov 2019 15:50:32 +0000 (UTC) Received: from localhost (unknown [62.119.166.9]) (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 4423E217F5; Tue, 5 Nov 2019 15:50:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572969032; bh=0Wqzj5saWGFQPcHScriQ0P5BJ17JeJjwaDDE8C9MBUo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Lw6RcLyVKDqZHREc1LJoj5D99aRFj5tS/8E3bHXUhXcKbtYJGENJOIzd5iZtYohGz Dml2XWiVgjGGBUno9CecWRRK6ZlG4hkdovBT2hIWYEBPS4fY9Lrr3vWzKkY0ltWlVU v3/rkQc3kviutnrDR1pINh8O9crNybecRgd7Kng4= Date: Tue, 5 Nov 2019 16:50:24 +0100 From: Greg KH To: Chen Wandun Subject: Re: [PATCH v2] hp100: remove set but not used variable val Message-ID: <20191105155024.GA2677365@kroah.com> References: <20191105133554.6C01F9A06CB85816F399@huawei.com> <1572964619-76671-1-git-send-email-chenwandun@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1572964619-76671-1-git-send-email-chenwandun@huawei.com> User-Agent: Mutt/1.12.2 (2019-09-21) X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, kstewart@linuxfoundation.org, linux-kernel@vger.kernel.org, perex@perex.cz, joe@perches.com, tglx@linutronix.de, allison@lohutok.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" On Tue, Nov 05, 2019 at 10:36:59PM +0800, Chen Wandun wrote: > From: Chenwandun > > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/staging/hp/hp100.c: In function hp100_start_xmit: > drivers/staging/hp/hp100.c:1629:10: warning: variable val set but not used [-Wunused-but-set-variable] > > Signed-off-by: Chenwandun I need a "full" name here, like the one on your email "From:" line. > --- > drivers/staging/hp/hp100.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c > index 6ec78f5..6fc7733 100644 > --- a/drivers/staging/hp/hp100.c > +++ b/drivers/staging/hp/hp100.c > @@ -1626,7 +1626,9 @@ static netdev_tx_t hp100_start_xmit(struct sk_buff *skb, > unsigned long flags; > int i, ok_flag; > int ioaddr = dev->base_addr; > +#ifdef HP100_DEBUG_TX > u_short val; > +#endif #ifdefs are not ok in .c code, sorry. > struct hp100_private *lp = netdev_priv(dev); > > #ifdef HP100_DEBUG_B > @@ -1695,7 +1697,9 @@ static netdev_tx_t hp100_start_xmit(struct sk_buff *skb, > > spin_lock_irqsave(&lp->lock, flags); > hp100_ints_off(); > +#ifdef HP100_DEBUG_TX > val = hp100_inw(IRQ_STATUS); Are you sure that this doesn't actually change the hardware in some way? thanks, greg k-h _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel