Thread (32 messages) 32 messages, 3 authors, 2016-09-12
STALE3546d

Re: [PATCH 10/10] PM / Domains: Add support for removing nested PM domains by provider

From: Ulf Hansson <hidden>
Date: 2016-09-09 14:21:45
Also in: linux-arm-kernel, linux-tegra

[...]
quoted
quoted
 /**
+ * of_genpd_remove_tail - Remove the last PM domain registered for a provider
+ * @provider: Pointer to device structure associated with provider
The naming of this function would be okay, if we only have added
genpds in the gpd_list by using list_add_tail(), although we don't.
Instead we use list_add() and put them first in the list.

So, unless we change to use list_add_tail() when adding genpds (I
assume we can do that!), I would rather change the name of this
function to of_genpd_remove_first().

What option do you prefer?
I think that I would prefer either of_genpd_remove_last() or
of_genpd_remove_one(). Although _first is accurate from the list
perspective it seems odd from the user perspective. I think that _last
is more meaningful as we are removing the last that was added regardless
or how things appear on the list. Alternatively, _one could be a good
compromise.
I am fine with of_genpd_remove_last().

[...]

Kind regards
Uffe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help