[PATCH 2/3] drm/i915: Add braces around the else block in clflush_write32()

Krzysztof Karas krzysztof.karas at intel.com
Wed Jul 16 13:47:19 UTC 2025


Hi Sebastian,

I think this patch could be dropped. The brackets do not improve
readability in this case, because we deal with only a single
line of code in the "else" block.

On 2025-07-16 at 09:37:18 +0000, Sebastian Brzezinka wrote:
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka at intel.com>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> index b2d940e89bbb..b2660445bb51 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> @@ -1382,8 +1382,9 @@ static void clflush_write32(u32 *addr, u32 value, unsigned int flushes)
>  		 */
>  		if (flushes & CLFLUSH_AFTER)
>  			drm_clflush_virt_range(addr, sizeof(*addr));
> -	} else
> +	} else {
>  		*addr = value;
> +	}
>  }
>  
>  static u64
> -- 
> 2.34.1
> 

---
Best Regards,
Krzysztof


More information about the Intel-gfx mailing list