lib: ubsan: Fix compilation issues for ubsan

Currently, multiple declarations of data structures and
functions exist, as well as dead code that was meant to be
removed earlier. Remove dead code and multiple declarations
for ubsan.

Change-Id: I2b1d27ab2edc9852a3cd286c70fe8990aa0e0754
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
tirimbino
Isaac J. Manjarres 7 years ago
parent b2bdf7dc77
commit a7ea4f03e5
  1. 28
      lib/ubsan.c
  2. 7
      lib/ubsan.h

@ -351,34 +351,6 @@ void __ubsan_handle_type_mismatch_v1(struct type_mismatch_data_v1 *data,
}
EXPORT_SYMBOL(__ubsan_handle_type_mismatch_v1);
void __ubsan_handle_nonnull_return(struct nonnull_return_data *data)
{
struct type_mismatch_data_common common_data = {
.location = &data->location,
.type = data->type,
.alignment = data->alignment,
.type_check_kind = data->type_check_kind
};
ubsan_type_mismatch_common(&common_data, ptr);
}
EXPORT_SYMBOL(__ubsan_handle_nonnull_return);
void __ubsan_handle_type_mismatch_v1(struct type_mismatch_data_v1 *data,
unsigned long ptr)
{
struct type_mismatch_data_common common_data = {
.location = &data->location,
.type = data->type,
.alignment = 1UL << data->log_alignment,
.type_check_kind = data->type_check_kind
};
ubsan_type_mismatch_common(&common_data, ptr);
}
EXPORT_SYMBOL(__ubsan_handle_type_mismatch_v1);
void __ubsan_handle_vla_bound_not_positive(struct vla_bound_data *data,
unsigned long bound)
{

@ -44,13 +44,6 @@ struct type_mismatch_data_v1 {
unsigned char type_check_kind;
};
struct type_mismatch_data_common {
struct source_location *location;
struct type_descriptor *type;
unsigned long alignment;
unsigned char type_check_kind;
};
struct nonnull_arg_data {
struct source_location location;
struct type_descriptor *type;

Loading…
Cancel
Save