diff options
author | Tapasweni Pathak <tapaswenipathak@gmail.com> | 2014-10-08 22:56:57 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-20 10:29:20 +0800 |
commit | dea7503ac4c53edfd0d25d6a1c8b360b3db700d7 (patch) | |
tree | 666f87e918a6d55f80c3c04aa1a34bf8e7977ab1 /drivers/staging/comedi/drivers/s626.c | |
parent | staging: iio: adc: use DIV_ROUND_UP (diff) | |
download | linux-dev-dea7503ac4c53edfd0d25d6a1c8b360b3db700d7.tar.xz linux-dev-dea7503ac4c53edfd0d25d6a1c8b360b3db700d7.zip |
staging: octeon-usb: use DIV_ROUND_UP
The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.
Coccinelle script used :
// <smpl>
@haskernel@
@@
@depends on haskernel@
expression n,d;
@@
(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)
@depends on haskernel@
expression n,d;
@@
- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)
@depends on haskernel@
expression n,d;
@@
- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </smpl>
Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/s626.c')
0 files changed, 0 insertions, 0 deletions