Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2717768rwr; Fri, 21 Apr 2023 13:00:00 -0700 (PDT) X-Google-Smtp-Source: AKy350YgHQQDRCByuye1/ChwTVvCFi9msgplBe6MftyYg6oSwHaDFPGC2Jsfz9gLZNWQ4zZttx1g X-Received: by 2002:a05:6a20:8f1b:b0:f0:6c1f:481c with SMTP id b27-20020a056a208f1b00b000f06c1f481cmr8852437pzk.3.1682107200565; Fri, 21 Apr 2023 13:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682107200; cv=none; d=google.com; s=arc-20160816; b=aqwFpZOlVxJMuv8MdC2VWfHGvQxktj/IWP9molYhtyCOksfg2D6yTh0XKU31UGBZnk H1rInB7goxjgLSml6qL2Ay+f2pSMFERUDYdUm0Uh3uyaX4JhMXKQ6PflCgTYPX7NQ/mw OMuQlU6ofTrH1B6csGD9fGw42QQi7qZCr/FfL4lQciy31nKCaGIBpWSpCTFPtKfZn1so pulIRaS4+0LqOay+fZpA262u1lMSQ2VvpFVoQuLRpneo7PqXdkCG37/vYWckCq76UDVA VzdUWuvtbZWQvGPyt4/8WEZW9HyLT/09sm6zml385vjVnBoWHk/nlpZeIHf98XyTOo6J AetQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=E+NZJmg2wGtl9UTyedalDySM8eWxNnKVjwcpkkZSi1c=; b=L+qLHbXP3gQN3o1zApGIP2nJ8o8ppsph2Q1YwmngkBaSuMV08h8Y7pwwJfPJcxloam uVPVyStxi6ZLoRYSL7bBHRtXpsJfaatES0QLwnkYPaeYZKc3t6xJ2bmzgKA7Z1IYU4cK htg3oO6LQKdZre7Fa0mhxlPcArscvmRBRA3mjBRq6c8r1S0q7wGvIpToWXMhqN/IIrcb SiR1pV3A9OWcwvUiB6U6/Codqrslwk/O+Cmyc2NjYK8XK3pF4FBvt3Ydh6wnXZc7g+l0 vReuU2yPReO6XASNuND3FV5m1145eOLReaL7WKPFdB+eKazMk1tPSlZLit9jRNfx09PK erNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=M3lCN4A3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n22-20020a63f816000000b0050bd27672e8si4880051pgh.421.2023.04.21.12.59.47; Fri, 21 Apr 2023 13:00:00 -0700 (PDT) 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=@infradead.org header.s=bombadil.20210309 header.b=M3lCN4A3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233592AbjDUT6j (ORCPT + 99 others); Fri, 21 Apr 2023 15:58:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233430AbjDUT6Y (ORCPT ); Fri, 21 Apr 2023 15:58:24 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80A432D52; Fri, 21 Apr 2023 12:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=E+NZJmg2wGtl9UTyedalDySM8eWxNnKVjwcpkkZSi1c=; b=M3lCN4A3ri6P3e3ql42mx4susg ysa14KlGQHDbxNKzxNvsD94HuAELu2p+zrjKlfbdBVsg5FEEQlOH97ONbcWpYtpat3BgqnGrCJ4eZ 7+JQDAfqvEamJvGO7RL0gSWM3Ly2D8INxLWliXrW9XPqtUhtBLOeZtABHPaHsMO6qxBZa79RVQWNR zNd/7tjUHFnBVj6gorqgr2cHySz2Quouq7qe9bY5mLcEOQdPtCOhWKHBAQK/WIhsI0c9ybOjJrP/c Rc2dRw8rPaDAZsO66xngjm08/KUreyeoN8QeYOiqGG8RnmDzeoTnC67Bs2LXR6rXWcYvCGGgJrPlz pqV0K7oQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1ppwtU-00Blad-21; Fri, 21 Apr 2023 19:58:08 +0000 From: Luis Chamberlain To: axboe@kernel.dk, agk@redhat.com, snitzer@kernel.org, philipp.reisner@linbit.com, lars.ellenberg@linbit.com, christoph.boehmwalder@linbit.com, hch@infradead.org, djwong@kernel.org, minchan@kernel.org, senozhatsky@chromium.org Cc: patches@lists.linux.dev, linux-block@vger.kernel.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, dm-devel@redhat.com, drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org, willy@infradead.org, hare@suse.de, p.raghav@samsung.com, da.gomez@samsung.com, kbusch@kernel.org, mcgrof@kernel.org Subject: [PATCH 4/5] dm bufio: simplify by using PAGE_SECTORS_SHIFT Date: Fri, 21 Apr 2023 12:58:06 -0700 Message-Id: <20230421195807.2804512-5-mcgrof@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230421195807.2804512-1-mcgrof@kernel.org> References: <20230421195807.2804512-1-mcgrof@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 The PAGE_SHIFT - SECTOR_SHIFT constant be replaced with PAGE_SECTORS_SHIFT defined in linux/blt_types.h, which is included by linux/blkdev.h. This produces no functional changes. Signed-off-by: Luis Chamberlain --- drivers/md/dm-bufio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index eea977662e81..08c4730e1819 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c @@ -1152,7 +1152,7 @@ static void *alloc_buffer_data(struct dm_bufio_client *c, gfp_t gfp_mask, gfp_mask & __GFP_NORETRY) { *data_mode = DATA_MODE_GET_FREE_PAGES; return (void *)__get_free_pages(gfp_mask, - c->sectors_per_block_bits - (PAGE_SHIFT - SECTOR_SHIFT)); + c->sectors_per_block_bits - (PAGE_SECTORS_SHIFT)); } *data_mode = DATA_MODE_VMALLOC; @@ -1190,7 +1190,7 @@ static void free_buffer_data(struct dm_bufio_client *c, case DATA_MODE_GET_FREE_PAGES: free_pages((unsigned long)data, - c->sectors_per_block_bits - (PAGE_SHIFT - SECTOR_SHIFT)); + c->sectors_per_block_bits - (PAGE_SECTORS_SHIFT)); break; case DATA_MODE_VMALLOC: -- 2.39.2