From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89DA1C433EF for ; Sun, 5 Jun 2022 02:05:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9D5E26B0071; Sat, 4 Jun 2022 22:05:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 982EA6B0073; Sat, 4 Jun 2022 22:05:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 871D46B0074; Sat, 4 Jun 2022 22:05:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 7517E6B0071 for ; Sat, 4 Jun 2022 22:05:43 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 46F3635469 for ; Sun, 5 Jun 2022 02:05:43 +0000 (UTC) X-FDA: 79542540966.10.C433E40 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf22.hostedemail.com (Postfix) with ESMTP id 75C61C004F for ; Sun, 5 Jun 2022 02:05:38 +0000 (UTC) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LG0KN0W1jzgYZG; Sun, 5 Jun 2022 10:03:52 +0800 (CST) Received: from dggpemm500002.china.huawei.com (7.185.36.229) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sun, 5 Jun 2022 10:05:36 +0800 Received: from [10.174.178.178] (10.174.178.178) by dggpemm500002.china.huawei.com (7.185.36.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sun, 5 Jun 2022 10:05:36 +0800 Message-ID: <374dfbbd-415e-890e-15db-b36c34a70a8d@huawei.com> Date: Sun, 5 Jun 2022 10:05:35 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.0.3 Subject: Re: [PATCH 2/4] mm/shmem: return -EINVAL for addr not PAGE_SIZE aligned To: David Hildenbrand , , , , References: <20220601124417.2872001-1-chenwandun@huawei.com> <20220601124417.2872001-3-chenwandun@huawei.com> From: Chen Wandun In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.178] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500002.china.huawei.com (7.185.36.229) X-CFilter-Loop: Reflected X-Stat-Signature: 65p9ab41oad6u9uw57t3oj1qrf1st1ya X-Rspam-User: Authentication-Results: imf22.hostedemail.com; dkim=none; spf=pass (imf22.hostedemail.com: domain of chenwandun@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=chenwandun@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 75C61C004F X-HE-Tag: 1654394738-864457 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: On 2022/6/1 22:14, David Hildenbrand wrote: > On 01.06.22 15:37, David Hildenbrand wrote: >> On 01.06.22 14:44, Chen Wandun wrote: >>> If addr is not PAGE_SIZE aligned, return -EINVAL directly. >> Why is this one to be treated in a special way compared to all of the >> other related checks? > Ah, I see you modify other places in other patches. Maybe just combine > all these return value changes into a single patch? That makes it look > less "special". OK, patch 2 and patch 3 are used to return error value directly, I will combine these patch to a single patch in next version. Thanks. > > >