From patchwork Sun Mar 15 17:09:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 6016481 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 12627BF90F for ; Mon, 16 Mar 2015 09:58:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A05B204B0 for ; Mon, 16 Mar 2015 09:58:23 +0000 (UTC) Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com [209.132.183.39]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 551F9200F4 for ; Mon, 16 Mar 2015 09:58:22 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2G9sZOo010155; Mon, 16 Mar 2015 05:54:36 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id t2FHE6Rc005062 for ; Sun, 15 Mar 2015 13:14:06 -0400 Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.18]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2FHE6Pl026726; Sun, 15 Mar 2015 13:14:06 -0400 Received: from www.osadl.org (www.osadl.org [62.245.132.105]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2FHE40S019958 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 15 Mar 2015 13:14:05 -0400 Received: from debian.hofrr.at (92-243-35-153.adsl.nanet.at [92.243.35.153] (may be forged)) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id t2FHE0gX026250; Sun, 15 Mar 2015 18:14:00 +0100 From: Nicholas Mc Guire To: Alasdair Kergon Date: Sun, 15 Mar 2015 13:09:38 -0400 Message-Id: <1426439378-26353-1-git-send-email-hofrat@osadl.org> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-RedHat-Spam-Score: -2.609 (BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, URIBL_BLOCKED) 62.245.132.105 www.osadl.org 62.245.132.105 www.osadl.org X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.18 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Mon, 16 Mar 2015 05:50:15 -0400 Cc: Mike Snitzer , linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, dm-devel@redhat.com, Nicholas Mc Guire Subject: [dm-devel] [PATCH] dm log userspace: base: fix compile warning X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Virus-Scanned: ClamAV using ClamSMTP This fixes up a compile warning [-Wunused-but-set-variable] - given the comments in userspace_set_region_sync() the non-reporting of errors seems intentional so the return value can be dropped to make gcc happy. Signed-off-by: Nicholas Mc Guire --- CC [M] drivers/md/dm-log-userspace-base.o drivers/md/dm-log-userspace-base.c: In function 'userspace_set_region_sync': drivers/md/dm-log-userspace-base.c:744:6: warning: variable 'r' set but not used [-Wunused-but-set-variable] The comment here states: /* * It would be nice to be able to report failures. * However, it is easy emough to detect and resolve. */ note though that userspace_do_request() calls dm_consult_userspace() which can also return -EINVAL (which is though reported in dm_consult_userspace via DMINFO if I got it right) Patch was only compile tested with x86_64_defconfig + CONFIG_DM_LOG_USERSPACE Patch is against 4.0-rc3 (localversion-next is -next-20150313) drivers/md/dm-log-userspace-base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/dm-log-userspace-base.c b/drivers/md/dm-log-userspace-base.c index 39fa007..1e3038e 100644 --- a/drivers/md/dm-log-userspace-base.c +++ b/drivers/md/dm-log-userspace-base.c @@ -741,7 +741,6 @@ static int userspace_get_resync_work(struct dm_dirty_log *log, region_t *region) static void userspace_set_region_sync(struct dm_dirty_log *log, region_t region, int in_sync) { - int r; struct log_c *lc = log->context; struct { region_t r; @@ -751,7 +750,7 @@ static void userspace_set_region_sync(struct dm_dirty_log *log, pkg.r = region; pkg.i = (int64_t)in_sync; - r = userspace_do_request(lc, lc->uuid, DM_ULOG_SET_REGION_SYNC, + userspace_do_request(lc, lc->uuid, DM_ULOG_SET_REGION_SYNC, (char *)&pkg, sizeof(pkg), NULL, NULL); /*