* [PATCH] tpm: vtpm: constify vio_device_id
@ 2017-08-17 17:34 Arvind Yadav
2017-08-17 19:16 ` Jason Gunthorpe
0 siblings, 1 reply; 6+ messages in thread
From: Arvind Yadav @ 2017-08-17 17:34 UTC (permalink / raw)
To: ashleydlai, peterhuewe, tpmdd, jarkko.sakkinen, jgunthorpe
Cc: linux-kernel, linuxppc-dev, tpmdd-devel
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.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/char/tpm/tpm_ibmvtpm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c
index f01d083..d2ce46b 100644
--- a/drivers/char/tpm/tpm_ibmvtpm.c
+++ 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"},
{ "", "" }
};
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] tpm: vtpm: constify vio_device_id
2017-08-17 17:34 [PATCH] tpm: vtpm: constify vio_device_id Arvind Yadav
@ 2017-08-17 19:16 ` Jason Gunthorpe
2017-08-18 11:32 ` Michael Ellerman
0 siblings, 1 reply; 6+ messages in thread
From: Jason Gunthorpe @ 2017-08-17 19:16 UTC (permalink / raw)
To: Arvind Yadav
Cc: ashleydlai, peterhuewe, tpmdd, jarkko.sakkinen, linux-kernel,
linuxppc-dev, tpmdd-devel
On Thu, Aug 17, 2017 at 11:04:21PM +0530, Arvind Yadav wrote:
> 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.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> drivers/char/tpm/tpm_ibmvtpm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c
> index f01d083..d2ce46b 100644
> +++ 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"},
> { "", "" }
> };
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tpm: vtpm: constify vio_device_id
2017-08-17 19:16 ` Jason Gunthorpe
@ 2017-08-18 11:32 ` Michael Ellerman
[not found] ` <87ziaxp0v5.fsf-W0DJWXSxmBNbyGPkN3NxC2scP1bn1w/D@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2017-08-18 11:32 UTC (permalink / raw)
To: Jason Gunthorpe, Arvind Yadav
Cc: tpmdd, linux-kernel, jarkko.sakkinen, tpmdd-devel, ashleydlai,
peterhuewe, linuxppc-dev
Jason Gunthorpe <jgunthorpe@obsidianresearch.com> writes:
> On Thu, Aug 17, 2017 at 11:04:21PM +0530, Arvind Yadav wrote:
>> 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.
>>
>> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
>
> Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Thanks Jason.
>> drivers/char/tpm/tpm_ibmvtpm.c | 2 +-
Who merges changes for this driver? I assume it's Jarkko?
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-08-23 14:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-17 17:34 [PATCH] tpm: vtpm: constify vio_device_id Arvind Yadav
2017-08-17 19:16 ` Jason Gunthorpe
2017-08-18 11:32 ` Michael Ellerman
[not found] ` <87ziaxp0v5.fsf-W0DJWXSxmBNbyGPkN3NxC2scP1bn1w/D@public.gmane.org>
2017-08-18 20:31 ` Jason Gunthorpe
2017-08-19 17:21 ` Jarkko Sakkinen
[not found] ` <20170819172150.sta6erdmikpfkrgv-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-08-23 14:06 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).