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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130103124242.GG7247@mwanda>
Date:	Thu, 3 Jan 2013 15:42:42 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	wei_wang@...lsil.com.cn
Cc:	cjb@...top.org, sameo@...ux.intel.com, arnd@...db.de,
	oakad@...oo.com, gregkh@...uxfoundation.org,
	linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
	bp@...en8.de, devel@...uxdriverproject.org
Subject: Re: [PATCH v3 6/8] MFD:rtsx: Add callback function conv_clk_and_div_n

On Fri, Dec 28, 2012 at 10:41:45AM +0800, wei_wang@...lsil.com.cn wrote:
> diff --git a/drivers/mfd/rts5209.c b/drivers/mfd/rts5209.c
> index ba74de8..98fe0f3 100644
> --- a/drivers/mfd/rts5209.c
> +++ b/drivers/mfd/rts5209.c
> @@ -174,6 +174,7 @@ static const struct pcr_ops rts5209_pcr_ops = {
>  	.card_power_off = rts5209_card_power_off,
>  	.switch_output_voltage = rts5209_switch_output_voltage,
>  	.cd_deglitch = NULL,
> +	.conv_clk_and_div_n = NULL,

This isn't needed.  It's set to NULL by default.

> -	N = (u8)(clk - 2);
> +	if (pcr->ops->conv_clk_and_div_n)
> +		N = (u8)pcr->ops->conv_clk_and_div_n(clk, CLK_TO_DIV_N);
> +	else
> +		N = (u8)(clk - 2);

These unneeded casts are confusing.  Why are we doing them anyway?

regards,
dan carpenter

--
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