All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Donohue <linux-kernel@PaulSD.com>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: linux-input@vger.kernel.org, Ben Gamari <ben@smart-cactus.org>,
	Michal Hocko <mhocko@suse.com>
Subject: Re: [PATCH v4 1/3] Input: ALPS - Fix TrackStick support for SS5 hardware
Date: Thu, 10 Nov 2016 09:17:21 -0500	[thread overview]
Message-ID: <20161110141721.GS2927@TopQuark.net> (raw)
In-Reply-To: <20161109121231.GB19557@pali>

On Wed, Nov 09, 2016 at 01:12:31PM +0100, Pali Rohár wrote:
> On Tuesday 08 November 2016 10:14:30 Paul Donohue wrote:
> > --- a/drivers/input/mouse/alps.c
> > +++ b/drivers/input/mouse/alps.c
> > @@ -1346,6 +1346,18 @@ static void alps_process_packet_ss4_v2(struct psmouse *psmouse)
> >  
> >  	priv->multi_packet = 0;
> >  
> > +	/* Report trackstick */
> > +	if (alps_get_pkt_id_ss4_v2(packet) == SS4_PACKET_ID_STICK) {
> 
> I would propose to show warning when trackstick packet is received on
> device marked as non-trackstick. It would help to debug possible
> problems in future...
> 
> if (!(priv->flags & ALPS_DUALPOINT))
>         psmouse_warn(psmouse, "Rejected trackstick packet from non DualPoint device");
For patch 1/3, the original alps_decode_ss4_v2() prints this warning,
so I don't think alps_process_packet_ss4_v2() needs to print it again.
Since this patch is a bug fix, I was trying to avoid any unnecessary
changes, and change just enough to fix the actual bug, so it is clear to
future readers what the bug was and how it was fixed.

In patch 2/3, I moved the warning from alps_decode_ss4_v2() to
alps_process_packet_ss4_v2(), since I agree it probably makes more sense
to print the warning in alps_process_packet_ss4_v2().  I also
removed the if statement from alps_decode_ss4_v2() entirely because
alps_decode_ss4_v2() decodes the trackstick buttons even in cases where
the trackstick packet is going to be rejected, and I thought it was a
bit confusing that alps_decode_ss4_v2() does not also decode the
trackstick movements even in cases where the trackstick packet is going
to be rejected (either they should both be decoded, or neither should be
decoded, and decoding both rather than skipping both requires less
logic).

      reply	other threads:[~2016-11-10 14:17 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24 21:01 [PATCH] Input: ALPS - Fix TrackStick support for SS5 hardware Paul Donohue
2016-11-01  9:35 ` Pali Rohár
2016-11-05 16:30   ` Paul Donohue
2016-11-05 16:44     ` [PATCH v2] " Paul Donohue
2016-11-06 19:59       ` Pali Rohár
2016-11-08 14:24         ` Paul Donohue
2016-11-06 19:57     ` [PATCH] " Pali Rohár
2016-11-08 14:54 ` [PATCH v3 1/3] " Paul Donohue
2016-11-08 14:59   ` [PATCH v3 2/3] " Paul Donohue
2016-11-08 15:06     ` Paul Donohue
2016-11-08 15:14 ` [PATCH v4 1/3] " Paul Donohue
2016-11-08 15:16   ` [PATCH v4 2/3] Input: ALPS - Clean up TrackStick handling " Paul Donohue
2016-11-08 15:17     ` [PATCH v4 3/3] Input: ALPS - Clean up code " Paul Donohue
2016-11-08 15:46       ` Paul Donohue
2016-11-08 15:49         ` Paul Donohue
2016-11-09 12:14     ` [PATCH v4 2/3] Input: ALPS - Clean up TrackStick handling " Pali Rohár
2016-11-10 14:27       ` Paul Donohue
2016-11-10 15:19         ` Pali Rohár
2016-11-10 16:44           ` [PATCH v5 0/3] Input: ALPS - Bug fix and cleanup " Paul Donohue
2016-11-10 16:44             ` [PATCH v5 1/3] Input: ALPS - Fix TrackStick support " Paul Donohue
2016-11-10 16:44             ` [PATCH v5 2/3] Input: ALPS - Clean up TrackStick handling " Paul Donohue
2016-11-10 16:44             ` [PATCH v5 3/3] Input: ALPS - Clean up code " Paul Donohue
2016-11-11 13:59             ` [PATCH v5 0/3] Input: ALPS - Bug fix and cleanup " Pali Rohár
2016-11-12  0:56               ` Dmitry Torokhov
2016-11-12  1:03                 ` Pali Rohár
2016-11-12  1:06                   ` Dmitry Torokhov
2016-11-12 12:29                     ` Pali Rohár
2016-11-13  6:43                       ` Dmitry Torokhov
2016-11-13 10:31                         ` Pali Rohár
2016-11-13 15:28                           ` Paul Donohue
2016-11-24 14:25               ` [PATCH v6 " Paul Donohue
2016-11-24 14:25                 ` [PATCH v6 1/3] Input: ALPS - Fix TrackStick support " Paul Donohue
2016-11-24 14:25                 ` [PATCH v6 2/3] Input: ALPS - Clean up TrackStick handling " Paul Donohue
2016-11-24 14:25                 ` [PATCH v6 3/3] Input: ALPS - Clean up code " Paul Donohue
2016-11-09 12:12   ` [PATCH v4 1/3] Input: ALPS - Fix TrackStick support " Pali Rohár
2016-11-10 14:17     ` Paul Donohue [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161110141721.GS2927@TopQuark.net \
    --to=linux-kernel@paulsd.com \
    --cc=ben@smart-cactus.org \
    --cc=linux-input@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=pali.rohar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.