summaryrefslogtreecommitdiff
path: root/reference/C/CONTRIB/SNIP/bitops.c
blob: 1d0c0bc537ba0a22cd8db6ea7ff475502dbb84cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/*
**  Bit set, clear, and test operations
**
**  public domain snippet by Bob Stout
*/

typedef enum {ERROR = -1, FALSE, TRUE} LOGICAL;

#define BOOL(x) (!(!(x)))

#define BitSet(arg,posn) ((arg) | (1L << (posn)))
#define BitClr(arg,posn) ((arg) & ~(1L << (posn)))
#define BitTst(arg,posn) BOOL((arg) & (1L << (posn)))
linux/net-next.git/diff/?id=44a7102484db0ddfa6f855b57ffe0566f739b55a&id2=1d5c65edd930ff05ef036bbade87275e4b5b7b90'>diff)
drm/i915: call kunmap_px on pt_vaddr
We need to kunmap pt_vaddr and not pt itself, otherwise we end up mapping a bunch of pages without ever unmapping them. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Fixes: d1c54acd67dc ("drm/i915/gtt: Introduce kmap|kunmap for dma page") Signed-off-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1460476663-24890-4-git-send-email-matthew.auld@intel.com
Diffstat