From: William Breathitt Gray <vilhelm.gray@gmail.com>
To: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Marek Vasut <marek.vasut@gmail.com>,
Richard Weinberger <richard@nod.at>,
Cyrille Pitchen <cyrille.pitchen@atmel.com>,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH 08/30] isa.txt: standardize document format
Date: Thu, 18 May 2017 22:13:55 -0400 [thread overview]
Message-ID: <20170519021355.GA24556@sophia> (raw)
In-Reply-To: <3cfb5ad6db86330e07c6d0f833bbdb2788d99fa7.1495156975.git.mchehab@s-opensource.com>
On Thu, May 18, 2017 at 10:24:00PM -0300, Mauro Carvalho Chehab wrote:
>Each text file under Documentation follows a different
>format. Some doesn't even have titles!
>
>Change its representation to follow the adopted standard,
>using ReST markups for it to be parseable by Sphinx:
>
>- Use the main title standard for this document;
>- replace _foo_ by **foo** for emphasis;
>- mark literal blocks as such.
>
>Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
I'm all right with this patch, but there's just one minor nitpick about
the title that I've inlined.
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
>---
> Documentation/isa.txt | 53 ++++++++++++++++++++++++++-------------------------
> 1 file changed, 27 insertions(+), 26 deletions(-)
>
>diff --git a/Documentation/isa.txt b/Documentation/isa.txt
>index f232c26a40be..def4a7b690b5 100644
>--- a/Documentation/isa.txt
>+++ b/Documentation/isa.txt
>@@ -1,5 +1,6 @@
>+===========
> ISA Drivers
>------------
There's no need for this single-dashed line now so just remove it.
>+===========
>
> The following text is adapted from the commit message of the initial
> commit of the ISA bus driver authored by Rene Herman.
>@@ -23,17 +24,17 @@ that all device creation has been made internal as well.
>
> The usage model this provides is nice, and has been acked from the ALSA
> side by Takashi Iwai and Jaroslav Kysela. The ALSA driver module_init's
>-now (for oldisa-only drivers) become:
>+now (for oldisa-only drivers) become::
>
>-static int __init alsa_card_foo_init(void)
>-{
>- return isa_register_driver(&snd_foo_isa_driver, SNDRV_CARDS);
>-}
>+ static int __init alsa_card_foo_init(void)
>+ {
>+ return isa_register_driver(&snd_foo_isa_driver, SNDRV_CARDS);
>+ }
>
>-static void __exit alsa_card_foo_exit(void)
>-{
>- isa_unregister_driver(&snd_foo_isa_driver);
>-}
>+ static void __exit alsa_card_foo_exit(void)
>+ {
>+ isa_unregister_driver(&snd_foo_isa_driver);
>+ }
>
> Quite like the other bus models therefore. This removes a lot of
> duplicated init code from the ALSA ISA drivers.
>@@ -47,11 +48,11 @@ parameter, indicating how many devices to create and call our methods
> with.
>
> The platform_driver callbacks are called with a platform_device param;
>-the isa_driver callbacks are being called with a "struct device *dev,
>-unsigned int id" pair directly -- with the device creation completely
>+the isa_driver callbacks are being called with a ``struct device *dev,
>+unsigned int id`` pair directly -- with the device creation completely
> internal to the bus it's much cleaner to not leak isa_dev's by passing
> them in at all. The id is the only thing we ever want other then the
>-struct device * anyways, and it makes for nicer code in the callbacks as
>+struct device anyways, and it makes for nicer code in the callbacks as
> well.
>
> With this additional .match() callback ISA drivers have all options. If
>@@ -75,20 +76,20 @@ This exports only two functions; isa_{,un}register_driver().
>
> isa_register_driver() register's the struct device_driver, and then
> loops over the passed in ndev creating devices and registering them.
>-This causes the bus match method to be called for them, which is:
>+This causes the bus match method to be called for them, which is::
>
>-int isa_bus_match(struct device *dev, struct device_driver *driver)
>-{
>- struct isa_driver *isa_driver = to_isa_driver(driver);
>+ int isa_bus_match(struct device *dev, struct device_driver *driver)
>+ {
>+ struct isa_driver *isa_driver = to_isa_driver(driver);
>
>- if (dev->platform_data == isa_driver) {
>- if (!isa_driver->match ||
>- isa_driver->match(dev, to_isa_dev(dev)->id))
>- return 1;
>- dev->platform_data = NULL;
>- }
>- return 0;
>-}
>+ if (dev->platform_data == isa_driver) {
>+ if (!isa_driver->match ||
>+ isa_driver->match(dev, to_isa_dev(dev)->id))
>+ return 1;
>+ dev->platform_data = NULL;
>+ }
>+ return 0;
>+ }
>
> The first thing this does is check if this device is in fact one of this
> driver's devices by seeing if the device's platform_data pointer is set
>@@ -102,7 +103,7 @@ well.
> Then, if the the driver did not provide a .match, it matches. If it did,
> the driver match() method is called to determine a match.
>
>-If it did _not_ match, dev->platform_data is reset to indicate this to
>+If it did **not** match, dev->platform_data is reset to indicate this to
> isa_register_driver which can then unregister the device again.
>
> If during all this, there's any error, or no devices matched at all
>--
>2.9.4
>
next prev parent reply other threads:[~2017-05-19 2:14 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-19 1:23 [PATCH 00/30] Standardize doc formats - part 2 Mauro Carvalho Chehab
2017-05-19 1:23 ` Mauro Carvalho Chehab
2017-05-19 1:23 ` [PATCH 01/30] iostats.txt: update it to cover recent Kernels Mauro Carvalho Chehab
2017-05-19 1:23 ` [PATCH 02/30] IPMI.txt: standardize document format Mauro Carvalho Chehab
2017-05-19 1:23 ` [PATCH 03/30] IRQ-affinity.txt: " Mauro Carvalho Chehab
2017-05-19 1:23 ` [PATCH 04/30] IRQ-domain.txt: " Mauro Carvalho Chehab
2017-05-19 1:23 ` [PATCH 05/30] irqflags-tracing.txt: " Mauro Carvalho Chehab
2017-05-19 1:23 ` [PATCH 06/30] IRQ.txt: add a markup for its title Mauro Carvalho Chehab
2017-05-19 1:23 ` [PATCH 07/30] isapnp.txt: promote title level Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 08/30] isa.txt: standardize document format Mauro Carvalho Chehab
2017-05-19 2:13 ` William Breathitt Gray [this message]
2017-05-19 8:55 ` Mauro Carvalho Chehab
2017-05-19 11:36 ` William Breathitt Gray
2017-05-19 1:24 ` [PATCH 09/30] kernel-per-CPU-kthreads.txt: " Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 10/30] kobject.txt: " Mauro Carvalho Chehab
2017-05-19 5:35 ` Greg Kroah-Hartman
2017-05-19 1:24 ` [PATCH 11/30] kprobes.txt: " Mauro Carvalho Chehab
2017-05-19 14:38 ` Masami Hiramatsu
2017-05-19 1:24 ` [PATCH 12/30] kref.txt: " Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 13/30] kselftest.txt: " Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 14/30] ldm.txt: " Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 15/30] lockup-watchdogs.txt: " Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 16/30] lzo.txt: " Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 17/30] mailbox.txt: " Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 18/30] memory-barriers.txt: " Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 19/30] memory-barriers.txt: use literals for variables Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 20/30] memory-hotplug.txt: standardize document format Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 21/30] men-chameleon-bus.txt: " Mauro Carvalho Chehab
2017-05-19 6:59 ` Johannes Thumshirn
2017-05-19 1:24 ` [PATCH 22/30] nommu-mmap.txt: " Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 23/30] nommu-mmap.txt: don't use all upper case on titles Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 24/30] ntb.txt: standardize document format Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 25/30] numastat.txt: " Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 26/30] padata.txt: " Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 27/30] parport-lowlevel.txt: " Mauro Carvalho Chehab
2017-05-19 1:24 ` Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 28/30] percpu-rw-semaphore.txt: " Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 29/30] phy.txt: " Mauro Carvalho Chehab
2017-05-19 1:24 ` [PATCH 30/30] pi-futex.txt: " Mauro Carvalho Chehab
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=20170519021355.GA24556@sophia \
--to=vilhelm.gray@gmail.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=corbet@lwn.net \
--cc=cyrille.pitchen@atmel.com \
--cc=dwmw2@infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=mchehab@infradead.org \
--cc=mchehab@s-opensource.com \
--cc=richard@nod.at \
/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.