Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp233489ybi; Fri, 31 May 2019 00:12:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqy017IGxLaSF28CLAbFg6ImtXFK6eYMC1iBTsCnr93RHtzlqYoLs12ucnfeVntLRzvBZJzc X-Received: by 2002:a17:90a:f992:: with SMTP id cq18mr7156976pjb.54.1559286772154; Fri, 31 May 2019 00:12:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559286772; cv=none; d=google.com; s=arc-20160816; b=Q1m0bBTN+SNEtPpPawEjlOZyNutiFGCK+7JyoRRDlchk6M0RrunRjh6W8AcrpsORla zfo9b77prDJ+hmHWgnMiYo307rSJp337HbFvX/cWhIxvMnHlMhZvBHl14lqJgpgZCL5C wqmm+buEJMDKrkqp9rnsceLSdNh/sepqSgU5sft4W/X5AqFbUSfi3w0yjwIibWj71T4m wXGju1IAF4eSuhcWBq62PnILH21/K02sc3VZdrT9+n/Ym1yWsvYw6o9woe84RPTVbOuB Tbw+y6OLY5MzPK7ypNFA3ayEXFEvouVCPkfoAk3eUt9WKTDdOkHAXgOpU/DYVGCYbeLI /KsQ== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=1I0X96D3v1HYQYxv798SWRpkNTAm3dJbfOYoFu1vcjc=; b=ZwNUuso5i5T5H1qQldlWe6ZZCDi0xWgJge0xxZgRODl8U7Rb/K/SGC8blvOkq1QI52 fDS85NI+0jdlhpoHVgnIh75kJ1Nu6yF96kZBIaxzPUTx5Y7TdfcAcjjOwTvsxk9jbo0y o4MzAvw7p7hY9tdwv/H3IhjzkKm89ewt/IH1W9e+yDnTKWdC7FND4mDPYrGJcVIHwFpo fsHnu70fJZ0UEoR2oIA6M4xUaoUpOjhATmMjnCaXU1qDC5ja9UkjyrlWU0TFyZVNTU6y mAYKP493WFANa/PDVkI3OY+LqG4AhHkxyjd55ZNvmrif0Ep/K6UwKmksrXJrbj3f3brf xUUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=mSXDop0s; 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 m13si4425743pjr.102.2019.05.31.00.12.33; Fri, 31 May 2019 00:12:52 -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; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=mSXDop0s; 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 S1726798AbfEaHKh (ORCPT + 99 others); Fri, 31 May 2019 03:10:37 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:42675 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbfEaHKh (ORCPT ); Fri, 31 May 2019 03:10:37 -0400 Received: by mail-oi1-f194.google.com with SMTP id v25so6405200oic.9 for ; Fri, 31 May 2019 00:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=1I0X96D3v1HYQYxv798SWRpkNTAm3dJbfOYoFu1vcjc=; b=mSXDop0s5jN9NAe1GtBRtMt2K1Xz8vR4sOEqaJjRU0qsqm+fGGNcJY4sW6OFh3g4+M z+Ka+XE9L9QeSAnO8qPi0FRJV7b5YoM6dbLCIOBz2UluV16H1LVVUx9EPHd7mvpxzsLE iyR0itn1OLelG55R8FoUg4ETdeaZxCjcPemNEeTCXpyUnTk9w6j9s11T+TufKbFFcmO8 owyBKDuikuu13vU2pfMpR5dxvsixreNuXplAG5v18FwnUzDGkYHtZmkBSG8v3WCEctm9 rs0rBYchC4Y28raKI51OL/9Q67GE4tObzU87TzN8Qpq14dapwtjDUOkvhvWqniB985/W GDOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=1I0X96D3v1HYQYxv798SWRpkNTAm3dJbfOYoFu1vcjc=; b=li/fd577AIDOmePwVAygjMB00wTUpiC/5tfxYz9W1YOe/0/1aIW0uLMxOGNTJ8onFg gjEKf/CzSIhISB5DgwBMMCn/5sEVtw+/FQvIWhiXllUzreaDUAr7K/TII1MTOFM6a8PU 7DJx7dDYD9CUGNgypb25xKtD2DHAUUDfAmBGkJKM507GDYaCX+KGwmrpH1eW6DmjBs+c gLYMyzwUkXzr+XaOqctuQFpgbYxM9x2AGP3GiFBzyAnr2RDYf+sr3T9YqsZ8/7TNZ084 O/t5uc413Kvjk41FBTfMbrZx/HQoq4JHyF2tzM/McVr+6lUQfOvKo7WZqIf6+N5t7F4V Lr2Q== X-Gm-Message-State: APjAAAXQPl4zj02kfOvu6odSihPg2RgONeu+NqM8nABhIzKOQ/yjYQob riJkggtXRjH6t8VPoK3bdGf28oKOyV2oDq/WQ1xlyQ== X-Received: by 2002:aca:6cc1:: with SMTP id h184mr370801oic.170.1559286636457; Fri, 31 May 2019 00:10:36 -0700 (PDT) MIME-Version: 1.0 References: <20190529145954.14500-1-yuehaibing@huawei.com> In-Reply-To: <20190529145954.14500-1-yuehaibing@huawei.com> From: Bartosz Golaszewski Date: Fri, 31 May 2019 09:10:25 +0200 Message-ID: Subject: Re: [PATCH -next] eeprom: at24: Remove set but not used variable 'addr' To: YueHaibing Cc: Arnd Bergmann , Greg KH , LKML , linux-i2c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =C5=9Br., 29 maj 2019 o 17:00 YueHaibing napisa=C5= =82(a): > > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/misc/eeprom/at24.c: In function at24_make_dummy_client: > drivers/misc/eeprom/at24.c:514:21: warning: variable addr set but not use= d [-Wunused-but-set-variable] > > It's not used since commit e7308628d0ae ("eeprom: > at24: use devm_i2c_new_dummy_device()") > > Signed-off-by: YueHaibing > --- > drivers/misc/eeprom/at24.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c > index ba8e73812644..fa730bb342e8 100644 > --- a/drivers/misc/eeprom/at24.c > +++ b/drivers/misc/eeprom/at24.c > @@ -511,13 +511,11 @@ static int at24_make_dummy_client(struct at24_data = *at24, unsigned int index, > struct regmap_config *regmap_config) > { > struct i2c_client *base_client, *dummy_client; > - unsigned short int addr; > struct regmap *regmap; > struct device *dev; > > base_client =3D at24->client[0].client; > dev =3D &base_client->dev; > - addr =3D base_client->addr + index; > > dummy_client =3D devm_i2c_new_dummy_device(dev, base_client->adap= ter, > base_client->addr + inde= x); > -- > 2.17.1 > > Applied, thanks! Bart