From: Jarkko Sakkinen Subject: Re: [PATCH] tpm: use test_bit() to check TPM2 flag in eventlog and sysfs code Date: Tue, 22 Nov 2016 12:59:59 +0200 Message-ID: <20161122105959.fmotb46kgzgmyqsy@intel.com> References: <1479715431-11983-1-git-send-email-nayna@linux.vnet.ibm.com> <20161121195508.6urrvuhmlt2oo5d7@intel.com> <58340988.9000700@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <58340988.9000700-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Nayna Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: tpmdd-devel@lists.sourceforge.net On Tue, Nov 22, 2016 at 02:32:00PM +0530, Nayna wrote: > > > On 11/22/2016 01:25 AM, Jarkko Sakkinen wrote: > > On Mon, Nov 21, 2016 at 03:03:51AM -0500, Nayna Jain wrote: > > > There is change done to introduce atomic bitops to set and test > > > chip->flags. > > > This patch fixes tpm_bios_log_setup() and tpm_sysfs_add_device() > > > to use test_bit() to check for TPM_CHIP_FLAG_TPM2 flag. > > > > > > Signed-off-by: Nayna Jain > > > > I'm bit lost of the purpose of this patch. > > I was using tabrm branch which has changes related to using bitops for > chip->flags, but it was failing for TPM2 check in tpm_bios_log_setup() with > the existing way of checking. Replacing existing one with test_bit() check > makes it work. Same in case of tpm_sysfs_add_device(). Why didn't you just response to the thread with a review comment especially as the patch is not applied to the master branch? /Jarkko ------------------------------------------------------------------------------