All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ray Huang <rayhuang110@gmail.com>
To: viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ray Huang <rayhuang110@gmail.com>
Subject: [PATCH] fs : select : fixed 4 style issues
Date: Fri,  4 Aug 2017 15:42:48 +0000	[thread overview]
Message-ID: <1501861368-12714-1-git-send-email-rayhuang110@gmail.com> (raw)

Fixed 4 style issues in select.c reported by checkpatch.pl.

Signed-off-by: Ray Huang <rayhuang110@gmail.com>
---
 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),
-- 
2.7.4

                 reply	other threads:[~2017-08-04  7:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1501861368-12714-1-git-send-email-rayhuang110@gmail.com \
    --to=rayhuang110@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.