OK, as Stephen recently asked why there is a double inclusion of in kernel/sysctl.c (and I asked Greg and Randy); I finally decided to write a patch to the LKML for possible inclusion.

But, git ain’t easy for people like me (who are used to the easiness of say - subversion or even cvs). So here’s what I did (thanks to Fernando for the help earlier today):

1
2
3
4
5
6
7
8
9
$ vim kernel/sysctl.c
// change something
$ git checkout -b sysctl
// create a new branch from your changes, based upon the master repository
$ git commit -a -s
// commit the changes to your newly created branch
$ git format-patch master..sysctl
// Enter a subject and then a separate description
// and you should have a new file in the current working directory starting like 0001-*.patch

Now you should have a mailable patch, ready to be sent upstream that looks like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 839ce261cf688d62bebd9ae3a0101dd672018940 Mon Sep 17 00:00:00 2001
From: Christian Heim
Date: Sun, 19 Aug 2007 12:51:52 +0200
Subject: [PATCH] Remove double inclusion of linux/capability.h

Remove the second inclusion of linux/capability.h, which has been introduced
with "[PATCH] move capable() to capability.h" (or commit c59ede7b78db329949d9cdcd7064e22d357560ef).

Signed-off-by: Christian Heim
---
 kernel/sysctl.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 8bdb8c0..9029690 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -27,7 +27,6 @@
 #include
 #include
 #include
-#include
 #include
 #include
 #include

--
1.5.3.rc4

And if you wanna delete the branch afterwards again, just do this:

1
2
3
4
$ git checkout master
// Switch back to the master branch
$ git branch -D sysctl
// Delete the old branch named "sysctl"