* [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()
@ 2017-12-02 9:58 Marcus Wolf
2017-12-02 10:06 ` Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: Marcus Wolf @ 2017-12-02 9:58 UTC (permalink / raw)
To: gregkh, dan.carpenter, devel, linux-kernel; +Cc: Marcus Wolf
From: root <root@Laptop-Wolf>
Defines used in cases contain already shifted bits, so currentValue must not be shifted.
Signed-off-by: Marcus Wolf <linux@wolf-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 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()
2017-12-02 9:58 [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation() Marcus Wolf
@ 2017-12-02 10:06 ` Greg KH
2017-12-02 10:10 ` Marcus Wolf
0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2017-12-02 10:06 UTC (permalink / raw)
To: Marcus Wolf; +Cc: dan.carpenter, devel, linux-kernel
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()
2017-12-02 10:06 ` Greg KH
@ 2017-12-02 10:10 ` Marcus Wolf
0 siblings, 0 replies; 7+ messages in thread
From: Marcus Wolf @ 2017-12-02 10:10 UTC (permalink / raw)
To: Greg KH, Marcus Wolf; +Cc: dan.carpenter, devel, linux-kernel
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()
2017-12-02 10:51 Marcus Wolf
@ 2017-12-02 14:59 ` Greg KH
0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2017-12-02 14:59 UTC (permalink / raw)
To: Marcus Wolf; +Cc: dan.carpenter, devel, linux-kernel
On Sat, Dec 02, 2017 at 12:51:54PM +0200, Marcus Wolf wrote:
> Defines used in cases contain already shifted bits, so currentValue must not be shifted.
> Signed-off-by: Marcus Wolf <linux@wolf-entwicklungen.de>
Odd extra ' ' in your subject :(
And again, linewrap please.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()
2017-12-02 10:32 Marcus Wolf
@ 2017-12-02 14:58 ` Greg KH
0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2017-12-02 14:58 UTC (permalink / raw)
To: Marcus Wolf; +Cc: dan.carpenter, devel, linux-kernel
On Sat, Dec 02, 2017 at 12:32:20PM +0200, Marcus Wolf wrote:
> Defines used in cases contain already shifted bits, so currentValue must not be shifted.
Please properly wrap your changelog text.
And you need a blank line before your signed-off-by line.
> signed_of_by: Marcus Wolf <linux@wolf-entwicklungen.de>
"Signed-off-by:"
Did you run scripts/checkpatch.pl on your patch?
You sent 4 patches just now, which order should I apply them in? I have
no idea, so please fix them up and resend them as a numbered patch
series so that I have a chance to get it right.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()
@ 2017-12-02 10:51 Marcus Wolf
2017-12-02 14:59 ` Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: Marcus Wolf @ 2017-12-02 10:51 UTC (permalink / raw)
To: gregkh, dan.carpenter, devel, linux-kernel; +Cc: Marcus Wolf
Defines used in cases contain already shifted bits, so currentValue must not be shifted.
Signed-off-by: Marcus Wolf <linux@wolf-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 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()
@ 2017-12-02 10:32 Marcus Wolf
2017-12-02 14:58 ` Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: Marcus Wolf @ 2017-12-02 10:32 UTC (permalink / raw)
To: gregkh, dan.carpenter, devel, linux-kernel
Defines used in cases contain already shifted bits, so currentValue must not be shifted.
signed_of_by: Marcus Wolf <linux@wolf-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 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-12-02 15:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-02 9:58 [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation() Marcus Wolf
2017-12-02 10:06 ` Greg KH
2017-12-02 10:10 ` Marcus Wolf
2017-12-02 10:32 Marcus Wolf
2017-12-02 14:58 ` Greg KH
2017-12-02 10:51 Marcus Wolf
2017-12-02 14:59 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).