Re: [PATCH 3/3] pinctrl: qcom: Avoid assigning thread_op_remain in unthreaded test

From: Sneh Mankad

Date: Wed Jun 10 2026 - 02:18:16 EST




On 03-Jun-26 7:28 PM, Konrad Dybcio wrote:
>
>
> On 29-May-26 14:55, Sneh Mankad wrote:
>> tlmm_test_rising_while_disabled() sets thread_op_remain to 10, but this
>> variable is only used by the threaded IRQ handler to control the number
>> of GPIO pin toggles. Since tlmm_test_rising_while_disabled() does not
>> register a threaded IRQ handler, the assignment is never used.
>>
>> Remove the thread_op_remain assignment from
>> tlmm_test_rising_while_disabled().
>>
>> This does not cause any change in functionality.
>>
>> Signed-off-by: Sneh Mankad <sneh.mankad@xxxxxxxxxxxxxxxx>
>> ---
>> drivers/pinctrl/qcom/tlmm-test.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/pinctrl/qcom/tlmm-test.c b/drivers/pinctrl/qcom/tlmm-test.c
>> index 007d6539ceced294e81cfbe93a00c75a98c858de..e9e04300ab3687825255885821ebde0f3ee586a8 100644
>> --- a/drivers/pinctrl/qcom/tlmm-test.c
>> +++ b/drivers/pinctrl/qcom/tlmm-test.c
>> @@ -521,7 +521,6 @@ static void tlmm_test_rising_while_disabled(struct kunit *test)
>> unsigned int before_edge;
>>
>> priv->intr_op = TLMM_TEST_COUNT;
>> - atomic_set(&priv->thread_op_remain, 10);
>
> Should this be setting priv->intr_op_remain instead?

Should not be needed.
priv->intr_op_remain is to indicate the hard IRQ handler how many times to toggle the GPIO line within the irq handler.
Here the test case does not require any toggles within IRQ handler.

I also found other test cases where intr_op_remain is assigned but never used. Will remove them in v2.

Thanks,
Sneh