Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752939Ab3DKI73 (ORCPT ); Thu, 11 Apr 2013 04:59:29 -0400 Received: from eu1sys200aog111.obsmtp.com ([207.126.144.131]:38731 "EHLO eu1sys200aog111.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750731Ab3DKI70 convert rfc822-to-8bit (ORCPT ); Thu, 11 Apr 2013 04:59:26 -0400 From: Mathias LEBLANC To: =?iso-8859-1?Q?Peter_H=FCwe?= , "tpmdd-devel@lists.sourceforge.net" , Kent Yoder , Jean-Luc BLANC Cc: "linux-kernel@vger.kernel.org" , Mathias leblanc Date: Thu, 11 Apr 2013 10:58:59 +0200 Subject: RE: [tpmdd-devel] [PATCH 1/1] TPM: STMicroelectronics st33 driver SPI Thread-Topic: [tpmdd-devel] [PATCH 1/1] TPM: STMicroelectronics st33 driver SPI Thread-Index: Ac42KheOphqL4f6pQQWmlkk6umNbHwAZ/ORA Message-ID: <35286B1AE75A7C47BFF0870081A31B4B45A568E70B@SAFEX1MAIL4.st.com> References: <1365518562-3678-1-git-send-email-mathias.leblanc@st.com> <201304102232.06682.PeterHuewe@gmx.de> In-Reply-To: <201304102232.06682.PeterHuewe@gmx.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7781 Lines: 148 Hi Peter, Yes, you have right, these error are generated by #ifndef __STM_ST33_TPM_SPI_H__ Just remove it and the #endif next the structure. Did you have these warning when you have run checkpatch script? Thanks, Mathias -----Original Message----- From: Peter H?we [mailto:PeterHuewe@gmx.de] Sent: 10 April, 2013 22:32 To: tpmdd-devel@lists.sourceforge.net; Mathias LEBLANC; Kent Yoder; Jean-Luc BLANC Cc: linux-kernel@vger.kernel.org; Mathias leblanc Subject: Re: [tpmdd-devel] [PATCH 1/1] TPM: STMicroelectronics st33 driver SPI Hi Matthias, Am Dienstag, 9. April 2013, 16:42:42 schrieb Matthias Leblanc: > From: Mathias leblanc > > * STMicroelectronics version 1.2.0, Copyright (C) 2010 > * STMicroelectronics comes with ABSOLUTELY NO WARRANTY. > * This is free software, and you are welcome to redistribute it > * under certain conditions. > > This is the driver for TPM chip from ST Microelectronics. > > If you have a TPM security chip from STMicroelectronics working with > an SPI, in menuconfig or .config choose the tpm driver on device --> > tpm and activate the protocol of your choice before compiling the > kernel. > The driver will be accessible from within Linux. > > Tested on linux x86/x64 and beagleboard REV B & XM REV C > > Signed-off-by: Mathias Leblanc fails to compile for me. Steps to reproduce (on x86_64): make defconfig git reset --hard tpmdd/tpmdd-03-04-13 make defconfig git am /tmp/\[tpmdd-devel\]\ \[PATCH\ 1_1\]\ TPM_STMicroelectronics\ st33\ driver\ SPI.mbox make menuconfig -> enable spi, gpio, and the TPM make LANG=C make make[1]: Nothing to be done for `all'. make[1]: Nothing to be done for `relocs'. CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CALL scripts/checksyscalls.sh CHK include/generated/compile.h make[3]: `arch/x86/realmode/rm/realmode.bin' is up to date. LD [M] drivers/char/tpm/tpm_bios.o CC [M] drivers/char/tpm/tpm_spi_stm_st33.o drivers/char/tpm/tpm_spi_stm_st33.c: In function 'write8_reg': drivers/char/tpm/tpm_spi_stm_st33.c:115:33: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:118:27: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:121:28: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:149:32: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c: In function 'read8_reg': drivers/char/tpm/tpm_spi_stm_st33.c:188:33: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:191:27: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:195:28: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c: In function '_wait_for_interrupt_serirq_timeout': drivers/char/tpm/tpm_spi_stm_st33.c:323:15: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:325:35: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:326:32: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c: In function 'tpm_ioserirq_handler': drivers/char/tpm/tpm_spi_stm_st33.c:605:21: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c: In function 'evaluate_latency': drivers/char/tpm/tpm_spi_stm_st33.c:802:16: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c: In function 'tpm_st33_spi_probe': drivers/char/tpm/tpm_spi_stm_st33.c:864:15: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:867:19: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:871:15: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:874:19: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:889:35: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:892:31: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:895:15: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:896:19: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:904:33: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:909:35: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:915:46: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:921:4: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:959:15: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:964:36: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:967:26: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:970:26: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:973:19: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:974:22: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:975:16: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:978:19: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:979:22: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:980:16: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:983:15: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c: In function 'tpm_st33_spi_remove': drivers/char/tpm/tpm_spi_stm_st33.c:1004:22: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:1007:16: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:1009:16: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:1010:19: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:1011:13: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:1013:16: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:1014:19: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:1015:13: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c: In function 'tpm_st33_spi_pm_suspend': drivers/char/tpm/tpm_spi_stm_st33.c:1041:27: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:1044:33: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c: In function 'tpm_st33_spi_pm_resume': drivers/char/tpm/tpm_spi_stm_st33.c:1064:27: error: dereferencing pointer to incomplete type drivers/char/tpm/tpm_spi_stm_st33.c:1071:33: error: dereferencing pointer to incomplete type make[3]: *** [drivers/char/tpm/tpm_spi_stm_st33.o] Error 1 make[2]: *** [drivers/char/tpm] Error 2 make[1]: *** [drivers/char] Error 2 make: *** [drivers] Error 2 This is caused by your double inclusion guard in include/linux/spi/tpm_spi_stm_st33.h #ifndef __STM_ST33_TPM_SPI_H__ #define __STM_ST33_TPM_SPI_H__ #include #define TPM_ST33_SPI "st33zp24_spi" #ifndef __STM_ST33_TPM_SPI_H__ <------- the define was just a few lines before struct st33zp24_platform_data { Regards, Peter -- 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/