linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] drop owner assignment from platform_drivers
Date: Fri, 10 Oct 2014 22:34:37 +0100	[thread overview]
Message-ID: <20141010213437.GP5182@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20141010182604.GC6075@katana>

On Fri, Oct 10, 2014 at 08:26:05PM +0200, Wolfram Sang wrote:
> platform_create_bundle() calls platform_driver_probe().
> platform_driver_probe() calls platform_driver_register().
> platform_driver_register() modifies driver.owner.
> 
> So, it is correct from the point of view that it doesn't make sense to
> set the .owner field if it gets overwritten anyhow.
> 
> You got me wondering, though, that it could not be correct to call
> platform_driver_register() from the platform core instead of module
> init. I will check tomorrow. Still, this would be a bug independent of
> my series. Although I'd need to respin it if platform_driver_probe()
> needed a fix.

This shows what the bad side-effect of people doing "cleanups" is.
This bug was introduced by:

commit 9447057eaff871dd7c63c808de761b8732407169
Author: Libo Chen <clbchenlibo.chen@huawei.com>
Date:   Sat May 25 12:40:50 2013 +0800

    platform_device: use a macro instead of platform_driver_register

    I found a lot of mistakes using struct platform_driver without owner
    so I make a macro instead of the function platform_driver_register.
    It can set owner in it, then guys don`t care about module owner again.

    Signed-off-by: Libo Chen <libo.chen@huawei.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

So, this patch subsituted one set of mistakes for another mistake...

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.

      parent reply	other threads:[~2014-10-10 21:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-10  7:24 [RFC] drop owner assignment from platform_drivers Wolfram Sang
2014-10-10  7:54 ` [Cocci] " Julia Lawall
2014-10-10 18:04   ` Wolfram Sang
2014-10-10  8:30 ` Arnd Bergmann
2014-10-10 18:12   ` Wolfram Sang
2014-10-10 19:39     ` Arnd Bergmann
2014-10-10  8:36 ` Russell King - ARM Linux
2014-10-10 18:26   ` Wolfram Sang
2014-10-10 19:42     ` Arnd Bergmann
2014-10-11 16:56       ` Wolfram Sang
2014-10-11 17:15         ` Russell King - ARM Linux
2014-10-11 20:55         ` Greg KH
2014-10-12  5:51           ` Wolfram Sang
2014-10-12 14:24             ` Greg KH
2014-10-12 17:01               ` Wolfram Sang
2014-10-10 21:34     ` Russell King - ARM Linux [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=20141010213437.GP5182@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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).