From 6e9663dcc1b9106c5ace9a4a8e9c017e4b291a58 Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Mon, 4 May 2020 09:50:57 -0700 Subject: [PATCH] haven: ctrl: Enable setting trace class Clean up compiler warnings in haven control driver. Change-Id: I6246a108f2e30c812071df9e5c1adbce12853fbf Signed-off-by: Elliot Berman --- drivers/virt/haven/hh_ctrl.c | 6 +++++- include/linux/haven/hcall.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/virt/haven/hh_ctrl.c b/drivers/virt/haven/hh_ctrl.c index b13fd07f1830..9f27408301d4 100644 --- a/drivers/virt/haven/hh_ctrl.c +++ b/drivers/virt/haven/hh_ctrl.c @@ -3,7 +3,7 @@ * Copyright (c) 2020, The Linux Foundation. All rights reserved. */ -#define pr_fmt(fmt) "haven: " +#define pr_fmt(fmt) "haven: " fmt #include #include @@ -120,6 +120,7 @@ static int hh_dbgfs_trace_class_clear(void *data, u64 val) static int hh_dbgfs_trace_class_get(void *data, u64 *val) { + *val = 0; return hh_remap_error(hh_hcall_trace_update_class_flags(0, 0, val)); } @@ -211,3 +212,6 @@ static void __exit hh_ctrl_exit(void) hh_dbgfs_unregister(); } module_exit(hh_ctrl_exit); + +MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Haven Hypervisor Control Driver"); diff --git a/include/linux/haven/hcall.h b/include/linux/haven/hcall.h index 8843849b4607..2dc128f03021 100644 --- a/include/linux/haven/hcall.h +++ b/include/linux/haven/hcall.h @@ -294,7 +294,7 @@ static inline int hh_hcall_trace_update_class_flags( (struct hh_hcall_args){ set_flags, clear_flags, 0 }, &_resp); - if ((ret != 0) && new_flags) + if (!ret && new_flags) *new_flags = _resp.resp1; return ret;