forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/md/bcache/util.c
....@@ -33,27 +33,27 @@
3333 case 'y': \
3434 case 'z': \
3535 u++; \
36
- /* fall through */ \
36
+ fallthrough; \
3737 case 'e': \
3838 u++; \
39
- /* fall through */ \
39
+ fallthrough; \
4040 case 'p': \
4141 u++; \
42
- /* fall through */ \
42
+ fallthrough; \
4343 case 't': \
4444 u++; \
45
- /* fall through */ \
45
+ fallthrough; \
4646 case 'g': \
4747 u++; \
48
- /* fall through */ \
48
+ fallthrough; \
4949 case 'm': \
5050 u++; \
51
- /* fall through */ \
51
+ fallthrough; \
5252 case 'k': \
5353 u++; \
5454 if (e++ == cp) \
5555 return -EINVAL; \
56
- /* fall through */ \
56
+ fallthrough; \
5757 case '\n': \
5858 case '\0': \
5959 if (*e == '\n') \
....@@ -270,7 +270,11 @@
270270 int i;
271271 struct bio_vec *bv;
272272
273
- bio_for_each_segment_all(bv, bio, i) {
273
+ /*
274
+ * This is called on freshly new bio, so it is safe to access the
275
+ * bvec table directly.
276
+ */
277
+ for (i = 0, bv = bio->bi_io_vec; i < bio->bi_vcnt; bv++, i++) {
274278 bv->bv_page = alloc_page(gfp_mask);
275279 if (!bv->bv_page) {
276280 while (--bv >= bio->bi_io_vec)