Message ID | 1409741551-16437-15-git-send-email-ulf.hansson@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Ulf, On Wed, Sep 3, 2014 at 12:52 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote: > --- a/drivers/base/power/domain_governor.c > +++ b/drivers/base/power/domain_governor.c > @@ -229,10 +229,7 @@ static bool always_on_power_down_ok(struct dev_pm_domain *domain) > > #else /* !CONFIG_PM_RUNTIME */ > > -bool default_stop_ok(struct device *dev) > -{ > - return false; > -} > +static inline bool default_stop_ok(struct device *dev) { return false; } The "inline" doesn't make much sense here. This function is only referenced from places that need its address: struct dev_power_governor simple_qos_governor = { .stop_ok = default_stop_ok, .power_down_ok = default_power_down_ok, }; and struct dev_power_governor pm_domain_always_on_gov = { .power_down_ok = always_on_power_down_ok, .stop_ok = default_stop_ok, }; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wednesday, September 03, 2014 03:15:59 PM Geert Uytterhoeven wrote: > Hi Ulf, > > On Wed, Sep 3, 2014 at 12:52 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote: > > --- a/drivers/base/power/domain_governor.c > > +++ b/drivers/base/power/domain_governor.c > > > @@ -229,10 +229,7 @@ static bool always_on_power_down_ok(struct dev_pm_domain *domain) > > > > #else /* !CONFIG_PM_RUNTIME */ > > > > -bool default_stop_ok(struct device *dev) > > -{ > > - return false; > > -} > > +static inline bool default_stop_ok(struct device *dev) { return false; } > > The "inline" doesn't make much sense here. But then it doesn't hurt either I suppose? Anyway, Ulf, are you going to update this patch?
On 4 September 2014 21:49, Rafael J. Wysocki <rjw@rjwysocki.net> wrote: > On Wednesday, September 03, 2014 03:15:59 PM Geert Uytterhoeven wrote: >> Hi Ulf, >> >> On Wed, Sep 3, 2014 at 12:52 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote: >> > --- a/drivers/base/power/domain_governor.c >> > +++ b/drivers/base/power/domain_governor.c >> >> > @@ -229,10 +229,7 @@ static bool always_on_power_down_ok(struct dev_pm_domain *domain) >> > >> > #else /* !CONFIG_PM_RUNTIME */ >> > >> > -bool default_stop_ok(struct device *dev) >> > -{ >> > - return false; >> > -} >> > +static inline bool default_stop_ok(struct device *dev) { return false; } >> >> The "inline" doesn't make much sense here. > > But then it doesn't hurt either I suppose? > > Anyway, Ulf, are you going to update this patch? Unless there are other comments, I would prefer to not update. :-) Kind regards Uffe -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/base/power/domain_governor.c b/drivers/base/power/domain_governor.c index a089e3b..d88a62e 100644 --- a/drivers/base/power/domain_governor.c +++ b/drivers/base/power/domain_governor.c @@ -42,7 +42,7 @@ static int dev_update_qos_constraint(struct device *dev, void *data) * default_stop_ok - Default PM domain governor routine for stopping devices. * @dev: Device to check. */ -bool default_stop_ok(struct device *dev) +static bool default_stop_ok(struct device *dev) { struct gpd_timing_data *td = &dev_gpd_data(dev)->td; unsigned long flags; @@ -229,10 +229,7 @@ static bool always_on_power_down_ok(struct dev_pm_domain *domain) #else /* !CONFIG_PM_RUNTIME */ -bool default_stop_ok(struct device *dev) -{ - return false; -} +static inline bool default_stop_ok(struct device *dev) { return false; } #define default_power_down_ok NULL #define always_on_power_down_ok NULL diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index abeb5dc..ebf52ae 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -151,8 +151,6 @@ extern void pm_genpd_init(struct generic_pm_domain *genpd, extern int pm_genpd_poweron(struct generic_pm_domain *genpd); extern int pm_genpd_name_poweron(const char *domain_name); -extern bool default_stop_ok(struct device *dev); - extern struct dev_power_governor pm_domain_always_on_gov; #else @@ -231,10 +229,6 @@ static inline int pm_genpd_name_poweron(const char *domain_name) { return -ENOSYS; } -static inline bool default_stop_ok(struct device *dev) -{ - return false; -} #define simple_qos_governor NULL #define pm_domain_always_on_gov NULL #endif
There are currently no need to export default_stop_ok() as an API, instead let's keep it local to the PM domain governor. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> --- drivers/base/power/domain_governor.c | 7 ++----- include/linux/pm_domain.h | 6 ------ 2 files changed, 2 insertions(+), 11 deletions(-)