Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9919266rwl; Wed, 11 Jan 2023 11:49:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXvNYpiJ9QKp5uJ0aBGUHINRFsy1RGxg+bP0GxPJ4VX5MbAadbpvvc5PP7I3RLNeHoVgnM5i X-Received: by 2002:a05:6402:d71:b0:498:5cfe:da81 with SMTP id ec49-20020a0564020d7100b004985cfeda81mr16540305edb.3.1673466586477; Wed, 11 Jan 2023 11:49:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673466586; cv=none; d=google.com; s=arc-20160816; b=p1qKbz+IqBWDc5cQakHYWQeJrQtKitk3qpM71iAPHDV0Vwi9gORJvoS0YAjq7OdKz7 hVZmKa7lQG4BTkLSfqs9jgo934BdXtIz2LnO6H0L1tFFvhe3lLRqa18ZoC+NrwdEehZq JnS2F3xs/1fTVzD/RsHR18EruvV7i4GzhIQE5hpUrapfr9wTZgG2tVim/avmN9xQyMeN 8s7jfNo/1hZNoqiuRk0Qa1h7HUpU7UQOyDCU+8WhvI/Xm/qUBc40MJhEHNaHaqTHiAQZ QR0lt+ePA99spEjxfZAN/Cp1sHPZWE5cjPEc9mKOCAdC6+sPCIt7VaYP9NhXaq7kfbsW qPKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=yUkJcvnxxY1Jn5kE5z65aeQ6MoeLx+akC37sClk/HC0=; b=h97FNOY1PUPu5L9kQUdiVDFriG1kVWioqBjLNwNGe2bZbv4kPUczzAl/LVg+Hc7eqA rkp9eTNuF8FOk4F8AxdrtIQsCFo+ZYFMxg0jUOLg3srPw5TSpWpse6PSuNrdJIMRBi3L yvXZWyjKr2GNg0TzQ/jJ3q7T8JRJ1QVjrd3xRCxqaU5jXf1g1N0BztPxPgQSpDAFBx8x +dpOjl95OqzNKaZ/u7841J/HRe2cGwTE0uCDEJfHom20u4vF9t+5MT8greGAhWdfxzfE vP21u+cV7GZf1psGqyLoqIet8Ks7Jw0OKRJgxDmmYzyK5A45hjneOlyMwQS94kICWwyk 808A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=cjCMruIg; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m6-20020a056402430600b0048e9c366c0csi18945016edc.236.2023.01.11.11.49.33; Wed, 11 Jan 2023 11:49:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=cjCMruIg; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235488AbjAKSqS (ORCPT + 51 others); Wed, 11 Jan 2023 13:46:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232926AbjAKSqQ (ORCPT ); Wed, 11 Jan 2023 13:46:16 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6EDC3AAB2; Wed, 11 Jan 2023 10:46:14 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 367D35088; Wed, 11 Jan 2023 18:46:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1673462773; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yUkJcvnxxY1Jn5kE5z65aeQ6MoeLx+akC37sClk/HC0=; b=cjCMruIg2T5wnPuTYD9ou3FWF6oo5GAVz7pZlkx6rsVTy1Xljdzg3oZFkCovw6ZaJKLPkH 9FjfUiIy0whj/sLKrb913GQD+3J5CAEH2aFW7e066sFRkoLNqUbbIoaRr9MITVFvskA77L PJiaaBQfyK39eraIF2u5kV8xzThSMos= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1673462773; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yUkJcvnxxY1Jn5kE5z65aeQ6MoeLx+akC37sClk/HC0=; b=sDOLyz6dtkL0chd4GsDQDt7xOTNpXrHrsR3XRZpu/nTZnnB+x7ai9KCetiGdP00WSipqH9 0hGIy2gfTIQxg7DA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E81EE1358A; Wed, 11 Jan 2023 18:46:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id exh+N/QDv2PjGgAAMHmgww (envelope-from ); Wed, 11 Jan 2023 18:46:12 +0000 Date: Wed, 11 Jan 2023 19:40:38 +0100 From: David Sterba To: Qu Wenruo Cc: zys.zljxml@gmail.com, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Yushan Zhou Subject: Re: [PATCH v3] btrfs: use PAGE_{ALIGN, ALIGNED, ALIGN_DOWN} macro Message-ID: <20230111184037.GI11562@twin.jikos.cz> Reply-To: dsterba@suse.cz References: <20230103051137.4085572-1-zys.zljxml@gmail.com> <87d14908-dc9d-7ce4-c594-b28a9991efbb@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87d14908-dc9d-7ce4-c594-b28a9991efbb@gmx.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 03, 2023 at 01:47:43PM +0800, Qu Wenruo wrote: > > > On 2023/1/3 13:11, zys.zljxml@gmail.com wrote: > > From: Yushan Zhou > > > > The header file linux/mm.h provides PAGE_ALIGN, PAGE_ALIGNED, > > PAGE_ALIGN_DOWN macros. Use these macros to make code more > > concise. > > Is there anything benefit from the change? > > In fact, PAGE_ALIGN()/PAGE_ALIGNED() is just using the same > ALIGN()/IS_ALIGNED() macro. > > Thus I don't think your change is of any usefulness, not to mention it's > going to introduce confusion and extra effort. > > I'm completely fine with regular ALIGN()/IS_ALIGNED() usage with PAGE_SIZE. We already have PAGE_ALIGN in some places and I think it's a bit better than the ALIGN/IS_ALIGN as it's clear that it's for a page.