Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751407AbcCKKVP (ORCPT ); Fri, 11 Mar 2016 05:21:15 -0500 Received: from mga02.intel.com ([134.134.136.20]:21262 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750960AbcCKKVD (ORCPT ); Fri, 11 Mar 2016 05:21:03 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,320,1455004800"; d="scan'208";a="907894891" Date: Fri, 11 Mar 2016 12:20:58 +0200 From: Jarkko Sakkinen To: Stefan Berger Cc: tpmdd-devel@lists.sourceforge.net, jgunthorpe@obsidianresearch.com, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs Message-ID: <20160311102058.GB10270@intel.com> References: <1457545170-30120-1-git-send-email-stefanb@linux.vnet.ibm.com> <1457545170-30120-9-git-send-email-stefanb@linux.vnet.ibm.com> <20160310163915.GA4863@intel.com> <56E1AF9F.3010409@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56E1AF9F.3010409@linux.vnet.ibm.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 834 Lines: 27 On Thu, Mar 10, 2016 at 12:32:15PM -0500, Stefan Berger wrote: > On 03/10/2016 11:39 AM, Jarkko Sakkinen wrote: > >+/* above flags */ > >+#define VTPM_FLAG_TPM2 1 /* emulator is TPM 2 */ > >+ > >+/* all supported flags */ > >+#define VTPM_FLAGS_ALL (VTPM_FLAG_TPM2) > >+ > >+#define VTPM_TPM 0xa0 A better name would be VTPM_IOC_MAGIC. You should also update Documentation/ioctl/ioctl-number.txt. > >+ > >+#define VTPM_NEW_DEV _IOW(VTPM_TPM, 0x00, struct vtpm_new_dev) > >I'd rather use VTPM_IOC_NEW_DEV. > > What about the name of the structure ? vtpm_ioc_new_dev? If I look at other subsystems like drm the common practice is either name the ioctl as VTPM_NEW_DEV_IOCTL or VTPM_IOC_NEW_DEV and not have suffix or postfix in the parameter struct. I would just copy that convention here. > Stefan /Jarkko