From: Wolfram Sang <wsa@the-dreams.de>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Nicholas Mc Guire <hofrat@osadl.org>,
Jonathan Corbet <corbet@lwn.net>,
linux-i2c <linux-i2c@vger.kernel.org>,
Linux Documentation List <linux-doc@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Nicholas Mc Guire <hofrat@osadl.at>
Subject: Re: [PATCH] Documentation: i2c: drop unnecessary .owner field in examples
Date: Mon, 15 Jan 2018 21:28:47 +0100 [thread overview]
Message-ID: <20180115202847.77s42fgc2zsdnc6s@ninjato> (raw)
In-Reply-To: <CAHp75VeamZDS=-bwGYn41y0pwKEptRE02W3bRe326Q34i68=yg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]
On Mon, Jan 15, 2018 at 10:24:52PM +0200, Andy Shevchenko wrote:
> On Mon, Jan 15, 2018 at 2:08 PM, Nicholas Mc Guire <hofrat@osadl.org> wrote:
> > From: Nicholas Mc Guire <hofrat@osadl.at>
> >
> > Currently there are a few drivers that still set the .owner
> > in the i2c_driver structure - all of which are reported by
> > coccinelle (scripts/coccinelle/api/platform_no_drv_owner.cocci)
> > and there are no cases that set the .onwer and do not call any
> > of the functions that set the .owner field anyway in any of the
> > drivers (checked by a modified coccinelle script based on the
> > above) so it seems that the examples are no longer valid and
> > .owner = THIS_MODULE, can be removed here.
> >
> > While at it an obvious typo (new new) was also fixed.
>
> AFAIU It is right only in case when someone does this, e.g.
> module_i2c_driver() macro. Otherwise the field is pretty valid and
> must be filled.
It gets filled with i2c_add_driver. module_i2c_driver uses
i2c_add_driver. I was about to suggest to keep the field in the old
driver and describe that it can be removed when using one of
i2c_add_driver or module_i2c_driver.
But then I realised that the kernel tree does not have any such old
drivers anymore and I couldn't even find out-of-tree code via some
search engines (I tried looking for "I2C_CLIENT_INSMOD").
I consider this obsolete and irrelevant these days. It might be good to
simply remove it to not confuse users.
Thoughts?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-01-15 20:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-15 12:08 Nicholas Mc Guire
2018-01-15 20:24 ` Andy Shevchenko
2018-01-15 20:28 ` Wolfram Sang [this message]
2018-02-03 15:11 ` Nicholas Mc Guire
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=20180115202847.77s42fgc2zsdnc6s@ninjato \
--to=wsa@the-dreams.de \
--cc=andy.shevchenko@gmail.com \
--cc=corbet@lwn.net \
--cc=hofrat@osadl.at \
--cc=hofrat@osadl.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®