Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755034AbcCRIwO (ORCPT ); Fri, 18 Mar 2016 04:52:14 -0400 Received: from mga02.intel.com ([134.134.136.20]:41576 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751569AbcCRIwE (ORCPT ); Fri, 18 Mar 2016 04:52:04 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,354,1455004800"; d="scan'208";a="940025653" Date: Fri, 18 Mar 2016 10:52:00 +0200 From: Jarkko Sakkinen To: Stefan Berger Cc: tpmdd-devel@lists.sourceforge.net, jgunthorpe@obsidianresearch.com, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCH v8 08/10] tpm: Proxy driver for supporting multiple emulated TPMs Message-ID: <20160318085200.GA5604@intel.com> References: <1457909680-14085-1-git-send-email-stefanb@linux.vnet.ibm.com> <1457909680-14085-9-git-send-email-stefanb@linux.vnet.ibm.com> <20160316204244.GB23966@intel.com> <56EAED30.3040503@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56EAED30.3040503@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: 1383 Lines: 45 On Thu, Mar 17, 2016 at 01:45:20PM -0400, Stefan Berger wrote: > On 03/16/2016 04:42 PM, Jarkko Sakkinen wrote: > >On Sun, Mar 13, 2016 at 06:54:38PM -0400, Stefan Berger wrote: > >>+ > >>+/* above flags */ > >>+#define VTPM_PROXY_FLAG_TPM2 1 /* emulator is TPM 2 */ > >>+ > >>+/* all supported flags */ > >>+#define VTPM_PROXY_FLAGS_ALL (VTPM_PROXY_FLAG_TPM2) > >This can be moved inside the .c-file? > > I can move that. > > > > >>+ > >>+#define VTPM_PROXY_MAGIC 0xa1 > >>+ > >>+#define VTPM_PROXY_IOC_NEW_DEV _IOW(VTPM_PROXY_MAGIC, 0x00, \ > >>+ struct vtpm_proxy_new_dev) > >Could we simply replace these four lines with one line: > > > >#deifne VTPM_PROXY_IOC_NEW_DEV _IOW('t', 0x00, struct vtpm_proxy_new_dev); > > Does this make it better? > > > > >I changed the magic but does it matter? > > I would keep the magic at '0xa1'. The documentation is written to '0xa1' now > and seems to be good just as any other. OK. Works for me. Keep the ioctl definition as it is. Reviewed-by: Jarkko Sakkinen I can move the constant. You don't have to send a new patch version anymore. I start keeping this patch in my master but will not merge it to next before 4.6-rc5 so at the moment it would be scheduled for 4.7. Does this sound good for you? Further improvemnts should be sent as separate fixup patches. > Stefan /Jarkko