[PATCH] drm/i915: Use memdup_user() instead of kmalloc() and copy_from_user()

2024-09-30 Thread Thorsten Blum
Use memdup_user() instead of kmalloc() followed by copy_from_user() to simplify set_context_image(). Fixes the following Coccinelle/coccicheck warning reported by memdup_user.cocci: WARNING opportunity for memdup_user Signed-off-by: Thorsten Blum --- drivers/gpu/drm/i915/gem

[PATCH v3] drm/i915: Explicitly cast divisor and use div_u64()

2024-08-12 Thread Thorsten Blum
preferred div_u64() function instead of the do_div() macro and remove the now unnecessary local variable tmp. Inline the if/else and invert the conditional expression. Reviewed-by: Jonathan Cavitt Signed-off-by: Thorsten Blum --- Changes in v2: - Use div_u64() instead of do_div() after feedback from

[PATCH v2] drm/i915: Explicitly cast divisor and use div_u64()

2024-08-05 Thread Thorsten Blum
preferred div_u64() function instead of the do_div() macro and remove the now unnecessary local variable tmp. Signed-off-by: Thorsten Blum --- Changes in v2: - Use div_u64() instead of do_div() after feedback from Ville Syrjälä - Link to v1: https://lore.kernel.org/linux-kernel/20240710074650.419902-2

Re: [PATCH] drm/i915: Explicitly cast divisor to fix Coccinelle warning

2024-07-10 Thread Thorsten Blum
On 10. Jul 2024, at 13:38, Ville Syrjälä wrote: > On Wed, Jul 10, 2024 at 09:46:51AM +0200, Thorsten Blum wrote: >> As the comment explains, the if check ensures that the divisor oa_period >> is a u32. Explicitly cast oa_period to u32 to remove the following >> Coccinel

[PATCH] drm/i915: Explicitly cast divisor to fix Coccinelle warning

2024-07-10 Thread Thorsten Blum
: Thorsten Blum --- drivers/gpu/drm/i915/i915_perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c index 0b1cd4c7a525..24722e758aaf 100644 --- a/drivers/gpu/drm/i915/i915_perf.c +++ b/drivers/gpu/drm/i915

[PATCH] treewide: Fix common grammar mistake "the the"

2024-04-12 Thread Thorsten Blum
Use `find . -type f -exec sed -i 's/\/the/g' {} +` to find all occurrences of "the the" and replace them with a single "the". Changes only comments and documentation - no code changes. Signed-off-by: Thorsten Blum --- Documentation/trace/histogram.rst

Re: [PATCH] treewide: Fix common grammar mistake "the the"

2024-04-12 Thread Thorsten Blum
On 11. Apr 2024, at 17:25, Dan Carpenter wrote: > > It's tricky to know which tree a patch like this would go through. The patch is based on the mainline tree. Should I have sent it directly to Linus then? I'm relatively new here and therefore only sent it to the corresponding mailing lists. T

[PATCH v2] treewide: Fix common grammar mistake "the the"

2024-04-12 Thread Thorsten Blum
Use `find . -type f -exec sed -i 's/\/the/g' {} +` to find all occurrences of "the the" and replace them with a single "the". In arch/arm/include/asm/unwind.h replace "the the" with "to the". Changes only comments and documentation - no code c