linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [git pull] Input updates for 3.5-rc0
Date: Thu, 24 May 2012 11:01:54 -0700	[thread overview]
Message-ID: <20120524180154.GA15036@core.coreip.homeip.net> (raw)
In-Reply-To: <CA+55aFxw0HRpizzJZxhhA2oqPpzg4DPUvH2r7YoYfctXS6K=WQ@mail.gmail.com>

On Thu, May 24, 2012 at 10:33:49AM -0700, Linus Torvalds wrote:
> On Thu, May 24, 2012 at 1:32 AM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> > Hi Linus,
> >
> > to receive updates for the input subsystem. You will get:
> 
> I get an annoying conflict, and the reason I call it annoying is not
> because it's hard to resolve, it's because doing that shows that you
> seem to have preferred using
> 
>    dev_dbg(&input->dev.parent, ...)
> 
> over the much more natural
> 
>    dev_dbg(&input->dev, ...)
> 
> which would seem to make more sense.
> 
> Why? Are the input layer device names so bad that using them for debug
> output is useless? And if so, why *are* they so bad?
> 
> I'm going to take your version over Greg's more straightforward one,
> because I assume Greg did things a bit more mindlessly and I think you
> presumably had a *reason* for your extra (stupid) ".parent" part. But
> I'm unhappy with it, because I suspect the reason you did that implies
> that the input layer does something bad.

A couple of points:

1. A driver should try to use the same device for all its messages and
input devices are not created yet at the time we try to bind USB
interface to a driver. Most (all?) USB probe() methods use interface's
device with dev_xxx() which shows exactly which interface we are dealing
with.

2. Input devices are essentially driver-less (they are class devices) and
therefore do not provide useful information if used in messages as the
format of the message would be:

	input inputX: some message

which does not identify neitehr the driver nor hardware device.  By
using input->dev.parent we get to the USB interface thus getting more
meaningful messages:

	wacom 2-1.2:1.0: some error happened

We had a discussion with Greg about this and he was going to change his
patchset to use USB interfaces in the messages...

Thanks.

-- 
Dmitry

  reply	other threads:[~2012-05-24 18:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24  8:32 [git pull] Input updates for 3.5-rc0 Dmitry Torokhov
2012-05-24 17:33 ` Linus Torvalds
2012-05-24 18:01   ` Dmitry Torokhov [this message]
2012-05-24 18:21     ` Linus Torvalds
2012-05-24 19:58       ` Dmitry Torokhov
2012-05-24 20:11         ` Linus Torvalds
2012-05-24 20:36           ` Dmitry Torokhov
2012-05-24 20:48             ` Linus Torvalds
2012-05-24 20:59               ` Dmitry Torokhov
2012-05-24 21:07                 ` Linus Torvalds
2012-05-24 21:38                   ` Dmitry Torokhov
2012-05-24 21:56                     ` Linus Torvalds
2012-05-24 21:44                   ` Linus Torvalds
2012-05-24 21:56                     ` Dmitry Torokhov
2012-05-24 21:59                       ` Linus Torvalds
2012-05-24 22:01                     ` Greg Kroah-Hartman
2012-05-24 22:05                       ` Linus Torvalds
2012-05-25  1:39                         ` Greg Kroah-Hartman
2012-05-25 19:05         ` Mark Lord
2012-05-24 21:26   ` Greg Kroah-Hartman

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=20120524180154.GA15036@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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).