Skip to content

Commit 0831e3f

Browse files
Iouri Tarassovchessturo
authored andcommitted
drivers: hv: dxgkrnl: Use tracing instead of dev_dbg
Signed-off-by: Iouri Tarassov <iourit@linux.microsoft.com> [kms: forward port to 6.6 from 6.1. No code changes made.] Signed-off-by: Kelsey Steele <kelseysteele@microsoft.com>
1 parent 17b01f5 commit 0831e3f

7 files changed

Lines changed: 25 additions & 22 deletions

File tree

drivers/hv/dxgkrnl/dxgadapter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
#include "dxgkrnl.h"
2020

21-
#undef pr_fmt
22-
#define pr_fmt(fmt) "dxgk: " fmt
21+
#undef dev_fmt
22+
#define dev_fmt(fmt) "dxgk: " fmt
2323

2424
int dxgadapter_set_vmbus(struct dxgadapter *adapter, struct hv_device *hdev)
2525
{

drivers/hv/dxgkrnl/dxgmodule.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
#undef pr_fmt
2525
#define pr_fmt(fmt) "dxgk: " fmt
2626

27+
#undef dev_fmt
28+
#define dev_fmt(fmt) "dxgk: " fmt
29+
2730
/*
2831
* Interface from dxgglobal
2932
*/
@@ -442,7 +445,7 @@ const struct file_operations dxgk_fops = {
442445
#define DXGK_VMBUS_HOSTCAPS_OFFSET (DXGK_VMBUS_VGPU_LUID_OFFSET + \
443446
sizeof(struct winluid))
444447

445-
/* The guest writes its capavilities to this adderss */
448+
/* The guest writes its capabilities to this address */
446449
#define DXGK_VMBUS_GUESTCAPS_OFFSET (DXGK_VMBUS_VERSION_OFFSET + \
447450
sizeof(u32))
448451

drivers/hv/dxgkrnl/dxgprocess.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
#include "dxgkrnl.h"
1515

16-
#undef pr_fmt
17-
#define pr_fmt(fmt) "dxgk: " fmt
16+
#undef dev_fmt
17+
#define dev_fmt(fmt) "dxgk: " fmt
1818

1919
/*
2020
* Creates a new dxgprocess object
@@ -248,7 +248,7 @@ struct dxgadapter *dxgprocess_adapter_by_handle(struct dxgprocess *process,
248248
HMGRENTRY_TYPE_DXGADAPTER,
249249
handle);
250250
if (adapter == NULL)
251-
DXG_ERR("adapter_by_handle failed %x", handle.v);
251+
DXG_TRACE("adapter_by_handle failed %x", handle.v);
252252
else if (kref_get_unless_zero(&adapter->adapter_kref) == 0) {
253253
DXG_ERR("failed to acquire adapter reference");
254254
adapter = NULL;

drivers/hv/dxgkrnl/dxgvmbus.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#include "dxgkrnl.h"
2323
#include "dxgvmbus.h"
2424

25-
#undef pr_fmt
26-
#define pr_fmt(fmt) "dxgk: " fmt
25+
#undef dev_fmt
26+
#define dev_fmt(fmt) "dxgk: " fmt
2727

2828
#define RING_BUFSIZE (256 * 1024)
2929

drivers/hv/dxgkrnl/hmgr.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
#include "dxgkrnl.h"
2020
#include "hmgr.h"
2121

22-
#undef pr_fmt
23-
#define pr_fmt(fmt) "dxgk: " fmt
22+
#undef dev_fmt
23+
#define dev_fmt(fmt) "dxgk: " fmt
2424

2525
const struct d3dkmthandle zerohandle;
2626

@@ -90,29 +90,29 @@ static bool is_handle_valid(struct hmgrtable *table, struct d3dkmthandle h,
9090
struct hmgrentry *entry;
9191

9292
if (index >= table->table_size) {
93-
DXG_ERR("Invalid index %x %d", h.v, index);
93+
DXG_TRACE("Invalid index %x %d", h.v, index);
9494
return false;
9595
}
9696

9797
entry = &table->entry_table[index];
9898
if (unique != entry->unique) {
99-
DXG_ERR("Invalid unique %x %d %d %d %p",
99+
DXG_TRACE("Invalid unique %x %d %d %d %p",
100100
h.v, unique, entry->unique, index, entry->object);
101101
return false;
102102
}
103103

104104
if (entry->destroyed && !ignore_destroyed) {
105-
DXG_ERR("Invalid destroyed value");
105+
DXG_TRACE("Invalid destroyed value");
106106
return false;
107107
}
108108

109109
if (entry->type == HMGRENTRY_TYPE_FREE) {
110-
DXG_ERR("Entry is freed %x %d", h.v, index);
110+
DXG_TRACE("Entry is freed %x %d", h.v, index);
111111
return false;
112112
}
113113

114114
if (t != HMGRENTRY_TYPE_FREE && t != entry->type) {
115-
DXG_ERR("type mismatch %x %d %d", h.v, t, entry->type);
115+
DXG_TRACE("type mismatch %x %d %d", h.v, t, entry->type);
116116
return false;
117117
}
118118

@@ -500,7 +500,7 @@ void *hmgrtable_get_object_by_type(struct hmgrtable *table,
500500
struct d3dkmthandle h)
501501
{
502502
if (!is_handle_valid(table, h, false, type)) {
503-
DXG_ERR("Invalid handle %x", h.v);
503+
DXG_TRACE("Invalid handle %x", h.v);
504504
return NULL;
505505
}
506506
return table->entry_table[get_index(h)].object;

drivers/hv/dxgkrnl/ioctl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#include "dxgvmbus.h"
2222
#include "dxgsyncfile.h"
2323

24-
#undef pr_fmt
25-
#define pr_fmt(fmt) "dxgk: " fmt
24+
#undef dev_fmt
25+
#define dev_fmt(fmt) "dxgk: " fmt
2626

2727
struct ioctl_desc {
2828
int (*ioctl_callback)(struct dxgprocess *p, void __user *arg);
@@ -556,7 +556,7 @@ dxgkio_enum_adapters3(struct dxgprocess *process, void *__user inargs)
556556

557557
cleanup:
558558

559-
DXG_TRACE("ioctl: %s %d", errorstr(ret), ret);
559+
DXG_TRACE("ioctl:%s %d", errorstr(ret), ret);
560560
return ret;
561561
}
562562

@@ -5242,7 +5242,7 @@ static int dxgk_ioctl(struct file *f, unsigned int p1, unsigned long p2)
52425242
int status;
52435243
struct dxgprocess *process;
52445244

5245-
if (code < 1 || code >= ARRAY_SIZE(ioctls)) {
5245+
if (code < 1 || code >= ARRAY_SIZE(ioctls)) {
52465246
DXG_ERR("bad ioctl %x %x %x %x",
52475247
code, _IOC_TYPE(p1), _IOC_SIZE(p1), _IOC_DIR(p1));
52485248
return -ENOTTY;

drivers/hv/dxgkrnl/misc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#include "dxgkrnl.h"
1919
#include "misc.h"
2020

21-
#undef pr_fmt
22-
#define pr_fmt(fmt) "dxgk: " fmt
21+
#undef dev_fmt
22+
#define dev_fmt(fmt) "dxgk: " fmt
2323

2424
u16 *wcsncpy(u16 *dest, const u16 *src, size_t n)
2525
{

0 commit comments

Comments
 (0)