From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755407AbcKOEaP (ORCPT ); Mon, 14 Nov 2016 23:30:15 -0500 Received: from quartz.orcorp.ca ([184.70.90.242]:38530 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750766AbcKOEaN (ORCPT ); Mon, 14 Nov 2016 23:30:13 -0500 Date: Mon, 14 Nov 2016 21:30:01 -0700 From: Jason Gunthorpe To: Jarkko Sakkinen Cc: tpmdd-devel@lists.sourceforge.net, linux-security-module@vger.kernel.org, Peter Huewe , Marcel Selhorst , Christophe Ricard , open list Subject: Re: [PATCH] tpm: drop chip->is_open and chip->duration_adjusted Message-ID: <20161115043001.GA22482@obsidianresearch.com> References: <20161114234500.24839-1-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161114234500.24839-1-jarkko.sakkinen@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 14, 2016 at 03:44:58PM -0800, Jarkko Sakkinen wrote: > Use atomic bitops for chip->flags so that we do not need chip->is_open > and chip->duration_adjusted anymore. I don't know if it s a really great idea to use atomic bit ops for things that do not need to be atomic.. It makes the locking scheme less clear. is open is genuinely different since it relies on the atomic for correctness. Merging is_duration makes lots of sense though Jason