Skip to content

Commit 7d81256

Browse files
committed
tree: do not print function twice
nvme_msg() already prints out the function name, no need to specify it in the message itself. Signed-off-by: Hannes Reinecke <[email protected]>
1 parent 524941a commit 7d81256

1 file changed

Lines changed: 7 additions & 14 deletions

File tree

src/nvme/tree.c

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,12 +1258,10 @@ static nvme_ctrl_t nvme_ctrl_alloc(nvme_root_t r, nvme_subsystem_t s,
12581258
break;
12591259
if (!strcmp(c->name, name)) {
12601260
nvme_msg(r, LOG_DEBUG,
1261-
"%s: found existing ctrl %s\n",
1262-
__func__, c->name);
1261+
"found existing ctrl %s\n", c->name);
12631262
break;
12641263
}
1265-
nvme_msg(r, LOG_DEBUG, "%s: skipping ctrl %s\n",
1266-
__func__, c->name);
1264+
nvme_msg(r, LOG_DEBUG, "skipping ctrl %s\n", c->name);
12671265
p = c;
12681266
}
12691267
} while (c);
@@ -1274,8 +1272,7 @@ static nvme_ctrl_t nvme_ctrl_alloc(nvme_root_t r, nvme_subsystem_t s,
12741272
free(address);
12751273
if (!c) {
12761274
if (!p) {
1277-
nvme_msg(r, LOG_ERR, "%s: failed to lookup ctrl\n",
1278-
__func__);
1275+
nvme_msg(r, LOG_ERR, "failed to lookup ctrl\n");
12791276
errno = ENODEV;
12801277
} else
12811278
errno = ENOMEM;
@@ -1796,15 +1793,13 @@ static int nvme_ctrl_scan_namespace(nvme_root_t r, struct nvme_ctrl *c,
17961793
struct nvme_ns *n;
17971794

17981795
if (!c->s) {
1799-
nvme_msg(r, LOG_DEBUG, "%s: no subsystem for %s\n",
1800-
__func__, name);
1796+
nvme_msg(r, LOG_DEBUG, "no subsystem for %s\n", name);
18011797
errno = EINVAL;
18021798
return -1;
18031799
}
18041800
n = __nvme_scan_namespace(c->sysfs_dir, name);
18051801
if (!n) {
1806-
nvme_msg(r, LOG_DEBUG, "%s: failed to scan namespace %s\n",
1807-
__func__, name);
1802+
nvme_msg(r, LOG_DEBUG, "failed to scan namespace %s\n", name);
18081803
return -1;
18091804
}
18101805

@@ -1821,8 +1816,7 @@ static int nvme_subsystem_scan_namespace(nvme_root_t r, nvme_subsystem_t s,
18211816

18221817
n = __nvme_scan_namespace(s->sysfs_dir, name);
18231818
if (!n) {
1824-
nvme_msg(r, LOG_DEBUG, "%s: failed to scan namespace %s\n",
1825-
__func__, name);
1819+
nvme_msg(r, LOG_DEBUG, "failed to scan namespace %s\n", name);
18261820
return -1;
18271821
}
18281822

@@ -1844,8 +1838,7 @@ struct nvme_ns *nvme_subsystem_lookup_namespace(struct nvme_subsystem *s,
18441838
return NULL;
18451839
n = __nvme_scan_namespace(s->sysfs_dir, name);
18461840
if (!n) {
1847-
nvme_msg(r, LOG_DEBUG, "%s: failed to scan namespace %d\n",
1848-
__func__, nsid);
1841+
nvme_msg(r, LOG_DEBUG, "failed to scan namespace %d\n", nsid);
18491842
free(name);
18501843
return NULL;
18511844
}

0 commit comments

Comments
 (0)