target/esirisc_trace: drop macro BIT_MASK() conflicting with bits.h
The esirisc_trace.c uses macro BIT_MASK(), same name as a macro from helper/bits.h Drop the macro definition and use GENMASK() instead. Change-Id: I0cc6a58e5aff3f48fa9a79a99bd28124f334c4e2 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/9168 Tested-by: jenkins Reviewed-by: Evgeniy Naydanov <eugnay@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#endif
|
||||
|
||||
#include <helper/binarybuffer.h>
|
||||
#include <helper/bits.h>
|
||||
#include <helper/command.h>
|
||||
#include <helper/fileio.h>
|
||||
#include <helper/log.h>
|
||||
@@ -18,8 +19,6 @@
|
||||
|
||||
#include "esirisc.h"
|
||||
|
||||
#define BIT_MASK(x) ((1 << (x)) - 1)
|
||||
|
||||
/* Control Fields */
|
||||
#define CONTROL_ST (1<<0) /* Start */
|
||||
#define CONTROL_SP (1<<1) /* Stop */
|
||||
@@ -483,7 +482,7 @@ static int esirisc_trace_analyze_simple(struct command_invocation *cmd, uint8_t
|
||||
struct target *target = get_current_target(cmd->ctx);
|
||||
struct esirisc_common *esirisc = target_to_esirisc(target);
|
||||
struct esirisc_trace *trace_info = &esirisc->trace_info;
|
||||
const uint32_t end_of_trace = BIT_MASK(trace_info->pc_bits) << 1;
|
||||
const uint32_t end_of_trace = GENMASK(trace_info->pc_bits, 1);
|
||||
const uint32_t num_bits = size * 8;
|
||||
int retval;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user