Re: [PATCH v3] staging: pi433: replace simple switch statements

2018-06-25 Thread Dan Carpenter
If there are going to be actual users in the specific near term then that's fine. Otherwise if we're talking a year out, then it's too far away to predict what will happen a year from now so we should delete the dead weight. regards, dan carpenter

Re: [PATCH v3] staging: pi433: replace simple switch statements

2018-06-25 Thread marcus . wolf
Hi Dan, I'd like to mention once more, that the idea of the abstraction was to support multiple modules of Hope-RF. If the decision of the "team" of developer of this driver is, that it should be reduced to a Pi433 or RFM69CW driver only, I fully agree, that the abstraction layer isn't necessar

Re: [PATCH v3] staging: pi433: replace simple switch statements

2018-06-25 Thread Dan Carpenter
I'd still prefer if we just removed this abstraction entirely and used OPMODE_MODE_TRANSMIT everywhere instead of bringing "transmit" into it. I know that every author thinks their abstraction will definitely be useful in the future, but generally kernel style is to remove abstractions. But I gue

Re: [PATCH v3] staging: pi433: replace simple switch statements

2018-06-25 Thread marcus . wolf
Reviewed-by: Marcus Wolf Thank you Valentin, very nice patch :-) Valentin Vidic schrieb am 24.06.2018 18:31: Use const array to map switch cases to resulting values. Signed-off-by: Valentin Vidic --- v2: use correct type for const arrays v3: add missing static keyword for af_map drivers/sta

[PATCH v3] staging: pi433: replace simple switch statements

2018-06-24 Thread Valentin Vidic
Use const array to map switch cases to resulting values. Signed-off-by: Valentin Vidic --- v2: use correct type for const arrays v3: add missing static keyword for af_map drivers/staging/pi433/rf69.c | 233 ++- 1 file changed, 93 insertions(+), 140 deletions(-)