2018-09-11 13:44:02

by Gerd Hoffmann

[permalink] [raw]
Subject: [PATCH v2 05/13] udmabuf: constify udmabuf_create args

Reported-by: Laurent Pinchart <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
---
drivers/dma-buf/udmabuf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index e3560e840d..4167da8141 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf/udmabuf.c
@@ -116,8 +116,8 @@ static const struct dma_buf_ops udmabuf_ops = {
#define SEALS_WANTED (F_SEAL_SHRINK)
#define SEALS_DENIED (F_SEAL_WRITE)

-static long udmabuf_create(struct udmabuf_create_list *head,
- struct udmabuf_create_item *list)
+static long udmabuf_create(const struct udmabuf_create_list *head,
+ const const struct udmabuf_create_item *list)
{
DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
struct file *memfd = NULL;
--
2.9.3



2018-09-11 14:53:20

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH v2 05/13] udmabuf: constify udmabuf_create args

Hi Gerd,

Thank you for the patch.

On Tuesday, 11 September 2018 16:42:08 EEST Gerd Hoffmann wrote:
> Reported-by: Laurent Pinchart <[email protected]>
> Signed-off-by: Gerd Hoffmann <[email protected]>
> Reviewed-by: Laurent Pinchart <[email protected]>
> Acked-by: Daniel Vetter <[email protected]>
> ---
> drivers/dma-buf/udmabuf.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
> index e3560e840d..4167da8141 100644
> --- a/drivers/dma-buf/udmabuf.c
> +++ b/drivers/dma-buf/udmabuf.c
> @@ -116,8 +116,8 @@ static const struct dma_buf_ops udmabuf_ops = {
> #define SEALS_WANTED (F_SEAL_SHRINK)
> #define SEALS_DENIED (F_SEAL_WRITE)
>
> -static long udmabuf_create(struct udmabuf_create_list *head,
> - struct udmabuf_create_item *list)
> +static long udmabuf_create(const struct udmabuf_create_list *head,
> + const const struct udmabuf_create_item *list)

Even if you really want to make it const, a single const should suffice :-)

> {
> DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
> struct file *memfd = NULL;


--
Regards,

Laurent Pinchart