tpm: vtpm: constify vio_device_id
Subsystems (2)
PATCH 1/1 tpm: vtpm: constify vio_device_id
vio_device_id are not supposed to change at runtime. All functions working with vio_device_id provided by <asm/vio.h> work with const vio_device_id. So mark the non-const structs as const.
--- drivers/char/tpm/tpm_ibmvtpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/tpm/tpm_ibmvtpm.c +1 -1
@@ -32,7 +32,7 @@static const char tpm_ibmvtpm_driver_name[] ="tpm_ibmvtpm" ; -static struct vio_device_id tpm_ibmvtpm_device_table[] = { +static const struct vio_device_id tpm_ibmvtpm_device_table[] = { {"IBM,vtpm" ,"IBM,vtpm" }, {"" ,"" } };
Signature · 1 line
2.7.4
Quoted 5 lines · Arvind Yadav
vio_device_idare not supposed to change at runtime. All functions working withvio_device_idprovided by <asm/vio.h> work with constvio_device_id. So mark the non-const structs as const.Signed-off-by Arvind Yadav <[email protected]>
Quoted 15 lines
drivers/char/tpm/tpm_ibmvtpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/char/tpm/tpm_ibmvtpm.c +2
-1+++ b/drivers/char/tpm/tpm_ibmvtpm.c@@ -32,7 +32,7 @@static const char tpm_ibmvtpm_driver_name[] ="tpm_ibmvtpm" ; -static struct vio_device_id tpm_ibmvtpm_device_table[] = { +static const struct vio_device_id tpm_ibmvtpm_device_table[] = { {"IBM,vtpm" ,"IBM,vtpm" }, {"" ,"" } };
Michael Ellerman
reviewerQuoted 8 lines · Jason Gunthorpe
Quoted 5 lines · Arvind Yadav
vio_device_idare not supposed to change at runtime. All functions working withvio_device_idprovided by <asm/vio.h> work with constvio_device_id. So mark the non-const structs as const.Signed-off-by Arvind Yadav <[email protected]>Reviewed-by Jason Gunthorpe <[email protected]>
Thanks Jason.
Quoted 1 line
Quoted 1 line
drivers/char/tpm/tpm_ibmvtpm.c | 2 +-
Who merges changes for this driver? I assume it's Jarkko?
cheers
Quoted 3 lines · Michael Ellerman
Quoted 1 line
Quoted 1 line
drivers/char/tpm/tpm_ibmvtpm.c | 2 +-Who merges changes for this driver? I assume it's Jarkko?
Yes
Jason
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Jarkko Sakkinen
AppliedQuoted 9 lines · Jason Gunthorpe
Quoted 3 lines · Michael Ellerman
Quoted 1 line
Quoted 1 line
drivers/char/tpm/tpm_ibmvtpm.c | 2 +-Who merges changes for this driver? I assume it's Jarkko?
Yes
Jason
Applied.
/Jarkko
Michael Ellerman
reviewerQuoted 5 lines · Jarkko Sakkinen
Quoted 4 lines · Jason Gunthorpe
Quoted 2 lines · Michael Ellerman
Quoted 1 line
Quoted 1 line
drivers/char/tpm/tpm_ibmvtpm.c | 2 +-
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Who merges changes for this driver? I assume it's Jarkko?
Yes
Jason
Applied.
Thanks.
cheers
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot