* [PATCH] vfio: platform: constify amba_id
@ 2017-08-23 17:17 Arvind Yadav
2017-08-30 21:24 ` Alex Williamson
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-23 17:17 UTC (permalink / raw)
To: b.reynal, alex.williamson; +Cc: linux-kernel, kvm
amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/vfio/platform/vfio_amba.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vfio/platform/vfio_amba.c b/drivers/vfio/platform/vfio_amba.c
index 31372fb..62dfbfe 100644
--- a/drivers/vfio/platform/vfio_amba.c
+++ b/drivers/vfio/platform/vfio_amba.c
@@ -93,7 +93,7 @@ static int vfio_amba_remove(struct amba_device *adev)
return -EINVAL;
}
-static struct amba_id pl330_ids[] = {
+static const struct amba_id pl330_ids[] = {
{ 0, 0 },
};
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] vfio: platform: constify amba_id
2017-08-23 17:17 [PATCH] vfio: platform: constify amba_id Arvind Yadav
@ 2017-08-30 21:24 ` Alex Williamson
0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2017-08-30 21:24 UTC (permalink / raw)
To: Arvind Yadav; +Cc: b.reynal, linux-kernel, kvm
On Wed, 23 Aug 2017 22:47:15 +0530
Arvind Yadav <arvind.yadav.cs@gmail.com> wrote:
> amba_id are not supposed to change at runtime. All functions
> working with const amba_id. So mark the non-const structs as const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> drivers/vfio/platform/vfio_amba.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/vfio/platform/vfio_amba.c b/drivers/vfio/platform/vfio_amba.c
> index 31372fb..62dfbfe 100644
> --- a/drivers/vfio/platform/vfio_amba.c
> +++ b/drivers/vfio/platform/vfio_amba.c
> @@ -93,7 +93,7 @@ static int vfio_amba_remove(struct amba_device *adev)
> return -EINVAL;
> }
>
> -static struct amba_id pl330_ids[] = {
> +static const struct amba_id pl330_ids[] = {
> { 0, 0 },
> };
>
Applied to next branch for v4.14. Thanks,
Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-30 21:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-23 17:17 [PATCH] vfio: platform: constify amba_id Arvind Yadav
2017-08-30 21:24 ` Alex Williamson
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).