linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Darren Hart <dvhart@infradead.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-input@vger.kernel.org, platform-driver-x86@vger.kernel.org
Subject: Re: Silead DMI driver
Date: Wed, 3 May 2017 10:19:45 +0200	[thread overview]
Message-ID: <20170503101945.11e47b2b@endymion> (raw)
In-Reply-To: <20170428172529.GC4949@dtor-ws>

Hi Dmirty,

On Fri, 28 Apr 2017 10:25:29 -0700, Dmitry Torokhov wrote:
> On Fri, Apr 28, 2017 at 11:33:21AM +0200, Jean Delvare wrote:
> > While this is a laudable goal, how will it scale in practice? I mean,
> > most drivers do need quirks in one form or another. Are we really going
> > to double the number of "drivers" (as in .c files and modules) and
> > Kconfig options to cleanly separate quirks from the device drivers
> > proper?
> 
> I do not see minimizing number of drivers as a goal. I also expect that

I do. A number of operations are directly dependent of the number of
available or loaded drivers. Splitting things into more small pieces
only helps performance up to a point, after which it backfires.

> devices that get one driver wrong would require more fixups. As far as

Not sure what you mean, sorry. "Getting one driver wrong"?

> having multiple config options - you do realize that even if we move
> these chunks into existing drivers they can still be protected by config
> options?

Good point, I indeed missed that. But somehow I think I find it less
confusing to have the driver-specific quirks option pop up right after
I say y or m to the driver in question, than having 2 seemingly
independent options in different menus in the configuration tree.
Darren just added the missing dependency, which makes things a bit
better, but doesn't solve the other "problems".

> > (...)
> > I'm speechless. If you believe that this kind of bug isn't worth
> > fixing quickly
> 
> Would you mind telling me what is s horrible about this bug that
> requires it to be fixed immediately. In practical terms please.

I guess this is just a case of the straw breaking the camel's back. The
non-modularity, then the horrible design, then the DMI check on every
I2C device addition on X86 every system, and now casting to the wrong
struct (and spending time verifying that it should be just OK in
practice, instead of applying a two-liner, obviously safe fix)... That
was just too much.

Ironically, the only reason why this (otherwise major) bug won't cause
any problem in practice is because you use strncmp to compare the names,
when strcmp would have been sufficient and preferable. So it's a case
of two mistakes compensating each other.

> > (...)
> > I thought the rule about upstream kernel code acceptance was that
> > you should get things right first, no matter how much time and how
> > many iterations it takes, and then we commit the result. Apparently
> > this has changed while I was not looking :-(
> 
> Yes, that is surely the rule. We do not merge the code until it is
> absolutely, 100% bug free. That is why are about to release 4.11 and
> stable 4.9 is at 25.

I perceive some sarcasm here ;-) But I'm not sure where you are getting
at. Of course we release imperfect code, and that's why we have the
stable kernel branches. But the idea of these branches is to backport
fixes that were found after the branch was released.

In this case, I see the 2 fixes have been written on April 3rd and
committed on April 13th, which correspond to rc1 and rc2 of the v4.11
release, respectively. It means you had plenty of time to send these
fixes to Linus before v4.11 final. You decided not to. This has nothing
to do with the stable branches process.

I remember from my classes at school about software engineering: "the
sooner a problem is detected and fixed, the lower the cost of the fix."
It seems that was have a good case for a study here. Just think of the
time we all have spent writing and reading these mails (and I deleted
half of what I wrote before sending it.)

-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2017-05-03  8:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24 11:23 Silead DMI driver Jean Delvare
2017-04-24 11:48 ` Andy Shevchenko
2017-04-25 10:19   ` Jean Delvare
2017-04-27 21:13     ` Darren Hart
2017-04-27 23:58       ` Dmitry Torokhov
2017-05-03  8:19       ` Jean Delvare
2017-05-04 22:48         ` Darren Hart
2017-04-24 16:59 ` Dmitry Torokhov
2017-04-28  9:33   ` Jean Delvare
2017-04-28 17:25     ` Dmitry Torokhov
2017-05-03  8:19       ` Jean Delvare [this message]
2017-05-04 22:39         ` Darren Hart

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=20170503101945.11e47b2b@endymion \
    --to=jdelvare@suse.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dvhart@infradead.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=platform-driver-x86@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).