From patchwork Thu Jul 19 21:08:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 1218581 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 5125E3FD48 for ; Thu, 19 Jul 2012 21:08:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751768Ab2GSVIr (ORCPT ); Thu, 19 Jul 2012 17:08:47 -0400 Received: from mail-yx0-f174.google.com ([209.85.213.174]:40265 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739Ab2GSVIq (ORCPT ); Thu, 19 Jul 2012 17:08:46 -0400 Received: by yenl2 with SMTP id l2so3302595yen.19 for ; Thu, 19 Jul 2012 14:08:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=ZHN7KZJKt3/zm9rzRcbUW0rlmDDBwKZbMzOj+rCWkbE=; b=j37hy9mINZQgK64OVAZIfKuM/MIOVZC8U/cCda+tg7Svrf7bMcDVMKDdiaKfyVLIO5 XLe0rlHZQvREPfVswbYiPr59ayVJXaRpV+F1RW+7KAfQu5hH3V/H685NouJVsqoxOUSZ mr1fioKRIiKJGQzEyY/DBQBMRLxoOLBt0heX8Vg0nBA1rwQMzs6nMLyuMkrzJ2px7EhK mvYL40quGwyRwaUlGVIHm3CLUdPh1zRQk9CRw/ZrDHD1SmEPvz1yc4GM+crzLP5OgvyA dgjeuULcsCa2pdGdojkbWWbPGbdI1U2Y215afInvN6LjMJzaHge6CoojoANOEc6aJUQR xprg== Received: by 10.50.100.137 with SMTP id ey9mr2670073igb.61.1342732125248; Thu, 19 Jul 2012 14:08:45 -0700 (PDT) Received: from [172.22.22.4] (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPS id gl1sm5486713igc.1.2012.07.19.14.08.44 (version=SSLv3 cipher=OTHER); Thu, 19 Jul 2012 14:08:44 -0700 (PDT) Message-ID: <5008775C.2060309@inktank.com> Date: Thu, 19 Jul 2012 16:08:44 -0500 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: ceph-devel@vger.kernel.org Subject: [PATCH 07/12] rbd: drop rbd_dev parameter in snap functions References: <500874F5.4090205@inktank.com> In-Reply-To: <500874F5.4090205@inktank.com> X-Gm-Message-State: ALoCoQlGgJKfvs73YjXlyVMt94qg1Upq0iCgEpMtcNRllNYPqTfnnOIqOCCjt0bjPYSOFpooieNx Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org Both rbd_register_snap_dev() and __rbd_remove_snap_dev() have rbd_dev parameters that are unused. Remove them. Signed-off-by: Alex Elder --- drivers/block/rbd.c | 19 +++++++------------ 1 files changed, 7 insertions(+), 12 deletions(-) /* @@ -2000,15 +1999,13 @@ static struct device_type rbd_snap_device_type = { .release = rbd_snap_dev_release, }; -static void __rbd_remove_snap_dev(struct rbd_device *rbd_dev, - struct rbd_snap *snap) +static void __rbd_remove_snap_dev(struct rbd_snap *snap) { list_del(&snap->node); device_unregister(&snap->dev); } -static int rbd_register_snap_dev(struct rbd_device *rbd_dev, - struct rbd_snap *snap, +static int rbd_register_snap_dev(struct rbd_snap *snap, struct device *parent) { struct device *dev = &snap->dev; @@ -2035,8 +2032,7 @@ static int __rbd_add_snap_dev(struct rbd_device *rbd_dev, snap->size = rbd_dev->header.snap_sizes[i]; snap->id = rbd_dev->header.snapc->snaps[i]; if (device_is_registered(&rbd_dev->dev)) { - ret = rbd_register_snap_dev(rbd_dev, snap, - &rbd_dev->dev); + ret = rbd_register_snap_dev(snap, &rbd_dev->dev); if (ret < 0) goto err; } @@ -2101,7 +2097,7 @@ static int __rbd_init_snaps_header(struct rbd_device *rbd_dev) */ if (rbd_dev->snap_id == old_snap->id) rbd_dev->snap_exists = false; - __rbd_remove_snap_dev(rbd_dev, old_snap); + __rbd_remove_snap_dev(old_snap); continue; } if (old_snap->id == cur_id) { @@ -2165,8 +2161,7 @@ static int rbd_bus_add_dev(struct rbd_device *rbd_dev) goto out; list_for_each_entry(snap, &rbd_dev->snaps, node) { - ret = rbd_register_snap_dev(rbd_dev, snap, - &rbd_dev->dev); + ret = rbd_register_snap_dev(snap, &rbd_dev->dev); if (ret < 0) break; } diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 3b4b4d2..955d75d 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -202,8 +202,7 @@ static ssize_t rbd_snap_add(struct device *dev, struct device_attribute *attr, const char *buf, size_t count); -static void __rbd_remove_snap_dev(struct rbd_device *rbd_dev, - struct rbd_snap *snap); +static void __rbd_remove_snap_dev(struct rbd_snap *snap); static ssize_t rbd_add(struct bus_type *bus, const char *buf, size_t count); @@ -1692,7 +1691,7 @@ static void __rbd_remove_all_snaps(struct rbd_device *rbd_dev) struct rbd_snap *next; list_for_each_entry_safe(snap, next, &rbd_dev->snaps, node) - __rbd_remove_snap_dev(rbd_dev, snap); + __rbd_remove_snap_dev(snap); }