Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 240379 Details for
Bug 296539
Uvesafb fails on 2.6.32-gentoo
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Explicitly cast abs values to u32 in modedb.c
modedb.patch (text/plain), 1.34 KB, created by
Michal Januszewski (RETIRED)
on 2010-07-27 23:05:29 UTC
(
hide
)
Description:
Explicitly cast abs values to u32 in modedb.c
Filename:
MIME Type:
Creator:
Michal Januszewski (RETIRED)
Created:
2010-07-27 23:05:29 UTC
Size:
1.34 KB
patch
obsolete
>diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c >index 0a4dbdc..9653e77 100644 >--- a/drivers/video/modedb.c >+++ b/drivers/video/modedb.c >@@ -636,8 +636,9 @@ done: > if (refresh_specified && db[i].refresh == refresh) { > return 1; > } else { >- if (abs(db[i].refresh - refresh) < diff) { >- diff = abs(db[i].refresh - refresh); >+ tdiff = (u32) abs(db[i].refresh - refresh); >+ if (tdiff < diff) { >+ diff = tdiff; > best = i; > } > } >@@ -654,8 +655,8 @@ done: > for (i = 0; i < dbsize; i++) { > DPRINTK("Trying %ix%i\n", db[i].xres, db[i].yres); > if (!fb_try_mode(var, info, &db[i], bpp)) { >- tdiff = abs(db[i].xres - xres) + >- abs(db[i].yres - yres); >+ tdiff = (u32) (abs(db[i].xres - xres) + >+ abs(db[i].yres - yres)); > > /* > * Penalize modes with resolutions smaller >diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c >index 7b8839e..4ebc300 100644 >--- a/drivers/video/uvesafb.c >+++ b/drivers/video/uvesafb.c >@@ -317,7 +317,8 @@ static void uvesafb_setup_var(struct fb_var_screeninfo *var, > static int uvesafb_vbe_find_mode(struct uvesafb_par *par, > int xres, int yres, int depth, unsigned char flags) > { >- int i, match = -1, h = 0, d = 0x7fffffff; >+ int i, match = -1; >+ unsigned int h = 0, d = UINT_MAX; > > for (i = 0; i < par->vbe_modes_cnt; i++) { > h = abs(par->vbe_modes[i].x_res - xres) +
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 296539
:
232545
|
240249
|
240313
|
240365
|
240379
|
240409
|
263871