That looks nice. Thank you. Sorry for the headaches.
regards,
dan carpenter
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Refactored the function `XGIfb_search_refresh_rate` by removing a level
of `if...else` block nesting. Removed unnecessary parantheses. Removed
potential bug of array underflow.
Signed-off-by: Pratik Jain
---
drivers/staging/xgifb/XGI_main_26.c | 59
On Tue, Mar 20, 2018 at 07:32:32PM +0530, Pratik Jain wrote:
> Refactored the function `XGIfb_search_refresh_rate` by removing a level
> of `if...else` block nesting. Removed unnecessary parantheses.
>
> Signed-off-by: Pratik Jain
> ---
>
Refactored the function `XGIfb_search_refresh_rate` by removing a level
of `if...else` block nesting. Removed unnecessary parantheses.
Signed-off-by: Pratik Jain
---
drivers/staging/xgifb/XGI_main_26.c | 59 +++--
1 file changed, 30
On Tue, Mar 20, 2018 at 02:05:49PM +0530, Pratik Jain wrote:
> Refactored the function `XGIfb_search_refresh_rate` by removing a level
> of `if...else` block nesting. Removed unnecessary parantheses.
>
> Signed-off-by: Pratik Jain
> ---
>
Refactored the function `XGIfb_search_refresh_rate` by removing a level
of `if...else` block nesting. Removed unnecessary parantheses.
Signed-off-by: Pratik Jain
---
drivers/staging/xgifb/XGI_main_26.c | 61 +++--
1 file changed, 32
You got a valid point about `++i` and `i++`. But I still feel
that it is less complicated than previous one. I am explicitly
saying(in first loop) that we are skipping some values to get
to a specific index. Apart from that, we can avoid unncessary
wrapping and indentation. Logic becomes much more
I'm trying to review this, but I feel like this makes it slightly more
complicated for no reason. Why break it up into two loops?
> - i++;
> + ++i;
These are equivalent, so you should default to accepting the original
author's style. Otherwise the next person to touch
Refactored the function `XGIfb_search_refresh_rate` by removing a level
of `if...else` block nesting. Removed unnecessary parantheses.
Signed-off-by: Pratik Jain
---
drivers/staging/xgifb/XGI_main_26.c | 63 +++--
1 file changed, 33