From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756137AbbDUTeA (ORCPT ); Tue, 21 Apr 2015 15:34:00 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:41100 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755841AbbDUTd6 (ORCPT ); Tue, 21 Apr 2015 15:33:58 -0400 Date: Tue, 21 Apr 2015 13:33:38 -0600 From: Jason Gunthorpe To: Jarkko Sakkinen Cc: peterhuewe@gmx.de, tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Marcel Selhorst , Greg Kroah-Hartman , Tejun Heo , Al Viro , Andrew Morton , Jianyu Zhan , "Eric W. Biederman" , Rasmus Villemoes , Andrzej Hajda , NeilBrown , Guenter Roeck , Simon Wunderlich Subject: Re: [PATCH v2] tpm: enable PPI for TPM 2.0 Message-ID: <20150421193338.GA31179@obsidianresearch.com> References: <1429641062-14421-1-git-send-email-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1429641062-14421-1-git-send-email-jarkko.sakkinen@linux.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.183 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 21, 2015 at 09:30:55PM +0300, Jarkko Sakkinen wrote: > Enabled PPI interface to the character device sysfs directory accessible > both for 1.x and 2.0 devices. > > The ppi group is moved from the platform device directory to the > character device directory. In order to retain backwards compatibility > with the 1.x devices, a symlink is created to the platform device > directory. > > Signed-off-by: Jarkko Sakkinen > Reviewed-by: Jason Gunthorpe Jumping the gun a bit, there :) But yes, the TPM bits still look OK to me. Ah, don't forget to update Documentation/ABI/testing/sysfs-driver-ppi > diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c > index 6acc964..749cea3 100644 > +++ b/fs/kernfs/dir.c > @@ -1225,6 +1225,7 @@ int kernfs_remove_by_name_ns(struct kernfs_node *parent, const char *name, > else > return -ENOENT; > } > +EXPORT_SYMBOL_GPL(kernfs_remove_by_name_ns); ?? I don't see this being called > +/** > + * sysfs_link_group_to_kobj - add a symlink to a kobject pointing to a group > + * @kobj: The kobject containing the group. > + * @target_kobj: The target kobject. > + * @target_name: Name of the target group. > + */ > +int sysfs_link_group_to_kobj(struct kobject *kobj, struct kobject *target_kobj, > + const char *target_name) Agree with Guenter, separate patch. I liked the signature I suggested earlier: sysfs_link_group_to_kobj(struct kobject *from_kobj, const char *from_name, struct kobject *target_kobj, const char *target_name) 'link_group' may be too specific a name, I think this would work to establish a link to any file in a sysfs directory? Which is good, we'll need that for future TPM patches that relocate the other sysfs files.. Jason