* [PATCH] xen/pvcalls: use WARN_ON(1) instead of __WARN()
@ 2017-07-21 16:17 ` Arnd Bergmann
0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2017-07-21 16:17 UTC (permalink / raw)
To: Boris Ostrovsky, Juergen Gross
Cc: Arnd Bergmann, Stefano Stabellini, xen-devel, linux-kernel
__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 <arnd@arndb.de>
---
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] xen/pvcalls: use WARN_ON(1) instead of __WARN()
@ 2017-07-21 16:17 ` Arnd Bergmann
0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2017-07-21 16:17 UTC (permalink / raw)
To: Boris Ostrovsky, Juergen Gross
Cc: xen-devel, Stefano Stabellini, linux-kernel, Arnd Bergmann
__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 <arnd@arndb.de>
---
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
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] xen/pvcalls: use WARN_ON(1) instead of __WARN()
2017-07-21 16:17 ` Arnd Bergmann
@ 2017-07-21 18:20 ` Boris Ostrovsky
-1 siblings, 0 replies; 8+ messages in thread
From: Boris Ostrovsky @ 2017-07-21 18:20 UTC (permalink / raw)
To: Arnd Bergmann, Juergen Gross; +Cc: Stefano Stabellini, xen-devel, linux-kernel
On 07/21/2017 12:17 PM, Arnd Bergmann wrote:
> __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 <arnd@arndb.de>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] xen/pvcalls: use WARN_ON(1) instead of __WARN()
@ 2017-07-21 18:20 ` Boris Ostrovsky
0 siblings, 0 replies; 8+ messages in thread
From: Boris Ostrovsky @ 2017-07-21 18:20 UTC (permalink / raw)
To: Arnd Bergmann, Juergen Gross; +Cc: xen-devel, Stefano Stabellini, linux-kernel
On 07/21/2017 12:17 PM, Arnd Bergmann wrote:
> __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 <arnd@arndb.de>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] xen/pvcalls: use WARN_ON(1) instead of __WARN()
2017-07-21 16:17 ` Arnd Bergmann
` (2 preceding siblings ...)
(?)
@ 2017-07-21 19:26 ` Stefano Stabellini
2017-08-16 18:36 ` Boris Ostrovsky
2017-08-16 18:36 ` Boris Ostrovsky
-1 siblings, 2 replies; 8+ messages in thread
From: Stefano Stabellini @ 2017-07-21 19:26 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Boris Ostrovsky, Juergen Gross, Stefano Stabellini, xen-devel,
linux-kernel
On Fri, 21 Jul 2017, Arnd Bergmann wrote:
> __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 <arnd@arndb.de>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> ---
> 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
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] xen/pvcalls: use WARN_ON(1) instead of __WARN()
2017-07-21 16:17 ` Arnd Bergmann
(?)
(?)
@ 2017-07-21 19:26 ` Stefano Stabellini
-1 siblings, 0 replies; 8+ messages in thread
From: Stefano Stabellini @ 2017-07-21 19:26 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Juergen Gross, xen-devel, Boris Ostrovsky, Stefano Stabellini,
linux-kernel
On Fri, 21 Jul 2017, Arnd Bergmann wrote:
> __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 <arnd@arndb.de>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> ---
> 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
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] xen/pvcalls: use WARN_ON(1) instead of __WARN()
2017-07-21 19:26 ` Stefano Stabellini
2017-08-16 18:36 ` Boris Ostrovsky
@ 2017-08-16 18:36 ` Boris Ostrovsky
1 sibling, 0 replies; 8+ messages in thread
From: Boris Ostrovsky @ 2017-08-16 18:36 UTC (permalink / raw)
To: Stefano Stabellini, Arnd Bergmann; +Cc: Juergen Gross, xen-devel, linux-kernel
On 07/21/2017 03:26 PM, Stefano Stabellini wrote:
> On Fri, 21 Jul 2017, Arnd Bergmann wrote:
>> __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 <arnd@arndb.de>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
>
Applied to for-linus-4.14
-boris
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] xen/pvcalls: use WARN_ON(1) instead of __WARN()
2017-07-21 19:26 ` Stefano Stabellini
@ 2017-08-16 18:36 ` Boris Ostrovsky
2017-08-16 18:36 ` Boris Ostrovsky
1 sibling, 0 replies; 8+ messages in thread
From: Boris Ostrovsky @ 2017-08-16 18:36 UTC (permalink / raw)
To: Stefano Stabellini, Arnd Bergmann; +Cc: Juergen Gross, xen-devel, linux-kernel
On 07/21/2017 03:26 PM, Stefano Stabellini wrote:
> On Fri, 21 Jul 2017, Arnd Bergmann wrote:
>> __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 <arnd@arndb.de>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
>
Applied to for-linus-4.14
-boris
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-08-16 18:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-21 16:17 [PATCH] xen/pvcalls: use WARN_ON(1) instead of __WARN() Arnd Bergmann
2017-07-21 16:17 ` Arnd Bergmann
2017-07-21 18:20 ` Boris Ostrovsky
2017-07-21 18:20 ` Boris Ostrovsky
2017-07-21 19:26 ` Stefano Stabellini
2017-07-21 19:26 ` Stefano Stabellini
2017-08-16 18:36 ` Boris Ostrovsky
2017-08-16 18:36 ` Boris Ostrovsky
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.