Skip to content

Commit d532c28

Browse files
Sergei Shtylyovr-vignesh
Sergei Shtylyov
authored andcommitted
mtd: cfi_util: use DIV_ROUND_UP() in cfi_udelay()
Use DIV_ROUND_UP() in cfi_udelay() instead of open-coding it... Doing this also helpfully gets rid of two complaints from 'scripts/checkpatch.pl --strict': CHECK: spaces preferred around that '+' (ctx:VxV) #29: FILE: drivers/mtd/chips/cfi_util.c:29: + msleep((us+999)/1000); ^ CHECK: spaces preferred around that '/' (ctx:VxV) #29: FILE: drivers/mtd/chips/cfi_util.c:29: + msleep((us+999)/1000); ^ Signed-off-by: Sergei Shtylyov <[email protected]> Signed-off-by: Vignesh Raghavendra <[email protected]>
1 parent 54ecb8f commit d532c28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mtd/chips/cfi_util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
void cfi_udelay(int us)
2727
{
2828
if (us >= 1000) {
29-
msleep((us+999)/1000);
29+
msleep(DIV_ROUND_UP(us, 1000));
3030
} else {
3131
udelay(us);
3232
cond_resched();

0 commit comments

Comments
 (0)