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: <20150929064749.GA23662@sudip-pc>
Date:	Tue, 29 Sep 2015 12:18:02 +0530
From:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	Dudley Du <dudl@...ress.com>, lkml <linux-kernel@...r.kernel.org>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>
Subject: Re: [PATCH] Input: cyapa: remove variable overwriting

On Mon, Sep 28, 2015 at 03:43:04PM -0700, Dmitry Torokhov wrote:
> Hi Sudip,
> 
> On Tue, Sep 15, 2015 at 3:06 AM, Sudip Mukherjee
> <sudipm.mukherjee@...il.com> wrote:
> > Even if rotat_align is true or false the final value of
> > cyapa->electrodes_rx is always cyapa->electrodes_y. remove the variable
> > overwriting and in the process remove the variable rotat_align which is
> > not required any more.
> >
> > Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
> > ---
> >  drivers/input/mouse/cyapa_gen6.c | 10 +---------
> >  1 file changed, 1 insertion(+), 9 deletions(-)
> >
> > diff --git a/drivers/input/mouse/cyapa_gen6.c b/drivers/input/mouse/cyapa_gen6.c
> > index 5f19107..f0c614b 100644
> > --- a/drivers/input/mouse/cyapa_gen6.c
> > +++ b/drivers/input/mouse/cyapa_gen6.c
> > @@ -196,7 +196,6 @@ static int cyapa_gen6_read_sys_info(struct cyapa *cyapa)
> >         u8 resp_data[PIP_READ_SYS_INFO_RESP_LENGTH];
> >         int resp_len;
> >         u16 product_family;
> > -       u8 rotat_align;
> >         int error;
> >
> >         /* Get App System Information to determine Gen5 or Gen6. */
> > @@ -241,14 +240,7 @@ static int cyapa_gen6_read_sys_info(struct cyapa *cyapa)
> >         memcpy(&cyapa->product_id[13], &resp_data[62], 2);
> >         cyapa->product_id[15] = '\0';
> >
> > -       rotat_align = resp_data[68];
> > -       if (rotat_align) {
> > -               cyapa->electrodes_rx = cyapa->electrodes_y;
> > -               cyapa->electrodes_rx = cyapa->electrodes_y;
> > -       } else {
> > -               cyapa->electrodes_rx = cyapa->electrodes_x;
> > -               cyapa->electrodes_rx = cyapa->electrodes_y;
> > -       }
> > +       cyapa->electrodes_rx = cyapa->electrodes_y;
> 
> II think it was probably a typo rather than rotat_align being not
> needed. Dudley?
maybe some copy paste error. I thought it might have been
cyapa->electrodes_ry but there is nothing like that.

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ