Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/radeon: remove volatile qualifier

There doesn't seem to be any need to have 'ib' volatile, the code is
not even consistent with it and some places already miss it. As it is
now it's just making gcc produce worse code. If there are special
requirements for that memory, then proper primitives like memory
barriers or accessor functions should be used, but it doesn't look
like that is needed here.
While at it, change the type to match the one in radeon_ib structure.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Grazvydas Ignotas and committed by
Alex Deucher
1c5dc335 7874d390

+3 -3
+3 -3
drivers/gpu/drm/radeon/evergreen_cs.c
··· 447 447 * command stream. 448 448 */ 449 449 if (!surf.mode) { 450 - volatile u32 *ib = p->ib.ptr; 450 + uint32_t *ib = p->ib.ptr; 451 451 unsigned long tmp, nby, bsize, size, min = 0; 452 452 453 453 /* find the height the ddx wants */ ··· 1773 1773 { 1774 1774 struct radeon_bo_list *reloc; 1775 1775 struct evergreen_cs_track *track; 1776 - volatile u32 *ib; 1776 + uint32_t *ib; 1777 1777 unsigned idx; 1778 1778 unsigned i; 1779 1779 unsigned start_reg, end_reg, reg; ··· 2747 2747 struct radeon_cs_chunk *ib_chunk = p->chunk_ib; 2748 2748 struct radeon_bo_list *src_reloc, *dst_reloc, *dst2_reloc; 2749 2749 u32 header, cmd, count, sub_cmd; 2750 - volatile u32 *ib = p->ib.ptr; 2750 + uint32_t *ib = p->ib.ptr; 2751 2751 u32 idx; 2752 2752 u64 src_offset, dst_offset, dst2_offset; 2753 2753 int r;