linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lyude Paul <lyude@redhat.com>
To: Jiri Kosina <jikos@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	linux-input <linux-input@vger.kernel.org>,
	Andrew Duggan <aduggan@synaptics.com>,
	stable@vger.kernel.org,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] HID: rmi: Make sure the HID device is opened on resume
Date: Mon, 24 Jul 2017 15:46:23 -0400	[thread overview]
Message-ID: <1500925583.6243.4.camel@redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.20.1707242127300.4705@cbobk.fhfr.pm>

Yeah I noticed that, sorry if my response wasn't very clear! Should
probably wait to have my morning coffee before responding to these
messages :P

On Mon, 2017-07-24 at 21:28 +0200, Jiri Kosina wrote:
> On Mon, 24 Jul 2017, Lyude Paul wrote:
> 
> > > > So, call hid_hw_open() in rmi_post_resume() so we make sure
> > > > that
> > > > the
> > > > device is alive before we try talking to it.
> > > > 
> > > > This fixes RMI device suspend/resume over HID.
> > > > -       int ret;
> > > > +       int ret = 0;
> > > 
> > > What's the point?
> > 
> > So that we can use the same out: label at the end of the function
> > that
> > calls hid_hw_close() to return success. This being said though I
> > just
> > realized that setting ret will initialize it to 0 anyway, so I
> > guess
> > this can be dropped
> 
> Andy's point was that hid_hw_open() is obviously re-initializing the
> ret 
> before its first use as a return value, so there is no need to
> initialize 
> it at a declaration time.
> 

  reply	other threads:[~2017-07-24 19:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-23  1:15 [PATCH] HID: rmi: Make sure the HID device is opened on resume Lyude
2017-07-23  9:54 ` Andy Shevchenko
2017-07-24 17:45   ` Lyude Paul
2017-07-24 19:28     ` Jiri Kosina
2017-07-24 19:46       ` Lyude Paul [this message]
2017-07-24  8:15 ` Benjamin Tissoires
2017-07-24 17:49   ` Lyude Paul
2017-09-08  7:16     ` Benjamin Tissoires
2017-09-08 13:01       ` Jiri Kosina
  -- strict thread matches above, loose matches on Subject: below --
2017-08-08 14:45 william

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=1500925583.6243.4.camel@redhat.com \
    --to=lyude@redhat.com \
    --cc=aduggan@synaptics.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).