/* * linux/drivers/video/console/fbcon_rotate.h -- Software Display Rotation * * Copyright (C) 2005 Antonino Daplas * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive * for more details. */ #ifndef _FBCON_ROTATE_H #define _FBCON_ROTATE_H #define GETVYRES(s,i) ({ \ (s == SCROLL_REDRAW || s == SCROLL_MOVE) ? \ (i)->var.yres : (i)->var.yres_virtual; }) #define GETVXRES(s,i) ({ \ (s == SCROLL_REDRAW || s == SCROLL_MOVE || !(i)->fix.xpanstep) ? \ (i)->var.xres : (i)->var.xres_virtual; }) static inline int pattern_test_bit(u32 x, u32 y, u32 pitch, const char *pat) { u32 tmp = (y * pitch) + x, index = tmp / 8, bit = tmp % 8; pat +=index; return (*pat) & (0x80 >> bit); } static inline void pattern_set_bit(u32 x, u32 y, u32 pitch, char *pat) { u32 tmp = (y * pitch) + x, index = tmp / 8, bit = tmp % 8; pat += index; (*pat) |= 0x80 >> bit; } static inline void rotate_ud(const char *in, char *out, u32 width, u32 height) { int i, j; int shift = (8 - (width % 8)) & 7; width = (width + 7) & ~7; for (i = 0; i < height; i++) { for (j = 0; j < width - shift; j++) { if (pattern_test_bit(j, i, width, in)) pattern_set_bit(width - (1 + j + shift), height - (1 + i), width, out); } } } static inline void rotate_cw(const char *in, char *out, u32 width, u32 height) { int i, j, h = height, w = width; int shift = (8 - (height % 8)) & 7; width = (width + 7) & ~7; height = (height + 7) & ~7; for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { if (pattern_test_bit(j, i, width, in)) pattern_set_bit(height - 1 - i - shift, j, height, out); } } } static inline void rotate_ccw(const char *in, char *out, u32 width, u32 height) { int i, j, h = height, w = width; int shift = (8 - (width % 8)) & 7; width = (width + 7) & ~7; height = (height + 7) & ~7; for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { if (pattern_test_bit(j, i, width, in)) pattern_set_bit(i, width - 1 - j - shift, height, out); } } } extern void fbcon_rotate_cw(struct fbcon_ops *ops); extern void fbcon_rotate_ud(struct fbcon_ops *ops); extern void fbcon_rotate_ccw(struct fbcon_ops *ops); #endif lue='author'>author
path: root/net/ipv4/tcp_hybla.c
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2017-01-24 15:18:49 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-24 16:26:14 -0800
commit3705ccfdd1e8b539225ce20e3925a945cc788d67 (patch)
tree99e56310f1dad0b63ac34307f4e2536a675972b6 /net/ipv4/tcp_hybla.c
parentf598f82e204ec0b17797caaf1b0311c52d43fb9a (diff)
mn10300: fix build error of missing fpu_save()
When CONFIG_FPU is not enabled on arch/mn10300, <asm/switch_to.h> causes a build error with a call to fpu_save(): kernel/built-in.o: In function `.L410': core.c:(.sched.text+0x28a): undefined reference to `fpu_save' Fix this by including <asm/fpu.h> in <asm/switch_to.h> so that an empty static inline fpu_save() is defined. Link: http://lkml.kernel.org/r/dc421c4f-4842-4429-1b99-92865c2f24b6@infradead.org Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reported-by: kbuild test robot <fengguang.wu@intel.com> Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/ipv4/tcp_hybla.c')