Did you know that vim has a built-in spellchecker? You turn it on with :set spell and set the language via set spelllang=<your_language>.

A couple weeks ago, I fired up vim to write a post for the blog. I had the spellchecker on, and I needed to check something in the kernel docs. I stumbled upon a file about memory barriers, went about my business, and then there it was. I’ve found a typo! The word “architecture” was misspelled. I decided to snoop around and maybe find some more. It turns out that there’s more typos than you think - and they’re all waiting for someone to correct them.

After correcting a couple more typos, I’ve made a commit and formed a patch. I sent it to the linux-doc mailing list:

This patch corrects a couple mistakes I've found when reading through
Documentation/.

This is my first submission and I hope to send more meaningful
fixes in the future.

Stan

Signed-off-by: Stan Drozd <drozdziak1@gmail.com>
---
 Documentation/ioctl/ioctl-number.txt   | 2 +-
 Documentation/memory-barriers.txt      | 2 +-
 Documentation/static-keys.txt          | 2 +-
 Documentation/vfio-mediated-device.txt | 6 +++---
 Documentation/zorro.txt                | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index 08244bea5048..a77ead911956 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -212,7 +212,7 @@ Code  Seq#(hex)	Include File		Comments
 'c'	00-1F	linux/chio.h		conflict!
 'c'	80-9F	arch/s390/include/asm/chsc.h	conflict!
 'c'	A0-AF   arch/x86/include/asm/msr.h	conflict!
-'d'	00-FF	linux/char/drm/drm/h	conflict!
+'d'	00-FF	linux/char/drm/drm.h	conflict!
 'd'	02-40	pcmcia/ds.h		conflict!
 'd'	F0-FF	linux/digi1.h
 'e'	all	linux/digi1.h		conflict!

[...]

--
2.12.2

It turns out that I’ve made a couple mistakes, pointed out in response by Jon Corbet, the docs maintainer:

On Sun, 16 Apr 2017 00:25:33 +0200
Stanisław Drozd <drozdziak1@gmail.com> wrote:

> This patch corrects a couple mistakes I've found when reading through
> Documentation/.
> 
> This is my first submission and I hope to send more meaningful
> fixes in the future.

It's a good start.  A couple of notes, though:

 - Please copy the docs maintainer (me) on documentation patches.
 - Please places patches inline, not as attachments.  If you've not read
   through Documentation/process/submitting-patches.rst, that would be a
   good thing to do.

> ---
>  Documentation/ioctl/ioctl-number.txt   | 2 +-
>  Documentation/memory-barriers.txt      | 2 +-

This file is maintained by Paul McKenney, so you'll want to make a separate
patch and copy him on it.

>  Documentation/static-keys.txt          | 2 +-
>  Documentation/vfio-mediated-device.txt | 6 +++---
>  Documentation/zorro.txt                | 2 +-
>  5 files changed, 7 insertions(+), 7 deletions(-)

Care to rework along those lines?

Thanks,

jon

After some reworking, I split the patch as suggested and resent with correct maintainers/developers CC’d, starting with memory-barriers.txt and Paul McKenney:

So here we are, this is my first contribution. I looked through the file with
":set spell" and this seems like the only real typo. It's not much, but I've got
more coming.

Stan

Signed-off-by: Stan Drozd <drozdziak1@gmail.com>
---
 Documentation/memory-barriers.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/memory-barriers.txt
b/Documentation/memory-barriers.txt
index d2b0a8d81258..d2bd7439a2e9 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -27,7 +27,7 @@ The purpose of this document is twofold:
  (2) to provide a guide as to how to use the barriers that are available.
 
 Note that an architecture can provide more than the minimum requirement
-for any particular barrier, but if the architecure provides less than
+for any particular barrier, but if the architecture provides less than
 that, that architecture is incorrect.
 
 Note also that it is possible that a barrier may be a no-op for an
-- 
2.12.2

After a couple hours, I’ve got Paul’s response. It seems that my patch still wasn’t perfect, but he decided to take it in anyway:

On Thu, Apr 20, 2017 at 11:03:36AM +0200, Stan Drozd wrote:
> So here we are, this is my first contribution. I looked through the file with
> ":set spell" and this seems like the only real typo. It's not much, but I've got
> more coming.
> 
> Stan
> 
> Signed-off-by: Stan Drozd <drozdziak1@gmail.com>

Thank you, queued for 4.13 (or whenever Jon wants to take it).  Good
show on getting your first patch posted!

I reworked your subject line and commit log, please see below (and
please let me know if my reworking was in any way problematic).
The word following the ":" on the subject line must be capitalized,
and the subject line should describe the change rather than the bug.

The body of the commit log is almost optional for this type of fix,
but if present it should describe the bug and fix.

							Thanx, Paul

------------------------------------------------------------------------

commit 79b64f114cbfd5daa6117c60c38b1689f6e80ee5
Author: Stan Drozd <drozdziak1@gmail.com>
Date:   Thu Apr 20 11:03:36 2017 +0200

    docs: Fix typo in Documentation/memory-barriers.txt
    
    This commit changes "architecure" to the correct spelling,
    "architecture".
    
    Signed-off-by: Stan Drozd <drozdziak1@gmail.com>
    Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index 08329cb857ed..6805accbba4f 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -27,7 +27,7 @@ The purpose of this document is twofold:
  (2) to provide a guide as to how to use the barriers that are available.
 
 Note that an architecture can provide more than the minimum requirement
-for any particular barrier, but if the architecure provides less than
+for any particular barrier, but if the architecture provides less than
 that, that architecture is incorrect.
 
 Note also that it is possible that a barrier may be a no-op for an

I did it! It felt really great to see Paul come back to me with the patch accepted. I’ve never thought that contributing to an open-source project could be this simple. That particular patch didn’t make it to mainline yet, but there’s already three other commits that Jon had passed through to the main kernel repo:

commit 9bb0e9cb04c82d6bf0e72f3207307d621083b801
Author: Stan Drozd <drozdziak1@gmail.com>
Date:   Fri Apr 21 13:16:03 2017 +0200

    docs: Fix a couple typos

    This commit gets rid of some minor errors in Documentation/:
    * cputopology.txt: drawes -> drawers
    * debugging-via-ohci1394.txt: remove an unnecessary line break
    * static-keys: statemnts -> statements
    * zorro.txt: busses -> buses

    Signed-off-by: Stan Drozd <drozdziak1@gmail.com>
    Signed-off-by: Jonathan Corbet <corbet@lwn.net>

commit 1c4f128ed1cbadcfcb3c2d654b39268d592f716f
Author: Stan Drozd <drozdziak1@gmail.com>
Date:   Fri Apr 21 13:07:10 2017 +0200

    docs: Fix a spelling error in vfio-mediated-device.txt

    This commit fixes a repeated "the" in vfio-mediated-device.txt and reflows
the
    paragraph.

    Signed-off-by: Stan Drozd <drozdziak1@gmail.com>
    Signed-off-by: Jonathan Corbet <corbet@lwn.net>

commit e884dbcb3c8cc829ca434248ea0aeb5c4198eef3
Author: Stan Drozd <drozdziak1@gmail.com>
Date:   Fri Apr 21 12:58:52 2017 +0200

    docs: Fix a spelling error in ioctl-number.txt

    This commit fixes a misspelled header name in the ioctl numbers list

    Signed-off-by: Stan Drozd <drozdziak1@gmail.com>
    Signed-off-by: Jonathan Corbet <corbet@lwn.net>

Yaaay! :champagne: :confetti_ball:

I hope that my little adventure showed you that getting started with the contributions really isn’t difficult at all. I really encourage everyone to try this out - even such small fixes as mine getting accepted into the codebase were a very motivating experience. See you on a mailing list! :slightly_smiling_face:

Further reading

:champagne: :champagne: :champagne: