diff options
author | Stefan Herdler <herdler@nurfuerspam.de> | 2024-04-15 04:24:11 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2024-04-16 00:02:53 +0200 |
commit | c3224f4147cc4159f2a47fe2162ee9b23bb09ed2 (patch) | |
tree | f192915fc0a35bf6f749f4fca9e320620e7187f4 /drivers/media/pci/ttpci/budget-av.c | |
parent | 58557349a875d321a582880b12943329a9f3fde4 (diff) | |
download | lwn-c3224f4147cc4159f2a47fe2162ee9b23bb09ed2.tar.gz lwn-c3224f4147cc4159f2a47fe2162ee9b23bb09ed2.zip |
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-av.c')
-rw-r--r-- | drivers/media/pci/ttpci/budget-av.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/media/pci/ttpci/budget-av.c b/drivers/media/pci/ttpci/budget-av.c index 76660d22f114..2e62c938e2cb 100644 --- a/drivers/media/pci/ttpci/budget-av.c +++ b/drivers/media/pci/ttpci/budget-av.c @@ -16,7 +16,6 @@ * the project's page is at https://linuxtv.org */ -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include "budget.h" #include "stv0299.h" @@ -206,7 +205,7 @@ static int ciintf_slot_reset(struct dvb_ca_en50221 *ca, int slot) if (slot != 0) return -EINVAL; - dprintk(1, "ciintf_slot_reset\n"); + dprintk(1, "ci slot reset\n"); budget_av->slot_status = SLOTSTATUS_RESET; saa7146_setgpio(saa, 2, SAA7146_GPIO_OUTHI); /* disable card */ @@ -235,7 +234,7 @@ static int ciintf_slot_shutdown(struct dvb_ca_en50221 *ca, int slot) if (slot != 0) return -EINVAL; - dprintk(1, "ciintf_slot_shutdown\n"); + dprintk(1, "ci slot shutdown\n"); ttpci_budget_set_video_port(saa, BUDGET_VIDEO_PORTB); budget_av->slot_status = SLOTSTATUS_NONE; @@ -251,7 +250,7 @@ static int ciintf_slot_ts_enable(struct dvb_ca_en50221 *ca, int slot) if (slot != 0) return -EINVAL; - dprintk(1, "ciintf_slot_ts_enable: %d\n", budget_av->slot_status); + dprintk(1, "ci slot status: %d\n", budget_av->slot_status); ttpci_budget_set_video_port(saa, BUDGET_VIDEO_PORTA); @@ -1464,7 +1463,7 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio if (err != 0) { ttpci_budget_deinit(&budget_av->budget); kfree(budget_av); - ERR("cannot init vv subsystem\n"); + pr_err("cannot init vv subsystem\n"); return err; } vv_data.vid_ops.vidioc_enum_input = vidioc_enum_input; @@ -1476,7 +1475,7 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio saa7146_vv_release(dev); ttpci_budget_deinit(&budget_av->budget); kfree(budget_av); - ERR("cannot register capture v4l2 device\n"); + pr_err("cannot register capture v4l2 device\n"); return err; } |