2017-12-02 09:58:25

by Marcus Wolf

[permalink] [raw]
Subject: [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()

From: root <root@Laptop-Wolf>

Defines used in cases contain already shifted bits, so currentValue must not be shifted.
Signed-off-by: Marcus Wolf <[email protected]>
---
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 e69a215..12c9df9 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


2017-12-02 10:06:24

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()

On Sat, Dec 02, 2017 at 11:58:12AM +0200, Marcus Wolf wrote:
> From: root <root@Laptop-Wolf>

I think something went wrong here :)

Also, you should never need to do kernel development as root...

greg k-h

2017-12-02 10:10:37

by Marcus Wolf

[permalink] [raw]
Subject: Re: [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()

Hi Greg,

yes, of course. Just got the wrong console to enter the commit command -
but when I recognized, it was already too late :-/ The patch already was
generated in user console.

I am wondering myself, where this From: comes from. I used 'git
send-email -1 --annotate'

How to prevent the From: line?

Should I resend the patch?

Thanks,

Marcus

Am 02.12.2017 um 12:06 schrieb Greg KH:
> On Sat, Dec 02, 2017 at 11:58:12AM +0200, Marcus Wolf wrote:
>> From: root <root@Laptop-Wolf>
>
> I think something went wrong here :)
>
> Also, you should never need to do kernel development as root...
>
> greg k-h
>

--
Smarthome-Wolf UG (haftungsbeschränkt)
Helene-Lange-Weg 23
80637 München
Amtsgericht München, HRB 223529
Umastzsteuer-ID: DE304719911
Geschäftsführer: Marcus Wolf