lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 02 Jan 2015 10:46:35 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	linux-arm-kernel@...ts.infradead.org
Cc:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
	Tony Lindgren <tony@...mide.com>,
	Russell King <linux@....linux.org.uk>,
	linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arch: arm: mach-omap2: voltage.c: Remove some unused functions

On Thursday 01 January 2015 18:06:34 Rickard Strandqvist wrote:

> -void omap_change_voltscale_method(struct voltagedomain *voltdm,
> -				  int voltscale_method)
> -{
> -	if (!voltdm || IS_ERR(voltdm)) {
> -		pr_warn("%s: VDD specified does not exist!\n", __func__);
> -		return;
> -	}
> -
> -	switch (voltscale_method) {
> -	case VOLTSCALE_VPFORCEUPDATE:
> -		voltdm->scale = omap_vp_forceupdate_scale;
> -		return;
> -	case VOLTSCALE_VCBYPASS:
> -		voltdm->scale = omap_vc_bypass_scale;
> -		return;
> -	default:
> -		pr_warn("%s: Trying to change the method of voltage scaling to an unsupported one!\n",
> -			__func__);
> -	}
> -}

The VOLTSCALE_VPFORCEUPDATE/VOLTSCALE_VCBYPASS macros are now unused and should
be removed as well.

> @@ -321,10 +290,9 @@ static struct voltagedomain *_voltdm_lookup(const char *name)
>   * @voltdm: struct voltagedomain * to add the powerdomain to
>   * @pwrdm: struct powerdomain * to associate with a voltagedomain
>   *
> - * Associate the powerdomain @pwrdm with a voltagedomain @voltdm.  This
> - * enables the use of voltdm_for_each_pwrdm().  Returns -EINVAL if
> - * presented with invalid pointers; -ENOMEM if memory could not be allocated;
> - * or 0 upon success.
> + * Associate the powerdomain @pwrdm with a voltagedomain @voltdm.
> + * Returns -EINVAL if presented with invalid pointers;
> + * -ENOMEM if memory could not be allocated; or 0 upon success.
>   */
>  int voltdm_add_pwrdm(struct voltagedomain *voltdm, struct powerdomain *pwrdm)
>  {

You have correctly spotted the only place that references voltdm_for_each_pwrdm
and changed the comment, but you failed to notice that it no longer makes
sense to call voltdm_add_pwrdm or keep the voltdm->pwrdm_list pointer
at all, so this function, and the associated list heads can all be removed
as well.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ