]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ipc/shmc.c: eliminate ugly 80-col tricks
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 27 Jun 2013 23:54:00 +0000 (09:54 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:39:00 +0000 (16:39 +1000)
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
ipc/shm.c
mm/mmap.c

index 7e199fa1960f86087c557bcc39b08d304c2b8f7b..85dc001634b1bb6cb63604f79178205504f73aca 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -491,10 +491,10 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
 
        sprintf (name, "SYSV%08x", key);
        if (shmflg & SHM_HUGETLB) {
-               struct hstate *hs = hstate_sizelog((shmflg >> SHM_HUGE_SHIFT)
-                                               & SHM_HUGE_MASK);
+               struct hstate *hs;
                size_t hugesize;
 
+               hs = hstate_sizelog((shmflg >> SHM_HUGE_SHIFT) & SHM_HUGE_MASK);
                if (!hs) {
                        error = -EINVAL;
                        goto no_file;
index 7d20ef44848ca944e5cb4bc049e7127e759148d8..fcedf517e61df45e52872f6f051e6cb40087f5ed 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1367,9 +1367,9 @@ SYSCALL_DEFINE6(mmap_pgoff, unsigned long, addr, unsigned long, len,
                        len = ALIGN(len, huge_page_size(hstate_file(file)));
        } else if (flags & MAP_HUGETLB) {
                struct user_struct *user = NULL;
-               struct hstate *hs = hstate_sizelog((flags >> MAP_HUGE_SHIFT) &
-                                                  SHM_HUGE_MASK);
+               struct hstate *hs;
 
+               hs = hstate_sizelog((flags >> MAP_HUGE_SHIFT) & SHM_HUGE_MASK);
                if (!hs)
                        return -EINVAL;