Hi Mike,
On 24/07/2019 12:04, Mike Leach wrote:
HI Suzuki,
On Mon, 17 Jun 2019 at 12:26, Suzuki K Poulose suzuki.poulose@arm.com wrote:
Hi Mike,
On 05/06/2019 20:03, Mike Leach wrote:
Adds a user API to allow programming of CTI by trigger ID and channel number. This will take the channel and trigger ID supplied by the user and program the appropriate register values.
This patch looks fine to me. Some minor comments/suggestsions below.
+/* select a channel for the show_chan_xtrig function */ +static ssize_t show_chan_sel_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t size)
+{
unsigned long val;
struct cti_drvdata *drvdata = dev_get_drvdata(dev->parent);
if (kstrtoul(buf, 10, &val))
return -EINVAL;
if (val > (drvdata->config.nr_ctm_channels-1))
nit : missing space.
not sure where - checkpatch.pl normally gets annoyed about these things and it didn't trigger.
space before and after arithmetic operators, in this case '-'.
for (reg_idx = 0;
reg_idx < drvdata->config.nr_trig_max;
reg_idx++) {
if (chan_mask & cfg->ctiinen[reg_idx]) {
used += scnprintf(buf+used, buf_sz-used, "%d ",
reg_idx);
nit: missing space.
here: "buf + used"
Cheers Suzuki