Re: [PATCH] Staging: crystalhd: change BCMLOG_ENTER macro to pr_debug, remove unused BCMLOG_LEAVE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/5/6 Charles Clément <caratorn@xxxxxxxxx>:
>
> Signed-off-by: Charles Clement <caratorn@xxxxxxxxx>

I've got a more complete patch that converts crystalhd over to using
dev_foo printk macros just about everywhere, I just need to get it
posted. Its intertwined with a few other things in my tree too
though...

--jarod


> ---
>  drivers/staging/crystalhd/crystalhd_hw.c   |    6 ++++--
>  drivers/staging/crystalhd/crystalhd_lnx.c  |   10 +++++++---
>  drivers/staging/crystalhd/crystalhd_misc.h |   11 -----------
>  3 files changed, 11 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/staging/crystalhd/crystalhd_hw.c b/drivers/staging/crystalhd/crystalhd_hw.c
> index 56d1e42..9cdfaaa 100644
> --- a/drivers/staging/crystalhd/crystalhd_hw.c
> +++ b/drivers/staging/crystalhd/crystalhd_hw.c
> @@ -22,6 +22,8 @@
>  * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
>  **********************************************************************/
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
>  #include <linux/pci.h>
>  #include <linux/slab.h>
>  #include <linux/delay.h>
> @@ -1628,7 +1630,7 @@ BC_STATUS crystalhd_download_fw(struct crystalhd_adp *adp, void *buffer, uint32_
>        uint32_t fw_sig_len = 36;
>        uint32_t dram_offset = BC_FWIMG_ST_ADDR, sig_reg;
>
> -       BCMLOG_ENTER;
> +       pr_debug("Entered %s\n", __func__);
>
>        if (!adp || !buffer || !sz) {
>                BCMLOG_ERR("Invalid Params.\n");
> @@ -1724,7 +1726,7 @@ BC_STATUS crystalhd_do_fw_cmd(struct crystalhd_hw *hw, BC_FW_CMD *fw_cmd)
>
>        crystalhd_create_event(&fw_cmd_event);
>
> -       BCMLOG_ENTER;
> +       pr_debug("Entered %s\n", __func__);
>
>        if (!hw || !fw_cmd) {
>                BCMLOG_ERR("Invalid Arguments\n");
> diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c
> index 141a3e3..d4f862d 100644
> --- a/drivers/staging/crystalhd/crystalhd_lnx.c
> +++ b/drivers/staging/crystalhd/crystalhd_lnx.c
> @@ -15,6 +15,8 @@
>   along with this driver.  If not, see <http://www.gnu.org/licenses/>.
>  ***************************************************************************/
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
>  #include <linux/smp_lock.h>
>  #include <linux/slab.h>
>
> @@ -299,7 +301,8 @@ static int chd_dec_open(struct inode *in, struct file *fd)
>        BC_STATUS sts = BC_STS_SUCCESS;
>        struct crystalhd_user *uc = NULL;
>
> -       BCMLOG_ENTER;
> +       pr_debug("Entered %s\n", __func__);
> +
>        if (!adp) {
>                BCMLOG_ERR("Invalid adp\n");
>                return -EINVAL;
> @@ -328,7 +331,8 @@ static int chd_dec_close(struct inode *in, struct file *fd)
>        struct crystalhd_adp *adp = chd_get_adp();
>        struct crystalhd_user *uc;
>
> -       BCMLOG_ENTER;
> +       pr_debug("Entered %s\n", __func__);
> +
>        if (!adp) {
>                BCMLOG_ERR("Invalid adp\n");
>                return -EINVAL;
> @@ -515,7 +519,7 @@ static void __devexit chd_dec_pci_remove(struct pci_dev *pdev)
>        struct crystalhd_adp *pinfo;
>        BC_STATUS sts = BC_STS_SUCCESS;
>
> -       BCMLOG_ENTER;
> +       pr_debug("Entered %s\n", __func__);
>
>        pinfo = (struct crystalhd_adp *) pci_get_drvdata(pdev);
>        if (!pinfo) {
> diff --git a/drivers/staging/crystalhd/crystalhd_misc.h b/drivers/staging/crystalhd/crystalhd_misc.h
> index 84331cd..3d15419 100644
> --- a/drivers/staging/crystalhd/crystalhd_misc.h
> +++ b/drivers/staging/crystalhd/crystalhd_misc.h
> @@ -200,19 +200,8 @@ enum _chd_log_levels {
>        BCMLOG_INFO             = 0x00000001,   /* Generic informational */
>        BCMLOG_DBG              = 0x00000002,   /* First level Debug info */
>        BCMLOG_SSTEP            = 0x00000004,   /* Stepping information */
> -       BCMLOG_ENTER_LEAVE      = 0x00000008,   /* stack tracking */
>  };
>
> -#define BCMLOG_ENTER                           \
> -if (g_linklog_level & BCMLOG_ENTER_LEAVE) {    \
> -       printk("Entered %s\n", __func__);       \
> -}
> -
> -#define BCMLOG_LEAVE                           \
> -if (g_linklog_level & BCMLOG_ENTER_LEAVE) {    \
> -       printk("Leaving %s\n", __func__);       \
> -}
> -
>  #define BCMLOG(trace, fmt, args...)            \
>  if (g_linklog_level & trace) {                 \
>        printk(fmt, ##args);                    \
> --
> 1.7.1
>
>



-- 
Jarod Wilson
jarod@xxxxxxxxxxxx
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux