From patchwork Fri Aug 4 15:42:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ray Huang X-Patchwork-Id: 9880759 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E342F603B4 for ; Fri, 4 Aug 2017 07:47:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D29132888B for ; Fri, 4 Aug 2017 07:47:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C75E9289AB; Fri, 4 Aug 2017 07:47:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.6 required=2.0 tests=BAYES_00, DATE_IN_FUTURE_06_12, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C5F02888B for ; Fri, 4 Aug 2017 07:47:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751940AbdHDHrj (ORCPT ); Fri, 4 Aug 2017 03:47:39 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:37545 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751924AbdHDHrh (ORCPT ); Fri, 4 Aug 2017 03:47:37 -0400 Received: by mail-pg0-f66.google.com with SMTP id 83so1079337pgb.4; Fri, 04 Aug 2017 00:47:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=j0r8ww4HMSjyauv0uKHQcHVjtTlQxAeAw7W1mmNzOOw=; b=cgJxcoYAspYnF7hrHbQas2tJracLg2oByeWylQEoZvlGGjk0ueurxaFsIATw99h3qH 07szrC/WJN5/m8CJNgXH9t84r9/aV5QLMsdhg318qnLO8IudTwVeWOkB574e/O2ntk29 2agQMaoGSYvChoyPh5nXuZD45hfN2LAWYcNSJkPeFgCHiQSnQw6v+CrAaKJh1rqr9AXe XhXBu+QNYzTby5reoaQdYAIYDoDDS1uotfG67joG7UFT2ShXbfdpgKn+J5VqjZP3qzw7 enBZ46RKd+vyXLbNWNbkm8sv5HeJcODiyebsFaxh/8eIviclFftwPlT2DMyMENgDVtLe /C6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=j0r8ww4HMSjyauv0uKHQcHVjtTlQxAeAw7W1mmNzOOw=; b=GHlzBDEBi5OZz7+oARO6BBJ0e7QT5uH1K3QAjCqrDLChbNqUUVTgh+NV3rjWVXYdJc szJag1sDsOVf3NsJCoqsYmaFz32qJi3r7xgvuQCUUwFP54fJge0AfD9z/Ob/eQ+v7OkY va4EQeJvuN1rc7STi6x79L9kbvgNkDRyHvoYaEbBPtV+VW99NOwapqQUdUbty0jP6hga IVtrMpLsplgCQBz4Zq1bahRaavafpXT06rQyzT5FrAZocxEePKHWF/K5DBSBTwXw7Wxr 9ZkIRzM5LIIJl9qocmAD0gFBqUB78PMnSsongsUfmtKPHX3jViPVA8jCowwxrsExSStn fAbw== X-Gm-Message-State: AIVw111JjD8NQBfbzZnZegj1h55wqtkXKM/WbN29Q7Doqw614GpUeZ8e 7DW/hl/9z4nUwQ== X-Received: by 10.84.238.204 with SMTP id l12mr1810769pln.300.1501832857065; Fri, 04 Aug 2017 00:47:37 -0700 (PDT) Received: from localhost.localdomain ([183.157.160.33]) by smtp.gmail.com with ESMTPSA id c12sm1558478pfe.154.2017.08.04.00.47.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 04 Aug 2017 00:47:36 -0700 (PDT) From: Ray Huang To: viro@zeniv.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Ray Huang Subject: [PATCH] fs : select : fixed 4 style issues Date: Fri, 4 Aug 2017 15:42:48 +0000 Message-Id: <1501861368-12714-1-git-send-email-rayhuang110@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixed 4 style issues in select.c reported by checkpatch.pl. Signed-off-by: Ray Huang --- fs/select.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/fs/select.c b/fs/select.c index 9d5f15e..f7d97d7 100644 --- a/fs/select.c +++ b/fs/select.c @@ -10,7 +10,7 @@ * parameter to reflect time remaining. * * 24 January 2000 - * Changed sys_poll()/do_poll() to use PAGE_SIZE chunk-based allocation + * Changed sys_poll()/do_poll() to use PAGE_SIZE chunk-based allocation * of fds to overcome nfds < 16390 descriptors limit (Tigran Aivazian). */ @@ -94,8 +94,8 @@ u64 select_estimate_accuracy(struct timespec64 *tv) struct poll_table_page { - struct poll_table_page * next; - struct poll_table_entry * entry; + struct poll_table_page *next; + struct poll_table_entry *entry; struct poll_table_entry entries[0]; }; @@ -136,12 +136,12 @@ static void free_poll_entry(struct poll_table_entry *entry) void poll_freewait(struct poll_wqueues *pwq) { - struct poll_table_page * p = pwq->table; + struct poll_table_page *p = pwq->table; int i; for (i = 0; i < pwq->inline_index; i++) free_poll_entry(pwq->inline_entries + i); while (p) { - struct poll_table_entry * entry; + struct poll_table_entry *entry; struct poll_table_page *old; entry = p->entry; @@ -622,7 +622,7 @@ int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp, /* * We need 6 bitmaps (in/out/ex for both incoming and outgoing), * since we used fdset we need to allocate memory in units of - * long-words. + * long-words. */ size = FDS_BYTES(n); bits = stack_fds; @@ -839,7 +839,7 @@ static inline unsigned int do_pollfd(struct pollfd *pollfd, poll_table *pwait, static int do_poll(struct poll_list *list, struct poll_wqueues *wait, struct timespec64 *end_time) { - poll_table* pt = &wait->pt; + poll_table *pt = &wait->pt; ktime_t expire, *to = NULL; int timed_out = 0, count = 0; u64 slack = 0; @@ -860,7 +860,7 @@ static int do_poll(struct poll_list *list, struct poll_wqueues *wait, bool can_busy_loop = false; for (walk = list; walk != NULL; walk = walk->next) { - struct pollfd * pfd, * pfd_end; + struct pollfd *pfd, *pfd_end; pfd = walk->entries; pfd_end = pfd + walk->len; @@ -929,14 +929,14 @@ static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds, struct timespec64 *end_time) { struct poll_wqueues table; - int err = -EFAULT, fdcount, len, size; + int err = -EFAULT, fdcount, len, size; /* Allocate small arguments on the stack to save memory and be faster - use long to make sure the buffer is aligned properly on 64 bit archs to avoid unaligned access */ long stack_pps[POLL_STACK_ALLOC/sizeof(long)]; struct poll_list *const head = (struct poll_list *)stack_pps; - struct poll_list *walk = head; - unsigned long todo = nfds; + struct poll_list *walk = head; + unsigned long todo = nfds; if (nfds > rlimit(RLIMIT_NOFILE)) return -EINVAL; @@ -976,7 +976,7 @@ static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds, for (j = 0; j < walk->len; j++, ufds++) if (__put_user(fds[j].revents, &ufds->revents)) goto out_fds; - } + } err = fdcount; out_fds: @@ -1370,10 +1370,10 @@ COMPAT_SYSCALL_DEFINE6(pselect6, int, n, compat_ulong_t __user *, inp, if (sig) { if (!access_ok(VERIFY_READ, sig, - sizeof(compat_uptr_t)+sizeof(compat_size_t)) || - __get_user(up, (compat_uptr_t __user *)sig) || - __get_user(sigsetsize, - (compat_size_t __user *)(sig+sizeof(up)))) + sizeof(compat_uptr_t)+sizeof(compat_size_t)) || + __get_user(up, (compat_uptr_t __user *)sig) || + __get_user(sigsetsize, + (compat_size_t __user *)(sig+sizeof(up)))) return -EFAULT; } return do_compat_pselect(n, inp, outp, exp, tsp, compat_ptr(up),