Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp214261ybl; Mon, 2 Dec 2019 09:41:03 -0800 (PST) X-Google-Smtp-Source: APXvYqwf1F/f3z+47xLbXv9RXnKDvOkmo1ykC+ozXjn0tWyzV0nc3UCRkVn2Xioz7BHtcuhzFrPe X-Received: by 2002:aa7:c694:: with SMTP id n20mr3714427edq.95.1575308463459; Mon, 02 Dec 2019 09:41:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575308463; cv=none; d=google.com; s=arc-20160816; b=NaeZkTkJv45ls0eU63ZsHUHdVOpz+3+lHnIhxVD2a+Nrog9z19Rt7WYszGeQiKNzEc gYZkE354dP/fsHsg6fp8331myhTwOsiBw03TfjFWgp6HiTzK8dXrLZZBnuvZ7vyomWjb K11i1fHZqApjcfB2jNDwTed5akGQ/OLaTN3oExiAMQ9FuiREuMqItXUskZ9CnyRX/X+s VtHZ0yTKYtDHcWBINI3BHjIjOw8UAczO4aCIvcGiSWKtsNkdcvntyOt13zGfZosiWo65 1HL4+ptYZkBY5DE1gAHYlWsQ2bTJkhwtt6AVwr3z6OE28u3V43wMHxBPvVjWWkXoHuFs 8XxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:user-agent:in-reply-to:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=V9SCc8Xb67Rv4f8yElCapS2tmzETNbHoXGURUx3SfYE=; b=w0WVu6RKBltraexpHjrQ66X5vqm5MgrknPQecGKD66cFAdiRH7au4Dvg6EleX/T+wK te6enhTQSfTcLNme1svD/T15y3kUXQ0phS8ll9Bjdo6LmfZqrDDLIkLO7DIugyMGMzmR CfsHPu1MWoQGH+Rt86dEGoJZ3hQfzpJfjWx7Y2IU+pLPDg19Egl0e4sd+qqZ6qOpavRv es+zudtymnjOCpqVIxpaGrrDmPNtCYYCwFlMgKfhk6Z8jg+Lo3zRkR5GX80Ug0aBZJH4 mKsabtmb42oMVNuwjgXgEdSjA4Iz4IIaBRGba/2UtE4rwkVUCeuz2qESUPLQ+n8Ahyf1 Z10g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=duvSWVpW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f25si97449ejq.362.2019.12.02.09.40.38; Mon, 02 Dec 2019 09:41:03 -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=@redhat.com header.s=mimecast20190719 header.b=duvSWVpW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727818AbfLBRjS (ORCPT + 99 others); Mon, 2 Dec 2019 12:39:18 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:32962 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727453AbfLBRjS (ORCPT ); Mon, 2 Dec 2019 12:39:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575308356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V9SCc8Xb67Rv4f8yElCapS2tmzETNbHoXGURUx3SfYE=; b=duvSWVpWgC8eOqQWdG+Oe2LQU7yVei7F+GX9H64yHFaCM3sTE03unDgZum2RIMW1/EngOX sHdV615kpB+HCV56cszomf3AD7RtzFadPcH5LGTtjdzyV6H3f7qYi6ZTcOVFwaVfpeNgwU i9ifaMFG9hGrxGy1PRx+Lud2V+8rdNw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-226-EaFkpV5kP-SoZ2jY9GHt0A-1; Mon, 02 Dec 2019 12:39:15 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 40EE2800D54; Mon, 2 Dec 2019 17:39:14 +0000 (UTC) Received: from localhost (unknown [10.18.25.174]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F14F35D9E5; Mon, 2 Dec 2019 17:39:10 +0000 (UTC) Date: Mon, 2 Dec 2019 12:39:10 -0500 From: Mike Snitzer To: Jieun Kim Cc: Alasdair Kergon , dm-devel@redhat.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH 1/2] drivers: md: dm-log.c: Remove unused variable 'sz' Message-ID: <20191202173909.GA15687@redhat.com> References: <20191201054219.13146-1-Jieun.Kim4758@gmail.com> <201912011539.mNLLB6ra%lkp@intel.com> MIME-Version: 1.0 In-Reply-To: <201912011539.mNLLB6ra%lkp@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: EaFkpV5kP-SoZ2jY9GHt0A-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As you can see below: your patches to remove the seemingly unused sz variables won't even compile. The sz variable is used by the DMEMIT() macro. Nacked-by: Mike Snitzer On Sun, Dec 01 2019 at 2:46am -0500, kbuild test robot wrote: > Hi Jieun, >=20 > Thank you for the patch! Yet something to improve: >=20 > [auto build test ERROR on dm/for-next] > [also build test ERROR on v5.4 next-20191129] > [if your patch is applied to the wrong git tree, please drop us a note to= help > improve the system. BTW, we also suggest to use '--base' option to specif= y the > base tree in git format-patch, please see https://stackoverflow.com/a/374= 06982] >=20 > url: https://github.com/0day-ci/linux/commits/Jieun-Kim/drivers-md-dm-= log-c-Remove-unused-variable-sz/20191201-134548 > base: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/lin= ux-dm.git for-next > config: i386-defconfig (attached as .config) > compiler: gcc-7 (Debian 7.5.0-1) 7.5.0 > reproduce: > # save the attached .config to linux build tree > make ARCH=3Di386=20 >=20 > If you fix the issue, kindly add following tag > Reported-by: kbuild test robot >=20 > All error/warnings (new ones prefixed by >>): >=20 > In file included from include/linux/dm-dirty-log.h:16:0, > from drivers/md/dm-log.c:13: > drivers/md/dm-log.c: In function 'core_status': > >> include/linux/device-mapper.h:551:22: error: 'sz' undeclared (first us= e in this function); did you mean 's8'? > #define DMEMIT(x...) sz +=3D ((sz >=3D maxlen) ? \ > ^ > >> drivers/md/dm-log.c:788:3: note: in expansion of macro 'DMEMIT' > DMEMIT("1 %s", log->type->name); > ^~~~~~ > include/linux/device-mapper.h:551:22: note: each undeclared identifier= is reported only once for each function it appears in > #define DMEMIT(x...) sz +=3D ((sz >=3D maxlen) ? \ > ^ > >> drivers/md/dm-log.c:788:3: note: in expansion of macro 'DMEMIT' > DMEMIT("1 %s", log->type->name); > ^~~~~~ > -- > In file included from include/linux/dm-dirty-log.h:16:0, > from drivers//md/dm-log.c:13: > drivers//md/dm-log.c: In function 'core_status': > >> include/linux/device-mapper.h:551:22: error: 'sz' undeclared (first us= e in this function); did you mean 's8'? > #define DMEMIT(x...) sz +=3D ((sz >=3D maxlen) ? \ > ^ > drivers//md/dm-log.c:788:3: note: in expansion of macro 'DMEMIT' > DMEMIT("1 %s", log->type->name); > ^~~~~~ > include/linux/device-mapper.h:551:22: note: each undeclared identifier= is reported only once for each function it appears in > #define DMEMIT(x...) sz +=3D ((sz >=3D maxlen) ? \ > ^ > drivers//md/dm-log.c:788:3: note: in expansion of macro 'DMEMIT' > DMEMIT("1 %s", log->type->name); > ^~~~~~ >=20 > vim +/DMEMIT +788 drivers/md/dm-log.c >=20 > ^1da177e4c3f41 Linus Torvalds 2005-04-16 776 =20 > ^1da177e4c3f41 Linus Torvalds 2005-04-16 777 #define=09DMEMIT_SYNC = \ > ^1da177e4c3f41 Linus Torvalds 2005-04-16 778 =09if (lc->sync !=3D D= EFAULTSYNC) \ > ^1da177e4c3f41 Linus Torvalds 2005-04-16 779 =09=09DMEMIT("%ssync "= , lc->sync =3D=3D NOSYNC ? "no" : "") > ^1da177e4c3f41 Linus Torvalds 2005-04-16 780 =20 > 416cd17b198221 Heinz Mauelshagen 2008-04-24 781 static int core_status= (struct dm_dirty_log *log, status_type_t status, > ^1da177e4c3f41 Linus Torvalds 2005-04-16 782 =09=09 char *res= ult, unsigned int maxlen) > ^1da177e4c3f41 Linus Torvalds 2005-04-16 783 { > ^1da177e4c3f41 Linus Torvalds 2005-04-16 784 =09struct log_c *lc = =3D log->context; > ^1da177e4c3f41 Linus Torvalds 2005-04-16 785 =20 > ^1da177e4c3f41 Linus Torvalds 2005-04-16 786 =09switch(status) { > ^1da177e4c3f41 Linus Torvalds 2005-04-16 787 =09case STATUSTYPE_INF= O: > 315dcc226f066c Jonathan E Brassow 2007-05-09 @788 =09=09DMEMIT("1 %s", l= og->type->name); > ^1da177e4c3f41 Linus Torvalds 2005-04-16 789 =09=09break; > ^1da177e4c3f41 Linus Torvalds 2005-04-16 790 =20 > ^1da177e4c3f41 Linus Torvalds 2005-04-16 791 =09case STATUSTYPE_TAB= LE: > ^1da177e4c3f41 Linus Torvalds 2005-04-16 792 =09=09DMEMIT("%s %u %u= ", log->type->name, > ^1da177e4c3f41 Linus Torvalds 2005-04-16 793 =09=09 lc->sync = =3D=3D DEFAULTSYNC ? 1 : 2, lc->region_size); > ^1da177e4c3f41 Linus Torvalds 2005-04-16 794 =09=09DMEMIT_SYNC; > ^1da177e4c3f41 Linus Torvalds 2005-04-16 795 =09} > ^1da177e4c3f41 Linus Torvalds 2005-04-16 796 =20 > 2a79ee10b97355 Jieun Kim 2019-12-01 797 =09return 0; > ^1da177e4c3f41 Linus Torvalds 2005-04-16 798 } > ^1da177e4c3f41 Linus Torvalds 2005-04-16 799 =20 >=20 > :::::: The code at line 788 was first introduced by commit > :::::: 315dcc226f066c1d3cef79283dcde807fe0e32d1 dm log: report fault stat= us >=20 > :::::: TO: Jonathan E Brassow > :::::: CC: Linus Torvalds >=20 > --- > 0-DAY kernel test infrastructure Open Source Technology C= enter > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corpor= ation