linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: wei_wang@realsil.com.cn
Cc: cjb@laptop.org, sameo@linux.intel.com, arnd@arndb.de,
	oakad@yahoo.com, gregkh@linuxfoundation.org,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	bp@alien8.de, devel@linuxdriverproject.org
Subject: Re: [PATCH v3 6/8] MFD:rtsx: Add callback function conv_clk_and_div_n
Date: Thu, 3 Jan 2013 15:42:42 +0300	[thread overview]
Message-ID: <20130103124242.GG7247@mwanda> (raw)
In-Reply-To: <0746763566e1d7b9902c18fc0539c3a099d28ae0.1356662294.git.wei_wang@realsil.com.cn>

On Fri, Dec 28, 2012 at 10:41:45AM +0800, wei_wang@realsil.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


  reply	other threads:[~2013-01-03 12:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-28  2:41 [PATCH v3 0/8] rtsx patchset for MFD and MMC tree wei_wang
2012-12-28  2:41 ` [PATCH v3 1/8] MFD:rtsx: Fix typo in comment wei_wang
2012-12-28  2:41 ` [PATCH v3 2/8] MFD:rtsx: Remove redundant code wei_wang
2012-12-28  2:41 ` [PATCH v3 3/8] MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly wei_wang
2013-01-03 12:25   ` Dan Carpenter
2013-01-04  2:46     ` [PATCH v3 3/8] MFD:rtsx: Declare that the DMA address limitationis32bit explicitly wwang
2013-01-04  5:50       ` Dan Carpenter
2012-12-28  2:41 ` [PATCH v3 4/8] MFD:rtsx: Add callback function switch_output_voltage wei_wang
2012-12-28  2:41 ` [PATCH v3 5/8] MMC:rtsx: Using callback function to switch output voltage wei_wang
2012-12-28  2:41 ` [PATCH v3 6/8] MFD:rtsx: Add callback function conv_clk_and_div_n wei_wang
2013-01-03 12:42   ` Dan Carpenter [this message]
2012-12-28  2:41 ` [PATCH v3 7/8] MFD:rtsx: Fix checkpatch warning wei_wang
2013-01-03 12:44   ` Dan Carpenter
2012-12-28  2:41 ` [PATCH v3 8/8] MFD:rtsx: Use macro defines to replace some variables wei_wang
2013-01-03 14:11 ` [PATCH v3 0/8] rtsx patchset for MFD and MMC tree Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130103124242.GG7247@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=cjb@laptop.org \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=oakad@yahoo.com \
    --cc=sameo@linux.intel.com \
    --cc=wei_wang@realsil.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).