Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13278937ybl; Sun, 29 Dec 2019 08:20:31 -0800 (PST) X-Google-Smtp-Source: APXvYqyJ0Lc+aQuHLz6XMkh1twxFqwv7YA9LwYA7PpmGsStGQT6GQVJc0sjrzGsMXjSrtvkcGiBH X-Received: by 2002:a9d:4b05:: with SMTP id q5mr55103966otf.174.1577636431318; Sun, 29 Dec 2019 08:20:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577636431; cv=none; d=google.com; s=arc-20160816; b=EhwSwHxTw/Q4lf3HOt1GucCPyfMP6A+a1t/Ny9nCTQTC+pFS2CHIOkFaHPh2QoLi// UdSCWhCwmSwV7lAQmfaF+mBBXmui/5RElo04itP8KzC12J+mQ+Q7WLLQbdgC2O4DWWaK qermuWXZXamXbsN7sbTgtF8F3LemIk++eaw+8erExAs+EGKMIPH+7drvTa42U9HEA/8E N5tqlLFhl2HHafsd9kpKamdKx+iVXF8uXE0yFtvOMIVGDt1FuMocFwYjgTO6EBhwo7ZT 9NWnZ5LFb/QAy80VdLi876E8BsCVf/bDklB742CQ9zgV2s6FV+L/xiLbBBp5IXW7GYV8 +a2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=zAc7EKXIyyO+iVB326Pr+31xpQBRk8uIjG9cP+MqE9k=; b=l9gdw1oUvQbyzLpfXYOh3FTf1eGDYZFbjMNzVvvC3WcbEJ3ICEsJnE7d0tq+1xeEXL eCzeAytSN6z8IIAGSzwxgPkYyZ2EomEp3XPrT1028EV5OSY0z9C5IMqqzifHzBH3W9+C h8MCwBKdUH3YDEWJ7j6CF9fEZ0+uiDmHNHzEuukmSMvMNpaRFY53F9HaH0pM+psDvFkj 9L8fnLTBGZ1xvHkloV3hL5+Mo7kBR6XSgGyD9S3qKvyjGepXuRvShAcVxIDIeyqRdwZm +mAXSK7tqyv9XWssi5jF7QnnmCoGW2DOhbsErxDoHHc9lzm+sOH/4rFiiHNpoa4/omOW ZzkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si16117674oix.197.2019.12.29.08.20.19; Sun, 29 Dec 2019 08:20:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726953AbfL2QTk (ORCPT + 99 others); Sun, 29 Dec 2019 11:19:40 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:38979 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726883AbfL2QTf (ORCPT ); Sun, 29 Dec 2019 11:19:35 -0500 X-IronPort-AV: E=Sophos;i="5.69,372,1571695200"; d="scan'208";a="334379019" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA256; 29 Dec 2019 17:19:30 +0100 From: Julia Lawall To: Jonas Bonn Cc: kernel-janitors@vger.kernel.org, Stefan Kristiansson , Stafford Horne , openrisc@lists.librecores.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] openrisc: use mmgrab Date: Sun, 29 Dec 2019 16:42:58 +0100 Message-Id: <1577634178-22530-5-git-send-email-Julia.Lawall@inria.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1577634178-22530-1-git-send-email-Julia.Lawall@inria.fr> References: <1577634178-22530-1-git-send-email-Julia.Lawall@inria.fr> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mmgrab was introduced in commit f1f1007644ff ("mm: add new mmgrab() helper") and most of the kernel was updated to use it. Update a remaining file. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) @@ expression e; @@ - atomic_inc(&e->mm_count); + mmgrab(e); Signed-off-by: Julia Lawall --- I was not able to compile this file. arch/openrisc/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/openrisc/kernel/smp.c b/arch/openrisc/kernel/smp.c index 7d518ee8bddc..7bd6e0fc7a6d 100644 --- a/arch/openrisc/kernel/smp.c +++ b/arch/openrisc/kernel/smp.c @@ -113,7 +113,7 @@ asmlinkage __init void secondary_start_kernel(void) * All kernel threads share the same mm context; grab a * reference and switch to it. */ - atomic_inc(&mm->mm_count); + mmgrab(mm); current->active_mm = mm; cpumask_set_cpu(cpu, mm_cpumask(mm));