Re: [PATCH 04/10] Coresight: Enable BC and GPR for TPDM driver
From: Mathieu Poirier <mathieu.poirier@linaro.org>
Date: 2021-11-05 15:14:36
Also in:
lkml
From: Mathieu Poirier <mathieu.poirier@linaro.org>
Date: 2021-11-05 15:14:36
Also in:
lkml
On Fri, Nov 05, 2021 at 04:17:54PM +0800, Jinlong wrote:
On Thu, Nov 04, 2021 at 11:02:24AM -0600, Mathieu Poirier wrote:quoted
[...]quoted
quoted
quoted
+ +static ssize_t reset_store(struct device *dev, + struct device_attribute *attr, + const char *buf, + size_t size) +{ + int ret = 0; + unsigned long val; + struct mcmb_dataset *mcmb_temp = NULL; + struct tpdm_drvdata *drvdata = dev_get_drvdata(dev->parent); + + ret = kstrtoul(buf, 10, &val);The coresight subsystem normally uses the hexadecimal base.We will address you comments.quoted
quoted
+ if (ret) + return ret;Shouldn't this be "if (!ret)" ?When ret is not 0, it need to return.I would expect something like this: $ echo 1 > /sys/path/to/tpdm/device/reset and not $ echo 0 > /sys/path/to/tpdm/device/reset The latter is what the code does. Thanks, MathieuHi Mathieu, The ret is the result of kstrtoul not the val.
Ah yes, you are correct. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel