Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1251614 > unrolled thread
| Started by | Andreas Ziegler <andreas.ziegler@fau.de> |
|---|---|
| First post | 2015-10-20 13:50 +0200 |
| Last post | 2015-10-23 15:10 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
Re: tpm, tpm_tis: fix tpm_tis ACPI detection issue with TPM 2.0 Andreas Ziegler <andreas.ziegler@fau.de> - 2015-10-20 13:50 +0200
Re: tpm, tpm_tis: fix tpm_tis ACPI detection issue with TPM 2.0 Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2015-10-20 17:00 +0200
Re: [tpmdd-devel] tpm, tpm_tis: fix tpm_tis ACPI detection issue with TPM 2.0 Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2015-10-21 18:00 +0200
Re: [tpmdd-devel] tpm, tpm_tis: fix tpm_tis ACPI detection issue with TPM 2.0 Valentin Rothberg <rothberg@cs.fau.de> - 2015-10-23 15:10 +0200
| From | Andreas Ziegler <andreas.ziegler@fau.de> |
|---|---|
| Date | 2015-10-20 13:50 +0200 |
| Subject | Re: tpm, tpm_tis: fix tpm_tis ACPI detection issue with TPM 2.0 |
| Message-ID | <qlDAv-2Db-21@gated-at.bofh.it> |
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? Regards, Andreas [0] https://cados.cs.fau.de -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2015-10-20 17:00 +0200 |
| Message-ID | <qlGyn-6Uz-21@gated-at.bofh.it> |
| In reply to | #1251614 |
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. > Regards, > > Andreas > > [0] https://cados.cs.fau.de /Jarkko -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> |
|---|---|
| Date | 2015-10-21 18:00 +0200 |
| Subject | Re: [tpmdd-devel] tpm, tpm_tis: fix tpm_tis ACPI detection issue with TPM 2.0 |
| Message-ID | <qm3XX-7C9-1@gated-at.bofh.it> |
| In reply to | #1251771 |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Valentin Rothberg <rothberg@cs.fau.de> |
|---|---|
| Date | 2015-10-23 15:10 +0200 |
| Subject | Re: [tpmdd-devel] tpm, tpm_tis: fix tpm_tis ACPI detection issue with TPM 2.0 |
| Message-ID | <qmKgx-2iZ-3@gated-at.bofh.it> |
| In reply to | #1252978 |
On Oct 21 '15 18:58, Jarkko Sakkinen wrote: > 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. Any option has certain benefits. In the current form, a reader might (falsely) assume that the block is configurable. However, if the constraints of ACPI or PNP change, the situation might look different. Best regards, Valentin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web