From: Chaitanya Kulkarni Date: Mon, 25 Jan 2021 23:32:35 +0000 (-0800) Subject: n64: use pr_fmt to avoid duplicate string X-Git-Tag: v5.12-rc1~31^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1e19224f5948ae61ff9972d35d3cd7176815cd9;p=thirdparty%2Fkernel%2Flinux.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 Reviewed-by: Lauri Kasanen Signed-off-by: Thomas Bogendoerfer --- diff --git a/drivers/block/n64cart.c b/drivers/block/n64cart.c index e76722acba466..8c7c9249071b4 100644 --- a/drivers/block/n64cart.c +++ b/drivers/block/n64cart.c @@ -5,6 +5,7 @@ * Copyright (c) 2021 Lauri Kasanen */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include #include #include @@ -117,12 +118,12 @@ static int __init n64cart_probe(struct platform_device *pdev) struct gendisk *disk; if (!start || !size) { - pr_err("n64cart: start and size not specified\n"); + pr_err("start or size not specified\n"); return -ENODEV; } 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; }