staging: kpc2000: remove unnecessary debug prints
cover staging: kpc2000: remove unnecessary debug prints
These patches removes unnecessary debug prints in staging/kpc2000. Debug prints that just informs about function entry or exit can be removed as ftrace can be used to get this information.
Simon Sandström (5):
staging: kpc2000: remove unnecessary debug prints in cell_probe.c
staging: kpc2000: remove unnecessary debug prints in core.c
staging: kpc2000: remove unnecessary debug prints in dma.c
staging: kpc2000: remove unnecessary debug prints in fileops.c
staging: kpc2000: remove unnecessary debug prints in kpc_dma_driver.c
drivers/staging/kpc2000/kpc2000/cell_probe.c | 5 ----- drivers/staging/kpc2000/kpc2000/core.c | 6 ------ drivers/staging/kpc2000/kpc_dma/dma.c | 4 ---- drivers/staging/kpc2000/kpc_dma/fileops.c | 17 ----------------- .../staging/kpc2000/kpc_dma/kpc_dma_driver.c | 4 ---- 5 files changed, 36 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/5 staging: kpc2000: remove unnecessary debug prints in cell_probe.c
Debug prints that are used only to inform about function entry or exit can be removed as ftrace can be used to get this information.
--- drivers/staging/kpc2000/kpc2000/cell_probe.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/staging/kpc2000/kpc2000/cell_probe.c +0 -5
@@ -344,8 +344,6 @@ static int create_dma_engine_core(struct kp2000_device *pcard, size_t engine_restruct mfd_cell cell = { .id = engine_num };struct resource resources[2 ]; -dev_dbg (&pcard->pdev->dev,"create_dma_core(pcard = [%p], engine_regs_offset = %zx, engine_num = %d)\n" , pcard, engine_regs_offset, engine_num); - cell.platform_data =NULL ; cell.pdata_size =0 ; cell.name =KP_DRIVER_NAME_DMA_CONTROLLER ;
@@ -414,9 +412,6 @@ int kp2000_probe_cores(struct kp2000_device *pcard)unsigned int highest_core_id =0 ;struct core_table_entry cte; -dev_dbg (&pcard->pdev->dev,"%s(pcard = %p / %d)\n" , __func__, pcard, - pcard->card_num); - err =kp2000_setup_dma_controller (pcard);if (err)return err;
Signature · 1 line
2.20.1
PATCH 2/5 staging: kpc2000: remove unnecessary debug prints in core.c
In reply to Simon SandströmDebug prints that are used only to inform about function entry or exit can be removed as ftrace can be used to get this information.
--- drivers/staging/kpc2000/kpc2000/core.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/staging/kpc2000/kpc2000/core.c +0 -6
@@ -311,9 +311,6 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,unsigned long dma_bar_phys_len;u16 regval; -dev_dbg (&pdev->dev,"%s(pdev = [%p], id = [%p])\n" , - __func__, pdev, id); -/* * Step 1: Allocate a struct for the pcard */
@@ -506,7 +503,6 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,writel (KPC_DMA_CARD_IRQ_ENABLE |KPC_DMA_CARD_USER_INTERRUPT_MODE , pcard->dma_common_regs); -dev_dbg (&pcard->pdev->dev,"%s() complete!\n" , __func__);mutex_unlock (&pcard->sem);return 0 ;
@@ -540,8 +536,6 @@ static void kp2000_pcie_remove(struct pci_dev *pdev) {struct kp2000_device *pcard =pci_get_drvdata (pdev); -dev_dbg (&pdev->dev,"%s(pdev=%p)\n" , __func__, pdev); -if (!pcard)return ;
Signature · 1 line
2.20.1
PATCH 3/5 staging: kpc2000: remove unnecessary debug prints in dma.c
In reply to Simon SandströmDebug prints that are used only to inform about function entry or exit can be removed as ftrace can be used to get this information.
--- drivers/staging/kpc2000/kpc_dma/dma.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/kpc2000/kpc_dma/dma.c +0 -4
@@ -92,8 +92,6 @@ int setup_dma_engine(struct kpc_dma_device *eng, u32 desc_cnt)unsigned int i;int rv; -dev_dbg (&eng->pldev->dev,"Setting up DMA engine [%p]\n" , eng); - caps =GetEngineCapabilities (eng);if (WARN (!(caps &ENG_CAP_PRESENT ),"%s() called for DMA Engine at %p which isn't present in hardware!\n" , __func__, eng))
@@ -161,8 +159,6 @@ void stop_dma_engine(struct kpc_dma_device *eng) {unsigned long timeout; -dev_dbg (&eng->pldev->dev,"Destroying DMA engine [%p]\n" , eng); -// Disable the descriptor engine WriteEngineControl (eng,0 );
Signature · 1 line
2.20.1
PATCH 4/5 staging: kpc2000: remove unnecessary debug prints in fileops.c
In reply to Simon SandströmDebug prints that are used only to inform about function entry or exit can be removed as ftrace can be used to get this information.
--- drivers/staging/kpc2000/kpc_dma/fileops.c | 17 ----------------- 1 file changed, 17 deletions(-)
drivers/staging/kpc2000/kpc_dma/fileops.c +0 -17
@@ -54,8 +54,6 @@ int kpc_dma_transfer(struct dev_private_data *priv, struct kiocb *kcb, unsigned ldev = priv->ldev;BUG_ON (ldev ==NULL ); -dev_dbg (&priv->ldev->pldev->dev,"%s(priv = [%p], kcb = [%p], iov_base = [%p], iov_len = %zu) ldev = [%p]\n" , __func__, priv, kcb, (void *)iov_base, iov_len, ldev); - acd =kzalloc (sizeof (*acd),GFP_KERNEL );if (!acd) {dev_err (&priv->ldev->pldev->dev,"Couldn't kmalloc space for for the aio data\n" );
@@ -218,8 +216,6 @@ void transfer_complete_cb(struct aio_cb_data *acd, size_t xfr_count, u32 flags)BUG_ON (acd->ldev ==NULL );BUG_ON (acd->ldev->pldev ==NULL ); -dev_dbg (&acd->ldev->pldev->dev,"%s(acd = [%p])\n" , __func__, acd); -for (i =0 ; i < acd->page_count ; i++) {if (!PageReserved (acd->user_pages[i])) {set_page_dirty (acd->user_pages[i]);
@@ -275,7 +271,6 @@ int kpc_dma_open(struct inode *inode, struct file *filp) priv->ldev = ldev; filp->private_data = priv; -dev_dbg (&priv->ldev->pldev->dev,"%s(inode = [%p], filp = [%p]) priv = [%p] ldev = [%p]\n" , __func__, inode, filp, priv, priv->ldev);return 0 ; }
@@ -286,8 +281,6 @@ int kpc_dma_close(struct inode *inode, struct file *filp)struct dev_private_data *priv = (struct dev_private_data *)filp->private_data;struct kpc_dma_device *eng = priv->ldev; -dev_dbg (&priv->ldev->pldev->dev,"%s(inode = [%p], filp = [%p]) priv = [%p], ldev = [%p]\n" , __func__, inode, filp, priv, priv->ldev); -lock_engine (eng);stop_dma_engine (eng);
@@ -330,8 +323,6 @@ ssize_t kpc_dma_aio_read(struct kiocb *kcb, const struct iovec *iov, unsigned {struct dev_private_data *priv = (struct dev_private_data *)kcb->ki_filp->private_data; -dev_dbg (&priv->ldev->pldev->dev,"%s(kcb = [%p], iov = [%p], iov_count = %ld, pos = %lld) priv = [%p], ldev = [%p]\n" , __func__, kcb, iov, iov_count, pos, priv, priv->ldev); -if (priv->ldev->dir !=DMA_FROM_DEVICE )return -EMEDIUMTYPE ;
@@ -350,8 +341,6 @@ ssize_t kpc_dma_aio_write(struct kiocb *kcb, const struct iovec *iov, unsigned {struct dev_private_data *priv = (struct dev_private_data *)kcb->ki_filp->private_data; -dev_dbg (&priv->ldev->pldev->dev,"%s(kcb = [%p], iov = [%p], iov_count = %ld, pos = %lld) priv = [%p], ldev = [%p]\n" , __func__, kcb, iov, iov_count, pos, priv, priv->ldev); -if (priv->ldev->dir !=DMA_TO_DEVICE )return -EMEDIUMTYPE ;
@@ -371,8 +360,6 @@ ssize_t kpc_dma_read(struct file *filp, char __user *user_buf, size_t cou {struct dev_private_data *priv = (struct dev_private_data *)filp->private_data; -dev_dbg (&priv->ldev->pldev->dev,"%s(filp = [%p], user_buf = [%p], count = %zu, ppos = [%p]) priv = [%p], ldev = [%p]\n" , __func__, filp, user_buf, count, ppos, priv, priv->ldev); -if (priv->ldev->dir !=DMA_FROM_DEVICE )return -EMEDIUMTYPE ;
@@ -384,8 +371,6 @@ ssize_t kpc_dma_write(struct file *filp, const char __user *user_buf, size_t co {struct dev_private_data *priv = (struct dev_private_data *)filp->private_data; -dev_dbg (&priv->ldev->pldev->dev,"%s(filp = [%p], user_buf = [%p], count = %zu, ppos = [%p]) priv = [%p], ldev = [%p]\n" , __func__, filp, user_buf, count, ppos, priv, priv->ldev); -if (priv->ldev->dir !=DMA_TO_DEVICE )return -EMEDIUMTYPE ;
@@ -397,8 +382,6 @@ long kpc_dma_ioctl(struct file *filp, unsigned int ioctl_num, unsigned long ioc {struct dev_private_data *priv = (struct dev_private_data *)filp->private_data; -dev_dbg (&priv->ldev->pldev->dev,"%s(filp = [%p], ioctl_num = 0x%x, ioctl_param = 0x%lx) priv = [%p], ldev = [%p]\n" , __func__, filp, ioctl_num, ioctl_param, priv, priv->ldev); -switch (ioctl_num) {case KND_IOCTL_SET_CARD_ADDR : priv->card_addr = ioctl_param;return priv->card_addr;
Signature · 1 line
2.20.1
PATCH 5/5 staging: kpc2000: remove unnecessary debug prints in kpc_dma_driver.c
In reply to Simon SandströmDebug prints that are used only to inform about function entry or exit can be removed as ftrace can be used to get this information.
--- drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c +0 -4
@@ -106,8 +106,6 @@ int kpc_dma_probe(struct platform_device *pldev) goto err_rv; } -dev_dbg (&pldev->dev,"%s(pldev = [%p]) ldev = [%p]\n" , __func__, pldev, ldev); -INIT_LIST_HEAD (&ldev->list); ldev->pldev = pldev;
@@ -183,8 +181,6 @@ int kpc_dma_remove(struct platform_device *pldev)if (!ldev)return -ENXIO ; -dev_dbg (&ldev->pldev->dev,"%s(pldev = [%p]) ldev = [%p]\n" , __func__, pldev, ldev); -lock_engine (ldev);sysfs_remove_files (&(ldev->pldev->dev.kobj), ndd_attr_list);destroy_dma_engine (ldev);
Signature · 1 line
2.20.1