From: Paulo Miguel Almeida Date: Tue, 8 Mar 2022 08:09:42 +0000 (+1300) Subject: staging: pi433: remove hardcoded mask value for easier readability X-Git-Tag: v6.1-rc5~1691^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=378c64302afe543ba6cedcbc696c08395e75aba4;p=platform%2Fkernel%2Flinux-starfive.git staging: pi433: remove hardcoded mask value for easier readability replace hardcoded value with the bitwise complement of the mask used to extract value sent to rf69 chip. Signed-off-by: Paulo Miguel Almeida Link: https://lore.kernel.org/r/YicPRrH3HmpiTCxe@mail.google.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index 3028018..659c8c1 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -741,7 +741,7 @@ int rf69_set_fifo_threshold(struct spi_device *spi, u8 threshold) int retval; /* check input value */ - if (threshold & 0x80) { + if (threshold & ~MASK_FIFO_THRESH_VALUE) { dev_dbg(&spi->dev, "set: illegal fifo threshold %u\n", threshold); return -EINVAL; }