Re: [PATCH v8 3/3] Input: Add TouchNetix axiom i2c touchscreen driver

Kamel Bouhara
2024-02-19T12:49:16Z

Le Mon, Feb 19, 2024 at 10:58:22AM +0000, SHUKLA Mamta Ramendra a écrit :
>
>
> Hello Kamel,

Hello,

[...]

> > +
> > +/*
> > + * Support function to axiom_process_u41_report.
> > + * Generates input-subsystem events for every target.
> > + * After calling this function the caller shall issue
> > + * a Sync to the input sub-system.
> > + */
> > +static bool axiom_process_u41_report_target(struct axiom_data *ts,
> > + struct axiom_target_report *target)
> > +{
> > + struct input_dev *input_dev = ts->input_dev;
> > + struct axiom_u41_target *target_prev_state;
> > + enum axiom_target_state current_state;
> > + int id;
> > +
> > + /* Verify the target index */
> > + if (target->index >= AXIOM_U41_MAX_TARGETS) {
> > + dev_err(ts->dev, "Invalid target index! %u\n", target->index);
> > + return false;
> > + }
> > +
> > + target_prev_state = &ts->targets[target->index];
> > +
> > + current_state = AXIOM_TARGET_STATE_NOT_PRESENT;
> > +
> > + if (target->present) {
> > + if (target->z >= 0)
> > + current_state = AXIOM_TARGET_STATE_TOUCHING;
> > + else if (target->z > AXIOM_PROX_LEVEL && target->z < 0)
> > + current_state = AXIOM_TARGET_STATE_HOVER;
> > + else if (target->z == AXIOM_PROX_LEVEL)
> > + current_state = AXIOM_TARGET_STATE_PROX;
> > + }
> > +
> > + if (target_prev_state->state == current_state &&
> > + target_prev_state->x == target->x &&
> > + target_prev_state->y == target->y &&
> > + target_prev_state->z == target->z)
> > + return false;
> > +
> > + id = target->index;
> > +
> > + dev_dbg(ts->dev, "U41 Target T%u, slot:%u present:%u, x:%u, y:%u, z:%d\n",
> > + target->index, slot, target->present,
> > + target->x, target->y, target->z);
>
> This doesn't compile. You forgot to replace slot with id.
>
>
> - dev_dbg(ts->dev, "U41 Target T%u, slot:%u present:%u, x:%u,
> y:%u, z:%d\n",
> - target->index, slot, target->present,
> + dev_dbg(ts->dev, "U41 Target T%u, id:%u present:%u, x:%u, y:%u,
> z:%d\n",
> + target->index, id, target->present,
>

I don't know how I could missed this one :/ !

Fixed thanks !

--
Kamel Bouhara, Bootlin
Embedded Linux and kernel engineering