All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: fix compare_const_fl.cocci warnings
@ 2016-04-15  7:15 ` Julia Lawall
  0 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2016-04-15  7:15 UTC (permalink / raw)
  To: Dave Airlie
  Cc: kbuild-all, Alex Deucher, Christian König, dri-devel, linux-kernel

Move constants to the right of binary operators.

Generated by: scripts/coccinelle/misc/compare_const_fl.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

Could be nice to put the thing being tested first.

 amdgpu_grph_object_id_helpers.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_grph_object_id_helpers.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_grph_object_id_helpers.c
@@ -169,11 +169,11 @@ struct graphics_object_id amdgpu_object_
 	struct graphics_object_id go_id = { 0 };
 
 	type = object_type_from_bios_object_id(bios_object_id);
-	if (OBJECT_TYPE_UNKNOWN == type)
+	if (type == OBJECT_TYPE_UNKNOWN)
 		return go_id;
 
 	enum_id = enum_id_from_bios_object_id(bios_object_id);
-	if (ENUM_ID_UNKNOWN == enum_id)
+	if (enum_id == ENUM_ID_UNKNOWN)
 		return go_id;
 
 	go_id = display_graphics_object_id_init(

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-04-15 15:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-15  7:15 [PATCH] drm/amdgpu: fix compare_const_fl.cocci warnings Julia Lawall
2016-04-15  7:15 ` Julia Lawall
2016-04-15  8:46 ` Christian König
2016-04-15  8:46   ` Christian König
2016-04-15 14:20   ` Julia Lawall
2016-04-15 14:20     ` Julia Lawall
2016-04-15 15:14     ` Emil Velikov
2016-04-15 15:14       ` Emil Velikov
2016-04-15 15:50     ` Joe Perches
2016-04-15 15:50       ` Joe Perches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.