From: green@linuxhacker.ru
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org,
Andreas Dilger <andreas.dilger@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Lustre Development List <lustre-devel@lists.lustre.org>,
Oleg Drokin <green@linuxhacker.ru>
Subject: [PATCH 28/45] staging/lustre/libcfs: Cleanup: parenthesis alignment adjustments
Date: Tue, 16 Feb 2016 00:47:00 -0500 [thread overview]
Message-ID: <1455601637-3847710-29-git-send-email-green@linuxhacker.ru> (raw)
In-Reply-To: <1455601637-3847710-1-git-send-email-green@linuxhacker.ru>
From: Oleg Drokin <green@linuxhacker.ru>
Adjust alignment of argments that were pushed to next lines
to conform to kernel code style.
Found with checkpatch.
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
drivers/staging/lustre/lustre/libcfs/debug.c | 3 +--
drivers/staging/lustre/lustre/libcfs/hash.c | 18 +++++++++---------
.../staging/lustre/lustre/libcfs/libcfs_string.c | 19 +++++++------------
.../lustre/lustre/libcfs/linux/linux-debug.c | 2 +-
.../lustre/lustre/libcfs/linux/linux-module.c | 4 ++--
drivers/staging/lustre/lustre/libcfs/module.c | 8 ++++----
drivers/staging/lustre/lustre/libcfs/tracefile.c | 21 +++++++++------------
drivers/staging/lustre/lustre/libcfs/workitem.c | 6 +++---
8 files changed, 36 insertions(+), 45 deletions(-)
diff --git a/drivers/staging/lustre/lustre/libcfs/debug.c b/drivers/staging/lustre/lustre/libcfs/debug.c
index 589b548..9cb8f04 100644
--- a/drivers/staging/lustre/lustre/libcfs/debug.c
+++ b/drivers/staging/lustre/lustre/libcfs/debug.c
@@ -448,8 +448,7 @@ void libcfs_debug_dumplog_internal(void *arg)
snprintf(debug_file_name, sizeof(debug_file_name) - 1,
"%s.%lld.%ld", libcfs_debug_file_path_arr,
(s64)ktime_get_real_seconds(), (long_ptr_t)arg);
- pr_alert("LustreError: dumping log to %s\n",
- debug_file_name);
+ pr_alert("LustreError: dumping log to %s\n", debug_file_name);
cfs_tracefile_dump_all_pages(debug_file_name);
libcfs_run_debug_log_upcall(debug_file_name);
}
diff --git a/drivers/staging/lustre/lustre/libcfs/hash.c b/drivers/staging/lustre/lustre/libcfs/hash.c
index ad831fa..51d72f0 100644
--- a/drivers/staging/lustre/lustre/libcfs/hash.c
+++ b/drivers/staging/lustre/lustre/libcfs/hash.c
@@ -2040,15 +2040,15 @@ void cfs_hash_debug_str(struct cfs_hash *hs, struct seq_file *m)
theta = __cfs_hash_theta(hs);
seq_printf(m, "%-*s %5d %5d %5d %d.%03d %d.%03d %d.%03d 0x%02x %6d ",
- CFS_HASH_BIGNAME_LEN, hs->hs_name,
- 1 << hs->hs_cur_bits, 1 << hs->hs_min_bits,
- 1 << hs->hs_max_bits,
- __cfs_hash_theta_int(theta), __cfs_hash_theta_frac(theta),
- __cfs_hash_theta_int(hs->hs_min_theta),
- __cfs_hash_theta_frac(hs->hs_min_theta),
- __cfs_hash_theta_int(hs->hs_max_theta),
- __cfs_hash_theta_frac(hs->hs_max_theta),
- hs->hs_flags, hs->hs_rehash_count);
+ CFS_HASH_BIGNAME_LEN, hs->hs_name,
+ 1 << hs->hs_cur_bits, 1 << hs->hs_min_bits,
+ 1 << hs->hs_max_bits,
+ __cfs_hash_theta_int(theta), __cfs_hash_theta_frac(theta),
+ __cfs_hash_theta_int(hs->hs_min_theta),
+ __cfs_hash_theta_frac(hs->hs_min_theta),
+ __cfs_hash_theta_int(hs->hs_max_theta),
+ __cfs_hash_theta_frac(hs->hs_max_theta),
+ hs->hs_flags, hs->hs_rehash_count);
/*
* The distribution is a summary of the chained hash depth in
diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_string.c b/drivers/staging/lustre/lustre/libcfs/libcfs_string.c
index f3bcf20..f7cda59 100644
--- a/drivers/staging/lustre/lustre/libcfs/libcfs_string.c
+++ b/drivers/staging/lustre/lustre/libcfs/libcfs_string.c
@@ -343,11 +343,10 @@ cfs_range_expr_print(char *buffer, int count, struct cfs_range_expr *expr,
i = scnprintf(buffer, count, "%u", expr->re_lo);
else if (expr->re_stride == 1)
i = scnprintf(buffer, count, "%s%u-%u%s",
- s, expr->re_lo, expr->re_hi, e);
+ s, expr->re_lo, expr->re_hi, e);
else
i = scnprintf(buffer, count, "%s%u-%u/%u%s",
- s, expr->re_lo, expr->re_hi,
- expr->re_stride, e);
+ s, expr->re_lo, expr->re_hi, expr->re_stride, e);
return i;
}
@@ -469,7 +468,7 @@ cfs_expr_list_free(struct cfs_expr_list *expr_list)
struct cfs_range_expr *expr;
expr = list_entry(expr_list->el_exprs.next,
- struct cfs_range_expr, re_link);
+ struct cfs_range_expr, re_link);
list_del(&expr->re_link);
LIBCFS_FREE(expr, sizeof(*expr));
}
@@ -520,15 +519,12 @@ cfs_expr_list_parse(char *str, int len, unsigned min, unsigned max,
if (rc != 0)
break;
- list_add_tail(&expr->re_link,
- &expr_list->el_exprs);
+ list_add_tail(&expr->re_link, &expr_list->el_exprs);
}
} else {
rc = cfs_range_expr_parse(&src, min, max, 0, &expr);
- if (rc == 0) {
- list_add_tail(&expr->re_link,
- &expr_list->el_exprs);
- }
+ if (rc == 0)
+ list_add_tail(&expr->re_link, &expr_list->el_exprs);
}
if (rc != 0)
@@ -554,8 +550,7 @@ cfs_expr_list_free_list(struct list_head *list)
struct cfs_expr_list *el;
while (!list_empty(list)) {
- el = list_entry(list->next,
- struct cfs_expr_list, el_link);
+ el = list_entry(list->next, struct cfs_expr_list, el_link);
list_del(&el->el_link);
cfs_expr_list_free(el);
}
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c
index 85deec9..565f990 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c
@@ -168,7 +168,7 @@ void __noreturn lbug_with_loc(struct libcfs_debug_msg_data *msgdata)
}
static int panic_notifier(struct notifier_block *self, unsigned long unused1,
- void *unused2)
+ void *unused2)
{
if (libcfs_panic_in_progress)
return 0;
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
index cbb44d7..ff90772 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
@@ -134,8 +134,8 @@ static long libcfs_ioctl(struct file *file,
return -EACCES;
if (_IOC_TYPE(cmd) != IOC_LIBCFS_TYPE ||
- _IOC_NR(cmd) < IOC_LIBCFS_MIN_NR ||
- _IOC_NR(cmd) > IOC_LIBCFS_MAX_NR) {
+ _IOC_NR(cmd) < IOC_LIBCFS_MIN_NR ||
+ _IOC_NR(cmd) > IOC_LIBCFS_MAX_NR) {
CDEBUG(D_IOCTL, "invalid ioctl ( type %d, nr %d, size %d )\n",
_IOC_TYPE(cmd), _IOC_NR(cmd), _IOC_SIZE(cmd));
return -EINVAL;
diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c
index cf1498a..b8b69bb 100644
--- a/drivers/staging/lustre/lustre/libcfs/module.c
+++ b/drivers/staging/lustre/lustre/libcfs/module.c
@@ -192,9 +192,9 @@ struct cfs_psdev_ops libcfs_psdev_ops = {
};
static int proc_call_handler(void *data, int write, loff_t *ppos,
- void __user *buffer, size_t *lenp,
- int (*handler)(void *data, int write,
- loff_t pos, void __user *buffer, int len))
+ void __user *buffer, size_t *lenp,
+ int (*handler)(void *data, int write, loff_t pos,
+ void __user *buffer, int len))
{
int rc = handler(data, write, *ppos, buffer, *lenp);
@@ -361,7 +361,7 @@ static int __proc_cpt_table(void *data, int write,
}
static int proc_cpt_table(struct ctl_table *table, int write,
- void __user *buffer, size_t *lenp, loff_t *ppos)
+ void __user *buffer, size_t *lenp, loff_t *ppos)
{
return proc_call_handler(table->data, write, ppos, buffer, lenp,
__proc_cpt_table);
diff --git a/drivers/staging/lustre/lustre/libcfs/tracefile.c b/drivers/staging/lustre/lustre/libcfs/tracefile.c
index c8f6a07..28a11b5 100644
--- a/drivers/staging/lustre/lustre/libcfs/tracefile.c
+++ b/drivers/staging/lustre/lustre/libcfs/tracefile.c
@@ -503,8 +503,7 @@ panic_collect_pages(struct page_collection *pc)
tcd->tcd_cur_pages = 0;
if (pc->pc_want_daemon_pages) {
- list_splice_init(&tcd->tcd_daemon_pages,
- &pc->pc_pages);
+ list_splice_init(&tcd->tcd_daemon_pages, &pc->pc_pages);
tcd->tcd_cur_daemon_pages = 0;
}
}
@@ -521,7 +520,7 @@ static void collect_pages_on_all_cpus(struct page_collection *pc)
tcd->tcd_cur_pages = 0;
if (pc->pc_want_daemon_pages) {
list_splice_init(&tcd->tcd_daemon_pages,
- &pc->pc_pages);
+ &pc->pc_pages);
tcd->tcd_cur_daemon_pages = 0;
}
}
@@ -673,7 +672,7 @@ int cfs_tracefile_dump_all_pages(char *filename)
rc = PTR_ERR(filp);
filp = NULL;
pr_err("LustreError: can't open %s for dump: rc %d\n",
- filename, rc);
+ filename, rc);
goto out;
}
@@ -872,7 +871,7 @@ int cfs_trace_daemon_command_usrstr(void __user *usr_str, int usr_str_nob)
return rc;
rc = cfs_trace_copyin_string(str, usr_str_nob + 1,
- usr_str, usr_str_nob);
+ usr_str, usr_str_nob);
if (rc == 0)
rc = cfs_trace_daemon_command(str);
@@ -980,8 +979,7 @@ static int tracefiled(void *arg)
MMSPACE_OPEN;
- list_for_each_entry_safe(tage, tmp, &pc.pc_pages,
- linkage) {
+ list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) {
static loff_t f_pos;
__LASSERT_TAGE_INVARIANT(tage);
@@ -1012,8 +1010,7 @@ static int tracefiled(void *arg)
int i;
printk(KERN_ALERT "Lustre: trace pages aren't empty\n");
- pr_err("total cpus(%d): ",
- num_possible_cpus());
+ pr_err("total cpus(%d): ", num_possible_cpus());
for (i = 0; i < num_possible_cpus(); i++)
if (cpu_online(i))
pr_cont("%d(on) ", i);
@@ -1023,9 +1020,9 @@ static int tracefiled(void *arg)
i = 0;
list_for_each_entry_safe(tage, tmp, &pc.pc_pages,
- linkage)
+ linkage)
pr_err("page %d belongs to cpu %d\n",
- ++i, tage->cpu);
+ ++i, tage->cpu);
pr_err("There are %d pages unwritten\n", i);
}
__LASSERT(list_empty(&pc.pc_pages));
@@ -1130,7 +1127,7 @@ static void trace_cleanup_on_all_cpus(void)
tcd->tcd_shutting_down = 1;
list_for_each_entry_safe(tage, tmp, &tcd->tcd_pages,
- linkage) {
+ linkage) {
__LASSERT_TAGE_INVARIANT(tage);
list_del(&tage->linkage);
diff --git a/drivers/staging/lustre/lustre/libcfs/workitem.c b/drivers/staging/lustre/lustre/libcfs/workitem.c
index 97ae5c1..24400df 100644
--- a/drivers/staging/lustre/lustre/libcfs/workitem.c
+++ b/drivers/staging/lustre/lustre/libcfs/workitem.c
@@ -234,8 +234,8 @@ cfs_wi_scheduler (void *arg)
while (!list_empty(&sched->ws_runq) &&
nloops < CFS_WI_RESCHED) {
- wi = list_entry(sched->ws_runq.next,
- cfs_workitem_t, wi_list);
+ wi = list_entry(sched->ws_runq.next, cfs_workitem_t,
+ wi_list);
LASSERT(wi->wi_scheduled && !wi->wi_running);
list_del_init(&wi->wi_list);
@@ -455,7 +455,7 @@ cfs_wi_shutdown(void)
}
while (!list_empty(&cfs_wi_data.wi_scheds)) {
sched = list_entry(cfs_wi_data.wi_scheds.next,
- struct cfs_wi_sched, ws_list);
+ struct cfs_wi_sched, ws_list);
list_del(&sched->ws_list);
LIBCFS_FREE(sched, sizeof(*sched));
}
--
2.1.0
next prev parent reply other threads:[~2016-02-16 5:48 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 5:46 [PATCH 00/45] Lustre cleanups green
2016-02-16 5:46 ` [PATCH 01/45] staging/lustre/ptlrpc: Get rid of /proc references in comments green
2016-02-16 5:46 ` [PATCH 02/45] staging/lustre/obdclass: " green
2016-02-16 5:46 ` [PATCH 03/45] staging/lustre/libcfs: " green
2016-02-16 5:46 ` [PATCH 04/45] staging/lustre/llite: " green
2016-02-16 5:46 ` [PATCH 05/45] staging/lustre/lov: " green
2016-02-16 5:46 ` [PATCH 06/45] staging/lustre: Remove unused function oti_init green
2016-02-16 5:46 ` [PATCH 07/45] staging/lustre: Remove unused osc_on_mdt function green
2016-02-16 5:46 ` [PATCH 08/45] staging/lustre: Remove server code from client_obd_setup() green
2016-02-16 5:46 ` [PATCH 09/45] staging/lustre: Remove server code from class_get_type() green
2016-02-16 5:46 ` [PATCH 10/45] staging/lustre: Remove commented out lock_lock_multi_match green
2016-02-16 5:46 ` [PATCH 11/45] staging/lustre/osc: Remove commented out osc_page_protected() green
2016-02-16 5:46 ` [PATCH 12/45] staging/lustre/libcfs: Adjust NULL comparison codestyle green
2016-02-16 5:46 ` [PATCH 13/45] staging/lustre/lov: " green
2016-02-16 5:46 ` [PATCH 14/45] staging/lustre/llite: " green
2016-02-16 5:46 ` [PATCH 15/45] staging/lustre/ldlm: " green
2016-02-16 5:46 ` [PATCH 16/45] staging/lustre/lmv: " green
2016-02-16 5:46 ` [PATCH 17/45] staging/lustre/fid: " green
2016-02-16 5:46 ` [PATCH 18/45] staging/lustre/fld: " green
2016-02-16 5:46 ` [PATCH 19/45] staging/lustre/lclient: " green
2016-02-16 5:46 ` [PATCH 20/45] staging/lustre/include: " green
2016-02-16 5:46 ` [PATCH 21/45] staging/lustre/mdc: " green
2016-02-16 5:46 ` [PATCH 22/45] staging/lustre/mgc: " green
2016-02-16 5:46 ` [PATCH 23/45] staging/lustre/obdclass: " green
2016-02-16 5:46 ` [PATCH 24/45] staging/lustre/obdecho: " green
2016-02-16 5:46 ` [PATCH 25/45] staging/lustre/osc: " green
2016-02-16 5:46 ` [PATCH 26/45] staging/lustre/ptlrpc: " green
2016-02-16 5:46 ` [PATCH 27/45] staging/lustre: Remove the "write to FSF to get a copy of GPL" wording green
2016-02-16 5:47 ` green [this message]
2016-02-16 5:47 ` [PATCH 29/45] staging/lustre/libcfs: Move EXPORT_SYMBOLs under function/variable green
2016-02-16 5:47 ` [PATCH 30/45] staging/lustre/libcfs: style change to add missing spaces for operations green
2016-02-16 5:47 ` [PATCH 31/45] staging/lustre/libcfs: reformat cfs_tcd_for_each_type_lock define green
2016-02-16 5:47 ` [PATCH 32/45] staging/lustre/libcfs: Remove stray spaces after function name green
2016-02-16 5:47 ` [PATCH 33/45] staging/lustre/libcfs: Shortened too long lines green
2016-02-16 5:47 ` [PATCH 34/45] staging/lustre/libcfs: Remove unused cfs_tcd_owns_tage() function green
2016-02-16 5:47 ` [PATCH 35/45] staging/lustre/libcfs: Move private tracefile structs out of header green
2016-02-16 5:47 ` [PATCH 36/45] staging/lustre/libcfs: Update comments style to match kernel green
2016-02-16 5:47 ` [PATCH 37/45] staging/lustre/libcfs: Remove useless returns in void functions green
2016-02-16 5:47 ` [PATCH 38/45] staging/lustre/libcfs: Remove empty lines after/before braces green
2016-02-16 5:47 ` [PATCH 39/45] staging/lustre: Update cfs_cpu_notify switch statement with a comment green
2016-02-16 5:47 ` [PATCH 40/45] staging/lustre: Get rid of cfs_trace_buf_type_t typedef green
2016-02-16 5:47 ` [PATCH 41/45] staging/lustre/libcfs: Get rid of multiple assignments green
2016-02-16 5:47 ` [PATCH 42/45] staging/lustre: Remove space after cast in cfs_crypto_hash_final() green
2016-02-16 5:47 ` [PATCH 43/45] staging/lustre/libcfs: Replace use of printk with pr_<level> green
2016-02-16 5:55 ` Joe Perches
2016-02-16 16:12 ` Oleg Drokin
2016-02-20 22:34 ` Greg Kroah-Hartman
2016-02-16 5:47 ` [PATCH 44/45] staging/lustre: Convert cfs_trace_daemon_command to use kstrtoul green
2016-02-16 5:47 ` [PATCH 45/45] staging/lustre: Convert cfs_str2num_check " green
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=1455601637-3847710-29-git-send-email-green@linuxhacker.ru \
--to=green@linuxhacker.ru \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox