lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed,  8 Nov 2017 19:13:56 +0200
From:   Marcus Wolf <linux@...f-entwicklungen.de>
To:     gregkh@...uxfoundation.org, dan.carpenter@...cle.com,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Cc:     Marcus Wolf <linux@...f-entwicklungen.de>
Subject: [PATCH] Fixes issue with bit shift in rf69_get_modulation

Fixes issue with bit shift in rf69_get_modulation

Signed-off-by: Marcus Wolf <linux@...f-entwicklungen.de>
---
 drivers/staging/pi433/rf69.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index 290b419..c945b4b 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -102,7 +102,7 @@ enum modulation rf69_get_modulation(struct spi_device *spi)
 
 	currentValue = READ_REG(REG_DATAMODUL);
 
-	switch (currentValue & MASK_DATAMODUL_MODULATION_TYPE >> 3) { // TODO improvement: change 3 to define
+	switch (currentValue & MASK_DATAMODUL_MODULATION_TYPE) {
 	case DATAMODUL_MODULATION_TYPE_OOK: return OOK;
 	case DATAMODUL_MODULATION_TYPE_FSK: return FSK;
 	default:			    return undefined;
-- 
1.7.10.4

Powered by blists - more mailing lists