* [PATCH i-g-t] lib/i915: Fix pointer cast build issue
@ 2019-05-22 15:04 Tvrtko Ursulin
2019-05-22 15:08 ` [igt-dev] " Chris Wilson
2019-05-22 21:08 ` Andi Shyti
0 siblings, 2 replies; 3+ messages in thread
From: Tvrtko Ursulin @ 2019-05-22 15:04 UTC (permalink / raw)
To: igt-dev; +Cc: Intel-gfx
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Use from_user_pointer when casting __u64 to a pointer.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Andi Shyti <andi.shyti@intel.com>
---
lib/i915/gem_engine_topology.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
index dd26fae00853..7ca3616687b9 100644
--- a/lib/i915/gem_engine_topology.c
+++ b/lib/i915/gem_engine_topology.c
@@ -81,7 +81,7 @@ static void ctx_map_engines(int fd, struct intel_engine_data *ed,
struct drm_i915_gem_context_param *param)
{
struct i915_context_param_engines *engines =
- (struct i915_context_param_engines *) param->value;
+ from_user_pointer(param->value);
int i = 0;
for (typeof(engines->engines[0]) *p =
--
2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] lib/i915: Fix pointer cast build issue
2019-05-22 15:04 [PATCH i-g-t] lib/i915: Fix pointer cast build issue Tvrtko Ursulin
@ 2019-05-22 15:08 ` Chris Wilson
2019-05-22 21:08 ` Andi Shyti
1 sibling, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2019-05-22 15:08 UTC (permalink / raw)
To: Tvrtko Ursulin, igt-dev; +Cc: Intel-gfx
Quoting Tvrtko Ursulin (2019-05-22 16:04:13)
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Use from_user_pointer when casting __u64 to a pointer.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Andi Shyti <andi.shyti@intel.com>
> ---
> lib/i915/gem_engine_topology.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
> index dd26fae00853..7ca3616687b9 100644
> --- a/lib/i915/gem_engine_topology.c
> +++ b/lib/i915/gem_engine_topology.c
> @@ -81,7 +81,7 @@ static void ctx_map_engines(int fd, struct intel_engine_data *ed,
> struct drm_i915_gem_context_param *param)
> {
> struct i915_context_param_engines *engines =
> - (struct i915_context_param_engines *) param->value;
> + from_user_pointer(param->value);
Only a single tab indent required.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> int i = 0;
>
> for (typeof(engines->engines[0]) *p =
And struct i915_engine_class_instance was added to make this for() loop
nicer.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH i-g-t] lib/i915: Fix pointer cast build issue
2019-05-22 15:04 [PATCH i-g-t] lib/i915: Fix pointer cast build issue Tvrtko Ursulin
2019-05-22 15:08 ` [igt-dev] " Chris Wilson
@ 2019-05-22 21:08 ` Andi Shyti
1 sibling, 0 replies; 3+ messages in thread
From: Andi Shyti @ 2019-05-22 21:08 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: igt-dev, Intel-gfx
Hi Tvrtko,
On Wed, May 22, 2019 at 04:04:13PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Use from_user_pointer when casting __u64 to a pointer.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Andi Shyti <andi.shyti@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
Thanks,
Andi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-22 21:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-22 15:04 [PATCH i-g-t] lib/i915: Fix pointer cast build issue Tvrtko Ursulin
2019-05-22 15:08 ` [igt-dev] " Chris Wilson
2019-05-22 21:08 ` Andi Shyti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox