File: fwctrl-fix-reg-status-typo.patch

package info (click to toggle)
mstflint 4.31.0%2B1-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 37,200 kB
  • sloc: ansic: 205,509; cpp: 103,810; ada: 15,143; sh: 11,406; python: 8,039; makefile: 1,413
file content (45 lines) | stat: -rw-r--r-- 1,906 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 8daed740c0ee4a04d0e5bbb7d135fbafe26ac687 Mon Sep 17 00:00:00 2001
From: Til Kaiser <mail@tk154.de>
Date: Fri, 7 Feb 2025 14:42:25 +0100
Subject: [PATCH] fwctrl: fix reg status typo

There is the following build error:

fwctrl.c: In function 'fwctl_control_access_register':
fwctrl.c:197:66: error: incompatible type for argument 1 of 'm_err2str'
  197 |                       reg_id, cmd_status, *reg_status, m_err2str(status));
      |                                                                  ^~~~~~
      |                                                                  |
      |                                                                  void *
../include/mtcr_ul/fwctrl_ioctl.h:47:81: note: in definition of macro 'FWCTL_DEBUG_PRINT'
   47 |         printf("%s: %s %d: " format, FWCTL_ENV_VAR_DEBUG, __func__, __LINE__, ##arg); \
      |                                                                                 ^~~
In file included from fwctrl.c:43:
../include/mtcr_ul/mtcr.h:173:30: note: expected 'MError' but argument is of type 'void *'
  173 | const char* m_err2str(MError status);
      |                       ~~~~~~~^~~~~~

Looking at the format string, this seems to be just a typo,
so fix that to the correct variable name.

Signed-off-by: Til Kaiser <mail@tk154.de>
---
 mtcr_ul/fwctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mtcr_ul/fwctrl.c b/mtcr_ul/fwctrl.c
index 90da0b54..a49e6c80 100644
--- a/mtcr_ul/fwctrl.c
+++ b/mtcr_ul/fwctrl.c
@@ -194,7 +194,7 @@ int fwctl_control_access_register(int    fd,
     }
 
     FWCTL_DEBUG_PRINT(mf, "register id = 0x%x, command status = 0x%x, reg status code: 0x%x, reg status: %s\n",
-                      reg_id, cmd_status, *reg_status, m_err2str(status));
+                      reg_id, cmd_status, *reg_status, m_err2str(*reg_status));
 out:
     free(out);
     free(in);
-- 
2.47.2