* [PATCH 0/5] staging: lustre: Fix a file 8 warnings of coding sytle.
[not found] <ppli281>
@ 2015-07-27 5:47 ` Incarnation P. Lee
2015-07-27 5:48 ` [PATCH 1/5] staging: lustre: Replace spaces at the start of a line Incarnation P. Lee
` (5 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: Incarnation P. Lee @ 2015-07-27 5:47 UTC (permalink / raw
To: oleg.drokin, andreas.dilger, gregkh, Julia.Lawall
Cc: HPDD-discuss, devel, linux-kernel, Pan Li
From: "Pan Li" <incarnation.p.lee@outlook.com>
Fix file cl_page.c 8 coding style warning issues as follow:
Replace spaces at the start of a line.
Adjust code indent for macro and tail blackslash
Add a blank line after declarations.
Remove a trailing */ of a separate line.
Remove unnecessary braces {} for single statement blocks
drivers/staging/lustre/lustre/obdclass/cl_page.c | 25 +++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
--
1.9.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] staging: lustre: Replace spaces at the start of a line.
[not found] <ppli281>
2015-07-27 5:47 ` [PATCH 0/5] staging: lustre: Fix a file 8 warnings of coding sytle Incarnation P. Lee
@ 2015-07-27 5:48 ` Incarnation P. Lee
2015-07-27 5:49 ` [PATCH 2/5] staging: lustre: Adjust code indent for macro and tail blackslash Incarnation P. Lee
` (4 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: Incarnation P. Lee @ 2015-07-27 5:48 UTC (permalink / raw
To: oleg.drokin, andreas.dilger, gregkh, Julia.Lawall
Cc: HPDD-discuss, devel, linux-kernel, Pan Li
From: "Pan Li" <incarnation.p.lee@outlook.com>
Replace the spaces at the start of a line with tab for indent.
Signed-off-by: Pan Li <incarnation.p.lee@outlook.com>
---
drivers/staging/lustre/lustre/obdclass/cl_page.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c b/drivers/staging/lustre/lustre/obdclass/cl_page.c
index 282ae73..4def881 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_page.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c
@@ -52,12 +52,12 @@ static void cl_page_delete0(const struct lu_env *env, struct cl_page *pg,
int radix);
# define PASSERT(env, page, expr) \
- do { \
+ do { \
if (unlikely(!(expr))) { \
CL_PAGE_DEBUG(D_ERROR, (env), (page), #expr "\n"); \
LASSERT(0); \
} \
- } while (0)
+ } while (0)
# define PINVRNT(env, page, exp) \
((void)sizeof(env), (void)sizeof(page), (void)sizeof !!(exp))
--
1.9.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] staging: lustre: Adjust code indent for macro and tail blackslash
[not found] <ppli281>
2015-07-27 5:47 ` [PATCH 0/5] staging: lustre: Fix a file 8 warnings of coding sytle Incarnation P. Lee
2015-07-27 5:48 ` [PATCH 1/5] staging: lustre: Replace spaces at the start of a line Incarnation P. Lee
@ 2015-07-27 5:49 ` Incarnation P. Lee
2015-07-27 5:50 ` [PATCH 3/5] staging: lustre: Add a blank line after declarations Incarnation P. Lee
` (3 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: Incarnation P. Lee @ 2015-07-27 5:49 UTC (permalink / raw
To: oleg.drokin, andreas.dilger, gregkh, Julia.Lawall
Cc: HPDD-discuss, devel, linux-kernel, Pan Li
From: "Pan Li" <incarnation.p.lee@outlook.com>
Adjust code indent for macro with tab, as well as tail blackslash.
Signed-off-by: Pan Li <incarnation.p.lee@outlook.com>
---
drivers/staging/lustre/lustre/obdclass/cl_page.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c b/drivers/staging/lustre/lustre/obdclass/cl_page.c
index 4def881..7c86437 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_page.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c
@@ -51,12 +51,12 @@
static void cl_page_delete0(const struct lu_env *env, struct cl_page *pg,
int radix);
-# define PASSERT(env, page, expr) \
- do { \
- if (unlikely(!(expr))) { \
- CL_PAGE_DEBUG(D_ERROR, (env), (page), #expr "\n"); \
- LASSERT(0); \
- } \
+# define PASSERT(env, page, expr) \
+ do { \
+ if (unlikely(!(expr))) { \
+ CL_PAGE_DEBUG(D_ERROR, (env), (page), #expr "\n"); \
+ LASSERT(0); \
+ } \
} while (0)
# define PINVRNT(env, page, exp) \
--
1.9.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] staging: lustre: Add a blank line after declarations.
[not found] <ppli281>
` (2 preceding siblings ...)
2015-07-27 5:49 ` [PATCH 2/5] staging: lustre: Adjust code indent for macro and tail blackslash Incarnation P. Lee
@ 2015-07-27 5:50 ` Incarnation P. Lee
2015-07-27 5:50 ` [PATCH 4/5] staging: lustre: Remove a trailing */ of a separate line Incarnation P. Lee
` (2 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: Incarnation P. Lee @ 2015-07-27 5:50 UTC (permalink / raw
To: oleg.drokin, andreas.dilger, gregkh, Julia.Lawall
Cc: HPDD-discuss, devel, linux-kernel, Pan Li
From: "Pan Li" <incarnation.p.lee@outlook.com>
Add a blank line after local variable declarations.
Signed-off-by: Pan Li <incarnation.p.lee@outlook.com>
---
drivers/staging/lustre/lustre/obdclass/cl_page.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c b/drivers/staging/lustre/lustre/obdclass/cl_page.c
index 7c86437..ec21f2b 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_page.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c
@@ -169,6 +169,7 @@ int cl_page_gang_lookup(const struct lu_env *env, struct cl_object *obj,
while ((nr = radix_tree_gang_lookup(&hdr->coh_tree, (void **)pvec,
idx, CLT_PVEC_SIZE)) > 0) {
int end_of_region = 0;
+
idx = pvec[nr - 1]->cp_index + 1;
for (i = 0, j = 0; i < nr; ++i) {
page = pvec[i];
@@ -286,6 +287,7 @@ static struct cl_page *cl_page_alloc(const struct lu_env *env,
GFP_NOFS);
if (page != NULL) {
int result = 0;
+
atomic_set(&page->cp_ref, 1);
if (type == CPT_CACHEABLE) /* for radix tree */
atomic_inc(&page->cp_ref);
--
1.9.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] staging: lustre: Remove a trailing */ of a separate line.
[not found] <ppli281>
` (3 preceding siblings ...)
2015-07-27 5:50 ` [PATCH 3/5] staging: lustre: Add a blank line after declarations Incarnation P. Lee
@ 2015-07-27 5:50 ` Incarnation P. Lee
2015-07-27 5:50 ` [PATCH 5/5] Remove unnecessary braces {} for single statement blocks Incarnation P. Lee
2015-07-27 5:52 ` [PATCH 5/5] staging: lustre: " Incarnation P. Lee
6 siblings, 0 replies; 7+ messages in thread
From: Incarnation P. Lee @ 2015-07-27 5:50 UTC (permalink / raw
To: oleg.drokin, andreas.dilger, gregkh, Julia.Lawall
Cc: HPDD-discuss, devel, linux-kernel, Pan Li
From: "Pan Li" <incarnation.p.lee@outlook.com>
Remove a trailing */ of a separate comments block line.
Signed-off-by: Pan Li <incarnation.p.lee@outlook.com>
---
drivers/staging/lustre/lustre/obdclass/cl_page.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c b/drivers/staging/lustre/lustre/obdclass/cl_page.c
index ec21f2b..1f6ca7c 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_page.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c
@@ -354,8 +354,10 @@ static struct cl_page *cl_page_find0(const struct lu_env *env,
idx, PFID(&hdr->coh_lu.loh_fid), vmpage, vmpage->private, type);
/* fast path. */
if (type == CPT_CACHEABLE) {
- /* vmpage lock is used to protect the child/parent
- * relationship */
+ /*
+ * vmpage lock is used to protect the child/parent
+ * relationship
+ */
KLASSERT(PageLocked(vmpage));
/*
* cl_vmpage_page() can be called here without any locks as
--
1.9.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] Remove unnecessary braces {} for single statement blocks
[not found] <ppli281>
` (4 preceding siblings ...)
2015-07-27 5:50 ` [PATCH 4/5] staging: lustre: Remove a trailing */ of a separate line Incarnation P. Lee
@ 2015-07-27 5:50 ` Incarnation P. Lee
2015-07-27 5:52 ` [PATCH 5/5] staging: lustre: " Incarnation P. Lee
6 siblings, 0 replies; 7+ messages in thread
From: Incarnation P. Lee @ 2015-07-27 5:50 UTC (permalink / raw
To: oleg.drokin, andreas.dilger, gregkh, Julia.Lawall
Cc: HPDD-discuss, devel, linux-kernel, Pan Li
From: "Pan Li" <incarnation.p.lee@outlook.com>
Remove unnecessary braces {} for single line statement blocks.
Signed-off-by: Pan Li <incarnation.p.lee@outlook.com>
---
drivers/staging/lustre/lustre/obdclass/cl_page.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c b/drivers/staging/lustre/lustre/obdclass/cl_page.c
index 1f6ca7c..0f34171 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_page.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c
@@ -376,9 +376,8 @@ static struct cl_page *cl_page_find0(const struct lu_env *env,
idx) == page));
}
- if (page != NULL) {
+ if (page != NULL)
return page;
- }
/* allocate and initialize cl_page */
page = cl_page_alloc(env, o, idx, vmpage, type);
--
1.9.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] staging: lustre: Remove unnecessary braces {} for single statement blocks
[not found] <ppli281>
` (5 preceding siblings ...)
2015-07-27 5:50 ` [PATCH 5/5] Remove unnecessary braces {} for single statement blocks Incarnation P. Lee
@ 2015-07-27 5:52 ` Incarnation P. Lee
6 siblings, 0 replies; 7+ messages in thread
From: Incarnation P. Lee @ 2015-07-27 5:52 UTC (permalink / raw
To: oleg.drokin, andreas.dilger, gregkh, Julia.Lawall
Cc: HPDD-discuss, devel, linux-kernel, Pan Li
From: "Pan Li" <incarnation.p.lee@outlook.com>
Remove unnecessary braces {} for single line statement blocks.
Signed-off-by: Pan Li <incarnation.p.lee@outlook.com>
---
drivers/staging/lustre/lustre/obdclass/cl_page.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c b/drivers/staging/lustre/lustre/obdclass/cl_page.c
index 1f6ca7c..0f34171 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_page.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c
@@ -376,9 +376,8 @@ static struct cl_page *cl_page_find0(const struct lu_env *env,
idx) == page));
}
- if (page != NULL) {
+ if (page != NULL)
return page;
- }
/* allocate and initialize cl_page */
page = cl_page_alloc(env, o, idx, vmpage, type);
--
1.9.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-07-27 13:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <ppli281>
2015-07-27 5:47 ` [PATCH 0/5] staging: lustre: Fix a file 8 warnings of coding sytle Incarnation P. Lee
2015-07-27 5:48 ` [PATCH 1/5] staging: lustre: Replace spaces at the start of a line Incarnation P. Lee
2015-07-27 5:49 ` [PATCH 2/5] staging: lustre: Adjust code indent for macro and tail blackslash Incarnation P. Lee
2015-07-27 5:50 ` [PATCH 3/5] staging: lustre: Add a blank line after declarations Incarnation P. Lee
2015-07-27 5:50 ` [PATCH 4/5] staging: lustre: Remove a trailing */ of a separate line Incarnation P. Lee
2015-07-27 5:50 ` [PATCH 5/5] Remove unnecessary braces {} for single statement blocks Incarnation P. Lee
2015-07-27 5:52 ` [PATCH 5/5] staging: lustre: " Incarnation P. Lee
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.