linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: akpm@linux-foundation.org
Cc: linux-ide@vger.kernel.org, harvey.harrison@gmail.com,
	alan@lxorguk.ukuu.org.uk
Subject: Re: [patch 2/2] pata_amd: fix sparse warning
Date: Fri, 04 Apr 2008 03:39:55 -0400	[thread overview]
Message-ID: <47F5DB4B.8060707@garzik.org> (raw)
In-Reply-To: <200803282133.m2SLXutE011470@imap1.linux-foundation.org>

akpm@linux-foundation.org wrote:
> From: Harvey Harrison <harvey.harrison@gmail.com>
> 
> Current code is essentially choosing between dividing by 1 or
> dividing by two, make the conditions a little more obvious.
> 
> As a bonus, removes a sparse error:
> drivers/ata/pata_amd.c:59:11: warning: symbol '__x' shadows an earlier one
> drivers/ata/pata_amd.c:59:11: originally declared here
> 
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  drivers/ata/pata_amd.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff -puN drivers/ata/pata_amd.c~pata_amd-fix-sparse-warning drivers/ata/pata_amd.c
> --- a/drivers/ata/pata_amd.c~pata_amd-fix-sparse-warning
> +++ a/drivers/ata/pata_amd.c
> @@ -56,7 +56,9 @@ static void timing_setup(struct ata_port
>  	u8 t;
>  
>  	T = 1000000000 / amd_clock;
> -	UT = T / min_t(int, max_t(int, clock, 1), 2);
> +	UT = T;
> +	if (clock >= 2)
> +		UT = T / 2;
>  
>  	if (ata_timing_compute(adev, speed, &at, T, UT) < 0) {

applied



      parent reply	other threads:[~2008-04-04  7:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28 21:33 [patch 2/2] pata_amd: fix sparse warning akpm
2008-03-29 16:17 ` Jeff Garzik
2008-03-31  3:12   ` Grant Grundler
2008-04-04  7:39 ` Jeff Garzik [this message]

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=47F5DB4B.8060707@garzik.org \
    --to=jeff@garzik.org \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-ide@vger.kernel.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 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).