Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1335048

[PATCH 30/45] staging/lustre/libcfs: style change to add missing spaces for operations

From green@linuxhacker.ru
Newsgroups linux.kernel
Subject [PATCH 30/45] staging/lustre/libcfs: style change to add missing spaces for operations
Date 2016-02-16 07:00 +0100
Message-ID <r2GQ5-3tt-67@gated-at.bofh.it> (permalink)
References <r2GGm-3pA-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Oleg Drokin <green@linuxhacker.ru>

This fixes checkpatch messages about
"spaces preferred around that '-' (ctx:VxV)"

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/libcfs/debug.c                 | 2 +-
 drivers/staging/lustre/lustre/libcfs/linux/linux-mem.c       | 2 +-
 drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c | 2 +-
 drivers/staging/lustre/lustre/libcfs/tracefile.c             | 7 ++++---
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/lustre/libcfs/debug.c b/drivers/staging/lustre/lustre/libcfs/debug.c
index 9bb31f9..fa81582 100644
--- a/drivers/staging/lustre/lustre/libcfs/debug.c
+++ b/drivers/staging/lustre/lustre/libcfs/debug.c
@@ -418,7 +418,7 @@ libcfs_debug_str2mask(int *mask, const char *str, int is_subsys)
 	/* Allow a number for backwards compatibility */
 
 	for (n = strlen(str); n > 0; n--)
-		if (!isspace(str[n-1]))
+		if (!isspace(str[n - 1]))
 			break;
 	matched = n;
 	t = sscanf(str, "%i%n", &m, &matched);
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-mem.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-mem.c
index 025e2f0..86f32ff 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-mem.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-mem.c
@@ -50,7 +50,7 @@ void *libcfs_kvzalloc_cpt(struct cfs_cpt_table *cptab, int cpt, size_t size,
 	ret = kzalloc_node(size, flags | __GFP_NOWARN,
 			   cfs_cpt_spread_node(cptab, cpt));
 	if (!ret) {
-		WARN_ON(!(flags & (__GFP_FS|__GFP_HIGH)));
+		WARN_ON(!(flags & (__GFP_FS | __GFP_HIGH)));
 		ret = vmalloc_node(size, cfs_cpt_spread_node(cptab, cpt));
 	}
 
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c
index 89944c0..5e3c400 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c
@@ -268,5 +268,5 @@ int cfs_trace_max_debug_mb(void)
 {
 	int  total_mb = (totalram_pages >> (20 - PAGE_SHIFT));
 
-	return max(512, (total_mb * 80)/100);
+	return max(512, (total_mb * 80) / 100);
 }
diff --git a/drivers/staging/lustre/lustre/libcfs/tracefile.c b/drivers/staging/lustre/lustre/libcfs/tracefile.c
index 28a11b5..967f8d7 100644
--- a/drivers/staging/lustre/lustre/libcfs/tracefile.c
+++ b/drivers/staging/lustre/lustre/libcfs/tracefile.c
@@ -346,7 +346,7 @@ int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata,
 			break;
 	}
 
-	if (*(string_buf+needed-1) != '\n')
+	if (*(string_buf + needed - 1) != '\n')
 		printk(KERN_INFO "format at %s:%d:%s doesn't end in newline\n",
 		       file, msgdata->msg_line, msgdata->msg_fn);
 
@@ -436,7 +436,7 @@ console:
 			remain = CFS_TRACE_CONSOLE_BUFFER_SIZE - needed;
 			if (remain > 0) {
 				va_start(ap, format2);
-				needed += vsnprintf(string_buf+needed, remain,
+				needed += vsnprintf(string_buf + needed, remain,
 						    format2, ap);
 				va_end(ap);
 			}
@@ -667,7 +667,8 @@ int cfs_tracefile_dump_all_pages(char *filename)
 
 	cfs_tracefile_write_lock();
 
-	filp = filp_open(filename, O_CREAT|O_EXCL|O_WRONLY|O_LARGEFILE, 0600);
+	filp = filp_open(filename, O_CREAT | O_EXCL | O_WRONLY | O_LARGEFILE,
+			 0600);
 	if (IS_ERR(filp)) {
 		rc = PTR_ERR(filp);
 		filp = NULL;
-- 
2.1.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/45] Lustre cleanups green@linuxhacker.ru - 2016-02-16 06:50 +0100
  [PATCH 43/45] staging/lustre/libcfs: Replace use of printk with pr_<level> green@linuxhacker.ru - 2016-02-16 06:50 +0100
    Re: [PATCH 43/45] staging/lustre/libcfs: Replace use of printk with  pr_<level> Joe Perches <joe@perches.com> - 2016-02-16 07:00 +0100
      Re: [PATCH 43/45] staging/lustre/libcfs: Replace use of printk with pr_<level> Oleg Drokin <green@linuxhacker.ru> - 2016-02-16 17:20 +0100
        Re: [PATCH 43/45] staging/lustre/libcfs: Replace use of printk with  pr_<level> Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-20 23:40 +0100
  [PATCH 41/45] staging/lustre/libcfs: Get rid of multiple assignments green@linuxhacker.ru - 2016-02-16 06:50 +0100
  [PATCH 45/45] staging/lustre: Convert cfs_str2num_check to use kstrtoul green@linuxhacker.ru - 2016-02-16 06:50 +0100
  [PATCH 44/45] staging/lustre: Convert cfs_trace_daemon_command to use kstrtoul green@linuxhacker.ru - 2016-02-16 06:50 +0100
  [PATCH 34/45] staging/lustre/libcfs: Remove unused cfs_tcd_owns_tage() function green@linuxhacker.ru - 2016-02-16 06:50 +0100
  [PATCH 32/45] staging/lustre/libcfs: Remove stray spaces after function name green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 39/45] staging/lustre: Update cfs_cpu_notify switch statement with a comment green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 38/45] staging/lustre/libcfs: Remove empty lines after/before braces green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 40/45] staging/lustre: Get rid of cfs_trace_buf_type_t typedef green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 37/45] staging/lustre/libcfs: Remove useless returns in void functions green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 19/45] staging/lustre/lclient: Adjust NULL comparison codestyle green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 31/45] staging/lustre/libcfs: reformat cfs_tcd_for_each_type_lock define green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 22/45] staging/lustre/mgc: Adjust NULL comparison codestyle green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 27/45] staging/lustre: Remove the "write to FSF to get a copy of GPL" wording green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 20/45] staging/lustre/include: Adjust NULL comparison codestyle green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 29/45] staging/lustre/libcfs: Move EXPORT_SYMBOLs under function/variable green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 15/45] staging/lustre/ldlm: Adjust NULL comparison codestyle green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 33/45] staging/lustre/libcfs: Shortened too long lines green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 16/45] staging/lustre/lmv: Adjust NULL comparison codestyle green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 18/45] staging/lustre/fld: Adjust NULL comparison codestyle green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 21/45] staging/lustre/mdc: Adjust NULL comparison codestyle green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 30/45] staging/lustre/libcfs: style change to add missing spaces for operations green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 28/45] staging/lustre/libcfs: Cleanup: parenthesis alignment adjustments green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 42/45] staging/lustre: Remove space after cast in cfs_crypto_hash_final() green@linuxhacker.ru - 2016-02-16 07:00 +0100
  [PATCH 07/45] staging/lustre: Remove unused osc_on_mdt function green@linuxhacker.ru - 2016-02-16 07:10 +0100
  [PATCH 06/45] staging/lustre: Remove unused function oti_init green@linuxhacker.ru - 2016-02-16 07:10 +0100
  [PATCH 10/45] staging/lustre: Remove commented out lock_lock_multi_match green@linuxhacker.ru - 2016-02-16 07:10 +0100
  [PATCH 09/45] staging/lustre: Remove server code from class_get_type() green@linuxhacker.ru - 2016-02-16 07:10 +0100
  [PATCH 11/45] staging/lustre/osc: Remove commented out osc_page_protected() green@linuxhacker.ru - 2016-02-16 07:10 +0100
  [PATCH 04/45] staging/lustre/llite: Get rid of /proc references in comments green@linuxhacker.ru - 2016-02-16 07:10 +0100
  [PATCH 05/45] staging/lustre/lov: Get rid of /proc references in comments green@linuxhacker.ru - 2016-02-16 07:10 +0100
  [PATCH 02/45] staging/lustre/obdclass: Get rid of /proc references in comments. green@linuxhacker.ru - 2016-02-16 07:10 +0100

csiph-web