Skip to content

Commit

Permalink
ARM: OMAP3+: SmartReflex: micro-optimization for sanity check
Browse files Browse the repository at this point in the history
val && (val != 1) == val > 1

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Jean Pihet <j-pihet@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
  • Loading branch information
Felipe Balbi authored and Kevin Hilman committed Mar 5, 2012
1 parent 4018bfe commit d617369
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/smartreflex.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ static int omap_sr_autocomp_store(void *data, u64 val)
}

/* Sanity check */
if (val && (val != 1)) {
if (val > 1) {
pr_warning("%s: Invalid argument %lld\n", __func__, val);
return -EINVAL;
}
Expand Down

0 comments on commit d617369

Please sign in to comment.