Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4034007ybg; Fri, 25 Oct 2019 12:22:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqyw3604h3TlWDi1K71qb3YRr8sxAlP+8VFUxXk3+r099rDh+HDL9UIAJqFs7NccVjbXnbsT X-Received: by 2002:aa7:d0c9:: with SMTP id u9mr5598873edo.217.1572031336292; Fri, 25 Oct 2019 12:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572031336; cv=none; d=google.com; s=arc-20160816; b=sKbtOoQvc+9ofzMfkCsrP9gcKCR5/RzZ0rUROr6CK/Uqp2fMWEaPy2AlLqBe6ZnXbR TXuQWPsfw0vTuKg/QAecNk+BJ6yGFb9YeocgviCpREvMHRkGeOVhcemW/yYxs3WhjIQ6 zUgDpSjG3FbXzfmZVa9duq1MafHoFLnY2SPv7IEA/2pQ89kx71S+ZvevJD5eGl/SM3FW 2Y/9maGFZ9G8LW+6hq9HRqwJr7gwdm4YIzBBnyg3FZwgglWThtHx6t3dVmtlXnVTHi0M Y1IWI5LRZmpfK8Whnu6yw2pb+kPrCKkaG4DuXLk/donLH9tcyLfoU9xUnoOH0V8nx22f JcXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=nl7m3/SQsHpbpOZ4faIC8ozq/HZPnpmW6CF2UDSmdnA=; b=ciglX4GLMrUo9ulje4q72aerj2PqQwHG+VrCOUBCvpawaPYpl8cxul1UHKQL0Wj3qS 9z9pxGllNnkrgACEy2eL72zXMeLkWcNfIh5cJjdgeOgTY/siC29H1yEK2X7Dt5ywESK/ uTNvWSWxZFLRe+2QJJ/J9pelwZYcq2hboq86LNk8D83HujwtkPeVxwo984wD9sPPma1i iHx7Zhopa3OkSqcBoApWghClHLSwwZBPmV8Tnk32dMX7j2F63JuXFc6+VMc9d4e6g8zT 37J3xe1GyqmKVOAxk9RFAqEcvQWae9InDZSKn4ujwzggROTeD71SCWmb/YXn1246sm0u OPyg== ARC-Authentication-Results: i=1; mx.google.com; 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 j16si1973067eda.161.2019.10.25.12.21.53; Fri, 25 Oct 2019 12:22:16 -0700 (PDT) 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; 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 S2388873AbfJYEhg (ORCPT + 99 others); Fri, 25 Oct 2019 00:37:36 -0400 Received: from proxima.lasnet.de ([78.47.171.185]:48255 "EHLO proxima.lasnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388369AbfJYEhg (ORCPT ); Fri, 25 Oct 2019 00:37:36 -0400 Received: from PC192.168.2.106 (p4FE7198A.dip0.t-ipconnect.de [79.231.25.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: stefan@datenfreihafen.org) by proxima.lasnet.de (Postfix) with ESMTPSA id CE58CC1BBA; Fri, 25 Oct 2019 06:37:33 +0200 (CEST) Subject: Re: [PATCH net-next] ieee802154: remove set but not used variable 'status' To: YueHaibing , varkabhadram@gmail.com, alex.aring@gmail.com, davem@davemloft.net Cc: linux-wpan@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20191023070618.30044-1-yuehaibing@huawei.com> From: Stefan Schmidt Message-ID: Date: Fri, 25 Oct 2019 06:37:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <20191023070618.30044-1-yuehaibing@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. On 23.10.19 09:06, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/ieee802154/cc2520.c:221:5: warning: > variable status set but not used [-Wunused-but-set-variable] > > It is never used, so can be removed. > > Signed-off-by: YueHaibing > --- > drivers/net/ieee802154/cc2520.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c > index 4350694..89c046b 100644 > --- a/drivers/net/ieee802154/cc2520.c > +++ b/drivers/net/ieee802154/cc2520.c > @@ -218,7 +218,6 @@ static int > cc2520_cmd_strobe(struct cc2520_private *priv, u8 cmd) > { > int ret; > - u8 status = 0xff; > struct spi_message msg; > struct spi_transfer xfer = { > .len = 0, > @@ -236,8 +235,6 @@ cc2520_cmd_strobe(struct cc2520_private *priv, u8 cmd) > priv->buf[0]); > > ret = spi_sync(priv->spi, &msg); > - if (!ret) > - status = priv->buf[0]; > dev_vdbg(&priv->spi->dev, > "buf[0] = %02x\n", priv->buf[0]); > mutex_unlock(&priv->buffer_mutex); > Applied to wpan-next. Thanks! regards Stefan Schmidt