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: 6129961 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7A062BF4A6 for ; Tue, 31 Mar 2015 13:28:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B195A201EF for ; Tue, 31 Mar 2015 13:28:16 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CB654201ED for ; Tue, 31 Mar 2015 13:28:15 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8F14080F82; Tue, 31 Mar 2015 06:28:15 -0700 (PDT) X-Original-To: linux-nvdimm@ml01.01.org Delivered-To: linux-nvdimm@ml01.01.org Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 986C180F80 for ; Tue, 31 Mar 2015 06:28:13 -0700 (PDT) Received: by wgdm6 with SMTP id m6so19187365wgd.2 for ; Tue, 31 Mar 2015 06:28:11 -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=AarR0Upvl40aN6I3TafawKa1zswdG/oJTPDoj8V2qs1hZA0jxKPTZa9+8KDZ4IqF7V grCa/cLhP6M1mksrw9QJBiiDGDaYppebsjjNCzLnI0Pv0Y+BVfrL6HIvmsHZF+liu+jY NQWYwONO9eWH8ococsHHjmJf1bZ9nI71uvJ0fUOU+3yAmLC6tsMRINH7Mezg3pCGa+6/ hCNk8eRUvYh3744/eO1lTkVyfUGWdeGCNKEODQWyLAtqFSFnRt979owGhyYjzN8ogysJ /egW3iLIai+5dFoCbAPElWooTjvl00tRxlfPMjgnUdFFODlKokMVAnLO54KnkreHvPPA uSGA== X-Gm-Message-State: ALoCoQmH9wuuJ9+Snz28xy1q1BUc+KaDz50A7lLARtWiTGSrveiO4i1t+Iey6xx7BtxN3BGHdGvs 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 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> Cc: axboe@kernel.dk, linux-nvdimm@ml01.01.org, x86@kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [Linux-nvdimm] [PATCH 5/6] SQUASHME: pmem: Remove SECTOR_SHIFT X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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);