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:   Wed, 4 Aug 2021 22:27:34 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jonathan Cameron <Jonathan.Cameron@...wei.com>
Cc:     Andrea Merello <andrea.merello@...il.com>,
        Jonathan Cameron <jic23@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Rob Herring <robh+dt@...nel.org>,
        Matt Ranostay <matt.ranostay@...sulko.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-iio <linux-iio@...r.kernel.org>,
        Andrea Merello <andrea.merello@....it>
Subject: Re: [PATCH 2/4] iio: imu: add Bosch Sensortec BNO055 core driver

On Wed, Aug 4, 2021 at 7:51 PM Jonathan Cameron
<Jonathan.Cameron@...wei.com> wrote:
> On Wed, 4 Aug 2021 12:06:46 +0200
> Andrea Merello <andrea.merello@...il.com> wrote:
> > Il giorno sab 31 lug 2021 alle ore 19:58 Jonathan Cameron
> > <jic23@...nel.org> ha scritto:

...

> > Isn't this like doing a cut-and-paste of check+dev_err() in more than
> > a dozen places in the code?
> >
> > If you just want more information about the caller then we could
> > macroize those functions, so they can also print the caller code line
> > number (or they could accept an additional argument, which is the code
> > line number to print, and then a macro helper that adds that last
> > argument can be used to invoke them).. But this wouldn't address your
> > second point..
> It's a trade off between reviewability which these wrappers make worse
> and short code.
>
> My personal preference is don't bother with messages on simple reg read /write
> failures.  If it happens you either get an error reported to userspace and
> can do some more debug, or the driver doesn't probe - again, more debug to
> be done even if you know it was a read or write.

The advantage of regmap is that it has already established trace
events. No need to add additional stuff (at least it's easy to see,
read or write or what values were there). I personally put messages on
regmap reads and writes in the specific cases only, when it indeed may
shed a light on some events.


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ