Re: [PATCH] opp: Reinitialize the list_kref before adding the static OPPs again

From: Viresh Kumar
Date: Mon Nov 11 2019 - 03:21:41 EST


On 30-10-19, 07:33, Stephen Boyd wrote:
> I agree a simple refcount_t makes more sense here instead of using a
> kref. That would be clearer.

I was using kref as I wanted to call the cleanup routine when kref
reaches 0. A refcount_t will have the same problem as the warning in
this came from refcount mechanism only (which is used by kref). You
can't increment a refcount_t if it is zero :)

Any other suggestions other than local counting ?

--
viresh