Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp327048imm; Thu, 6 Sep 2018 03:09:22 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb2rKPZRD+AaBIDD0/8z3yKNU4RGaDVbNNi2lGZyHpZ1BYVKfR0qwDkUK0MFXEzlFE3uaC4 X-Received: by 2002:a63:f043:: with SMTP id s3-v6mr1922708pgj.94.1536228562144; Thu, 06 Sep 2018 03:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536228562; cv=none; d=google.com; s=arc-20160816; b=jfMENMh6fJ+IMcA6nWWtu+o1weFX3mrtmmhoVXkj6UHyqfOf5p1PGHyWhUsCjWDaom ky5XLm/Ff4hZD5KRSWNjPvfwD/Ljpu/HsfJLpZonJ1Y40pXV3hfhwi+fZow8Fs5Dgkli 1gbA+KsZyceMU8ON5gNbzX0cX/ENVRUF7dFYhr7YyUb0hD+2v4nsAPlmxFHdqydN+8F4 qoh4ejHdMWiXrxm/IJP2lmzvyj9f5FT/3Q+kBqeIpBRuPF8eGqfv/AEO2DsVyY6dXqIL QNxiw9b0py41qlvKsbIbh5HKtdWJfCzEy+jMccbGJEcF7HFhmK0bzePcw/ZiWeunuzHo acjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=uQs/bdT+CwW8NOpRkwHN1LjRfFLEHqc2gtnpyWHasLA=; b=JgXLlcwA4ZyNZAS1Emoe2La9as5f/NfHHizQl6GWw8FMu/dIEDw/INknP9egOcsRfQ 3z57MIMgXbvlBrR5hu9MGPRuIJZzB363ywUIvZnUnwp4HwannZ3tLid3BB4Cq1kFV0+l E+PpX4/ViF1juREt/xmjmoX3006iFRamtXjpLNzg6F0NHBad5M1Pg2sdb02Yklr7nimN UXXhHLcYqO+NCxIpPCcmo383bNKt6bOb0sVBhK9Q1UMtjpyQHRZfL1qJ5+NV3BJ6poo/ dnjxurTvjJFF2xv5cJ3f/VCnrGYr7fS74BZ4h0GFARucccmGx3ETfEk8TUlkhPvFBjp/ +HUg== 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 o3-v6si4489148plk.321.2018.09.06.03.08.56; Thu, 06 Sep 2018 03:09:22 -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 S1728177AbeIFOVx (ORCPT + 99 others); Thu, 6 Sep 2018 10:21:53 -0400 Received: from smtp03.citrix.com ([162.221.156.55]:13140 "EHLO SMTP03.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725809AbeIFOVx (ORCPT ); Thu, 6 Sep 2018 10:21:53 -0400 X-IronPort-AV: E=Sophos;i="5.53,337,1531785600"; d="scan'208";a="64578226" Date: Thu, 6 Sep 2018 10:47:12 +0100 From: Wei Liu To: Ding Xiang CC: , , , , Wei Liu Subject: Re: [Xen-devel] [PATCH] xen: remove redundant put_device Message-ID: <20180906094712.qc2ukrtvz2jzak64@zion.uk.xensource.com> References: <1536215590-400-1-git-send-email-dingxiang@cmss.chinamobile.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1536215590-400-1-git-send-email-dingxiang@cmss.chinamobile.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 06, 2018 at 02:33:10PM +0800, Ding Xiang wrote: > device_unregister will put device, do not need to do it one more time > > Signed-off-by: Ding Xiang > --- > drivers/xen/xenbus/xenbus_probe.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c > index 5b47188..cfaa878 100644 > --- a/drivers/xen/xenbus/xenbus_probe.c > +++ b/drivers/xen/xenbus/xenbus_probe.c > @@ -369,7 +369,6 @@ static void xenbus_cleanup_devices(const char *path, struct bus_type *bus) > bus_for_each_dev(bus, NULL, &info, cleanup_dev); > if (info.dev) { > device_unregister(&info.dev->dev); > - put_device(&info.dev->dev); This is to match the get_device call in cleanup_dev. It is not redundant IMHO. Wei.