mirror of https://github.com/torvalds/linux.git
n64: use pr_fmt to avoid duplicate string
Instead of repeating the n64cart string all over the module use pr_fmt macro and remove the duplicate string. Also, replace and with or in the one of the error message. Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Lauri Kasanen <cand@gmx.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
d9b2a2bbbb
commit
f1e19224f5
|
|
@ -5,6 +5,7 @@
|
||||||
* Copyright (c) 2021 Lauri Kasanen
|
* Copyright (c) 2021 Lauri Kasanen
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
#include <linux/bitops.h>
|
#include <linux/bitops.h>
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
|
|
@ -117,12 +118,12 @@ static int __init n64cart_probe(struct platform_device *pdev)
|
||||||
struct gendisk *disk;
|
struct gendisk *disk;
|
||||||
|
|
||||||
if (!start || !size) {
|
if (!start || !size) {
|
||||||
pr_err("n64cart: start and size not specified\n");
|
pr_err("start or size not specified\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (size & 4095) {
|
if (size & 4095) {
|
||||||
pr_err("n64cart: size must be a multiple of 4K\n");
|
pr_err("size must be a multiple of 4K\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue