Commit 4be4504e authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab
Browse files

media: atomisp: remove unused attribute argument from ia_css_frame_map()

ia_css_frame_map() has only one caller which passes a hardcoded 0
for the attribute argument, drop it.

Link: https://lore.kernel.org/linux-media/20220615205037.16549-15-hdegoede@redhat.com


Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent c0039ef3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1371,7 +1371,7 @@ static int atomisp_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf)


		ret = ia_css_frame_map(&handle, &frame_info,
		ret = ia_css_frame_map(&handle, &frame_info,
					    (void __user *)buf->m.userptr,
					    (void __user *)buf->m.userptr,
					    0, pgnr);
					    pgnr);
		if (ret) {
		if (ret) {
			dev_err(isp->dev, "Failed to map user buffer\n");
			dev_err(isp->dev, "Failed to map user buffer\n");
			goto error;
			goto error;
+0 −1
Original line number Original line Diff line number Diff line
@@ -295,7 +295,6 @@ int
ia_css_frame_map(struct ia_css_frame **frame,
ia_css_frame_map(struct ia_css_frame **frame,
		 const struct ia_css_frame_info *info,
		 const struct ia_css_frame_info *info,
		 const void __user *data,
		 const void __user *data,
		 u16 attribute,
		 unsigned int pgnr);
		 unsigned int pgnr);


/* @brief Unmap a CSS frame structure.
/* @brief Unmap a CSS frame structure.
+1 −4
Original line number Original line Diff line number Diff line
@@ -146,7 +146,6 @@ int ia_css_frame_allocate(struct ia_css_frame **frame,
int ia_css_frame_map(struct ia_css_frame **frame,
int ia_css_frame_map(struct ia_css_frame **frame,
				 const struct ia_css_frame_info *info,
				 const struct ia_css_frame_info *info,
				 const void __user *data,
				 const void __user *data,
				 u16 attribute,
				 unsigned int pgnr)
				 unsigned int pgnr)
{
{
	int err = 0;
	int err = 0;
@@ -172,9 +171,7 @@ int ia_css_frame_map(struct ia_css_frame **frame,
		goto error;
		goto error;
	}
	}


	me->data = hmm_alloc(me->data_bytes, HMM_BO_USER, 0, data,
	me->data = hmm_alloc(me->data_bytes, HMM_BO_USER, 0, data, 0);
			     attribute & ATOMISP_MAP_FLAG_CACHED);

	if (me->data == mmgr_NULL)
	if (me->data == mmgr_NULL)
		err = -EINVAL;
		err = -EINVAL;