arch/x86: fix multiboot.c pointer cast
Widen the integer to pointer size before conversion, to make explicit the intent (and silence the compiler warning). Also fix a minor bug involving a duplicate (and thus dead) store. Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This commit is contained in:
parent
8b339e7409
commit
58bbbddbef
1 changed files with 1 additions and 2 deletions
|
@ -41,11 +41,10 @@ static int multiboot_framebuf_init(struct device *dev)
|
||||||
|
|
||||||
adj_x = info->fb_width - CONFIG_X86_MULTIBOOT_FRAMEBUF_X;
|
adj_x = info->fb_width - CONFIG_X86_MULTIBOOT_FRAMEBUF_X;
|
||||||
adj_y = info->fb_height - CONFIG_X86_MULTIBOOT_FRAMEBUF_Y;
|
adj_y = info->fb_height - CONFIG_X86_MULTIBOOT_FRAMEBUF_Y;
|
||||||
buffer = (uint32_t *) info->fb_addr_lo;
|
|
||||||
data->pitch = (info->fb_pitch / 4) + adj_x;
|
data->pitch = (info->fb_pitch / 4) + adj_x;
|
||||||
adj_x /= 2;
|
adj_x /= 2;
|
||||||
adj_y /= 2;
|
adj_y /= 2;
|
||||||
buffer = (uint32_t *) info->fb_addr_lo;
|
buffer = (uint32_t *) (uintptr_t) info->fb_addr_lo;
|
||||||
buffer += adj_x;
|
buffer += adj_x;
|
||||||
buffer += adj_y * data->pitch;
|
buffer += adj_y * data->pitch;
|
||||||
data->buffer = buffer;
|
data->buffer = buffer;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue