Skip to content

Commit fd4a66c

Browse files
committed
ASoC: SOF: sof-client-dma-trace: Coding style cleanups
Reduce the number of long lines where it can be done in a clean way. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent b269552 commit fd4a66c

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

sound/soc/sof/sof-client-dma-trace.c

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ static int trace_filter_parse_entry(struct sof_client_dev *cdev, const char *lin
7474
if (!ret && read == len)
7575
return len;
7676

77-
ret = sscanf(line, " %d %x %d %d %n", &log_level, &uuid_id, &pipe_id, &comp_id, &read);
77+
ret = sscanf(line, " %d %x %d %d %n",
78+
&log_level, &uuid_id, &pipe_id, &comp_id, &read);
7879
if (ret != TRACE_FILTER_ELEMENTS_PER_ENTRY || read != len) {
7980
dev_err(priv->dev, "invalid trace filter entry '%s'\n", line);
8081
return -EINVAL;
@@ -135,12 +136,12 @@ static int trace_filter_parse(struct sof_client_dev *cdev, char *string,
135136
if (!*out)
136137
return -ENOMEM;
137138

138-
/* split input string by ';', and parse each entry separately in trace_filter_parse_entry */
139+
/* split input string by ';', and parse each entry separately */
139140
while ((entry = strsep(&string, entry_delimiter))) {
140141
entry_len = trace_filter_parse_entry(cdev, entry, *out, capacity, &cnt);
141142
if (entry_len < 0) {
142-
dev_err(priv->dev, "%s failed for '%s', %d\n", __func__, entry,
143-
entry_len);
143+
dev_err(priv->dev, "%s failed for '%s', %d\n", __func__,
144+
entry, entry_len);
144145
return -EINVAL;
145146
}
146147
}
@@ -178,7 +179,8 @@ static int sof_ipc_trace_update_filter(struct sof_client_dev *cdev, int num_elem
178179
return ret ? ret : reply.error;
179180
}
180181

181-
static ssize_t sof_dfsentry_trace_filter_write(struct file *file, const char __user *from,
182+
static ssize_t sof_dfsentry_trace_filter_write(struct file *file,
183+
const char __user *from,
182184
size_t count, loff_t *ppos)
183185
{
184186
struct sof_client_dev *cdev = file->private_data;
@@ -194,8 +196,8 @@ static ssize_t sof_dfsentry_trace_filter_write(struct file *file, const char __u
194196
}
195197

196198
if (count > TRACE_FILTER_MAX_CONFIG_STRING_LENGTH) {
197-
dev_err(priv->dev, "%s too long input, %zu > %d\n", __func__, count,
198-
TRACE_FILTER_MAX_CONFIG_STRING_LENGTH);
199+
dev_err(priv->dev, "%s too long input, %zu > %d\n", __func__,
200+
count, TRACE_FILTER_MAX_CONFIG_STRING_LENGTH);
199201
return -EINVAL;
200202
}
201203

@@ -236,8 +238,8 @@ static const struct file_operations sof_dtrace_filter_fops = {
236238
.owner = THIS_MODULE,
237239
};
238240

239-
static size_t sof_trace_avail(struct sof_client_dev *cdev,
240-
loff_t pos, size_t buffer_size)
241+
static size_t sof_trace_avail(struct sof_client_dev *cdev, loff_t pos,
242+
size_t buffer_size)
241243
{
242244
struct sof_dtrace_priv *priv = cdev->data;
243245
loff_t host_offset = READ_ONCE(priv->host_offset);
@@ -257,8 +259,8 @@ static size_t sof_trace_avail(struct sof_client_dev *cdev,
257259
return 0;
258260
}
259261

260-
static size_t sof_wait_trace_avail(struct sof_client_dev *cdev,
261-
loff_t pos, size_t buffer_size)
262+
static size_t sof_wait_trace_avail(struct sof_client_dev *cdev, loff_t pos,
263+
size_t buffer_size)
262264
{
263265
size_t ret = sof_trace_avail(cdev, pos, buffer_size);
264266
struct sof_dtrace_priv *priv = cdev->data;

0 commit comments

Comments
 (0)