staging: rts5208: Comparisons should place the constant on the right side of the test
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Sergio Paracuellos
Signed-off-by Sergio Paracuellos <[email protected]>--- drivers/staging/rts5208/rtsx_card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/rts5208/rtsx_card.c +0
-0
drivers/staging/rts5208/rtsx_card.c int switch_ssc_clock(struct rtsx_chip *chip, int clk) · line 648
Quoted 5 lines
drivers/staging/rts5208/rtsx_card.c +1
-1@@ -645,7 +645,7 @@ int switch_ssc_clock(struct rtsx_chip *chip, int clk)dev_dbg (rtsx_dev (chip),"Switch SSC clock to %dMHz (cur_clk = %d)\n" , clk, chip->cur_clk); -if ((clk <=2 ) || (N > max_N)) { +if ((clk <=2 ) || (max_N <N )) {
Where is the constant?
The original code looks fine to me...
Also, I can't take patches where there is no changelog text, sorry.
greg k-h
That's true. It seems that checkpatch script is getting a false positive. Just trying to do checkpatch happy. Sorry for inconvenience.
I'll be careful with Changelog stuff from now. Thanks for advice.
Cheers,
Sergio Paracuellos
Quoted 25 lines · Greg KH
Quoted 10 lines · Sergio Paracuellos
Signed-off-by Sergio Paracuellos <[email protected]>--- drivers/staging/rts5208/rtsx_card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/rts5208/rtsx_card.c +0
-0drivers/staging/rts5208/rtsx_card.c int switch_ssc_clock(struct rtsx_chip *chip, int clk) · line 648
Quoted 5 lines
drivers/staging/rts5208/rtsx_card.c +1
-1@@ -645,7 +645,7 @@ int switch_ssc_clock(struct rtsx_chip *chip, int clk)dev_dbg (rtsx_dev (chip),"Switch SSC clock to %dMHz (cur_clk = %d)\n" , clk, chip->cur_clk); -if ((clk <=2 ) || (N > max_N)) { +if ((clk <=2 ) || (max_N <N )) {Where is the constant?
The original code looks fine to me...
Also, I can't take patches where there is no changelog text, sorry.
greg k-h
Quoted 2 lines · Sergio Paracuellos
That's true. It seems that checkpatch script is getting a false positive. Just trying to do checkpatch happy. Sorry for inconvenience.
Keeping the style consistent instead of taking the simplest path to quiet the checkpatch messages is better.
Making N, min_N, max_N all lower case would be better.
Quoted 2 lines · Sergio Paracuellos
That's true. It seems that checkpatch script is getting a false positive. Just trying to do checkpatch happy.
Also the old code was better than new code so leave it alone.
regards,
dan carpenter