forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/mtd/chips/cfi_util.c
....@@ -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();
....@@ -109,10 +109,13 @@
109109 case 8:
110110 onecmd |= (onecmd << (chip_mode * 32));
111111 #endif
112
+ fallthrough;
112113 case 4:
113114 onecmd |= (onecmd << (chip_mode * 16));
115
+ fallthrough;
114116 case 2:
115117 onecmd |= (onecmd << (chip_mode * 8));
118
+ fallthrough;
116119 case 1:
117120 ;
118121 }
....@@ -162,10 +165,13 @@
162165 case 8:
163166 res |= (onestat >> (chip_mode * 32));
164167 #endif
168
+ fallthrough;
165169 case 4:
166170 res |= (onestat >> (chip_mode * 16));
171
+ fallthrough;
167172 case 2:
168173 res |= (onestat >> (chip_mode * 8));
174
+ fallthrough;
169175 case 1:
170176 ;
171177 }