Skip to content

Commit b7935e5

Browse files
cgrogregkh
authored andcommitted
staging: most: core: fix logging messages
This patch fixes the module's logging messages. Signed-off-by: Christian Gromm <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d693e90 commit b7935e5

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

drivers/staging/most/core.c

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static void flush_channel_fifos(struct most_channel *c)
143143
spin_unlock_irqrestore(&c->fifo_lock, hf_flags);
144144

145145
if (unlikely((!list_empty(&c->fifo) || !list_empty(&c->halt_fifo))))
146-
dev_warn(&c->dev, "fifo | trash fifo not empty\n");
146+
dev_warn(&c->dev, "Channel or trash fifo not empty\n");
147147
}
148148

149149
/**
@@ -629,7 +629,7 @@ int most_set_cfg_datatype(char *mdev, char *mdev_ch, char *buf)
629629
}
630630

631631
if (i == ARRAY_SIZE(ch_data_type))
632-
dev_warn(&c->dev, "invalid attribute settings\n");
632+
dev_warn(&c->dev, "Invalid attribute settings\n");
633633
return 0;
634634
}
635635

@@ -799,7 +799,7 @@ static int hdm_enqueue_thread(void *data)
799799
mutex_unlock(&c->nq_mutex);
800800

801801
if (unlikely(ret)) {
802-
dev_err(&c->dev, "hdm enqueue failed\n");
802+
dev_err(&c->dev, "Buffer enqueue failed\n");
803803
nq_hdm_mbo(mbo);
804804
c->hdm_enqueue_task = NULL;
805805
return 0;
@@ -926,7 +926,7 @@ static int arm_mbo_chain(struct most_channel *c, int dir,
926926
void most_submit_mbo(struct mbo *mbo)
927927
{
928928
if (WARN_ONCE(!mbo || !mbo->context,
929-
"bad mbo or missing channel reference\n"))
929+
"Bad buffer or missing channel reference\n"))
930930
return;
931931

932932
nq_hdm_mbo(mbo);
@@ -945,8 +945,6 @@ static void most_write_completion(struct mbo *mbo)
945945
struct most_channel *c;
946946

947947
c = mbo->context;
948-
if (mbo->status == MBO_E_INVAL)
949-
dev_warn(&c->dev, "Tx MBO status: invalid\n");
950948
if (unlikely(c->is_poisoned || (mbo->status == MBO_E_CLOSE)))
951949
trash_mbo(mbo);
952950
else
@@ -1105,14 +1103,14 @@ int most_start_channel(struct most_interface *iface, int id,
11051103
goto out; /* already started by another component */
11061104

11071105
if (!try_module_get(iface->mod)) {
1108-
dev_err(&c->dev, "failed to acquire HDM lock\n");
1106+
dev_err(&c->dev, "Failed to acquire HDM lock\n");
11091107
mutex_unlock(&c->start_mutex);
11101108
return -ENOLCK;
11111109
}
11121110

11131111
c->cfg.extra_len = 0;
11141112
if (c->iface->configure(c->iface, c->channel_id, &c->cfg)) {
1115-
dev_err(&c->dev, "channel configuration failed. Go check settings...\n");
1113+
dev_err(&c->dev, "Channel configuration failed. Go check settings...\n");
11161114
ret = -EINVAL;
11171115
goto err_put_module;
11181116
}
@@ -1186,7 +1184,7 @@ int most_stop_channel(struct most_interface *iface, int id,
11861184

11871185
c->is_poisoned = true;
11881186
if (c->iface->poison_channel(c->iface, c->channel_id)) {
1189-
dev_err(&c->dev, "Cannot stop channel %d of mdev %s\n", c->channel_id,
1187+
dev_err(&c->dev, "Failed to stop channel %d of interface %s\n", c->channel_id,
11901188
c->iface->description);
11911189
mutex_unlock(&c->start_mutex);
11921190
return -EAGAIN;
@@ -1196,7 +1194,7 @@ int most_stop_channel(struct most_interface *iface, int id,
11961194

11971195
#ifdef CMPL_INTERRUPTIBLE
11981196
if (wait_for_completion_interruptible(&c->cleanup)) {
1199-
dev_err(&c->dev, "Interrupted while clean up ch %d\n", c->channel_id);
1197+
dev_err(&c->dev, "Interrupted while cleaning up channel %d\n", c->channel_id);
12001198
mutex_unlock(&c->start_mutex);
12011199
return -EINTR;
12021200
}
@@ -1293,7 +1291,7 @@ int most_register_interface(struct most_interface *iface)
12931291

12941292
id = ida_simple_get(&mdev_id, 0, 0, GFP_KERNEL);
12951293
if (id < 0) {
1296-
dev_err(iface->dev, "Failed to alloc mdev ID\n");
1294+
dev_err(iface->dev, "Failed to allocate device ID\n");
12971295
return id;
12981296
}
12991297

@@ -1310,7 +1308,7 @@ int most_register_interface(struct most_interface *iface)
13101308
iface->dev->groups = interface_attr_groups;
13111309
dev_set_drvdata(iface->dev, iface);
13121310
if (device_register(iface->dev)) {
1313-
dev_err(iface->dev, "registering iface->dev failed\n");
1311+
dev_err(iface->dev, "Failed to register interface device\n");
13141312
kfree(iface->p);
13151313
put_device(iface->dev);
13161314
ida_simple_remove(&mdev_id, id);
@@ -1354,7 +1352,7 @@ int most_register_interface(struct most_interface *iface)
13541352
mutex_init(&c->nq_mutex);
13551353
list_add_tail(&c->list, &iface->p->channel_list);
13561354
if (device_register(&c->dev)) {
1357-
dev_err(&c->dev, "registering c->dev failed\n");
1355+
dev_err(&c->dev, "Failed to register channel device\n");
13581356
goto err_free_most_channel;
13591357
}
13601358
}
@@ -1463,12 +1461,12 @@ static int __init most_init(void)
14631461

14641462
err = bus_register(&mostbus);
14651463
if (err) {
1466-
pr_err("Cannot register most bus\n");
1464+
pr_err("Failed to register most bus\n");
14671465
return err;
14681466
}
14691467
err = driver_register(&mostbus_driver);
14701468
if (err) {
1471-
pr_err("Cannot register core driver\n");
1469+
pr_err("Failed to register core driver\n");
14721470
goto err_unregister_bus;
14731471
}
14741472
configfs_init();

0 commit comments

Comments
 (0)