From patchwork Sun Jan 20 08:13:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Fan X-Patchwork-Id: 10772315 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DA47F746 for ; Sun, 20 Jan 2019 08:13:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9A8F2ACB0 for ; Sun, 20 Jan 2019 08:13:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BABBD2ACB6; Sun, 20 Jan 2019 08:13:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5782E2ACB0 for ; Sun, 20 Jan 2019 08:13:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5D6AC8E0004; Sun, 20 Jan 2019 03:13:33 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 582AB8E0002; Sun, 20 Jan 2019 03:13:33 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 44C688E0004; Sun, 20 Jan 2019 03:13:33 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by kanga.kvack.org (Postfix) with ESMTP id E1ABE8E0002 for ; Sun, 20 Jan 2019 03:13:32 -0500 (EST) Received: by mail-wr1-f69.google.com with SMTP id y1so9085905wrd.7 for ; Sun, 20 Jan 2019 00:13:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=oF2K06y6GqbP+A72CRDkYBvyUldsNflXgLzQar1esgY=; b=udDbho7Me1ysss1L0hyi0P58gVC383fn0TKeyrviZeq85oimMv8xkaCRBUJDa+FA3J r22jpguxl3mWRgt/b8ocEqKtEkhu+JWIKI60hVrBM6FiAec3BzHlbAczN7kHcjGmSpiQ ACVC+jjiY5kgzWRRzLkfGSm5iA30qVJYoE1syaXkJDxqDfMPHGJ2EekYHI1qq/GD9UBe 1cjKFvQP769WtghqpothNb28NxSvQrWnMQwLxS+QoIzKmOxUx+mBFNhGnRdrogXzYxRF ywtD1jxbaolZBPzoSGmlhx8cspuB/mhO/j5zkYMxDi5SGxwNUB6aCDRUFwqhwg4OSsBp Tu9Q== X-Gm-Message-State: AJcUukc2mzInx8zj6fGY4+MsORx65n74qtjrMR05RO0NNriICqRof3r8 P7stYnG1KSCRPSCegkL8aWQhbS6DcBGgP3aw7dPXjFQwpDftllkIlNg46K8egYtHUH9qHH/UPdJ kwdXVI7D+ovQIXKcbU03A1klDmjiAREW1i+782LaNlRlPD3U9BuXkWK9sQZjOFt1zDAEoFUK/EH h3jTGh3ZSKhq1e0wBGNNMUKLSQ/cZrUOUd3O/kSoaoPCbzlx+CLsy0ODh1aX5PuGqVObjeChu2M RK4gKlURbjy1bqdiVP+PSlw1arLXEd99aqzBNN4srzXlZ7r+E88Ongvk3fCu6g3vYYIxfID9dq+ QACYdfjLA1myBmSbGJ9iUg157y2hcaHD3vEr6auGlpyFVr8maldWLDn3LjMO3hL2x9g/7mukbaj L X-Received: by 2002:a7b:ce84:: with SMTP id q4mr8660901wmj.105.1547972012428; Sun, 20 Jan 2019 00:13:32 -0800 (PST) X-Received: by 2002:a7b:ce84:: with SMTP id q4mr8660859wmj.105.1547972011306; Sun, 20 Jan 2019 00:13:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547972011; cv=none; d=google.com; s=arc-20160816; b=f0XNN4cEHpWoWu7mnPUHQTDoACasExqA2rNgJphnGP+CIS+uVmT802pJ8x84jc/+Cf DbbU9V5wHD/v1QGhmCLdCVcL4wpZYZYI+dcVs5j6/2s/OUBGwbx4awQu7SYqg77oL53a Nfe9dc5bEznKR3dSEhzeEcdE3DWzUw246H4f2Dxg45H33qcemW0iYkDdqKRtXdXIU+e6 3tf2+id7zqFoqSKqAu6lX3RK90wZRskRHT/ASs+YnmbpVRTY/Gxv5X/9sXH1zttmvZfo 6dZYHZySsBiyTeWLy5Fmt7QXYNhPaKvz8gTD1NJPBGGTdqu/xbZfIvXCkzHr6piWU0lo pX8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oF2K06y6GqbP+A72CRDkYBvyUldsNflXgLzQar1esgY=; b=ao/+tjC1H8/fJLE3mxrunNrziF4uNvS01dGBlsh04sUY0UScN8EHn2XMnNuBfGjHBF pWbP4VuaZhjFkoMNC6rzmQl7TMamBUImU5vt7xU0XaXrbak6FQPW4fNlrbURWXZRBuTZ Unzw9WKFjzktQ7xcWeL5TgVos07KY/8kIrsCOSVrYDm+O2Gqt6v6TGq7xN/vTXeJAtwL QOzlT2WWMJLNHiKBW2Nczmq/v5ZLHs+Ky96qS7emFI1n/nQ1rhLdI+/z7/mjRbcx9e5J 9LPOLYaNePI+B2tTRduSFcbM6pn+AdHOU1A6r4noxjY9QkIo920cOcbY7Xhj3/CHIO0q PqLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sU+4BFbb; spf=pass (google.com: domain of nullptr.cpp@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=nullptr.cpp@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id n12sor11161779wrv.1.2019.01.20.00.13.31 for (Google Transport Security); Sun, 20 Jan 2019 00:13:31 -0800 (PST) Received-SPF: pass (google.com: domain of nullptr.cpp@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sU+4BFbb; spf=pass (google.com: domain of nullptr.cpp@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=nullptr.cpp@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oF2K06y6GqbP+A72CRDkYBvyUldsNflXgLzQar1esgY=; b=sU+4BFbbRDOfvdREEHV7nnPZ3+BwgHKgHdD9a6wkahtBCSh3v69oulBctWBziV4Pt/ QW3prd9wR8ndpkUgLdDbW9zPEFXMGLwtOJjxyTPygNMgl3MEeeA2/HJ4dYTNQQ4y9QzF h/Zy8QOpdCy2bVjVSJBsWI14zU9w1t8/p8FyPaOWAphCL0FNPHRCtyyKi6pw0xWRwaWx eD7hJasN7GjqsfF1oCtn7rYfOHtggI8QTg4TtiaFPEHndp+wRA/k6hAzwNq56ErZjKTs V3Mg7vCCld4U1Y4F7GNkafJuJpM/+/WpftnfE3ZjFn0kFFp5OLeScqxlW5WZbQ/IhR4f 40FQ== X-Google-Smtp-Source: ALg8bN7MNDmk6xF++nrpsB/iYgKXsF08yW4AIRJ6qM5aQ/yGalX0JXWrZ5ZQp+rZ4r9pG1JZDh8F4w== X-Received: by 2002:a5d:4dc8:: with SMTP id f8mr23829190wru.45.1547972010944; Sun, 20 Jan 2019 00:13:30 -0800 (PST) Received: from localhost ([2a01:4f8:1c1c:6057::1]) by smtp.gmail.com with ESMTPSA id l20sm188093197wrb.93.2019.01.20.00.13.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 20 Jan 2019 00:13:30 -0800 (PST) From: Yang Fan To: akpm@linux-foundation.org, will.deacon@arm.com Cc: Yang Fan , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] mm/mmap.c: Remove redundant variable 'addr' in arch_get_unmapped_area_topdown() Date: Sun, 20 Jan 2019 09:13:24 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: 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: X-Virus-Scanned: ClamAV using ClamSMTP The variable 'addr' is redundant in arch_get_unmapped_area_topdown(), just use parameter 'addr0' directly. Then remove the const qualifier of the parameter, and change its name to 'addr'. Signed-off-by: Yang Fan --- mm/mmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index f901065c4c64..f2d163ac827a 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2126,13 +2126,12 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, */ #ifndef HAVE_ARCH_UNMAPPED_AREA_TOPDOWN unsigned long -arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, const unsigned long len, const unsigned long pgoff, const unsigned long flags) { struct vm_area_struct *vma, *prev; struct mm_struct *mm = current->mm; - unsigned long addr = addr0; struct vm_unmapped_area_info info; const unsigned long mmap_end = arch_get_mmap_end(addr); From patchwork Sun Jan 20 08:13:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Fan X-Patchwork-Id: 10772317 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C1D06746 for ; Sun, 20 Jan 2019 08:14:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD1322ACB0 for ; Sun, 20 Jan 2019 08:14:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D6482ACB6; Sun, 20 Jan 2019 08:14:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37B202ACB0 for ; Sun, 20 Jan 2019 08:14:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5FB568E0005; Sun, 20 Jan 2019 03:14:21 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5A8CA8E0002; Sun, 20 Jan 2019 03:14:21 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 471828E0005; Sun, 20 Jan 2019 03:14:21 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by kanga.kvack.org (Postfix) with ESMTP id E56198E0002 for ; Sun, 20 Jan 2019 03:14:20 -0500 (EST) Received: by mail-wr1-f72.google.com with SMTP id p12so9090506wrt.17 for ; Sun, 20 Jan 2019 00:14:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=6TueSK0t2mbCzrUTvwto9p+ZPwhPUJQ8fKD3EecXO7w=; b=N7fEFpfz337EQ9Q/lJU4uiiitEqJzg/qBu0lBs4AsHSDE0lazp0IMofzNoB0N6MJ+F j1O+25sMxoWjI2MQfuzDVXWSQGfDjgQwDyOi4NbcpyHdIj1Wws8+/O74j+f5A6VqkJhG kSFRqgliIfGKV7WFbk835VTQQ4PBfzWmZM4ZadWKI1e/CkA/wK2+EHYN63bydWFIXwy0 yQnZWAXHpS3jruQrj+/7gHmlWkEWBYkYQ1CUnSI7Pg6f1Rd9S2rJ1fxAwL7Zki36E4Ad /LEAeJo4s/LuuKjDgWdre2Q3daKmq/GZr4VrvUEsGQ6JcCcQ0N38a4cu/kgOBW6sv2VK 3fRA== X-Gm-Message-State: AJcUukfDq9zTtY5n3mtmVbnbqAexZ3jN2ykWQmXaBqj/hV1xCKzO5W0H vxdC1TeqfkBjto1oWoSGEjGhEPgUbRncmhvzCCDjxYIBqjQXS88hIFj88Qe9Bi0GHuLgpOIZX9D DRNAvvJku4ATIJP5TSYgQ63KOfBQs197pWjJDpgDzoViussN4gB/PhVGsNXgmRU0PPaVQUV2O89 52YQjGWG1ANf50hvh/AbV788yYuHHRozac6YTGtIuno5r6qWLV4vrWtXf0hk0QEH6xAgY1G6/Ph DXhv61OlUeRXo0BNtPVouTMgNVi4/jz9iVUOd3SyLC7Gpkl2P51BMlWfTQoip5QxdF+IBuSHsZl f2v3bnkv9Onfc/TptZT530Zrz88garIb9KSD42+XZG3ZpAhU7fKB7uu1FkiCDNAZUClWnQ3jFal w X-Received: by 2002:a5d:6889:: with SMTP id h9mr22883605wru.222.1547972060443; Sun, 20 Jan 2019 00:14:20 -0800 (PST) X-Received: by 2002:a5d:6889:: with SMTP id h9mr22883542wru.222.1547972059370; Sun, 20 Jan 2019 00:14:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547972059; cv=none; d=google.com; s=arc-20160816; b=Wgdg7rIBURBjBVhCJjvKRDCbdZ6nMqsG7uJoRh4Egdg2pdh/PUSPgV5YIWuYWFFdC3 IyBW+4PzNNdBNnIAtuT1JBaki3LOmCK0l28xezlR+YiCvHY4LHj3Vy5RHi/mCx8tK55v 87hwBS1YKm1RVRLYJ15ipkWBlpzOa/UqPZZW1x/XZ3bGUUQxs4ZzZxCdQf1EjSme3DBb JN9xAYu41iZb8FRpIvU1EvaABPxRKrZawAi/OuVLHwQ+hN/OF9ReweNDueI0tO05kS7J /PF7L55OxmYAyIAUTnvi9/2EoBJtiWNzCjWCA9ujnXZvCJj+A6F/8OROhXfqQVZF+388 BaBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6TueSK0t2mbCzrUTvwto9p+ZPwhPUJQ8fKD3EecXO7w=; b=WIkfWUbEDFZhIxtk9xMm7f0xwTHw75s4pR+bg3aLHUfgZAGXNe2MIRq1Sgg6JjrUbF BL64A1YOcXSq5LqWkuOpI1H60Kzma7cUttEkNMI8T/h9v1xdk1z3DFlMIgVng2RphYdq fREirSiLTwer2ldwGdBiZEaH7wFOFfgi3wDy9fGFmR+LnAEHd8bPOMOr4VI1mfox2WW0 8sRavwdNMo8b6vRTkaBCm3ojku5FjGFj6UvEKBTk5rRLgQUJ7wrfeK7VIiFzSgbkOVAP VMkX4UxL5VYvn5DuRG5f+dhribPQDgVXvbp6Gl7BriXYidKhhLigcU1MUf6uhqx3pgLU a/rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OD3yXsWD; spf=pass (google.com: domain of nullptr.cpp@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=nullptr.cpp@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id j19sor61875696wre.41.2019.01.20.00.14.19 for (Google Transport Security); Sun, 20 Jan 2019 00:14:19 -0800 (PST) Received-SPF: pass (google.com: domain of nullptr.cpp@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OD3yXsWD; spf=pass (google.com: domain of nullptr.cpp@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=nullptr.cpp@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6TueSK0t2mbCzrUTvwto9p+ZPwhPUJQ8fKD3EecXO7w=; b=OD3yXsWDmwKt0s2/30zZ9wHAQvNxYe25MlTSBacU8H1lyh5DtbY3iagvPhgHl0wR7m 0KZd0x/QursI2cOZQvqTzHH5hh1lXqzSpFpLRi+fOgTkC8RSKWF26YwYhyTRRT+sTIRi 1p3hrY761Ep9sZdVFk1w6WbzPf9NWCQ0LkKeu4ZrqngaVhZ/7aWWOs+GYhqsP3X+UTxV g+jD0JLltHhn1zIVCetbwj4qR+eNe3oLFY3HtbC+/IMkhmSBDfOeCEhoZOzh3WM86usT uuLWYhI2YuUAtynTFX7jGy9fb41rIP+TsKHMUCCBHh6wXcJLJ+y+Q+AcEysiGYj5s0aT 0a8w== X-Google-Smtp-Source: ALg8bN4g15eyxfr6tSx564o9SKGT8PDY3+OtAhMoPjlRoT7TC6utLS7k15Ha8yOLXndfJB/2N9NhEA== X-Received: by 2002:a5d:63c3:: with SMTP id c3mr22954222wrw.215.1547972059060; Sun, 20 Jan 2019 00:14:19 -0800 (PST) Received: from localhost ([2a01:4f8:1c1c:6057::1]) by smtp.gmail.com with ESMTPSA id k19sm142925012wre.5.2019.01.20.00.14.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 20 Jan 2019 00:14:18 -0800 (PST) From: Yang Fan To: akpm@linux-foundation.org, will.deacon@arm.com Cc: Yang Fan , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] mm/mmap.c: Remove redundant const qualifier of the no-pointer parameters Date: Sun, 20 Jan 2019 09:13:45 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: 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: X-Virus-Scanned: ClamAV using ClamSMTP In according with other functions, remove the const qualifier of the no-pointer parameters in function arch_get_unmapped_area_topdown(). Signed-off-by: Yang Fan --- mm/mmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index f2d163ac827a..84cdde125d4d 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2127,8 +2127,8 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, #ifndef HAVE_ARCH_UNMAPPED_AREA_TOPDOWN unsigned long arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, - const unsigned long len, const unsigned long pgoff, - const unsigned long flags) + unsigned long len, unsigned long pgoff, + unsigned long flags) { struct vm_area_struct *vma, *prev; struct mm_struct *mm = current->mm;