From patchwork Tue Mar 31 13:28:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boaz Harrosh X-Patchwork-Id: 6129981 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CB08D9F2EC for ; Tue, 31 Mar 2015 13:28:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B41EB201D3 for ; Tue, 31 Mar 2015 13:28:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C923E20103 for ; Tue, 31 Mar 2015 13:28:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754132AbbCaN2N (ORCPT ); Tue, 31 Mar 2015 09:28:13 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:33525 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751384AbbCaN2M (ORCPT ); Tue, 31 Mar 2015 09:28:12 -0400 Received: by wgoe14 with SMTP id e14so18973963wgo.0 for ; Tue, 31 Mar 2015 06:28:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=LIkstRGEjjH2BERHRBezSyWowCTHILOZb0f+3LtRQcI=; b=XhB3hqHNmRWpbbX38Fn8nwFlwFG8ab1PH8FKcA7ClRe6U1RIsmlX8eQprn6Ytlfkjx NVQWDFJwihf7vycyp4/K3ClQcYhXcvjyy3mQlASvuphnOPWvCw0ONVIujLXlBopmkOIZ iZmu8QXb7wUEovuMFQSK5RHMnQ4W1oOFVP9GSRGDPCL2cyyFQpnyaIZ57g9td/T4dg4K pxY99qnvYNbnfdELU8MT2/bWWYIuF2Gm3I8yNWGluJRHpjTZvILD6wFU/RslVmBKzTNg ZOndJhBs2crCKcwipcWsBkPuoOCk0QohKMAjdyt5yiiWHD9EE8mFhIDasjx4MYEisynl lWeg== X-Gm-Message-State: ALoCoQnjgidw45XQpTT91/Qsi7tkovCE1JZ5rAOSWOJbycv4C+ghfpTWYkRg9/DdOOvKLusONVaQ X-Received: by 10.180.87.66 with SMTP id v2mr5334968wiz.51.1427808491811; Tue, 31 Mar 2015 06:28:11 -0700 (PDT) Received: from [10.0.0.5] ([207.232.55.62]) by mx.google.com with ESMTPSA id ga8sm20330099wib.11.2015.03.31.06.28.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Mar 2015 06:28:11 -0700 (PDT) Message-ID: <551AA0E9.8090306@plexistor.com> Date: Tue, 31 Mar 2015 16:28:09 +0300 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Christoph Hellwig CC: linux-nvdimm@ml01.01.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, ross.zwisler@linux.intel.com, axboe@kernel.dk Subject: [PATCH 5/6] SQUASHME: pmem: Remove SECTOR_SHIFT References: <1427358764-6126-1-git-send-email-hch@lst.de> <55143A8B.2060304@plexistor.com> <20150331092526.GA25958@lst.de> <551A9EB3.8000605@plexistor.com> In-Reply-To: <551A9EB3.8000605@plexistor.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove SECTOR_SHIFT. It is defined in 6 other places in the Kernel. I do not like a new one. 9 is used through out, including block core. I do not like pmem to blasphemy more than needed. Signed-off-by: Boaz Harrosh --- drivers/block/pmem.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/block/pmem.c b/drivers/block/pmem.c index 209a410..508c9a8 100644 --- a/drivers/block/pmem.c +++ b/drivers/block/pmem.c @@ -25,10 +25,6 @@ #include #include -#define SECTOR_SHIFT 9 -#define PAGE_SECTORS_SHIFT (PAGE_SHIFT - SECTOR_SHIFT) -#define PAGE_SECTORS (1 << PAGE_SECTORS_SHIFT) - #define PMEM_MINORS 16 struct pmem_device { @@ -227,7 +223,7 @@ static int pmem_probe(struct platform_device *pdev) disk->flags = GENHD_FL_EXT_DEVT; sprintf(disk->disk_name, "pmem%d", idx); disk->driverfs_dev = &pdev->dev; - set_capacity(disk, pmem->size >> SECTOR_SHIFT); + set_capacity(disk, pmem->size >> 9); pmem->pmem_disk = disk; add_disk(disk);