lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 5 Nov 2021 09:14:25 -0600
From:   Mathieu Poirier <mathieu.poirier@...aro.org>
To:     Jinlong <quic_jinlmao@...cinc.com>
Cc:     Tao Zhang <quic_taozha@...cinc.com>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Mike Leach <mike.leach@...aro.org>,
        Leo Yan <leo.yan@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org,
        Tingwei Zhang <quic_tingweiz@...cinc.com>,
        Yuanfang Zhang <quic_yuanfang@...cinc.com>,
        Trilok Soni <quic_tsoni@...cinc.com>
Subject: Re: [PATCH 04/10] Coresight: Enable BC and GPR for TPDM driver

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:
> > [...]
> > 
> > > > > +
> > > > > +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.
> > > 
> > > > > +	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,
> > Mathieu
> > 
> 
> Hi Mathieu,
> 
> The ret is the result of kstrtoul not the val.
>

Ah yes, you are correct.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ