[PATCH] char/random: Add a newline at the end of the file

From: Borislav Petkov
Date: Tue Oct 01 2019 - 13:50:27 EST


On Tue, Oct 01, 2019 at 10:14:40AM -0700, Linus Torvalds wrote:
> The previous state of the file didn't have that 0xa at the end, so you get that
>
>
> -EXPORT_SYMBOL_GPL(add_bootloader_randomness);
> \ No newline at end of file
> +EXPORT_SYMBOL_GPL(add_bootloader_randomness);
>
> which is "the '-' line doesn't have a newline, the '+' line does" marker.

Aaha, that makes total sense, thanks for explaining. Oh well, let's fix
it then so that people don't scratch heads like me.

---
From: Borislav Petkov <bp@xxxxxxx>
Date: Tue, 1 Oct 2019 19:39:14 +0200
Subject: [PATCH] char/random: Add a newline at the end of the file

git denotes files without newline at their end with

"\ No newline at end of file"

when displaying diffs. Due to

428826f5358c ("fdt: add support for rng-seed")

that file doesn't have a newline (0xa) at its end so whenever an editor
which adds those newlines by default touches it, the below hunk gets
added in addition to other changes.

Fix that separately so that people don't wonder like me what's going on.

No functional changes.

Debugged-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Borislav Petkov <bp@xxxxxxx>
---
drivers/char/random.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/random.c b/drivers/char/random.c
index c2f7de9dc543..de434feb873a 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -2520,4 +2520,4 @@ void add_bootloader_randomness(const void *buf, unsigned int size)
else
add_device_randomness(buf, size);
}
-EXPORT_SYMBOL_GPL(add_bootloader_randomness);
\ No newline at end of file
+EXPORT_SYMBOL_GPL(add_bootloader_randomness);
--
2.21.0

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette