Skip to contentSkip to conversation

drm/vmwgfx: remove redundant unlikely annotation

PATCH In review Chengguang Xu 2 participants 2 messages Feb 21, 2019 – Mar 1, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/vmwgfx: remove redundant unlikely annotation

unlikely has already included in IS_ERR(), so just remove redundant unlikely annotation.

---
 drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_context.c +1 -1
index 14bd760a62fd..694fabafaeee 100644
@@ -210,7 +210,7 @@ static int vmw_gb_context_init(struct vmw_private *dev_priv,
 		for (i = 0; i < SVGA_COTABLE_DX10_MAX; ++i) {
 			uctx->cotables[i] = vmw_cotable_alloc(dev_priv,
 							      &uctx->res, i);
-			if (unlikely(IS_ERR(uctx->cotables[i]))) {
+			if (IS_ERR(uctx->cotables[i])) {
 				ret = PTR_ERR(uctx->cotables[i]);
 				goto out_cotables;
 			}
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +2 -2
index 88b8178d4687..1cde07cf3067 100644
@@ -638,7 +638,7 @@ vmw_cmd_res_check(struct vmw_private *dev_priv,
 
 		res = vmw_user_resource_noref_lookup_handle
 			(dev_priv, sw_context->fp->tfile, *id_loc, converter);
-		if (unlikely(IS_ERR(res))) {
+		if (IS_ERR(res)) {
 			DRM_ERROR("Could not find or use resource 0x%08x.\n",
 				  (unsigned int) *id_loc);
 			return PTR_ERR(res);
@@ -3799,7 +3799,7 @@ static int vmw_execbuf_tie_context(struct vmw_private *dev_priv,
 	res = vmw_user_resource_noref_lookup_handle
 		(dev_priv, sw_context->fp->tfile, handle,
 		 user_context_converter);
-	if (unlikely(IS_ERR(res))) {
+	if (IS_ERR(res)) {
 		DRM_ERROR("Could not find or user DX context 0x%08x.\n",
 			  (unsigned) handle);
 		return PTR_ERR(res);
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw

Hi Chengguang,

Thanks for doing this. Will include this for vmwgfx-next

Quoted 50 lines · Chengguang Xu

unlikely has already included in IS_ERR(), so just remove redundant unlikely annotation.

---
 drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_context.c +1 -1
index 14bd760a62fd..694fabafaeee 100644
@@ -210,7 +210,7 @@ static int vmw_gb_context_init(struct vmw_private
 *dev_priv,
 		for (i = 0; i < SVGA_COTABLE_DX10_MAX; ++i) {
 			uctx->cotables[i] = vmw_cotable_alloc(dev_priv,
 							      &uctx-
 >res, i);
-			if (unlikely(IS_ERR(uctx->cotables[i]))) {
+			if (IS_ERR(uctx->cotables[i])) {
 				ret = PTR_ERR(uctx->cotables[i]);
drivers/gpu/drm/vmwgfx/vmwgfx_context.c +0 -0
 				goto out_cotables;
 			}
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +1 -1
index 88b8178d4687..1cde07cf3067 100644
@@ -638,7 +638,7 @@ vmw_cmd_res_check(struct vmw_private *dev_priv,
 
 		res = vmw_user_resource_noref_lookup_handle
 			(dev_priv, sw_context->fp->tfile, *id_loc,
 converter);
-		if (unlikely(IS_ERR(res))) {
+		if (IS_ERR(res)) {
 			DRM_ERROR("Could not find or use resource
 0x%08x.\n",
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +1 -1
 				  (unsigned int) *id_loc);
 			return PTR_ERR(res);
@@ -3799,7 +3799,7 @@ static int vmw_execbuf_tie_context(struct
 vmw_private *dev_priv,
 	res = vmw_user_resource_noref_lookup_handle
 		(dev_priv, sw_context->fp->tfile, handle,
 		 user_context_converter);
-	if (unlikely(IS_ERR(res))) {
+	if (IS_ERR(res)) {
 		DRM_ERROR("Could not find or user DX context
 0x%08x.\n",

drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c static int vmw_execbuf_tie_context(struct vmw_private *dev_priv, · line 3805

Quoted 2 lines
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +0 -0
 			  (unsigned) handle);
 		return PTR_ERR(res);

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel