linux icon indicating copy to clipboard operation
linux copied to clipboard

Fixed bug where 'yes' and 'no' are mixed up

Open marcschuler opened this issue 5 years ago • 8 comments

Everywhere in the kernel 'yes' means 'no' and 'no' means 'yes' for whatever reason. So I fixed around 44.000 files. Obviously.

I am now a maintainer of the linux kernel project.

marcschuler avatar Jan 16 '20 11:01 marcschuler

Hi @KarlTheBee!

Thanks for your contribution to the Linux kernel!

Linux kernel development happens on mailing lists, rather than on GitHub - this GitHub repository is a read-only mirror that isn't used for accepting contributions. So that your change can become part of Linux, please email it to us as a patch.

Sending patches isn't quite as simple as sending a pull request, but fortunately it is a well documented process.

Here's what to do:

  • Format your contribution according to kernel requirements
  • Decide who to send your contribution to
  • Set up your system to send your contribution as an email
  • Send your contribution and wait for feedback

How do I format my contribution?

The Linux kernel community is notoriously picky about how contributions are formatted and sent. Fortunately, they have documented their expectations.

Firstly, all contributions need to be formatted as patches. A patch is a plain text document showing the change you want to make to the code, and documenting why it is a good idea.

You can create patches with git format-patch.

Secondly, patches need 'commit messages', which is the human-friendly documentation explaining what the change is and why it's necessary.

Thirdly, changes have some technical requirements. There is a Linux kernel coding style, and there are licensing requirements you need to comply with.

Both of these are documented in the Submitting Patches documentation that is part of the kernel.

Note that you will almost certainly have to modify your existing git commits to satisfy these requirements. Don't worry: there are many guides on the internet for doing this.

Where do I send my contribution?

The Linux kernel is composed of a number of subsystems. These subsystems are maintained by different people, and have different mailing lists where they discuss proposed changes.

If you don't already know what subsystem your change belongs to, the get_maintainer.pl script in the kernel source can help you.

get_maintainer.pl will take the patch or patches you created in the previous step, and tell you who is responsible for them, and what mailing lists are used. You can also take a look at the MAINTAINERS file by hand.

Make sure that your list of recipients includes a mailing list. If you can't find a more specific mailing list, then LKML - the Linux Kernel Mailing List - is the place to send your patches.

It's not usually necessary to subscribe to the mailing list before you send the patches, but if you're interested in kernel development, subscribing to a subsystem mailing list is a good idea. (At this point, you probably don't need to subscribe to LKML - it is a very high traffic list with about a thousand messages per day, which is often not useful for beginners.)

How do I send my contribution?

Use git send-email, which will ensure that your patches are formatted in the standard manner. In order to use git send-email, you'll need to configure git to use your SMTP email server.

For more information about using git send-email, look at the Git documentation or type git help send-email. There are a number of useful guides and tutorials about git send-email that can be found on the internet.

How do I get help if I'm stuck?

Firstly, don't get discouraged! There are an enormous number of resources on the internet, and many kernel developers who would like to see you succeed.

Many issues - especially about how to use certain tools - can be resolved by using your favourite internet search engine.

If you can't find an answer, there are a few places you can turn:

If you get really, really stuck, you could try the owners of this bot, @daxtens and @ajdlinux. Please be aware that we do have full-time jobs, so we are almost certainly the slowest way to get answers!

I sent my patch - now what?

You wait.

You can check that your email has been received by checking the mailing list archives for the mailing list you sent your patch to. Messages may not be received instantly, so be patient. Kernel developers are generally very busy people, so it may take a few weeks before your patch is looked at.

Then, you keep waiting. Three things may happen:

  • You might get a response to your email. Often these will be comments, which may require you to make changes to your patch, or explain why your way is the best way. You should respond to these comments, and you may need to submit another revision of your patch to address the issues raised.
  • Your patch might be merged into the subsystem tree. Code that becomes part of Linux isn't merged into the main repository straight away - it first goes into the subsystem tree, which is managed by the subsystem maintainer. It is then batched up with a number of other changes sent to Linus for inclusion. (This process is described in some detail in the kernel development process guide).
  • Your patch might be ignored completely. This happens sometimes - don't take it personally. Here's what to do:
    • Wait a bit more - patches often take several weeks to get a response; more if they were sent at a busy time.
    • Kernel developers often silently ignore patches that break the rules. Check for obvious violations of the Submitting Patches guidelines, the style guidelines, and any other documentation you can find about your subsystem. Check that you're sending your patch to the right place.
    • Try again later. When you resend it, don't add angry commentary, as that will get your patch ignored. It might also get you silently blacklisted.

Further information

Happy hacking!

This message was posted by a bot - if you have any questions or suggestions, please talk to my owners, @ajdlinux and @daxtens, or raise an issue at https://github.com/ajdlinux/KernelPRBot.

KernelPRBot avatar Jan 16 '20 11:01 KernelPRBot

The Diff

Github sadly won't create a diff for the files because it's "too large". But I only edited 46.285 files. That's like a small to medium sized npm project.

So I created my own diff, trimmed it in size and tried uploading it to github - but 77MB is "too big" to upload. Ever started a docker image? 77MB is nothing.

Best Of

So here is a best of (/worst of) the git diff you get when you change "yes" to "no" and "no" to "yes". All in all i think, the code does look more nice and kind of lovely. I think I should write Linus Torvalds (does he have WhatsApp?) to use it as the general coding style.

--  CRYPTO_ALG_TYPE_SHASH Synchronous multi-block hash
+-  CRYPTO_ALG_TYPE_SHASH Synchroyesus multi-block hash

The Jesus Algorithm

-implements the simplest possible 'no-overwrite' mode, i.e. it does nothing but return 0.
+implements the simplest possible 'yes-overwrite' mode, i.e. it does yesthing but return 0.

Is yes a thing? Yesthing is definitly a thing.


-vpid.vregname.field = onoff ? pid : 0x1fff; \
+vpid.vregname.field = oyesff ? pid : 0x1fff; \

OY!

-MODULE_AUTHOR("Michael Hunold <[email protected]>");
+MODULE_AUTHOR("Michael Huyesld <[email protected]>");

Sorry Michael

-	 * their normal dequeued state.
+	 * their yesrmal dequeued state.

That's not a normal word.

- * @inode: Inode concerned.
+ * @iyesde: Iyesde concerned.

-		return notifier_from_errno(err);
+		return yestifier_from_erryes(err);

- * We return zero for unsupported registers as the MII code does not check
+ * We return zero for unsupported registers as the MII code does yest check

-	nolock_reg_bfclr(priv, ECON1, ECON1_RXEN);
+	yeslock_regb_write(priv, EIE, 0x00);

- * Moxa Technology Co., Ltd. <www.moxa.com>
+ * Moxa Techyeslogy Co., Ltd. <www.moxa.com>

-static int kvm_init_mmu_notifier(struct kvm *kvm)
+static int kvm_init_mmu_yestifier(struct kvm *kvm)

-static void kvm_sched_in(struct preempt_notifier *pn, int cpu)
+static void kvm_sched_in(struct preempt_yestifier *pn, int cpu)

-	list_for_each_entry(tmp, &consumers, node) {
+	list_for_each_entry(tmp, &consumers, yesde) {

marcschuler avatar Jan 23 '20 21:01 marcschuler

I uploaded the files to dropbox. I'm a bit disappointed by githubs large file abilities. Maybe the linux project should consider using dropbox instead of git as a distributed version control system.

https://www.dropbox.com/sh/y2issl5hz8yhjor/AAAZp49F80enURb6YRSrDBK0a?dl=0

marcschuler avatar Jan 23 '20 21:01 marcschuler

No

ishanrai05 avatar Jan 24 '20 17:01 ishanrai05

You may want to read the bot's message.....

You need to email the diffs, or get in touch with someone who can help you do that.

tman904 avatar Jan 25 '20 14:01 tman904

It ain't a cool joke at all.

berkant avatar Jan 29 '20 07:01 berkant

LGTM

danemadsen avatar Mar 21 '24 14:03 danemadsen

It has absolutely yes conflicts whatsoever

anstropleuton avatar Apr 01 '24 12:04 anstropleuton