All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tpm: fix a sparse error in tpm-interface.c
@ 2017-01-31 18:07 ` Jarkko Sakkinen
  0 siblings, 0 replies; 6+ messages in thread
From: Jarkko Sakkinen @ 2017-01-31 18:07 UTC (permalink / raw)
  To: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: open list, linux-security-module-u79uwXL29TY76Z2rM5mHXA

drivers/char/tpm//tpm-interface.c:492:42: warning: bad assignment (-=)
to restricted __be32

Fixes: 0883743825e3 ("TPM: sysfs functions consolidation")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
 drivers/char/tpm/tpm-interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index 423938e..746bc54 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -489,7 +489,7 @@ ssize_t tpm_getcap(struct tpm_chip *chip, u32 subcap_id, cap_t *cap,
 		tpm_cmd.params.getcap_in.cap = cpu_to_be32(subcap_id);
 		/*subcap field not necessary */
 		tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(0);
-		tpm_cmd.header.in.length -= cpu_to_be32(sizeof(__be32));
+		tpm_cmd.header.in.length = cpu_to_be32(18);
 	} else {
 		if (subcap_id == TPM_CAP_FLAG_PERM ||
 		    subcap_id == TPM_CAP_FLAG_VOL)
-- 
2.9.3


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-31 20:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-31 18:07 [PATCH] tpm: fix a sparse error in tpm-interface.c Jarkko Sakkinen
2017-01-31 18:07 ` Jarkko Sakkinen
     [not found] ` <20170131180742.28460-1-jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-01-31 19:10   ` James Bottomley
2017-01-31 19:10     ` [tpmdd-devel] " James Bottomley
     [not found]     ` <1485889841.3199.57.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2017-01-31 20:52       ` Jarkko Sakkinen
2017-01-31 20:52         ` [tpmdd-devel] " Jarkko Sakkinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.