aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-20 23:00:43 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-20 23:00:43 -0500
commit4c9a44aebeaef35570a67aed17b72a2cf8d0b219 (patch)
treeabb874fe7f50671627b282f6c7fb58db5e75a2e3 /include
parent1f0377ff088ed2971c57debc9b0c3b846ec431fd (diff)
parentcfde819088422503b5c69e03ab7bb90f87121d4d (diff)
Merge branch 'akpm' (Andrew's patch-bomb)
Merge the rest of Andrew's patches for -rc1: "A bunch of fixes and misc missed-out-on things. That'll do for -rc1. I still have a batch of IPC patches which still have a possible bug report which I'm chasing down." * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (25 commits) keys: use keyring_alloc() to create module signing keyring keys: fix unreachable code sendfile: allows bypassing of notifier events SGI-XP: handle non-fatal traps fat: fix incorrect function comment Documentation: ABI: remove testing/sysfs-devices-node proc: fix inconsistent lock state linux/kernel.h: fix DIV_ROUND_CLOSEST with unsigned divisors memcg: don't register hotcpu notifier from ->css_alloc() checkpatch: warn on uapi #includes that #include <uapi/... revert "rtc: recycle id when unloading a rtc driver" mm: clean up transparent hugepage sysfs error messages hfsplus: add error message for the case of failure of sync fs in delayed_sync_fs() method hfsplus: rework processing of hfs_btree_write() returned error hfsplus: rework processing errors in hfsplus_free_extents() hfsplus: avoid crash on failed block map free kcmp: include linux/ptrace.h drivers/rtc/rtc-imxdi.c: must include <linux/spinlock.h> mm: cma: WARN if freed memory is still in use exec: do not leave bprm->interp on stack ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/binfmts.h1
-rw-r--r--include/linux/kernel.h6
2 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index cf3eae0b4f59..0530b9860359 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -112,6 +112,7 @@ extern int setup_arg_pages(struct linux_binprm * bprm,
112 unsigned long stack_top, 112 unsigned long stack_top,
113 int executable_stack); 113 int executable_stack);
114extern int bprm_mm_init(struct linux_binprm *bprm); 114extern int bprm_mm_init(struct linux_binprm *bprm);
115extern int bprm_change_interp(char *interp, struct linux_binprm *bprm);
115extern int copy_strings_kernel(int argc, const char *const *argv, 116extern int copy_strings_kernel(int argc, const char *const *argv,
116 struct linux_binprm *bprm); 117 struct linux_binprm *bprm);
117extern int prepare_bprm_creds(struct linux_binprm *bprm); 118extern int prepare_bprm_creds(struct linux_binprm *bprm);
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index d140e8fb075f..c566927efcbd 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -77,13 +77,15 @@
77 77
78/* 78/*
79 * Divide positive or negative dividend by positive divisor and round 79 * Divide positive or negative dividend by positive divisor and round
80 * to closest integer. Result is undefined for negative divisors. 80 * to closest integer. Result is undefined for negative divisors and
81 * for negative dividends if the divisor variable type is unsigned.
81 */ 82 */
82#define DIV_ROUND_CLOSEST(x, divisor)( \ 83#define DIV_ROUND_CLOSEST(x, divisor)( \
83{ \ 84{ \
84 typeof(x) __x = x; \ 85 typeof(x) __x = x; \
85 typeof(divisor) __d = divisor; \ 86 typeof(divisor) __d = divisor; \
86 (((typeof(x))-1) > 0 || (__x) > 0) ? \ 87 (((typeof(x))-1) > 0 || \
88 ((typeof(divisor))-1) > 0 || (__x) > 0) ? \
87 (((__x) + ((__d) / 2)) / (__d)) : \ 89 (((__x) + ((__d) / 2)) / (__d)) : \
88 (((__x) - ((__d) / 2)) / (__d)); \ 90 (((__x) - ((__d) / 2)) / (__d)); \
89} \ 91} \