emul: Remove or declare unused args
In several locations of the emulator code there are unused function arguments that were never caught. Declare these as unused or remove the unused function parameters entirely. Signed-off-by: Aaron Massey <aaronmassey@google.com>
This commit is contained in:
parent
9d7b9dc807
commit
76ae0ba270
|
@ -91,6 +91,8 @@ static int espi_emul_read_lpc_request(const struct device *dev, enum lpc_periphe
|
|||
struct espi_emul *emul;
|
||||
struct espi_emul_data *emul_data = dev->data;
|
||||
|
||||
ARG_UNUSED(data);
|
||||
|
||||
if (!(emul_data->cfg.channel_caps & ESPI_CHANNEL_VWIRE)) {
|
||||
LOG_ERR("bad channel vwire");
|
||||
return -EINVAL;
|
||||
|
@ -122,6 +124,8 @@ static int espi_emul_write_lpc_request(const struct device *dev, enum lpc_periph
|
|||
uint32_t *data)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
ARG_UNUSED(op);
|
||||
ARG_UNUSED(data);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ struct bmi160_emul_cfg {
|
|||
/* Names for the PMU components */
|
||||
static const char *const pmu_name[] = { "acc", "gyr", "mag", "INV" };
|
||||
|
||||
static void sample_read(struct bmi160_emul_data *data, union bmi160_sample *buf)
|
||||
static void sample_read(union bmi160_sample *buf)
|
||||
{
|
||||
/*
|
||||
* Use hard-coded scales to get values just above 0, 1, 2 and
|
||||
|
@ -175,6 +175,8 @@ static int bmi160_emul_io_spi(const struct emul *emulator, const struct spi_conf
|
|||
unsigned int regn, val;
|
||||
int count;
|
||||
|
||||
ARG_UNUSED(config);
|
||||
|
||||
data = emulator->data;
|
||||
|
||||
__ASSERT_NO_MSG(tx_bufs || rx_bufs);
|
||||
|
@ -206,7 +208,7 @@ static int bmi160_emul_io_spi(const struct emul *emulator, const struct spi_conf
|
|||
break;
|
||||
case BMI160_SAMPLE_SIZE:
|
||||
if (regn & BMI160_REG_READ) {
|
||||
sample_read(data, rxd->buf);
|
||||
sample_read(rxd->buf);
|
||||
} else {
|
||||
LOG_INF("Unknown sample write");
|
||||
}
|
||||
|
@ -263,7 +265,7 @@ static int bmi160_emul_transfer_i2c(const struct emul *emulator, struct i2c_msg
|
|||
msgs->buf[0] = val;
|
||||
break;
|
||||
case BMI160_SAMPLE_SIZE:
|
||||
sample_read(data, (void *)msgs->buf);
|
||||
sample_read((void *)msgs->buf);
|
||||
break;
|
||||
default:
|
||||
LOG_ERR("Unexpected msg1 length %d", msgs->len);
|
||||
|
@ -305,6 +307,8 @@ static int emul_bosch_bmi160_init(const struct emul *target, const struct device
|
|||
struct bmi160_emul_data *data = target->data;
|
||||
uint8_t *reg = cfg->reg;
|
||||
|
||||
ARG_UNUSED(parent);
|
||||
|
||||
data->pmu_status = 0;
|
||||
|
||||
reg[BMI160_REG_CHIPID] = BMI160_CHIP_ID;
|
||||
|
|
|
@ -250,6 +250,8 @@ static int emul_host_init(const struct emul *emul, const struct device *bus)
|
|||
{
|
||||
struct espi_host_emul_data *data = emul->data;
|
||||
|
||||
ARG_UNUSED(bus);
|
||||
|
||||
emul_host_init_vw_state(data);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue