Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936682AbcCQRpb (ORCPT ); Thu, 17 Mar 2016 13:45:31 -0400 Received: from e35.co.us.ibm.com ([32.97.110.153]:33921 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935977AbcCQRp1 (ORCPT ); Thu, 17 Mar 2016 13:45:27 -0400 X-IBM-Helo: d03dlp01.boulder.ibm.com X-IBM-MailFrom: stefanb@linux.vnet.ibm.com X-IBM-RcptTo: linux-api@vger.kernel.org;linux-doc@vger.kernel.org;linux-kernel@vger.kernel.org;linux-security-module@vger.kernel.org Subject: Re: [PATCH v8 08/10] tpm: Proxy driver for supporting multiple emulated TPMs To: Jarkko Sakkinen 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> 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 From: Stefan Berger Message-ID: <56EAED30.3040503@linux.vnet.ibm.com> Date: Thu, 17 Mar 2016 13:45:20 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20160316204244.GB23966@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16031717-0013-0000-0000-00001E882AF2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 846 Lines: 31 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. Stefan