From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755642AbbJUP6m (ORCPT ); Wed, 21 Oct 2015 11:58:42 -0400 Received: from mga02.intel.com ([134.134.136.20]:2488 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752449AbbJUP6k (ORCPT ); Wed, 21 Oct 2015 11:58:40 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,712,1437462000"; d="scan'208";a="585410612" Date: Wed, 21 Oct 2015 18:58:13 +0300 From: Jarkko Sakkinen To: Andreas Ziegler Cc: Paul Bolle , Valentin Rothberg , "linux-kernel@vger.kernel.org" , tpmdd-devel@lists.sourceforge.net Subject: Re: [tpmdd-devel] tpm, tpm_tis: fix tpm_tis ACPI detection issue with TPM 2.0 Message-ID: <20151021155813.GA10420@intel.com> References: <56262A2E.6040602@fau.de> <20151020145835.GA6186@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151020145835.GA6186@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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 Tue, Oct 20, 2015 at 05:58:35PM +0300, Jarkko Sakkinen wrote: > On Tue, Oct 20, 2015 at 01:49:02PM +0200, Andreas Ziegler wrote: > > Hi Jarkko, > > > > your patch "tpm, tpm_tis: fix tpm_tis ACPI detection issue with TPM 2.0" > > showed up as commit 399235dc6e95 in linux-next today (that is, > > next-20151020). I noticed it because we (a research group from > > Erlangen[0]) are running daily checks on linux-next. > > > > Your commit creates the following structure of #ifdef blocks in > > drivers/char/tpm/tpm_tis.c following line 1088: > > > > #ifdef CONFIG_ACPI > > ... > > #ifdef CONFIG_PNP > > ... > > #endif > > ... > > #endif > > > > Looking at the definition of CONFIG_ACPI at drivers/acpi/Kconfig, line > > 5, we see that ACPI unconditionally selects PNP, meaning that CONFIG_PNP > > is always enabled if CONFIG_ACPI has been enabled. > > Thus, the inner #ifdef statement can never evaluate to 'false' if the > > outer #ifdef evaluates to true (i.e., CONFIG_ACPI is enabled), and > > hence, the #ifdef is unnecessary. > > > > The same situation holds for the nested structure following line 1124, > > where the #ifdef CONFIG_PNP at line 1129 is unnecessary. > > > > Is this correct or did we miss something? > > Good catch. Shoud I send a separate fix for this? Thanks for pointing > this out. In all I would cases do a separate fix and do not fixup the original patchs because I wouldn't consider this a regression. The next question is: will it always be like this? Can I safely assume that ACPI will always select PNP unconditionally? This is so minor cosmetic glitch in the code that I'm getting second thoughts whether I should anything to this or not. /Jarkko