Skip to content

Commit

Permalink
mm-memcg-optimize-user-context-object-stock-access-checkpatch-fixes
Browse files Browse the repository at this point in the history
WARNING: else is not generally useful after a break or return
torvalds#138: FILE: mm/memcontrol.c:2121:
+		return &stock->task_obj;
+	} else {

total: 0 errors, 1 warnings, 193 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/mm-memcg-optimize-user-context-object-stock-access.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Alex Shi <[email protected]>
Cc: Chris Down <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Masayoshi Mizuma <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: Roman Gushchin <[email protected]>
Cc: Shakeel Butt <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Vladimir Davydov <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Wei Yang <[email protected]>
Cc: Xing Zhengjun <[email protected]>
Cc: Yafang Shao <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Stephen Rothwell <[email protected]>
  • Loading branch information
akpm00 authored and sfrothwell committed Jun 24, 2021
1 parent e70e1a1 commit 08df224
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2118,11 +2118,11 @@ static inline struct obj_stock *get_obj_stock(unsigned long *pflags)
preempt_disable();
stock = this_cpu_ptr(&memcg_stock);
return &stock->task_obj;
} else {
local_irq_save(*pflags);
stock = this_cpu_ptr(&memcg_stock);
return &stock->irq_obj;
}

local_irq_save(*pflags);
stock = this_cpu_ptr(&memcg_stock);
return &stock->irq_obj;
}

static inline void put_obj_stock(unsigned long flags)
Expand Down

0 comments on commit 08df224

Please sign in to comment.