From patchwork Wed Jul 18 10:17:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yasuaki Ishimatsu X-Patchwork-Id: 1209881 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id EAD9CDFFFD for ; Wed, 18 Jul 2012 10:17:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753313Ab2GRKR4 (ORCPT ); Wed, 18 Jul 2012 06:17:56 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:34146 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752111Ab2GRKR4 (ORCPT ); Wed, 18 Jul 2012 06:17:56 -0400 Received: from m1.gw.fujitsu.co.jp (unknown [10.0.50.71]) by fgwmail5.fujitsu.co.jp (Postfix) with ESMTP id 89B7A3EE081; Wed, 18 Jul 2012 19:17:55 +0900 (JST) Received: from smail (m1 [127.0.0.1]) by outgoing.m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 7399645DE59; Wed, 18 Jul 2012 19:17:55 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (s1.gw.fujitsu.co.jp [10.0.50.91]) by m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 56CCA45DE54; Wed, 18 Jul 2012 19:17:55 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 47D4A1DB8052; Wed, 18 Jul 2012 19:17:55 +0900 (JST) Received: from g01jpexchyt12.g01.fujitsu.local (g01jpexchyt12.g01.fujitsu.local [10.128.194.51]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id EF2DA1DB8048; Wed, 18 Jul 2012 19:17:54 +0900 (JST) Received: from [127.0.0.1] (10.124.101.33) by g01jpexchyt12.g01.fujitsu.local (10.128.194.51) with Microsoft SMTP Server id 14.2.309.2; Wed, 18 Jul 2012 19:17:50 +0900 X-SecurityPolicyCheck: OK by SHieldMailChecker v1.7.4 Message-ID: <50068D41.9090109@jp.fujitsu.com> Date: Wed, 18 Jul 2012 19:17:37 +0900 From: Yasuaki Ishimatsu User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: , , , CC: , , , , , , , , , Subject: [RFC PATCH v4 12/13] memory-hotplug : add node_device_release References: <50068974.1070409@jp.fujitsu.com> In-Reply-To: <50068974.1070409@jp.fujitsu.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org When calling unregister_node(), the function shows following message at device_release(). Device 'node2' does not have a release() function, it is broken and must be fixed. So the patch implements node_device_release() CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- drivers/base/node.c | 7 +++++++ 1 file changed, 7 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-3.5-rc6/drivers/base/node.c =================================================================== --- linux-3.5-rc6.orig/drivers/base/node.c 2012-07-18 18:24:29.191121066 +0900 +++ linux-3.5-rc6/drivers/base/node.c 2012-07-18 18:25:47.111146983 +0900 @@ -252,6 +252,12 @@ static inline void hugetlb_register_node static inline void hugetlb_unregister_node(struct node *node) {} #endif +static void node_device_release(struct device *dev) +{ + struct node *node_dev = to_node(dev); + + memset(node_dev, 0, sizeof(struct node)); +} /* * register_node - Setup a sysfs device for a node. @@ -265,6 +271,7 @@ int register_node(struct node *node, int node->dev.id = num; node->dev.bus = &node_subsys; + node->dev.release = node_device_release; error = device_register(&node->dev); if (!error){