linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: linux-fbdev@vger.kernel.org
Subject: Re: [patch -next] fb: fix recent breakage in correct_chipset()
Date: Fri, 12 Jul 2013 20:11:11 +0000	[thread overview]
Message-ID: <51E062DF.5080801@infradead.org> (raw)
In-Reply-To: <20130702062821.GC24410@elgon.mountain>

On 07/01/13 23:28, Dan Carpenter wrote:
> The 6e36308a6f "fb: fix atyfb build warning" isn't right.  It makes all
> the indexes off by one.  This patch reverts it and casts the
> ARRAY_SIZE() to int to silence the build warning.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Tomi,

My incorrect patch has been merged into mainline.
Please merge Dan's fix for it instead.

Thanks.

> diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
> index a89c15d..9b0f12c 100644
> --- a/drivers/video/aty/atyfb_base.c
> +++ b/drivers/video/aty/atyfb_base.c
> @@ -435,8 +435,8 @@ static int correct_chipset(struct atyfb_par *par)
>  	const char *name;
>  	int i;
>  
> -	for (i = ARRAY_SIZE(aty_chips); i > 0; i--)
> -		if (par->pci_id = aty_chips[i - 1].pci_id)
> +	for (i = (int)ARRAY_SIZE(aty_chips) - 1; i >= 0; i--)
> +		if (par->pci_id = aty_chips[i].pci_id)
>  			break;
>  
>  	if (i < 0)
> 


-- 
~Randy

  parent reply	other threads:[~2013-07-12 20:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02  6:28 [patch -next] fb: fix recent breakage in correct_chipset() Dan Carpenter
2013-07-02 15:50 ` Randy Dunlap
2013-07-12 20:11 ` Randy Dunlap [this message]
2013-07-26  8:34 ` Tomi Valkeinen
2013-08-01  9:31 ` Geert Uytterhoeven
2013-08-01 11:50 ` 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=51E062DF.5080801@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=linux-fbdev@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).