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] [day] [month] [year] [list]
Date:   Sun, 21 Jul 2019 00:59:18 -0700
From:   "Life is hard, and then you die" <ronald@...ovation.ch>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     Federico Lorenzi <federico@...velground.com>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        kbuild test robot <lkp@...el.com>
Subject: Re: [PATCH 2/2] Input: applespi: fix warnings detected by sparse


  Hi Dmitry,

On Sun, Jul 21, 2019 at 10:24:27AM +0300, Dmitry Torokhov wrote:
> On Sun, Jul 21, 2019 at 12:06:29AM -0700, Ronald Tschalär wrote:
> > Reported-by: kbuild test robot <lkp@...el.com>
> > Signed-off-by: Ronald Tschalär <ronald@...ovation.ch>
> > ---
> >  drivers/input/keyboard/applespi.c | 18 +++++++++++-------
> >  1 file changed, 11 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/input/keyboard/applespi.c b/drivers/input/keyboard/applespi.c
> > index d5defdefbc34..00cd8dccd4f5 100644
> > --- a/drivers/input/keyboard/applespi.c
> > +++ b/drivers/input/keyboard/applespi.c
> > @@ -998,10 +998,14 @@ static inline int le16_to_int(__le16 x)
> >  static void applespi_debug_update_dimensions(struct applespi_data *applespi,
> >  					     const struct tp_finger *f)
> >  {
> > -	applespi->tp_dim_min_x = min_t(int, applespi->tp_dim_min_x, f->abs_x);
> 
> Should we also make tp_dim_* u16? Then we won't need min_t here.

abs_x/abs_y are actually signed values and sometimes negative, and
hence tp_dim_min_* are negative here. But we can just replace the
min_t/max_t with min/max, since both args are now int's.


  Cheers,

  Ronald

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ