Commit 4c1ca831 authored by Nick Desaulniers's avatar Nick Desaulniers Committed by Gustavo A. R. Silva
Browse files

Revert "lib: Revert use of fallthrough pseudo-keyword in lib/"



This reverts commit 6a9dc5fd ("lib: Revert use of fallthrough
pseudo-keyword in lib/")

Now that we can build arch/powerpc/boot/ free of -Wimplicit-fallthrough,
re-enable these fixes for lib/.

Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Tested-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Reviewed-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: default avatarMiguel Ojeda <ojeda@kernel.org>
Link: https://github.com/ClangBuiltLinux/linux/issues/236


Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
parent 77433830
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -381,7 +381,7 @@ next_op:
	case ASN1_OP_END_SET_ACT:
		if (unlikely(!(flags & FLAG_MATCHED)))
			goto tag_mismatch;
		/* fall through */
		fallthrough;

	case ASN1_OP_END_SEQ:
	case ASN1_OP_END_SET_OF:
@@ -448,7 +448,7 @@ next_op:
			pc += asn1_op_lengths[op];
			goto next_op;
		}
		/* fall through */
		fallthrough;

	case ASN1_OP_ACT:
		ret = actions[machine[pc + 1]](context, hdr, tag, data + tdp, len);
+1 −1
Original line number Diff line number Diff line
@@ -1113,7 +1113,7 @@ struct assoc_array_edit *assoc_array_delete(struct assoc_array *array,
						index_key))
				goto found_leaf;
		}
		/* fall through */
		fallthrough;
	case assoc_array_walk_tree_empty:
	case assoc_array_walk_found_wrong_shortcut:
	default:
+2 −2
Original line number Diff line number Diff line
@@ -827,7 +827,7 @@ int __init xbc_init(char *buf, const char **emsg, int *epos)
							q - 2);
				break;
			}
			/* fall through */
			fallthrough;
		case '=':
			ret = xbc_parse_kv(&p, q, c);
			break;
@@ -836,7 +836,7 @@ int __init xbc_init(char *buf, const char **emsg, int *epos)
			break;
		case '#':
			q = skip_comment(q);
			/* fall through */
			fallthrough;
		case ';':
		case '\n':
			ret = xbc_parse_key(&p, q);
+5 −5
Original line number Diff line number Diff line
@@ -132,23 +132,23 @@ unsigned long long memparse(const char *ptr, char **retptr)
	case 'E':
	case 'e':
		ret <<= 10;
		/* fall through */
		fallthrough;
	case 'P':
	case 'p':
		ret <<= 10;
		/* fall through */
		fallthrough;
	case 'T':
	case 't':
		ret <<= 10;
		/* fall through */
		fallthrough;
	case 'G':
	case 'g':
		ret <<= 10;
		/* fall through */
		fallthrough;
	case 'M':
	case 'm':
		ret <<= 10;
		/* fall through */
		fallthrough;
	case 'K':
	case 'k':
		ret <<= 10;
+1 −1
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@ void net_dim(struct dim *dim, struct dim_sample end_sample)
			schedule_work(&dim->work);
			break;
		}
		/* fall through */
		fallthrough;
	case DIM_START_MEASURE:
		dim_update_sample(end_sample.event_ctr, end_sample.pkt_ctr,
				  end_sample.byte_ctr, &dim->start_sample);
Loading