From patchwork Mon Feb 22 01:16:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhiyuan Dai X-Patchwork-Id: 12097823 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15C0EC433E0 for ; Mon, 22 Feb 2021 01:16:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4FF4F64EC3 for ; Mon, 22 Feb 2021 01:16:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4FF4F64EC3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=phytium.com.cn Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 73B036B0006; Sun, 21 Feb 2021 20:16:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6C42A6B006C; Sun, 21 Feb 2021 20:16:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 58A9E6B006E; Sun, 21 Feb 2021 20:16:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0162.hostedemail.com [216.40.44.162]) by kanga.kvack.org (Postfix) with ESMTP id 3E7386B0006 for ; Sun, 21 Feb 2021 20:16:35 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 0149F8248047 for ; Mon, 22 Feb 2021 01:16:35 +0000 (UTC) X-FDA: 77844138750.09.CCCBF86 Received: from zg8tmty1ljiyny4xntqumjca.icoremail.net (zg8tmty1ljiyny4xntqumjca.icoremail.net [165.227.154.27]) by imf13.hostedemail.com (Postfix) with SMTP id 18CF3E0011C4 for ; Mon, 22 Feb 2021 01:16:29 +0000 (UTC) Received: from centos7u5.localdomain (unknown [202.43.158.76]) by c1app2 (Coremail) with SMTP id AgINCgCnrrroBTNgAJ0TAw--.9444S3; Mon, 22 Feb 2021 09:16:24 +0800 (CST) From: Zhiyuan Dai To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Zhiyuan Dai Subject: [PATCH] mm/mlock: minor coding style tweaks Date: Mon, 22 Feb 2021 09:16:28 +0800 Message-Id: <1613956588-2453-1-git-send-email-daizhiyuan@phytium.com.cn> X-Mailer: git-send-email 1.8.3.1 X-CM-TRANSID: AgINCgCnrrroBTNgAJ0TAw--.9444S3 X-Coremail-Antispam: 1UD129KBjvdXoW7Xr1xKr4xGrW7WF45uF4fuFg_yoWfuFb_Aa yIyryjgF15t3Wa9F10kw13Wryvvwn7ZF12yF95KrW3XryDGr98uF4UurW7Xryxuay7AFnx C3Z5Cr9Fkr1I9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbcAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j 6F4UJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26F 4UJVW0owAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv 7VC0I7IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r 1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCY02Avz4vE14v_ KwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r 1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij 64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr 0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6rW3Jr0E3s1lIxAIcVC2z280aVAFwI0_Jr0_Gr1l IxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa73UjIFyTuYvjfUoUDGUUUUU X-Originating-IP: [202.43.158.76] X-CM-SenderInfo: hgdl6xpl1xt0o6sk53xlxphulrpou0/ X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 18CF3E0011C4 X-Stat-Signature: huedipkob76m11yi1hwafu7yoba9y5ji Received-SPF: none (phytium.com.cn>: No applicable sender policy available) receiver=imf13; identity=mailfrom; envelope-from=""; helo=zg8tmty1ljiyny4xntqumjca.icoremail.net; client-ip=165.227.154.27 X-HE-DKIM-Result: none/none X-HE-Tag: 1613956589-470586 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This patch move the pointer location to fix coding style issues, improve code reading. Signed-off-by: Zhiyuan Dai --- mm/mlock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/mlock.c b/mm/mlock.c index 55b3b36..f6e26c2 100644 --- a/mm/mlock.c +++ b/mm/mlock.c @@ -560,7 +560,7 @@ static int apply_vma_lock_flags(unsigned long start, size_t len, vm_flags_t flags) { unsigned long nstart, end, tmp; - struct vm_area_struct * vma, * prev; + struct vm_area_struct *vma, *prev; int error; VM_BUG_ON(offset_in_page(start)); @@ -738,7 +738,7 @@ static __must_check int do_mlock(unsigned long start, size_t len, vm_flags_t fla */ static int apply_mlockall_flags(int flags) { - struct vm_area_struct * vma, * prev = NULL; + struct vm_area_struct *vma, *prev = NULL; vm_flags_t to_add = 0; current->mm->def_flags &= VM_LOCKED_CLEAR_MASK;