From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757263Ab3EaVqF (ORCPT ); Fri, 31 May 2013 17:46:05 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:59360 "EHLO e7.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752017Ab3EaVp7 (ORCPT ); Fri, 31 May 2013 17:45:59 -0400 Message-ID: <51A91A0F.4020408@linux.vnet.ibm.com> Date: Fri, 31 May 2013 14:45:51 -0700 From: Cody P Schafer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: Nathan Fontenot CC: Greg Kroah-Hartman , LKML , linux-mm Subject: Re: [PATCH v2] drivers/base: Use attribute groups to create sysfs memory files References: <51A908A3.7010006@linux.vnet.ibm.com> In-Reply-To: <51A908A3.7010006@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13053121-5806-0000-0000-00002176D7B2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/31/2013 01:31 PM, Nathan Fontenot wrote: > Update the sysfs memory code to create/delete files at the time of device > and subsystem registration. > > The current code creates files in the root memory directory explicitly through > the use of init_* routines. The files for each memory block are created and > deleted explicitly using the mem_[create|delete]_simple_file macros. > > This patch creates attribute groups for the memory root files and files in > each memory block directory so that they are created and deleted implicitly > at subsys and device register and unregister time. > > This did necessitate moving the register_memory() updating it to set the > dev.groups field. > > Signed-off-by: Nathan Fontenot > > Please cc me on responses/comments. > > v2: refreshed the patch, previous version was corrupted. There is no difference > otherwise between this patch and the previous one sent out. Still looks broken. Tabs have been converted into spaces, and the top of the patch is whitespace padded to 80 characters. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx130.postini.com [74.125.245.130]) by kanga.kvack.org (Postfix) with SMTP id AEEEF6B0033 for ; Fri, 31 May 2013 17:45:59 -0400 (EDT) Received: from /spool/local by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 31 May 2013 15:45:58 -0600 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 732873E4006C for ; Fri, 31 May 2013 15:45:38 -0600 (MDT) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r4VLjsjE147878 for ; Fri, 31 May 2013 15:45:55 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r4VLjsj5023039 for ; Fri, 31 May 2013 15:45:54 -0600 Message-ID: <51A91A0F.4020408@linux.vnet.ibm.com> Date: Fri, 31 May 2013 14:45:51 -0700 From: Cody P Schafer MIME-Version: 1.0 Subject: Re: [PATCH v2] drivers/base: Use attribute groups to create sysfs memory files References: <51A908A3.7010006@linux.vnet.ibm.com> In-Reply-To: <51A908A3.7010006@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Nathan Fontenot Cc: Greg Kroah-Hartman , LKML , linux-mm On 05/31/2013 01:31 PM, Nathan Fontenot wrote: > Update the sysfs memory code to create/delete files at the time of device > and subsystem registration. > > The current code creates files in the root memory directory explicitly through > the use of init_* routines. The files for each memory block are created and > deleted explicitly using the mem_[create|delete]_simple_file macros. > > This patch creates attribute groups for the memory root files and files in > each memory block directory so that they are created and deleted implicitly > at subsys and device register and unregister time. > > This did necessitate moving the register_memory() updating it to set the > dev.groups field. > > Signed-off-by: Nathan Fontenot > > Please cc me on responses/comments. > > v2: refreshed the patch, previous version was corrupted. There is no difference > otherwise between this patch and the previous one sent out. Still looks broken. Tabs have been converted into spaces, and the top of the patch is whitespace padded to 80 characters. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org