From: wsa@the-dreams.de (Wolfram Sang)
To: cocci@systeme.lip6.fr
Subject: [Cocci] [RFC] drop owner assignment from platform_drivers
Date: Sat, 11 Oct 2014 18:56:51 +0200 [thread overview]
Message-ID: <20141011165650.GA1263@katana> (raw)
In-Reply-To: <2769473.KEN6DZKnT7@wuerfel>
> > 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.
>
> Right, this seems to be a preexisting bug. platform_create_bundle
> and platform_driver_probe will both overwrite the .owner field with
> NULL since they live in builtin code. They need to be replaced with
> __platform_driver_probe and __platform_driver_register that both
> take an extra owner argument passed down from the caller in the driver
> module.
Yeah, that would be one solution. However, my personal favourite would
meanwhile be to revert the commit that Russell mentioned. I think it is
cleaner to have the owner explicitly set in the module rather than
hidden away by a function call. However, grepping through include/linux,
there are a few subsystems hiding it this way. So, it is a pattern
somewhow. Oh well...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20141011/5e94dd0f/attachment.asc>
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@the-dreams.de>
To: cocci@systeme.lip6.fr
Subject: Re: [RFC] drop owner assignment from platform_drivers
Date: Sat, 11 Oct 2014 16:56:51 +0000 [thread overview]
Message-ID: <20141011165650.GA1263@katana> (raw)
In-Reply-To: <2769473.KEN6DZKnT7@wuerfel>
[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]
> > 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.
>
> Right, this seems to be a preexisting bug. platform_create_bundle
> and platform_driver_probe will both overwrite the .owner field with
> NULL since they live in builtin code. They need to be replaced with
> __platform_driver_probe and __platform_driver_register that both
> take an extra owner argument passed down from the caller in the driver
> module.
Yeah, that would be one solution. However, my personal favourite would
meanwhile be to revert the commit that Russell mentioned. I think it is
cleaner to have the owner explicitly set in the module rather than
hidden away by a function call. However, grepping through include/linux,
there are a few subsystems hiding it this way. So, it is a pattern
somewhow. Oh well...
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: wsa@the-dreams.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] drop owner assignment from platform_drivers
Date: Sat, 11 Oct 2014 18:56:51 +0200 [thread overview]
Message-ID: <20141011165650.GA1263@katana> (raw)
In-Reply-To: <2769473.KEN6DZKnT7@wuerfel>
> > 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.
>
> Right, this seems to be a preexisting bug. platform_create_bundle
> and platform_driver_probe will both overwrite the .owner field with
> NULL since they live in builtin code. They need to be replaced with
> __platform_driver_probe and __platform_driver_register that both
> take an extra owner argument passed down from the caller in the driver
> module.
Yeah, that would be one solution. However, my personal favourite would
meanwhile be to revert the commit that Russell mentioned. I think it is
cleaner to have the owner explicitly set in the module rather than
hidden away by a function call. However, grepping through include/linux,
there are a few subsystems hiding it this way. So, it is a pattern
somewhow. Oh well...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141011/5e94dd0f/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@the-dreams.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
Greg KH <gregkh@linuxfoundation.org>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
cocci@systeme.lip6.fr
Subject: Re: [RFC] drop owner assignment from platform_drivers
Date: Sat, 11 Oct 2014 18:56:51 +0200 [thread overview]
Message-ID: <20141011165650.GA1263@katana> (raw)
In-Reply-To: <2769473.KEN6DZKnT7@wuerfel>
[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]
> > 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.
>
> Right, this seems to be a preexisting bug. platform_create_bundle
> and platform_driver_probe will both overwrite the .owner field with
> NULL since they live in builtin code. They need to be replaced with
> __platform_driver_probe and __platform_driver_register that both
> take an extra owner argument passed down from the caller in the driver
> module.
Yeah, that would be one solution. However, my personal favourite would
meanwhile be to revert the commit that Russell mentioned. I think it is
cleaner to have the owner explicitly set in the module rather than
hidden away by a function call. However, grepping through include/linux,
there are a few subsystems hiding it this way. So, it is a pattern
somewhow. Oh well...
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-10-11 16:56 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-10 7:24 [Cocci] [RFC] drop owner assignment from platform_drivers Wolfram Sang
2014-10-10 7:24 ` Wolfram Sang
2014-10-10 7:24 ` Wolfram Sang
2014-10-10 7:24 ` Wolfram Sang
2014-10-10 7:54 ` [Cocci] " Julia Lawall
2014-10-10 7:54 ` Julia Lawall
2014-10-10 7:54 ` Julia Lawall
2014-10-10 7:54 ` Julia Lawall
2014-10-10 18:04 ` Wolfram Sang
2014-10-10 18:04 ` Wolfram Sang
2014-10-10 18:04 ` Wolfram Sang
2014-10-10 18:04 ` Wolfram Sang
2014-10-10 8:30 ` Arnd Bergmann
2014-10-10 8:30 ` Arnd Bergmann
2014-10-10 8:30 ` Arnd Bergmann
2014-10-10 8:30 ` Arnd Bergmann
2014-10-10 18:12 ` [Cocci] " Wolfram Sang
2014-10-10 18:12 ` Wolfram Sang
2014-10-10 18:12 ` Wolfram Sang
2014-10-10 18:12 ` Wolfram Sang
2014-10-10 19:39 ` [Cocci] " Arnd Bergmann
2014-10-10 19:39 ` Arnd Bergmann
2014-10-10 19:39 ` Arnd Bergmann
2014-10-10 19:39 ` Arnd Bergmann
2014-10-10 8:36 ` [Cocci] " Russell King - ARM Linux
2014-10-10 8:36 ` Russell King - ARM Linux
2014-10-10 8:36 ` Russell King - ARM Linux
2014-10-10 8:36 ` Russell King - ARM Linux
2014-10-10 18:26 ` [Cocci] " Wolfram Sang
2014-10-10 18:26 ` Wolfram Sang
2014-10-10 18:26 ` Wolfram Sang
2014-10-10 18:26 ` Wolfram Sang
2014-10-10 19:42 ` [Cocci] " Arnd Bergmann
2014-10-10 19:42 ` Arnd Bergmann
2014-10-10 19:42 ` Arnd Bergmann
2014-10-10 19:42 ` Arnd Bergmann
2014-10-11 16:56 ` Wolfram Sang [this message]
2014-10-11 16:56 ` Wolfram Sang
2014-10-11 16:56 ` Wolfram Sang
2014-10-11 16:56 ` Wolfram Sang
2014-10-11 17:15 ` [Cocci] " Russell King - ARM Linux
2014-10-11 17:15 ` Russell King - ARM Linux
2014-10-11 17:15 ` Russell King - ARM Linux
2014-10-11 17:15 ` Russell King - ARM Linux
2014-10-11 20:55 ` [Cocci] " Greg KH
2014-10-11 20:55 ` Greg KH
2014-10-11 20:55 ` Greg KH
2014-10-11 20:55 ` Greg KH
2014-10-12 5:51 ` [Cocci] " Wolfram Sang
2014-10-12 5:51 ` Wolfram Sang
2014-10-12 5:51 ` Wolfram Sang
2014-10-12 5:51 ` Wolfram Sang
2014-10-12 14:24 ` [Cocci] " Greg KH
2014-10-12 14:24 ` Greg KH
2014-10-12 14:24 ` Greg KH
2014-10-12 14:24 ` Greg KH
2014-10-12 17:01 ` [Cocci] " Wolfram Sang
2014-10-12 17:01 ` Wolfram Sang
2014-10-12 17:01 ` Wolfram Sang
2014-10-12 17:01 ` Wolfram Sang
2014-10-10 21:34 ` [Cocci] " Russell King - ARM Linux
2014-10-10 21:34 ` Russell King - ARM Linux
2014-10-10 21:34 ` Russell King - ARM Linux
2014-10-10 21:34 ` Russell King - ARM Linux
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=20141011165650.GA1263@katana \
--to=wsa@the-dreams.de \
--cc=cocci@systeme.lip6.fr \
/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.