summaryrefslogtreecommitdiff
path: root/drivers/media/pci/ttpci/budget-core.c
diff options
context:
space:
mode:
authorStefan Herdler <herdler@nurfuerspam.de>2024-04-15 05:24:11 +0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2024-04-16 01:02:53 +0300
commitc3224f4147cc4159f2a47fe2162ee9b23bb09ed2 (patch)
treef192915fc0a35bf6f749f4fca9e320620e7187f4 /drivers/media/pci/ttpci/budget-core.c
parent58557349a875d321a582880b12943329a9f3fde4 (diff)
downloadlinux-c3224f4147cc4159f2a47fe2162ee9b23bb09ed2.tar.xz
media: ttpci: coding style fixes: logging
This patch fixes the following checkpatch warnings: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ... WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'ciintf_slot_ts_enable', this function's name, in a string CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'level' may be better as '(level)' to avoid precedence issues There was no consistent style of logging functions used so far. Convert all logging to the appropriate pr_* macros. Add a global pr_fmt macro for the whole driver. Signed-off-by: Stefan Herdler <herdler@nurfuerspam.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/pci/ttpci/budget-core.c')
-rw-r--r--drivers/media/pci/ttpci/budget-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/pci/ttpci/budget-core.c b/drivers/media/pci/ttpci/budget-core.c
index 101695c71cc4..d33adeca196f 100644
--- a/drivers/media/pci/ttpci/budget-core.c
+++ b/drivers/media/pci/ttpci/budget-core.c
@@ -209,7 +209,7 @@ static void vpeirq(struct tasklet_struct *t)
budget->buffer_warnings++;
if (budget->buffer_warnings && time_after(jiffies, budget->buffer_warning_time)) {
- printk("%s %s: used %d times >80%% of buffer (%u bytes now)\n",
+ pr_warn("%s %s: used %d times >80%% of buffer (%u bytes now)\n",
budget->dev->name, __func__, budget->buffer_warnings, count);
budget->buffer_warning_time = jiffies + BUFFER_WARNING_WAIT;
budget->buffer_warnings = 0;
@@ -473,7 +473,7 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
budget->dev->name,
budget->buffer_size > budget->buffer_width * budget->buffer_height ? "odd/even" : "single",
budget->buffer_width, budget->buffer_height);
- printk("%s: dma buffer size %u\n", budget->dev->name, budget->buffer_size);
+ pr_info("%s: dma buffer size %u\n", budget->dev->name, budget->buffer_size);
ret = dvb_register_adapter(&budget->dvb_adapter, budget->card->name,
owner, &budget->dev->pci->dev, adapter_nums);