1 Oct
2020
1 Oct
'20
3:59 p.m.
On Wed, Sep 30, 2020 at 03:50:48PM -0700, Dave Ertman wrote:
+/* helper function to perform the flood test */ +static int sof_debug_ipc_flood_test(struct sof_client_dev *cdev, bool flood_duration_test,
unsigned long ipc_duration_ms, unsigned long ipc_count)
Again, some word wrapping would be nice.
The flood_duration_test parameter is boolean which is often a warning sign for uncler interfaces and...
- if (flood_duration_test) {
dev_dbg(dev, "IPC Flood test duration: %lums\n", ipc_duration_ms);
snprintf(ipc_client_data->buf, IPC_FLOOD_TEST_RESULT_LEN,
"IPC Flood test duration: %lums\n", ipc_duration_ms);
- }
...appears to only control this debug print which I'd never have guessed from the name.
- /* set test completion criterion */
- ret = flood_duration_test ? kstrtoul(string, 0, &ipc_duration_ms) :
kstrtoul(string, 0, &ipc_count);
- if (ret < 0)
goto out;
Please write normal conditional statements for legibility.