Skip to contentSkip to conversation

tpm: fix regression caused by section type conflict of tpm_dev_release() in ppc builds

PATCH In review Peter Huewe 3 participants 4 messages May 27, 2013 – May 29, 2013 1 message not in the archive TPM device driver

lore
Share & tools
lore

Peter Huewe

author maintainer
#1 lore raw

PATCH 1/1 tpm: fix regression caused by section type conflict of tpm_dev_release() in ppc builds

In reply to a message not in the archive

The 8119807 commit reintroduced a regression
(error: __ksymtab_tpm_dev_release causes a section type conflict) that was fixed by commit cbb2ed4.
Fix it for good by adding the prototype to tpm.h so sparse doesn't
complain about it anymore.

---
James, can you please take this one directly and push it to next please? As it causes a build failure on ppc

 drivers/char/tpm/tpm.c | 2 +-
 drivers/char/tpm/tpm.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/char/tpm/tpm.c +1 -1
index 7c3b3dc..e3c974a 100644
@@ -1472,7 +1472,7 @@ EXPORT_SYMBOL_GPL(tpm_dev_vendor_release);
  * Once all references to platform device are down to 0,
  * release all allocated structures.
  */
-static void tpm_dev_release(struct device *dev)
+void tpm_dev_release(struct device *dev)
 {
 	struct tpm_chip *chip = dev_get_drvdata(dev);
 
drivers/char/tpm/tpm.h +1 -0
index 4334232..a7bfc17 100644
@@ -332,6 +332,7 @@ extern struct tpm_chip* tpm_register_hardware(struct device *,
 				 const struct tpm_vendor_specific *);
 extern int tpm_open(struct inode *, struct file *);
 extern int tpm_release(struct inode *, struct file *);
+extern void tpm_dev_release(struct device *dev);
 extern void tpm_dev_vendor_release(struct tpm_chip *);
 extern ssize_t tpm_write(struct file *, const char __user *, size_t,
 			 loff_t *);
Signature · 1 line
1.8.1.5
#2 lore raw
Quoted 35 lines · Peter Huewe

The 8119807 commit reintroduced a regression
(error: __ksymtab_tpm_dev_release causes a section type conflict) that was fixed by commit cbb2ed4.
Fix it for good by adding the prototype to tpm.h so sparse doesn't
complain about it anymore.

---
James, can you please take this one directly and push it to next please? As it causes a build failure on ppc

 drivers/char/tpm/tpm.c | 2 +-
 drivers/char/tpm/tpm.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/char/tpm/tpm.c +1 -1
index 7c3b3dc..e3c974a 100644
@@ -1472,7 +1472,7 @@ EXPORT_SYMBOL_GPL(tpm_dev_vendor_release);
  * Once all references to platform device are down to 0,
  * release all allocated structures.
  */
-static void tpm_dev_release(struct device *dev)
+void tpm_dev_release(struct device *dev)
 {
 	struct tpm_chip *chip = dev_get_drvdata(dev);
 
drivers/char/tpm/tpm.h +0 -0
index 4334232..a7bfc17 100644

drivers/char/tpm/tpm.h extern struct tpm_chip* tpm_register_hardware(struct device *, · line 338

Quoted 7 lines
drivers/char/tpm/tpm.h +1 -0
@@ -332,6 +332,7 @@ extern struct tpm_chip* tpm_register_hardware(struct device *,
 				 const struct tpm_vendor_specific *);
 extern int tpm_open(struct inode *, struct file *);
 extern int tpm_release(struct inode *, struct file *);
+extern void tpm_dev_release(struct device *dev);
 extern void tpm_dev_vendor_release(struct tpm_chip *);
 extern ssize_t tpm_write(struct file *, const char __user *, size_t,
 			 loff_t *);

Thanks, Peter. I should've mentioned that it didn't cause problems with x86 build, only with ppc.

author maintainer
#3 lore raw

[PULL] TPM: fix regression caused by section type conflict of tpm_dev_release() in ppc builds

In reply to Peter Huewe

Hi James,

The following changes since commit 5b88e270253db6d817e6a2f61909d1e53620e990:

maintainers: Remove Kent from maintainers

are available in the git repository at:

git://github.com/PeterHuewe/linux-tpmdd.git for-james

for you to fetch changes up to e2fa3d799b7471f00adae59ff36260ad8237929f:

tpm: fix regression caused by section type conflict of tpm_dev_release() in ppc builds

----------------------------------------------------------------
Peter Huewe (1):
tpm: fix regression caused by section type conflict of tpm_dev_release() in ppc builds

 drivers/char/tpm/tpm.c | 2 +-
 drivers/char/tpm/tpm.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Thanks,
Peter

#4 lore raw

Re: [PULL] TPM: fix regression caused by section type conflict of tpm_dev_release() in ppc builds

Quoted 6 lines · Peter H?we

Hi James,

The following changes since commit 5b88e270253db6d817e6a2f61909d1e53620e990:

maintainers: Remove Kent from maintainers

Quoted 7 lines

are available in the git repository at:

git://github.com/PeterHuewe/linux-tpmdd.git for-james

for you to fetch changes up to e2fa3d799b7471f00adae59ff36260ad8237929f:

tpm: fix regression caused by section type conflict of tpm_dev_release() in ppc builds

Pulled, thanks.

Signature · 2 lines
James Morris
<[email protected]>