Re: [PATCH 4/4] lib/debugobjects.c: code clean-up
On Sat, 24 May 2014 15:00:09 -0700 Josh Triplett wrote: > On Sat, May 24, 2014 at 03:08:06PM +0200, Fabian Frederick wrote: > > Fix some checkpatch warnings. > > > > Cc: Josh Triplett > > Cc: Andrew Morton > > Signed-off-by: Fabian Frederick > > Some of these make sense, one of them does not. Comments below. > > Also, please explicitly note the checkpatch warnings you fixed, not just > "Fix some checkpatch warnings.". ok -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 4/4] lib/debugobjects.c: code clean-up
On Sat, May 24, 2014 at 03:08:06PM +0200, Fabian Frederick wrote: > Fix some checkpatch warnings. > > Cc: Josh Triplett > Cc: Andrew Morton > Signed-off-by: Fabian Frederick Some of these make sense, one of them does not. Comments below. Also, please explicitly note the checkpatch warnings you fixed, not just "Fix some checkpatch warnings.". > --- a/lib/debugobjects.c > +++ b/lib/debugobjects.c [...] > @@ -415,7 +415,8 @@ int debug_object_activate(void *addr, struct > debug_obj_descr *descr) > debug_print_object(obj, "activate"); > state = obj->state; > raw_spin_unlock_irqrestore(>lock, flags); > - ret = debug_object_fixup(descr->fixup_activate, addr, > state); > + ret = debug_object_fixup(descr->fixup_activate, > + addr, state); This does not seem like a worthwhile improvement. Please don't blindly listen to checkpatch, especially regarding line lengths. - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 4/4] lib/debugobjects.c: code clean-up
Fix some checkpatch warnings. Cc: Josh Triplett Cc: Andrew Morton Signed-off-by: Fabian Frederick --- lib/debugobjects.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 437a6b4..69f25bf 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -271,7 +271,7 @@ static void debug_print_object(struct debug_obj *obj, char *msg) */ static int debug_object_fixup(int (*fixup)(void *addr, enum debug_obj_state state), - void * addr, enum debug_obj_state state) + void *addr, enum debug_obj_state state) { int fixed = 0; @@ -415,7 +415,8 @@ int debug_object_activate(void *addr, struct debug_obj_descr *descr) debug_print_object(obj, "activate"); state = obj->state; raw_spin_unlock_irqrestore(>lock, flags); - ret = debug_object_fixup(descr->fixup_activate, addr, state); + ret = debug_object_fixup(descr->fixup_activate, +addr, state); return ret ? -EINVAL : 0; case ODEBUG_STATE_DESTROYED: @@ -680,7 +681,7 @@ static void __debug_check_no_obj_freed(const void *address, unsigned long size) chunks = ((eaddr - paddr) + (ODEBUG_CHUNK_SIZE - 1)); chunks >>= ODEBUG_CHUNK_SHIFT; - for (;chunks > 0; chunks--, paddr += ODEBUG_CHUNK_SIZE) { + for (; chunks > 0; chunks--, paddr += ODEBUG_CHUNK_SIZE) { db = get_bucket(paddr); repeat: @@ -1084,7 +1085,7 @@ void __init debug_objects_mem_init(void) return; obj_cache = kmem_cache_create("debug_objects_cache", - sizeof (struct debug_obj), 0, + sizeof(struct debug_obj), 0, SLAB_DEBUG_OBJECTS, NULL); if (!obj_cache || debug_objects_replace_static_objects()) { -- 1.8.4.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 4/4] lib/debugobjects.c: code clean-up
Fix some checkpatch warnings. Cc: Josh Triplett j...@joshtriplett.org Cc: Andrew Morton a...@linux-foundation.org Signed-off-by: Fabian Frederick f...@skynet.be --- lib/debugobjects.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 437a6b4..69f25bf 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -271,7 +271,7 @@ static void debug_print_object(struct debug_obj *obj, char *msg) */ static int debug_object_fixup(int (*fixup)(void *addr, enum debug_obj_state state), - void * addr, enum debug_obj_state state) + void *addr, enum debug_obj_state state) { int fixed = 0; @@ -415,7 +415,8 @@ int debug_object_activate(void *addr, struct debug_obj_descr *descr) debug_print_object(obj, activate); state = obj-state; raw_spin_unlock_irqrestore(db-lock, flags); - ret = debug_object_fixup(descr-fixup_activate, addr, state); + ret = debug_object_fixup(descr-fixup_activate, +addr, state); return ret ? -EINVAL : 0; case ODEBUG_STATE_DESTROYED: @@ -680,7 +681,7 @@ static void __debug_check_no_obj_freed(const void *address, unsigned long size) chunks = ((eaddr - paddr) + (ODEBUG_CHUNK_SIZE - 1)); chunks = ODEBUG_CHUNK_SHIFT; - for (;chunks 0; chunks--, paddr += ODEBUG_CHUNK_SIZE) { + for (; chunks 0; chunks--, paddr += ODEBUG_CHUNK_SIZE) { db = get_bucket(paddr); repeat: @@ -1084,7 +1085,7 @@ void __init debug_objects_mem_init(void) return; obj_cache = kmem_cache_create(debug_objects_cache, - sizeof (struct debug_obj), 0, + sizeof(struct debug_obj), 0, SLAB_DEBUG_OBJECTS, NULL); if (!obj_cache || debug_objects_replace_static_objects()) { -- 1.8.4.5 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 4/4] lib/debugobjects.c: code clean-up
On Sat, May 24, 2014 at 03:08:06PM +0200, Fabian Frederick wrote: Fix some checkpatch warnings. Cc: Josh Triplett j...@joshtriplett.org Cc: Andrew Morton a...@linux-foundation.org Signed-off-by: Fabian Frederick f...@skynet.be Some of these make sense, one of them does not. Comments below. Also, please explicitly note the checkpatch warnings you fixed, not just Fix some checkpatch warnings.. --- a/lib/debugobjects.c +++ b/lib/debugobjects.c [...] @@ -415,7 +415,8 @@ int debug_object_activate(void *addr, struct debug_obj_descr *descr) debug_print_object(obj, activate); state = obj-state; raw_spin_unlock_irqrestore(db-lock, flags); - ret = debug_object_fixup(descr-fixup_activate, addr, state); + ret = debug_object_fixup(descr-fixup_activate, + addr, state); This does not seem like a worthwhile improvement. Please don't blindly listen to checkpatch, especially regarding line lengths. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 4/4] lib/debugobjects.c: code clean-up
On Sat, 24 May 2014 15:00:09 -0700 Josh Triplett j...@joshtriplett.org wrote: On Sat, May 24, 2014 at 03:08:06PM +0200, Fabian Frederick wrote: Fix some checkpatch warnings. Cc: Josh Triplett j...@joshtriplett.org Cc: Andrew Morton a...@linux-foundation.org Signed-off-by: Fabian Frederick f...@skynet.be Some of these make sense, one of them does not. Comments below. Also, please explicitly note the checkpatch warnings you fixed, not just Fix some checkpatch warnings.. ok -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/