ramoops: add new line to each print
Add new line to each print. Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com> Reported-by: Stevie Trujillo <stevie.trujillo@gmail.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Américo Wang <xiyou.wangcong@gmail.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
13aefd7293
commit
0169256e4b
|
@ -19,6 +19,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/kmsg_dump.h>
|
#include <linux/kmsg_dump.h>
|
||||||
|
@ -111,14 +113,14 @@ static int __init ramoops_probe(struct platform_device *pdev)
|
||||||
int err = -EINVAL;
|
int err = -EINVAL;
|
||||||
|
|
||||||
if (!pdata->mem_size) {
|
if (!pdata->mem_size) {
|
||||||
printk(KERN_ERR "ramoops: invalid size specification");
|
pr_err("invalid size specification\n");
|
||||||
goto fail3;
|
goto fail3;
|
||||||
}
|
}
|
||||||
|
|
||||||
rounddown_pow_of_two(pdata->mem_size);
|
rounddown_pow_of_two(pdata->mem_size);
|
||||||
|
|
||||||
if (pdata->mem_size < RECORD_SIZE) {
|
if (pdata->mem_size < RECORD_SIZE) {
|
||||||
printk(KERN_ERR "ramoops: size too small");
|
pr_err("size too small\n");
|
||||||
goto fail3;
|
goto fail3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,21 +130,21 @@ static int __init ramoops_probe(struct platform_device *pdev)
|
||||||
cxt->phys_addr = pdata->mem_address;
|
cxt->phys_addr = pdata->mem_address;
|
||||||
|
|
||||||
if (!request_mem_region(cxt->phys_addr, cxt->size, "ramoops")) {
|
if (!request_mem_region(cxt->phys_addr, cxt->size, "ramoops")) {
|
||||||
printk(KERN_ERR "ramoops: request mem region failed");
|
pr_err("request mem region failed\n");
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto fail3;
|
goto fail3;
|
||||||
}
|
}
|
||||||
|
|
||||||
cxt->virt_addr = ioremap(cxt->phys_addr, cxt->size);
|
cxt->virt_addr = ioremap(cxt->phys_addr, cxt->size);
|
||||||
if (!cxt->virt_addr) {
|
if (!cxt->virt_addr) {
|
||||||
printk(KERN_ERR "ramoops: ioremap failed");
|
pr_err("ioremap failed\n");
|
||||||
goto fail2;
|
goto fail2;
|
||||||
}
|
}
|
||||||
|
|
||||||
cxt->dump.dump = ramoops_do_dump;
|
cxt->dump.dump = ramoops_do_dump;
|
||||||
err = kmsg_dump_register(&cxt->dump);
|
err = kmsg_dump_register(&cxt->dump);
|
||||||
if (err) {
|
if (err) {
|
||||||
printk(KERN_ERR "ramoops: registering kmsg dumper failed");
|
pr_err("registering kmsg dumper failed\n");
|
||||||
goto fail1;
|
goto fail1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +163,7 @@ static int __exit ramoops_remove(struct platform_device *pdev)
|
||||||
struct ramoops_context *cxt = &oops_cxt;
|
struct ramoops_context *cxt = &oops_cxt;
|
||||||
|
|
||||||
if (kmsg_dump_unregister(&cxt->dump) < 0)
|
if (kmsg_dump_unregister(&cxt->dump) < 0)
|
||||||
printk(KERN_WARNING "ramoops: could not unregister kmsg_dumper");
|
pr_warn("could not unregister kmsg_dumper\n");
|
||||||
|
|
||||||
iounmap(cxt->virt_addr);
|
iounmap(cxt->virt_addr);
|
||||||
release_mem_region(cxt->phys_addr, cxt->size);
|
release_mem_region(cxt->phys_addr, cxt->size);
|
||||||
|
@ -185,6 +187,7 @@ static int __init ramoops_init(void)
|
||||||
* If we didn't find a platform device, we use module parameters
|
* If we didn't find a platform device, we use module parameters
|
||||||
* building platform data on the fly.
|
* building platform data on the fly.
|
||||||
*/
|
*/
|
||||||
|
pr_info("platform device not found, using module parameters\n");
|
||||||
dummy_data = kzalloc(sizeof(struct ramoops_platform_data),
|
dummy_data = kzalloc(sizeof(struct ramoops_platform_data),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!dummy_data)
|
if (!dummy_data)
|
||||||
|
|
Loading…
Reference in New Issue