Skip to contentSkip to conversation

Patching spelling errors

DISCUSSION Mark Heim 4 participants 10 messages Mar 17, 2023 – Mar 19, 2023 1 message not in the archive

lore
Share & tools
lore

Mark Heim

author
#0 lore raw

Hello Outreachy,

I have managed to identify at least 50 spelling errors in the Linux Kernel, but possibly as many as hundreds using grep (I have been using grep to wade through enormous amounts of text). If that is a worthwile fix, or if anyone is interested in teaming up to dig through them, please message me. (I am estimating there are about 15000 cases to dig through by hand, but I won't know until I'm done grep-ing). Thank you for your time.

#1 lore raw
Quoted 9 lines · Mark Heim

Hello Outreachy,

I have managed to identify at least 50 spelling errors in the Linux Kernel, but possibly as many as hundreds using grep (I have been using grep to wade through enormous amounts of text). If that is a worthwile fix, or if anyone is interested in teaming up to dig through them, please message me. (I am estimating there are about 15000 cases to dig through by hand, but I won't know until I'm done grep-ing). Thank you for your time.

This won't necessarily ease the burden of reviewing all the spelling errors, but have you tried codespell? I'm guessing there are far more than 50 types of misspellings in the kernel code ...

https://github.com/codespell-project/codespell

Signature · 1 line
paul-moore.com
#2 lore raw
In reply to Mark Heim
Quoted 8 lines · Mark Heim

Hello Outreachy,

I have managed to identify at least 50 spelling errors in the Linux Kernel, but possibly as many as hundreds using grep (I have been using grep to wade through enormous amounts of text). If that is a worthwile fix, or if anyone is interested in teaming up to dig through them, please message me. (I am estimating there are about 15000 cases to dig through by hand, but I won't know until I'm done grep-ing). Thank you for your time.

Spelling mistakes are distracting and make it hard to grep for things, if one expects them to be spelled correctly. So it can be nice to fix them. People seem to prefer that you fix all the mistakes per file, though.

But for the moment, please focus on drivers staging (and not the media subdirectory). That way, Greg will apply your patches.

julia

author
#3 lore raw
Quoted 13 lines · Julia Lawall
Quoted 8 lines · Mark Heim

Hello Outreachy,

I have managed to identify at least 50 spelling errors in the Linux Kernel, but possibly as many as hundreds using grep (I have been using grep to wade through enormous amounts of text). If that is a worthwile fix, or if anyone is interested in teaming up to dig through them, please message me. (I am estimating there are about 15000 cases to dig through by hand, but I won't know until I'm done grep-ing). Thank you for your time.

Quoted 7 lines

Spelling mistakes are distracting and make it hard to grep for things, if one expects them to be spelled correctly. So it can be nice to fix them. People seem to prefer that you fix all the mistakes per file, though.

But for the moment, please focus on drivers staging (and not the media subdirectory). That way, Greg will apply your patches.

There is a quirk with how my directories are set up due to the commands I used to check out. Thus, I think "drivers staging" is ambiguous in regards to my setup. Is the drivers staging directory the one that has (e.g.) these directories?

accel, accessibility, acpi...

Or, these directories?

axis-fifo, board, emxx_udc...

Doing a simple spelling error patch might be good practice for me since the last one I submitted might not be worth patching.

Quoted 1 line

julia

#4 lore raw
Quoted 2 lines

There is a quirk with how my directories are set up due to the commands I used to check out.

It's not at all clear to me what you mean by this. The one and only proper way to get the code is to clone the complete repository. YOu can use

git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/gregkh/staging.git

(I can't access the tutorial at the moment, so I don't know what it recommends).

Do you have a problem with disk space?

If you don't have the whole repository organized in the expected way, you won't be able to compile the code properly. I would suggest to just desctroy what you have and start over.

Quoted 5 lines

Thus, I think "drivers staging" is ambiguous in
regards to my setup. Is the drivers staging directory the one that has (e.g.) these directories?

accel, accessibility, acpi...

No, I don't think so.

If your tree is called linux, then it would be linux/drivers/staging

Quoted 6 lines

Or, these directories?

axis-fifo, board, emxx_udc...

Doing a simple spelling error patch might be good practice for me since the last one I submitted might not be worth patching.

It's fine, as long as it is on a file in drivers/staging and not in drivers/staging/media.

julia

author
#5 lore raw
Quoted 9 lines · Julia Lawall
Quoted 2 lines

There is a quirk with how my directories are set up due to the commands I used to check out.

It's not at all clear to me what you mean by this. The one and only proper way to get the code is to clone the complete repository. YOu can use

git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/gregkh/staging.git

Consider the greybus directory that I attempted to commit my patch. On my machine, the path is:

~/git/kernels/staging/drivers/staging/greybus

I'm getting confused because I did a checkout of the repository inside a folder named staging, correct?

Quoted 3 lines

(I can't access the tutorial at the moment, so I don't know what it recommends).

The command is:

git clone -b staging-testing git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

Quoted 2 lines

Do you have a problem with disk space?

I have had warnings about low disk space in my /boot/ partition, but I deleted some old kernel images, and the problem is solved.

Quoted 8 lines

If you don't have the whole repository organized in the expected way, you won't be able to compile the code properly. I would suggest to just desctroy what you have and start over.

Quoted 4 lines

Thus, I think "drivers staging" is ambiguous in
regards to my setup. Is the drivers staging directory the one that has (e.g.) these directories?

Quoted 6 lines
Quoted 1 line

accel, accessibility, acpi...

No, I don't think so.

If your tree is called linux, then it would be linux/drivers/staging

Part of my directory tree is literally:

staging/drivers/staging

No wonder I'm confused.

Quoted 10 lines
Quoted 6 lines

Or, these directories?

axis-fifo, board, emxx_udc...

Doing a simple spelling error patch might be good practice for me since the last one I submitted might not be worth patching.

It's fine, as long as it is on a file in drivers/staging and not in drivers/staging/media.

I wrote a script to find instances of a misspelled word in the directory that would fix a word. In the Outreachyfirstpatch tutorial, under the "Potential cleanup patch tasks," spelling mistakes are number 5.

I really appreciate your help, Julia. Even if I didn't make it as an intern this summer, my productivity and confidence have obtained a big boost!

Quoted 1 line

julia

#6 lore raw
Quoted 11 lines · Mark Heim
Quoted 9 lines · Julia Lawall
Quoted 2 lines

There is a quirk with how my directories are set up due to the commands I used to check out.

It's not at all clear to me what you mean by this. The one and only proper way to get the code is to clone the complete repository. YOu can use

git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/gregkh/staging.git

Quoted 6 lines

Consider the greybus directory that I attempted to commit my patch. On my machine, the path is:

~/git/kernels/staging/drivers/staging/greybus

I'm getting confused because I did a checkout of the repository inside a folder named staging, correct?

OK, you can name the top level folder as whatever you want, but staging is fine. But I was referring to the drivers/staging that comes after that.

Quoted 3 lines

I wrote a script to find instances of a misspelled word in the directory that would fix a word. In the Outreachyfirstpatch tutorial, under the "Potential cleanup patch tasks," spelling mistakes are number 5.

Fixing mistakes in the tutorial is also a contribution. Ask Alison for the necessary access.

Quoted 3 lines

I really appreciate your help, Julia. Even if I didn't make it as an intern this summer, my productivity and confidence have obtained a big boost!

An important part of kernel development is communicating in a way that is quickly and accurately understandable by others (or by yourself 6 months later :). That is a useful skill in lots of other areas.

julia

#7 lore raw
In reply to Mark Heim
Quoted 18 lines · Mark Heim
Quoted 9 lines · Julia Lawall
Quoted 2 lines

There is a quirk with how my directories are set up due to the commands I used to check out.

It's not at all clear to me what you mean by this. The one and only proper way to get the code is to clone the complete repository. YOu can use

git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/gregkh/staging.git

Consider the greybus directory that I attempted to commit my patch. On my machine, the path is:

~/git/kernels/staging/drivers/staging/greybus

I'm getting confused because I did a checkout of the repository inside a folder named staging, correct?

Quoted 8 lines
Quoted 3 lines

(I can't access the tutorial at the moment, so I don't know what it recommends).

The command is:

git clone -b staging-testing git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

I'm confused when you ran this what was the current directory?

~/git/kernels?

That would make the kernel root ~/git/kernels/staging

Which is fine.

$ git clone -b staging-testing https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
Cloning into 'staging'...
remote: Enumerating objects: 517, done.
remote: Counting objects: 100% (517/517), done.
remote: Compressing objects: 100% (155/155), done.
remote: Total 9354360 (delta 414), reused 396 (delta 362), pack-reused 9353843
Receiving objects: 100% (9354360/9354360), 2.54 GiB | 2.48 MiB/s, done.
Resolving deltas: 100% (7672184/7672184), done.
Updating files: 100% (79608/79608), done.
$ ls staging/
arch/   certs/   CREDITS  Documentation/  fs/       init/      ipc/    Kconfig  lib/       MAINTAINERS  mm/   README  samples/  security/  tools/  virt/
block/  COPYING  crypto/  drivers/        include/  io_uring/  Kbuild  kernel/  LICENSES/  Makefile     net/  rust/   scripts/  sound/     usr/

That is what you see correct?

Julia is referring to the 'staging' subsystem not the staging repo from Greg. The clone is of his 'staging' repo.

Does that make things more clear?

Ira

author
#8 lore raw
Quoted 49 lines · Ira Weiny
Quoted 18 lines · Mark Heim
Quoted 9 lines · Julia Lawall
Quoted 2 lines

There is a quirk with how my directories are set up due to the commands I used to check out.

It's not at all clear to me what you mean by this. The one and only proper way to get the code is to clone the complete repository. YOu can use

git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/gregkh/staging.git

Consider the greybus directory that I attempted to commit my patch. On my machine, the path is:

~/git/kernels/staging/drivers/staging/greybus

I'm getting confused because I did a checkout of the repository inside a folder named staging, correct?

Quoted 8 lines
Quoted 3 lines

(I can't access the tutorial at the moment, so I don't know what it recommends).

The command is:

git clone -b staging-testing git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

I'm confused when you ran this what was the current directory?

~/git/kernels?

That would make the kernel root ~/git/kernels/staging

Which is fine.

$ git clone -b staging-testing https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
Cloning into 'staging'...
remote: Enumerating objects: 517, done.
remote: Counting objects: 100% (517/517), done.
remote: Compressing objects: 100% (155/155), done.
remote: Total 9354360 (delta 414), reused 396 (delta 362), pack-reused 9353843
Receiving objects: 100% (9354360/9354360), 2.54 GiB | 2.48 MiB/s, done.
Resolving deltas: 100% (7672184/7672184), done.
Updating files: 100% (79608/79608), done.
$ ls staging/
arch/   certs/   CREDITS  Documentation/  fs/       init/      ipc/    Kconfig  lib/       MAINTAINERS  mm/   README  samples/  security/  tools/  virt/
block/  COPYING  crypto/  drivers/        include/  io_uring/  Kbuild  kernel/  LICENSES/  Makefile     net/  rust/   scripts/  sound/     usr/
Quoted 7 lines

That is what you see correct?

Julia is referring to the 'staging' subsystem not the staging repo from Greg. The clone is of his 'staging' repo.

Does that make things more clear?

That is approximately what I see (I also have a directory named, e.g. block). The root is ~/git/kernels, but confusingly there is also a subdirectory named ~/git/kernels/staging/drivers/staging which is why I was confused. Case closed, and thank for your response.

Quoted 1 line

Ira

A message that is not in the archive (sent off-list or not yet received): CALfc2ngYvgWE_Km89zZeUp+xx0cXXsrz5iyC=NnhXcAFK0reOg@mail.gmail.com

#10 lore raw
Quoted 1 line · Mark Heim

Yes, that is approximately what I see. The root is ~/git/kernels/staging, but it is confusing that there is a subdirectory called ~/git/kernels/staging/drivers/staging

Don't top post. Please read the tutorial.

julia

Quoted 64 lines

Mark

On Sat, Mar 18, 2023 at 12:24 AM Ira Weiny <[email protected]> wrote:
Mark Heim wrote:
> On Fri, Mar 17, 2023 at 10:07:05PM +0100, Julia Lawall wrote:
> > > There is a quirk with how my directories are set up due to the commands
> > > I used to check out.
> >
> > It's not at all clear to me what you mean by this.  The one and only
> > proper way to get the code is to clone the complete repository.  YOu can
> > use
> >
> > git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/gregkh/staging.git
> >
>
> Consider the greybus directory that I attempted to commit my patch. On my machine, the path is:
>
> ~/git/kernels/staging/drivers/staging/greybus
>
> I'm getting confused because I did a checkout of the repository inside a
> folder named staging, correct?
>
> > (I can't access the tutorial at the moment, so I don't know what it
> > recommends).
> >
>
> The command is:
>
> git clone -b staging-testing git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
>

I'm confused when you ran this what was the current directory?

~/git/kernels?

That would make the kernel root ~/git/kernels/staging

Which is fine.

$ git clone -b staging-testing https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
Cloning into 'staging'...
remote: Enumerating objects: 517, done.
remote: Counting objects: 100% (517/517), done.
remote: Compressing objects: 100% (155/155), done.
remote: Total 9354360 (delta 414), reused 396 (delta 362), pack-reused 9353843
Receiving objects: 100% (9354360/9354360), 2.54 GiB | 2.48 MiB/s, done.
Resolving deltas: 100% (7672184/7672184), done.
Updating files: 100% (79608/79608), done.
$ ls staging/
arch/   certs/   CREDITS  Documentation/  fs/       init/      ipc/    Kconfig  lib/       MAINTAINERS  mm/   README  samples/  security/  tools/  virt/ block/  COPYING  crypto/  drivers/        include/  io_uring/  Kbuild  kernel/  LICENSES/  Makefile     net/  rust/   scripts/  sound/     usr/

That is what you see correct?

Julia is referring to the 'staging' subsystem not the staging repo from Greg. The clone is of his 'staging' repo.

Does that make things more clear?

Ira