projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa31528
)
tty: Cleanup tty buffer align mask
author
Ilpo Järvinen
<ilpo.jarvinen@linux.intel.com>
Wed, 19 Oct 2022 10:55:04 +0000
(13:55 +0300)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 02:56:08 +0000
(
03:56
+0100)
Don't use decimal for mask. Don't use literal for aligning.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link:
https://lore.kernel.org/r/20221019105504.16800-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_buffer.c
patch
|
blob
|
history
diff --git
a/drivers/tty/tty_buffer.c
b/drivers/tty/tty_buffer.c
index 5e287dedce0185e5221e0d6b8a71adad32ca39b7..3f057805560feccfef407d415b5e6612736e77d3 100644
(file)
--- a/
drivers/tty/tty_buffer.c
+++ b/
drivers/tty/tty_buffer.c
@@
-21,7
+21,7
@@
#include "tty.h"
#define MIN_TTYB_SIZE 256
-#define TTYB_ALIGN_MASK
255
+#define TTYB_ALIGN_MASK
0xff
/*
* Byte threshold to limit memory consumption for flip buffers.
@@
-37,7
+37,7
@@
* logic this must match.
*/
-#define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~
0xFF
)
+#define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~
TTYB_ALIGN_MASK
)
/**
* tty_buffer_lock_exclusive - gain exclusive access to buffer