Re: [PATCH 01/12] drm/radeon: remove unecessary assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For the series:

Reviewed-by: Marek Olšák <maraeo@xxxxxxxxx>

Marek

On Thu, Jan 3, 2013 at 12:27 AM, Ilija Hadzic
<ihadzic@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> length_dw field was assigned twice. While at it, move user_ptr
> assignment together with all other assignments to p->chunks[i]
> structure to make the code more readable.
>
> Signed-off-by: Ilija Hadzic <ihadzic@xxxxxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/radeon/radeon_cs.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
> index 396baba0..4be64e0 100644
> --- a/drivers/gpu/drm/radeon/radeon_cs.c
> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
> @@ -203,7 +203,7 @@ int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data)
>                 p->chunks[i].length_dw = user_chunk.length_dw;
>                 p->chunks[i].kdata = NULL;
>                 p->chunks[i].chunk_id = user_chunk.chunk_id;
> -
> +               p->chunks[i].user_ptr = (void __user *)(unsigned long)user_chunk.chunk_data;
>                 if (p->chunks[i].chunk_id == RADEON_CHUNK_ID_RELOCS) {
>                         p->chunk_relocs_idx = i;
>                 }
> @@ -226,9 +226,6 @@ int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data)
>                                 return -EINVAL;
>                 }
>
> -               p->chunks[i].length_dw = user_chunk.length_dw;
> -               p->chunks[i].user_ptr = (void __user *)(unsigned long)user_chunk.chunk_data;
> -
>                 cdata = (uint32_t *)(unsigned long)user_chunk.chunk_data;
>                 if ((p->chunks[i].chunk_id == RADEON_CHUNK_ID_RELOCS) ||
>                     (p->chunks[i].chunk_id == RADEON_CHUNK_ID_FLAGS)) {
> --
> 1.7.12
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux