diff mbox series

[2/4] mm: Fix minor formatting issues for mm control

Message ID 20241104222737.298130-3-kerensun@google.com (mailing list archive)
State New
Headers show
Series mm: fix checkpatch.pl warnings in memcg v1 code | expand

Commit Message

Keren Sun Nov. 4, 2024, 10:27 p.m. UTC
Add a line after declaration as it's missing after DEFINE_WAIT(),
replace the spaces with tabs for indent, and remove the non-useful else
after a break in a if statement.

Signed-off-by: Keren Sun <kerensun@google.com>
---
 mm/memcontrol-v1.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Shakeel Butt Nov. 5, 2024, 4:29 p.m. UTC | #1
On Mon, Nov 04, 2024 at 02:27:35PM -0800, Keren Sun wrote:
> Add a line after declaration as it's missing after DEFINE_WAIT(),
> replace the spaces with tabs for indent, and remove the non-useful else
> after a break in a if statement.
> 
> Signed-off-by: Keren Sun <kerensun@google.com>

Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
diff mbox series

Patch

diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c
index 3951538bd73f..5f9d3d6d443c 100644
--- a/mm/memcontrol-v1.c
+++ b/mm/memcontrol-v1.c
@@ -460,6 +460,7 @@  bool memcg1_wait_acct_move(struct mem_cgroup *memcg)
 	if (mc.moving_task && current != mc.moving_task) {
 		if (mem_cgroup_under_move(memcg)) {
 			DEFINE_WAIT(wait);
+
 			prepare_to_wait(&mc.waitq, &wait, TASK_INTERRUPTIBLE);
 			/* moving charge context might have finished. */
 			if (mc.moving_task)
@@ -490,7 +491,7 @@  void folio_memcg_lock(struct folio *folio)
 	 * The RCU lock is held throughout the transaction.  The fast
 	 * path can get away without acquiring the memcg->move_lock
 	 * because page moving starts with an RCU grace period.
-         */
+	 */
 	rcu_read_lock();
 
 	if (mem_cgroup_disabled())
@@ -2096,8 +2097,8 @@  static bool mem_cgroup_oom_trylock(struct mem_cgroup *memcg)
 			failed = iter;
 			mem_cgroup_iter_break(memcg, iter);
 			break;
-		} else
-			iter->oom_lock = true;
+		}
+		iter->oom_lock = true;
 	}
 
 	if (failed) {