Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753748AbdGUQTO (ORCPT ); Fri, 21 Jul 2017 12:19:14 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:59940 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751996AbdGUQTN (ORCPT ); Fri, 21 Jul 2017 12:19:13 -0400 From: Arnd Bergmann To: Boris Ostrovsky , Juergen Gross Cc: Arnd Bergmann , Stefano Stabellini , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: [PATCH] xen/pvcalls: use WARN_ON(1) instead of __WARN() Date: Fri, 21 Jul 2017 18:17:45 +0200 Message-Id: <20170721161757.3336844-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:pFNPyAYqHd3iKm4ckWeqPI+xDSODDovZLoqKWi1gs1Rm7L2Vp5g KIKejZ78OEY6xVzFM6H+WZC1d/NS0+NRPP8EFB4W2gn3emEubLJ312it5fQESovtW+m7EDY 9ThVAx6zMHP8lHN4wawfcLHfVBo1z1VYa2coKa7tW9hR3VmAE8qiVmfnK7AZfEMDLgpcwnG B3pasJGSClCIe9RyajaKw== X-UI-Out-Filterresults: notjunk:1;V01:K0:jJuRVwtim9A=:n3ZBosmpCKybNep0LyJXQs rvkkhdMx5s784c3mO08p5EafECdOkac3I7pNAIf5R4U8AEZSANBXf3BZYgns7yqBZNiJ7oN3S ie0pewkjP5lVJ9rZu9bbe7s02QdDKrBiC9IuuL4AWw9OvAyu5iVHQ2uJvZlXORo9ZSG6irB+z l7Jn6YGRZfEuaqZZ9b0LUsNrJ2wWNTVlg/5j8PFg0TtX89b8Tu2I3w82Cv8GTrfebatrUCwOI X27suIIH2pERtRsfe96SQUqpvr57QRZQ68+A+eaMz0HBu3UF9Aunt8VoZgIHYXWyoDExGpatg OyINkIhbJ0t+E2jLHdW9DooxiQHTkvsZrj94uA7sQbJG+KMrb4uAYk+A9PhbKnu2zVNh/lEYR uimNcw3bOKVFzCAMA09+qM2E8GWjRVQEhNHo5N8gBplEVBOUP02iVJeMR3DM7/NsUGuWManWM tQSpdailT5rrwNzyOfmmktJWL03IQIKVeHjWYzyHc3hf0hOsMkmCTvJ+62WQpxMh93ALZYu0M BQNrHOTGmj00srb3q8UkRTjQhUiuvq+6iBvp8A8T+z9RtkzbS8FuaB6EEpIivmMDjvUKrgybm 0C73JQ49rcdNepAdngf247sxBAQ2X/ZvHqYwdRwFwfCY8IaemD01gRjtbi0qDCQNuwjmI5M+I xRxd737iWOWS6WpwPlAYteJcEDL9CffOjAaUyLa2DugNV2Q2u1E+/L1+LXj3Pf1sz/DNL2Jsk +TuiCR7nNYxZmS0gWyqR/x8GYNHnDrbJkHCuGg== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1827 Lines: 64 __WARN() is an internal helper that is only available on some architectures, but causes a build error e.g. on ARM64 in some configurations: drivers/xen/pvcalls-back.c: In function 'set_backend_state': drivers/xen/pvcalls-back.c:1097:5: error: implicit declaration of function '__WARN' [-Werror=implicit-function-declaration] Unfortunately, there is no equivalent of BUG() that takes no arguments, but WARN_ON(1) is commonly used in other drivers and works on all configurations. Fixes: 7160378206b2 ("xen/pvcalls: xenbus state handling") Signed-off-by: Arnd Bergmann --- drivers/xen/pvcalls-back.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/xen/pvcalls-back.c b/drivers/xen/pvcalls-back.c index d6c4c4aecb41..00c1a2344330 100644 --- a/drivers/xen/pvcalls-back.c +++ b/drivers/xen/pvcalls-back.c @@ -1094,7 +1094,7 @@ static void set_backend_state(struct xenbus_device *dev, xenbus_switch_state(dev, XenbusStateClosing); break; default: - __WARN(); + WARN_ON(1); } break; case XenbusStateInitWait: @@ -1109,7 +1109,7 @@ static void set_backend_state(struct xenbus_device *dev, xenbus_switch_state(dev, XenbusStateClosing); break; default: - __WARN(); + WARN_ON(1); } break; case XenbusStateConnected: @@ -1123,7 +1123,7 @@ static void set_backend_state(struct xenbus_device *dev, xenbus_switch_state(dev, XenbusStateClosing); break; default: - __WARN(); + WARN_ON(1); } break; case XenbusStateClosing: @@ -1134,11 +1134,11 @@ static void set_backend_state(struct xenbus_device *dev, xenbus_switch_state(dev, XenbusStateClosed); break; default: - __WARN(); + WARN_ON(1); } break; default: - __WARN(); + WARN_ON(1); } } } -- 2.9.0