Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756046AbbDGPrV (ORCPT ); Tue, 7 Apr 2015 11:47:21 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:38627 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753502AbbDGPrP (ORCPT ); Tue, 7 Apr 2015 11:47:15 -0400 Message-ID: <5523FC00.1080802@plexistor.com> Date: Tue, 07 Apr 2015 18:47:12 +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 , linux-nvdimm@ml01.01.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, axboe@kernel.dk CC: ross.zwisler@linux.intel.com Subject: [PATCH 1A] pmem: Add prints at pmem_probe/remove References: <1427872339-6688-1-git-send-email-hch@lst.de> <5523FBC7.80301@plexistor.com> In-Reply-To: <5523FBC7.80301@plexistor.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1627 Lines: 53 Add small prints at creation/remove of pmem devices. So we can see in dmesg logs when users loaded/unloaded the pmem driver and what devices were created. The prints will look like this: Printed by e820 on load: [ +0.000000] user: [mem 0x0000000100000000-0x000000015fffffff] persistent (type 12) [ +0.000000] user: [mem 0x0000000160000000-0x00000001dfffffff] persistent (type 12) ... Printed by modprobe pmem: [ +0.003065] pmem pmem.0.auto: probe [0x0000000100000000:0x60000000] [ +0.001816] pmem pmem.1.auto: probe [0x0000000160000000:0x80000000] ... Printed by modprobe -r pmem: [ +16.299145] pmem pmem.1.auto: remove [ +0.011155] pmem pmem.0.auto: remove Signed-off-by: Boaz Harrosh --- drivers/block/pmem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/block/pmem.c b/drivers/block/pmem.c index 988f384..36017f1 100644 --- a/drivers/block/pmem.c +++ b/drivers/block/pmem.c @@ -216,6 +216,8 @@ static int pmem_probe(struct platform_device *pdev) return PTR_ERR(pmem); platform_set_drvdata(pdev, pmem); + dev_info(&pdev->dev, "probe [%pa:0x%zx]\n", + &pmem->phys_addr, pmem->size); return 0; } @@ -224,6 +226,7 @@ static int pmem_remove(struct platform_device *pdev) { struct pmem_device *pmem = platform_get_drvdata(pdev); + dev_info(&pdev->dev, "remove\n"); pmem_free(pmem); return 0; } -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/