diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2022-10-19 13:55:04 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-03 03:56:08 +0100 |
commit | 15730dc45dc7432713c7af9ee5abad76872f6405 (patch) | |
tree | bb2b365093dbadee4f699c0c795cc70b9bf49ca8 /drivers/tty/tty_buffer.c | |
parent | fa31528a214701e3afb3997f1c2c2b7290e1d05c (diff) | |
download | linux-15730dc45dc7432713c7af9ee5abad76872f6405.tar.bz2 |
tty: Cleanup tty buffer align mask
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>
Diffstat (limited to 'drivers/tty/tty_buffer.c')
-rw-r--r-- | drivers/tty/tty_buffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index 5e287dedce01..3f057805560f 100644 --- 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 |