linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pintu Kumar <quic_pintu@quicinc.com>
To: <akpm@linux-foundation.org>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>
Cc: <skhan@linuxfoundation.org>, <pintu.ping@gmail.com>,
	Pintu Kumar <quic_pintu@quicinc.com>
Subject: [PATCH] mm/dmapool_test: replace printk with pr_info/err
Date: Tue, 15 Oct 2024 00:05:49 +0530	[thread overview]
Message-ID: <20241014183549.8898-1-quic_pintu@quicinc.com> (raw)

Add SPDX license header and use correct pr_info/err.
These warnings are reported by checkpatch.
This makes the style clean.

WARNING: Missing or malformed SPDX-License-Identifier tag in line 1
+#include <linux/device.h>

WARNING: printk() should include KERN_<LEVEL> facility level
+       printk("dmapool test: size:%-4zu align:%-4zu blocks:%-4d time:%llu\n",

[...]

Signed-off-by: Pintu Kumar <quic_pintu@quicinc.com>
---
 mm/dmapool_test.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/mm/dmapool_test.c b/mm/dmapool_test.c
index 54b1fd1ccfbb..99269e37ca59 100644
--- a/mm/dmapool_test.c
+++ b/mm/dmapool_test.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
 #include <linux/device.h>
 #include <linux/dma-map-ops.h>
 #include <linux/dma-mapping.h>
@@ -87,7 +89,7 @@ static int dmapool_test_block(const struct dmapool_parms *parms)
 	}
 	end_time = ktime_get();
 
-	printk("dmapool test: size:%-4zu align:%-4zu blocks:%-4d time:%llu\n",
+	pr_info("dmapool test: size:%-4zu align:%-4zu blocks:%-4d time:%llu\n",
 		parms->size, parms->align, blocks,
 		ktime_us_delta(end_time, start_time));
 
@@ -112,7 +114,7 @@ static int dmapool_checks(void)
 
 	ret = device_register(&test_dev);
 	if (ret) {
-		printk("%s: register failed:%d\n", __func__, ret);
+		pr_err("%s: register failed:%d\n", __func__, ret);
 		goto put_device;
 	}
 
@@ -121,7 +123,7 @@ static int dmapool_checks(void)
 	test_dev.dma_mask = &dma_mask;
 	ret = dma_set_mask_and_coherent(&test_dev, DMA_BIT_MASK(64));
 	if (ret) {
-		printk("%s: mask failed:%d\n", __func__, ret);
+		pr_err("%s: mask failed:%d\n", __func__, ret);
 		goto del_device;
 	}
 
-- 
2.17.1



                 reply	other threads:[~2024-10-14 18:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241014183549.8898-1-quic_pintu@quicinc.com \
    --to=quic_pintu@quicinc.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pintu.ping@gmail.com \
    --cc=skhan@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox