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]
Message-ID: <CAHp75VeC1Gw8PvJCRGxKKzHGJCaSvsh3JbPnPhDCNsLDF5OaFw@mail.gmail.com>
Date: Thu, 12 Sep 2024 19:06:19 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Andi Shyti <andi.shyti@...nel.org>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, linux-i2c@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Jean Delvare <jdelvare@...e.com>
Subject: Re: [PATCH v1 08/12] i2c: isch: Use read_poll_timeout()

On Thu, Sep 12, 2024 at 6:55 PM Andi Shyti <andi.shyti@...nel.org> wrote:
> On Thu, Sep 12, 2024 at 06:35:46PM GMT, Andy Shevchenko wrote:
> > Thu, Sep 12, 2024 at 09:29:38AM +0200, Andi Shyti kirjoitti:

...

> > > > -         sch_io_wr8(priv, SMBHSTSTS, temp);
> > > > +         sch_io_wr8(priv, SMBHSTSTS, temp & 0x0f);
> > >
> > > there is still a dev_dbg() using temp. To be on the safe side, do
> > > we want to do a "temp &= 0x0f" after the read_poll_timeout?
> >
> > Isn't it even better that we have more information in the debug output?
>
> I think not, because:
>
>  1. It's information that we don't need, and we intentionally
>     discard in every check. If we print a value we ignore, we
>     risk providing incorrect information.
>
>  2. It’s more future-proof. In future development, cleanups,
>     refactorings, or copy-paste, temp can be used as is
>     without needing to continuously & it with 0xf. This
>     avoids unnecessary operations being repeated later on.
>
>  3. It maintains the original design.

Okay, but where do you see this debug message? I looked again into the
code and do not see that _this_ value of temp is used in the
messaging. What did I miss?

> In any case, these are small details, and the patch is already
> good as it is.

Thank you for the review!

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ