All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Girish K S <girish.shivananjappa@linaro.org>
Cc: linux-mmc@vger.kernel.org, kgene.kim@samsung.com,
	patches@linaro.org, linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH] mmc: card: modify mmc_getgeo function
Date: Wed, 21 Sep 2011 14:52:08 -0400	[thread overview]
Message-ID: <m2ty8520fb.fsf@bob.laptop.org> (raw)
In-Reply-To: <1316516929-26694-1-git-send-email-girish.shivananjappa@linaro.org> (Girish K. S.'s message of "Tue, 20 Sep 2011 16:38:49 +0530")

Hi,

On Tue, Sep 20 2011, Girish K S wrote:
> In the earlier code the cylinder, sector and head are assigned
> independently. Current patch generates the cylinder number
> with the values of sector and head.
> This patch only makes they cylinder value to be dependent on
> the sector and head.
>
> Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
> ---
>  drivers/mmc/card/block.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> index 1ff5486..bebb13b 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -226,9 +226,10 @@ static int mmc_blk_release(struct gendisk *disk, fmode_t mode)
>  static int
>  mmc_blk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
>  {
> -	geo->cylinders = get_capacity(bdev->bd_disk) / (4 * 16);
>  	geo->heads = 4;
>  	geo->sectors = 16;
> +	geo->cylinders = get_capacity(bdev->bd_disk) /
> +		(geo->heads * geo->sectors);
>  	return 0;
>  }

Thanks, pushed to mmc-next for 3.2 with a reworded commit message:

Author: Girish K S <girish.shivananjappa@linaro.org>
Date:   Tue Sep 20 16:38:49 2011 +0530

    mmc: card: Remove duplicated constants

    Reuse heads/sectors instead of duplicating them in the cylinders
    calculation.

    Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
    Signed-off-by: Chris Ball <cjb@laptop.org>                    

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  reply	other threads:[~2011-09-21 18:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-20 11:08 [PATCH] mmc: card: modify mmc_getgeo function Girish K S
2011-09-21 18:52 ` Chris Ball [this message]
2011-09-26  8:28   ` Uwe Kleine-König
2011-09-26  8:28     ` Uwe Kleine-König
2011-09-26 12:41     ` Chris Ball
2011-09-26 12:41       ` Chris Ball
2011-09-26 13:09       ` Russell King - ARM Linux
2011-09-26 13:09         ` Russell King - ARM Linux
2011-09-26 13:13       ` Uwe Kleine-König
2011-09-26 13:13         ` Uwe Kleine-König
2011-09-26 13:19         ` Russell King - ARM Linux
2011-09-26 13:19           ` Russell King - ARM Linux

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=m2ty8520fb.fsf@bob.laptop.org \
    --to=cjb@laptop.org \
    --cc=girish.shivananjappa@linaro.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=patches@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.