diff options
| author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-30 14:41:18 +0000 |
|---|---|---|
| committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-30 14:41:18 +0000 |
| commit | 4ed3c0e713adac46dcca8a9ee668221399b7b659 (patch) | |
| tree | 06929dc26671f0710b964d5bb0a7634f12528a36 /sys/dev/fb | |
| parent | 7154bf4a413eca71cffdb37361ad19960501a2fa (diff) | |
Notes
Diffstat (limited to 'sys/dev/fb')
| -rw-r--r-- | sys/dev/fb/fb.c | 2 | ||||
| -rw-r--r-- | sys/dev/fb/vesa.c | 2 | ||||
| -rw-r--r-- | sys/dev/fb/vga.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c index aa2d30005f41..183abdc3bfcb 100644 --- a/sys/dev/fb/fb.c +++ b/sys/dev/fb/fb.c @@ -86,7 +86,7 @@ vid_realloc_array(void) return ENOMEM; s = spltty(); - newsize = ((adapters + ARRAY_DELTA)/ARRAY_DELTA)*ARRAY_DELTA; + newsize = rounddown(adapters + ARRAY_DELTA, ARRAY_DELTA); new_adp = malloc(sizeof(*new_adp)*newsize, M_DEVBUF, M_WAITOK | M_ZERO); new_vidsw = malloc(sizeof(*new_vidsw)*newsize, M_DEVBUF, M_WAITOK | M_ZERO); diff --git a/sys/dev/fb/vesa.c b/sys/dev/fb/vesa.c index cdd836cd3d3c..4ab83c30ff4b 100644 --- a/sys/dev/fb/vesa.c +++ b/sys/dev/fb/vesa.c @@ -1581,7 +1581,7 @@ vesa_set_origin(video_adapter_t *adp, off_t offset) regs.R_DX = offset / adp->va_window_gran; x86bios_intr(®s, 0x10); - adp->va_window_orig = (offset/adp->va_window_gran)*adp->va_window_gran; + adp->va_window_orig = rounddown(offset, adp->va_window_gran); return (0); /* XXX */ } diff --git a/sys/dev/fb/vga.c b/sys/dev/fb/vga.c index d0239b3a18b8..83b969470b5e 100644 --- a/sys/dev/fb/vga.c +++ b/sys/dev/fb/vga.c @@ -1252,7 +1252,7 @@ set_line_length(video_adapter_t *adp, int pixel) break; case V_INFO_MM_PACKED: count = (pixel + 7)/8; - bpl = ((pixel + 7)/8)*8; + bpl = rounddown(pixel + 7, 8); break; case V_INFO_MM_TEXT: count = (pixel + 7)/8; /* columns */ |
