2020-08-19 09:13:06

by Olaf Hering

[permalink] [raw]
Subject: [PATCH v1] tools: hv: remove cast from hyperv_die_event

No need to cast a void pointer.

Signed-off-by: Olaf Hering <[email protected]>
---
drivers/hv/vmbus_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 910b6e90866c..187809977360 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -83,7 +83,7 @@ static int hyperv_panic_event(struct notifier_block *nb, unsigned long val,
static int hyperv_die_event(struct notifier_block *nb, unsigned long val,
void *args)
{
- struct die_args *die = (struct die_args *)args;
+ struct die_args *die = args;
struct pt_regs *regs = die->regs;

/* Don't notify Hyper-V if the die event is other than oops */


2020-08-19 11:31:47

by Wei Liu

[permalink] [raw]
Subject: Re: [PATCH v1] tools: hv: remove cast from hyperv_die_event

On Wed, Aug 19, 2020 at 11:05:09AM +0200, Olaf Hering wrote:
> No need to cast a void pointer.
>
> Signed-off-by: Olaf Hering <[email protected]>

Applied to hyperv-next.

I also changed "tools" to "drivers".

> ---
> drivers/hv/vmbus_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index 910b6e90866c..187809977360 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -83,7 +83,7 @@ static int hyperv_panic_event(struct notifier_block *nb, unsigned long val,
> static int hyperv_die_event(struct notifier_block *nb, unsigned long val,
> void *args)
> {
> - struct die_args *die = (struct die_args *)args;
> + struct die_args *die = args;
> struct pt_regs *regs = die->regs;
>
> /* Don't notify Hyper-V if the die event is other than oops */