* [PATCH] Staging: lustre: Place the open brace on previous line.
@ 2017-07-22 16:56 ` Shreeya Patel
0 siblings, 0 replies; 4+ messages in thread
From: Shreeya Patel @ 2017-07-22 16:56 UTC (permalink / raw)
To: oleg.drokin, andreas.dilger, jsimmons, gregkh, lustre-devel,
devel, linux-kernel
Cc: Shreeya Patel
Remove errors by placing the open braces on previous line.
This saves the vertical space of the code.
Problem found by checkpatch.
Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
---
drivers/staging/lustre/lnet/libcfs/hash.c | 24 ++++++++----------------
1 file changed, 8 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/lustre/lnet/libcfs/hash.c b/drivers/staging/lustre/lnet/libcfs/hash.c
index 5c2ce2e..a255e04 100644
--- a/drivers/staging/lustre/lnet/libcfs/hash.c
+++ b/drivers/staging/lustre/lnet/libcfs/hash.c
@@ -1348,8 +1348,7 @@ cfs_hash_lookup(struct cfs_hash *hs, const void *key)
EXPORT_SYMBOL(cfs_hash_lookup);
static void
-cfs_hash_for_each_enter(struct cfs_hash *hs)
-{
+cfs_hash_for_each_enter(struct cfs_hash *hs) {
LASSERT(!cfs_hash_is_exiting(hs));
if (!cfs_hash_with_rehash(hs))
@@ -1375,8 +1374,7 @@ cfs_hash_for_each_enter(struct cfs_hash *hs)
}
static void
-cfs_hash_for_each_exit(struct cfs_hash *hs)
-{
+cfs_hash_for_each_exit(struct cfs_hash *hs) {
int remained;
int bits;
@@ -1407,8 +1405,7 @@ cfs_hash_for_each_exit(struct cfs_hash *hs)
*/
static u64
cfs_hash_for_each_tight(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
- void *data, int remove_safe)
-{
+ void *data, int remove_safe) {
struct hlist_node *hnode;
struct hlist_node *pos;
struct cfs_hash_bd bd;
@@ -1501,8 +1498,7 @@ EXPORT_SYMBOL(cfs_hash_for_each);
void
cfs_hash_for_each_safe(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
- void *data)
-{
+ void *data) {
cfs_hash_for_each_tight(hs, func, data, 1);
}
EXPORT_SYMBOL(cfs_hash_for_each_safe);
@@ -1551,8 +1547,7 @@ EXPORT_SYMBOL(cfs_hash_size_get);
*/
static int
cfs_hash_for_each_relax(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
- void *data, int start)
-{
+ void *data, int start) {
struct hlist_node *hnode;
struct hlist_node *tmp;
struct cfs_hash_bd bd;
@@ -1629,8 +1624,7 @@ cfs_hash_for_each_relax(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
int
cfs_hash_for_each_nolock(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
- void *data, int start)
-{
+ void *data, int start) {
if (cfs_hash_with_no_lock(hs) ||
cfs_hash_with_rehash_key(hs) ||
!cfs_hash_with_no_itemref(hs))
@@ -1661,8 +1655,7 @@ EXPORT_SYMBOL(cfs_hash_for_each_nolock);
*/
int
cfs_hash_for_each_empty(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
- void *data)
-{
+ void *data) {
unsigned int i = 0;
if (cfs_hash_with_no_lock(hs))
@@ -1718,8 +1711,7 @@ EXPORT_SYMBOL(cfs_hash_hlist_for_each);
*/
void
cfs_hash_for_each_key(struct cfs_hash *hs, const void *key,
- cfs_hash_for_each_cb_t func, void *data)
-{
+ cfs_hash_for_each_cb_t func, void *data) {
struct hlist_node *hnode;
struct cfs_hash_bd bds[2];
unsigned int i;
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [lustre-devel] [PATCH] Staging: lustre: Place the open brace on previous line.
@ 2017-07-22 16:56 ` Shreeya Patel
0 siblings, 0 replies; 4+ messages in thread
From: Shreeya Patel @ 2017-07-22 16:56 UTC (permalink / raw)
To: oleg.drokin, andreas.dilger, jsimmons, gregkh, lustre-devel,
devel, linux-kernel
Cc: Shreeya Patel
Remove errors by placing the open braces on previous line.
This saves the vertical space of the code.
Problem found by checkpatch.
Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
---
drivers/staging/lustre/lnet/libcfs/hash.c | 24 ++++++++----------------
1 file changed, 8 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/lustre/lnet/libcfs/hash.c b/drivers/staging/lustre/lnet/libcfs/hash.c
index 5c2ce2e..a255e04 100644
--- a/drivers/staging/lustre/lnet/libcfs/hash.c
+++ b/drivers/staging/lustre/lnet/libcfs/hash.c
@@ -1348,8 +1348,7 @@ cfs_hash_lookup(struct cfs_hash *hs, const void *key)
EXPORT_SYMBOL(cfs_hash_lookup);
static void
-cfs_hash_for_each_enter(struct cfs_hash *hs)
-{
+cfs_hash_for_each_enter(struct cfs_hash *hs) {
LASSERT(!cfs_hash_is_exiting(hs));
if (!cfs_hash_with_rehash(hs))
@@ -1375,8 +1374,7 @@ cfs_hash_for_each_enter(struct cfs_hash *hs)
}
static void
-cfs_hash_for_each_exit(struct cfs_hash *hs)
-{
+cfs_hash_for_each_exit(struct cfs_hash *hs) {
int remained;
int bits;
@@ -1407,8 +1405,7 @@ cfs_hash_for_each_exit(struct cfs_hash *hs)
*/
static u64
cfs_hash_for_each_tight(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
- void *data, int remove_safe)
-{
+ void *data, int remove_safe) {
struct hlist_node *hnode;
struct hlist_node *pos;
struct cfs_hash_bd bd;
@@ -1501,8 +1498,7 @@ EXPORT_SYMBOL(cfs_hash_for_each);
void
cfs_hash_for_each_safe(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
- void *data)
-{
+ void *data) {
cfs_hash_for_each_tight(hs, func, data, 1);
}
EXPORT_SYMBOL(cfs_hash_for_each_safe);
@@ -1551,8 +1547,7 @@ EXPORT_SYMBOL(cfs_hash_size_get);
*/
static int
cfs_hash_for_each_relax(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
- void *data, int start)
-{
+ void *data, int start) {
struct hlist_node *hnode;
struct hlist_node *tmp;
struct cfs_hash_bd bd;
@@ -1629,8 +1624,7 @@ cfs_hash_for_each_relax(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
int
cfs_hash_for_each_nolock(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
- void *data, int start)
-{
+ void *data, int start) {
if (cfs_hash_with_no_lock(hs) ||
cfs_hash_with_rehash_key(hs) ||
!cfs_hash_with_no_itemref(hs))
@@ -1661,8 +1655,7 @@ EXPORT_SYMBOL(cfs_hash_for_each_nolock);
*/
int
cfs_hash_for_each_empty(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
- void *data)
-{
+ void *data) {
unsigned int i = 0;
if (cfs_hash_with_no_lock(hs))
@@ -1718,8 +1711,7 @@ EXPORT_SYMBOL(cfs_hash_hlist_for_each);
*/
void
cfs_hash_for_each_key(struct cfs_hash *hs, const void *key,
- cfs_hash_for_each_cb_t func, void *data)
-{
+ cfs_hash_for_each_cb_t func, void *data) {
struct hlist_node *hnode;
struct cfs_hash_bd bds[2];
unsigned int i;
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Staging: lustre: Place the open brace on previous line.
2017-07-22 16:56 ` [lustre-devel] " Shreeya Patel
@ 2017-07-22 17:00 ` Joe Perches
-1 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2017-07-22 17:00 UTC (permalink / raw)
To: Shreeya Patel, oleg.drokin, andreas.dilger, jsimmons, gregkh,
lustre-devel, devel, linux-kernel
On Sat, 2017-07-22 at 22:26 +0530, Shreeya Patel wrote:
> Remove errors by placing the open braces on previous line.
> This saves the vertical space of the code.
>
> Problem found by checkpatch.
No. These are checkpatch false positives.
> diff --git a/drivers/staging/lustre/lnet/libcfs/hash.c b/drivers/staging/lustre/lnet/libcfs/hash.c
[]
> @@ -1348,8 +1348,7 @@ cfs_hash_lookup(struct cfs_hash *hs, const void *key)
> EXPORT_SYMBOL(cfs_hash_lookup);
>
> static void
> -cfs_hash_for_each_enter(struct cfs_hash *hs)
> -{
> +cfs_hash_for_each_enter(struct cfs_hash *hs) {
> LASSERT(!cfs_hash_is_exiting(hs));
>
> if (!cfs_hash_with_rehash(hs))
etc...
These are correctly written function definitions.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [lustre-devel] [PATCH] Staging: lustre: Place the open brace on previous line.
@ 2017-07-22 17:00 ` Joe Perches
0 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2017-07-22 17:00 UTC (permalink / raw)
To: Shreeya Patel, oleg.drokin, andreas.dilger, jsimmons, gregkh,
lustre-devel, devel, linux-kernel
On Sat, 2017-07-22 at 22:26 +0530, Shreeya Patel wrote:
> Remove errors by placing the open braces on previous line.
> This saves the vertical space of the code.
>
> Problem found by checkpatch.
No. These are checkpatch false positives.
> diff --git a/drivers/staging/lustre/lnet/libcfs/hash.c b/drivers/staging/lustre/lnet/libcfs/hash.c
[]
> @@ -1348,8 +1348,7 @@ cfs_hash_lookup(struct cfs_hash *hs, const void *key)
> EXPORT_SYMBOL(cfs_hash_lookup);
>
> static void
> -cfs_hash_for_each_enter(struct cfs_hash *hs)
> -{
> +cfs_hash_for_each_enter(struct cfs_hash *hs) {
> LASSERT(!cfs_hash_is_exiting(hs));
>
> if (!cfs_hash_with_rehash(hs))
etc...
These are correctly written function definitions.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-07-22 17:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-22 16:56 [PATCH] Staging: lustre: Place the open brace on previous line Shreeya Patel
2017-07-22 16:56 ` [lustre-devel] " Shreeya Patel
2017-07-22 17:00 ` Joe Perches
2017-07-22 17:00 ` [lustre-devel] " Joe Perches
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.