[PATCH 1A] pmem: Add prints at pmem_probe/remove

2015-04-07 Thread Boaz Harrosh

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.00] user: [mem 0x0001-0x00015fff] persistent 
(type 12)
 [  +0.00] user: [mem 0x00016000-0x0001dfff] persistent 
(type 12)
 ...
Printed by modprobe pmem:
 [  +0.003065] pmem pmem.0.auto: probe [0x0001:0x6000]
 [  +0.001816] pmem pmem.1.auto: probe [0x00016000:0x8000]
 ...
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(>dev, "probe [%pa:0x%zx]\n",
+>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(>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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1A] pmem: Add prints at pmem_probe/remove

2015-04-07 Thread Boaz Harrosh

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.00] user: [mem 0x0001-0x00015fff] persistent 
(type 12)
 [  +0.00] user: [mem 0x00016000-0x0001dfff] persistent 
(type 12)
 ...
Printed by modprobe pmem:
 [  +0.003065] pmem pmem.0.auto: probe [0x0001:0x6000]
 [  +0.001816] pmem pmem.1.auto: probe [0x00016000:0x8000]
 ...
Printed by modprobe -r pmem:
 [ +16.299145] pmem pmem.1.auto: remove
 [  +0.011155] pmem pmem.0.auto: remove

Signed-off-by: Boaz Harrosh b...@plexistor.com
---
 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/