* [PATCH 0/2] Fixed multiple checkpatch warnings and errors
@ 2015-10-09 15:00 Shivani Bhardwaj
2015-10-09 15:01 ` [PATCH 1/2] Staging: lustre: ldlm_resource: Removed initialization of global variables Shivani Bhardwaj
2015-10-09 15:02 ` [PATCH 2/2] Staging: lustre: ldlm_resource: Fixed character limit warning Shivani Bhardwaj
0 siblings, 2 replies; 4+ messages in thread
From: Shivani Bhardwaj @ 2015-10-09 15:00 UTC (permalink / raw)
To: outreachy-kernel; +Cc: outreachy-kernel
This patch fixes the global variable initialization error and removes the warning for character limits.
After these patches, warnings and errors thrown by checkpatch get considerably reduced. Also, the warnings given by checkpatch now cannot be fixed as it might reduce the readability and search of particular strings.
Shivani Bhardwaj (2):
Staging: lustre: ldlm_resource: Removed initialization of global
variables
Staging: lustre: ldlm_resource: Fixed character limit warning
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] Staging: lustre: ldlm_resource: Removed initialization of global variables 2015-10-09 15:00 [PATCH 0/2] Fixed multiple checkpatch warnings and errors Shivani Bhardwaj @ 2015-10-09 15:01 ` Shivani Bhardwaj 2015-10-10 7:17 ` [Outreachy kernel] " Sudip Mukherjee 2015-10-09 15:02 ` [PATCH 2/2] Staging: lustre: ldlm_resource: Fixed character limit warning Shivani Bhardwaj 1 sibling, 1 reply; 4+ messages in thread From: Shivani Bhardwaj @ 2015-10-09 15:01 UTC (permalink / raw) To: outreachy-kernel; +Cc: outreachy-kernel Fixed the error generated by checkpatch : do not initialise globals to 0 or NULL, by removing the initialization of variables ldlm_srv_namespace_nr and ldlm_cli_namespace_nr. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> --- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index 4bb3173..cc212b9 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -47,8 +47,8 @@ struct kmem_cache *ldlm_resource_slab, *ldlm_lock_slab; -int ldlm_srv_namespace_nr = 0; -int ldlm_cli_namespace_nr = 0; +int ldlm_srv_namespace_nr; +int ldlm_cli_namespace_nr; struct mutex ldlm_srv_namespace_lock; LIST_HEAD(ldlm_srv_namespace_list); -- 2.1.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH 1/2] Staging: lustre: ldlm_resource: Removed initialization of global variables 2015-10-09 15:01 ` [PATCH 1/2] Staging: lustre: ldlm_resource: Removed initialization of global variables Shivani Bhardwaj @ 2015-10-10 7:17 ` Sudip Mukherjee 0 siblings, 0 replies; 4+ messages in thread From: Sudip Mukherjee @ 2015-10-10 7:17 UTC (permalink / raw) To: Shivani Bhardwaj; +Cc: outreachy-kernel On Fri, Oct 09, 2015 at 08:31:28PM +0530, Shivani Bhardwaj wrote: > Fixed the error generated by checkpatch : do not initialise > globals to 0 or NULL, by removing the initialization of variables > ldlm_srv_namespace_nr and ldlm_cli_namespace_nr. > > Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> > --- This has already been done by: ea28d21ac51a ("staging: lustre: fix GLOBAL_INITIALISERS checkpatch.pl errors") which tree you are using? regards sudip ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] Staging: lustre: ldlm_resource: Fixed character limit warning 2015-10-09 15:00 [PATCH 0/2] Fixed multiple checkpatch warnings and errors Shivani Bhardwaj 2015-10-09 15:01 ` [PATCH 1/2] Staging: lustre: ldlm_resource: Removed initialization of global variables Shivani Bhardwaj @ 2015-10-09 15:02 ` Shivani Bhardwaj 1 sibling, 0 replies; 4+ messages in thread From: Shivani Bhardwaj @ 2015-10-09 15:02 UTC (permalink / raw) To: outreachy-kernel; +Cc: outreachy-kernel Fixed warning generated by checkpatch : line over 80 characters, by breaking up the lines into sensible chunks. User-visible strings were not broken as it might break the ability to grep for them. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> --- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index cc212b9..6bc6f89 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -778,7 +778,8 @@ static void cleanup_resource(struct ldlm_resource *res, struct list_head *q, } else { ldlm_resource_unlink_lock(lock); unlock_res(res); - LDLM_DEBUG(lock, "Freeing a lock still held by a client node"); + LDLM_DEBUG(lock, + "Freeing a lock still held by a client node"); ldlm_lock_destroy(lock); } LDLM_LOCK_RELEASE(lock); @@ -862,8 +863,8 @@ force_wait: * so it's safe to wait forever... we can't leak locks... */ if (force && rc == -ETIMEDOUT) { LCONSOLE_ERROR("Forced cleanup waiting for %s namespace with %d resources in use, (rc=%d)\n", - ldlm_ns_name(ns), - atomic_read(&ns->ns_bref), rc); + ldlm_ns_name(ns), + atomic_read(&ns->ns_bref), rc); goto force_wait; } @@ -1445,7 +1446,8 @@ void ldlm_resource_dump(int level, struct ldlm_resource *res) LDLM_DEBUG_LIMIT(level, lock, "###"); if (!(level & D_CANTMASK) && ++granted > ldlm_dump_granted_max) { - CDEBUG(level, "only dump %d granted locks to avoid DDOS.\n", + CDEBUG(level, + "only dump %d granted locks to avoid DDOS.\n", granted); break; } -- 2.1.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-10 7:18 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-10-09 15:00 [PATCH 0/2] Fixed multiple checkpatch warnings and errors Shivani Bhardwaj 2015-10-09 15:01 ` [PATCH 1/2] Staging: lustre: ldlm_resource: Removed initialization of global variables Shivani Bhardwaj 2015-10-10 7:17 ` [Outreachy kernel] " Sudip Mukherjee 2015-10-09 15:02 ` [PATCH 2/2] Staging: lustre: ldlm_resource: Fixed character limit warning Shivani Bhardwaj
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.