IB/cxgb3: remove cxio_dbg.c
PATCH 1/1 IB/cxgb3: remove cxio_dbg.c
cxio_dbg.c is uncompiled since commit 2b540355cd2f ("RDMA/cxgb3: cleanups") 10 years after, we could remove it.
--- drivers/infiniband/hw/cxgb3/cxio_dbg.c | 206 --------------------------------- 1 file changed, 206 deletions(-) delete mode 100644 drivers/infiniband/hw/cxgb3/cxio_dbg.c
drivers/infiniband/hw/cxgb3/cxio_dbg.c deleted +0 -206
@@ -1,206 +0,0 @@ -/* -* Copyright (c) 2006 Chelsio, Inc. All rights reserved. -* -* This software is available to you under a choice of one of two -* licenses. You may choose to be licensed under the terms of the GNU -* General Public License (GPL) Version 2, available from the file -* COPYING in the main directory of this source tree, or the -* OpenIB.org BSD license below: -* -* Redistribution and use in source and binary forms, with or -* without modification, are permitted provided that the following -* conditions are met: -* -* - Redistributions of source code must retain the above -* copyright notice, this list of conditions and the following -* disclaimer. -* -* - Redistributions in binary form must reproduce the above -* copyright notice, this list of conditions and the following -* disclaimer in the documentation and/or other materials -* provided with the distribution. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -*/ -#ifdef DEBUG -#include <linux/types.h> -#include <linux/slab.h> -#include "common.h" -#include "cxgb3_ioctl.h" -#include "cxio_hal.h" -#include "cxio_wr.h" - -void cxio_dump_tpt (struct cxio_rdev *rdev,u32 stag) -{ -struct ch_mem_range *m; -u64 *data; -int rc; -int size =32 ; - - m =kmalloc (sizeof (*m) + size,GFP_ATOMIC ); -if (!m) -return ; - - m->mem_id =MEM_PMRX ; - m->addr = (stag>>8 ) *32 + rdev->rnic_info.tpt_base; - m->len = size; -pr_debug ("%s TPT addr 0x%x len %d\n" , __func__, m->addr, m->len); - rc = rdev->t3cdev_p->ctl (rdev->t3cdev_p,RDMA_GET_MEM , m); -if (rc) { -pr_debug ("%s toectl returned error %d\n" , __func__, rc); -kfree (m); -return ; - } - - data = (u64 *)m->buf; -while (size >0 ) { -pr_debug ("TPT %08x: %016llx\n" , - m->addr, (unsigned long long )*data); - size -=8 ; - data++; - m->addr +=8 ; - } -kfree (m); -} - -void cxio_dump_pbl (struct cxio_rdev *rdev,u32 pbl_addr,uint len,u8 shift) -{ -struct ch_mem_range *m; -u64 *data; -int rc; -int size, npages; - - shift +=12 ; - npages = (len + (1ULL << shift) -1 ) >> shift; - size = npages *sizeof (u64); - - m =kmalloc (sizeof (*m) + size,GFP_ATOMIC ); -if (!m) -return ; - - m->mem_id =MEM_PMRX ; - m->addr = pbl_addr; - m->len = size; -pr_debug ("%s PBL addr 0x%x len %d depth %d\n" , - __func__, m->addr, m->len, npages); - rc = rdev->t3cdev_p->ctl (rdev->t3cdev_p,RDMA_GET_MEM , m); -if (rc) { -pr_debug ("%s toectl returned error %d\n" , __func__, rc); -kfree (m); -return ; - } - - data = (u64 *)m->buf; -while (size >0 ) { -pr_debug ("PBL %08x: %016llx\n" , - m->addr, (unsigned long long )*data); - size -=8 ; - data++; - m->addr +=8 ; - } -kfree (m); -} - -void cxio_dump_wqe (union t3_wr *wqe) -{ -__be64 *data = (__be64 *)wqe; -uint size = (uint)(be64_to_cpu (*data) &0xff ); - -if (size ==0 ) - size =8 ; -while (size >0 ) { -pr_debug ("WQE %p: %016llx\n" , - data, (unsigned long long )be64_to_cpu (*data)); - size--; - data++; - } -} - -void cxio_dump_wce (struct t3_cqe *wce) -{ -__be64 *data = (__be64 *)wce; -int size =sizeof (*wce); - -while (size >0 ) { -pr_debug ("WCE %p: %016llx\n" , - data, (unsigned long long )be64_to_cpu (*data)); - size -=8 ; - data++; - } -} - -void cxio_dump_rqt (struct cxio_rdev *rdev,u32 hwtid,int nents) -{ -struct ch_mem_range *m; -int size = nents *64 ; -u64 *data; -int rc; - - m =kmalloc (sizeof (*m) + size,GFP_ATOMIC ); -if (!m) -return ; - - m->mem_id =MEM_PMRX ; - m->addr = ((hwtid)<<10 ) + rdev->rnic_info.rqt_base; - m->len = size; -pr_debug ("%s RQT addr 0x%x len %d\n" , __func__, m->addr, m->len); - rc = rdev->t3cdev_p->ctl (rdev->t3cdev_p,RDMA_GET_MEM , m); -if (rc) { -pr_debug ("%s toectl returned error %d\n" , __func__, rc); -kfree (m); -return ; - } - - data = (u64 *)m->buf; -while (size >0 ) { -pr_debug ("RQT %08x: %016llx\n" , - m->addr, (unsigned long long )*data); - size -=8 ; - data++; - m->addr +=8 ; - } -kfree (m); -} - -void cxio_dump_tcb (struct cxio_rdev *rdev,u32 hwtid) -{ -struct ch_mem_range *m; -int size =TCB_SIZE ; -u32 *data; -int rc; - - m =kmalloc (sizeof (*m) + size,GFP_ATOMIC ); -if (!m) -return ; - - m->mem_id =MEM_CM ; - m->addr = hwtid * size; - m->len = size; -pr_debug ("%s TCB %d len %d\n" , __func__, m->addr, m->len); - rc = rdev->t3cdev_p->ctl (rdev->t3cdev_p,RDMA_GET_MEM , m); -if (rc) { -pr_debug ("%s toectl returned error %d\n" , __func__, rc); -kfree (m); -return ; - } - - data = (u32 *)m->buf; -while (size >0 ) { -printk ("%2u: %08x %08x %08x %08x %08x %08x %08x %08x\n" , - m->addr, - *(data+2 ), *(data+3 ), *(data),*(data+1 ), - *(data+6 ), *(data+7 ), *(data+4 ), *(data+5 )); - size -=32 ; - data +=8 ; - m->addr +=32 ; - } -kfree (m); -} -#endif
Signature · 1 line
2.13.6
Quoted 2 lines · Corentin Labbe
cxio_dbg.cis uncompiled since commit2b540355cd2f("RDMA/cxgb3: cleanups") 10 years after, we could remove it.
OK, now you could remove the prototypes and probably CONFIG_INFINIBAND_CXGB3_DEBUG too.
There is a DEBUG test and many uses of pr_debug that would have modified behavior.
The pr_debug uses would only be emitted via a dynamic_debug enable and the #ifdef DEBUG is probably not necessary or useful as it guards a BUG_ON.
--- drivers/infiniband/hw/cxgb3/Kconfig | 9 --------- drivers/infiniband/hw/cxgb3/Makefile | 2 -- drivers/infiniband/hw/cxgb3/cxio_hal.h | 9 --------- drivers/infiniband/hw/cxgb3/iwch_cq.c | 7 ------- 4 files changed, 27 deletions(-)
drivers/infiniband/hw/cxgb3/Kconfig +0 -9
@@ -16,12 +16,3 @@ config INFINIBAND_CXGB3 To compile this driver as a module, choose M here: the module will be called iw_cxgb3. - -config INFINIBAND_CXGB3_DEBUG - bool "Verbose debugging output" - depends on INFINIBAND_CXGB3 - default n - ---help--- - This option causes the Chelsio RDMA driver to produce copious - amounts of debug messages. Select this if you are developing - the driver or trying to diagnose a problem.
drivers/infiniband/hw/cxgb3/Makefile +0 -2
@@ -5,5 +5,3 @@ obj-$(CONFIG_INFINIBAND_CXGB3) += iw_cxgb3.o iw_cxgb3-y := iwch_cm.o iwch_ev.o iwch_cq.o iwch_qp.o iwch_mem.o \ iwch_provider.o iwch.o cxio_hal.o cxio_resource.o - -ccflags-$(CONFIG_INFINIBAND_CXGB3_DEBUG) += -DDEBUG
drivers/infiniband/hw/cxgb3/cxio_hal.h +0 -9
@@ -202,13 +202,4 @@ int iwch_cxgb3_ofld_send(struct t3cdev *tdev, struct sk_buff *skb);#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt -#ifdef DEBUG -void cxio_dump_tpt (struct cxio_rdev *rev,u32 stag); -void cxio_dump_pbl (struct cxio_rdev *rev,u32 pbl_addr,uint len,u8 shift); -void cxio_dump_wqe (union t3_wr *wqe); -void cxio_dump_wce (struct t3_cqe *wce); -void cxio_dump_rqt (struct cxio_rdev *rdev,u32 hwtid,int nents); -void cxio_dump_tcb (struct cxio_rdev *rdev,u32 hwtid); -#endif -#endif
drivers/infiniband/hw/cxgb3/iwch_cq.c +0 -7
@@ -200,10 +200,6 @@ int iwch_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc)spin_lock_irqsave (&chp->lock, flags);for (npolled =0 ; npolled < num_entries; ++npolled) { -#ifdef DEBUG -int i=0 ; -#endif -/* * Because T3 can post CQEs that are _not_ associated * with a WR, we might have to poll again after removing
@@ -211,9 +207,6 @@ int iwch_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc)*/ do { err =iwch_poll_cq_one (rhp, chp, wc + npolled); -#ifdef DEBUG -BUG_ON (++i >1000 ); -#endif }while (err == -EAGAIN );if (err <=0 )break ;
Quoted 15 lines · Joe Perches
Quoted 2 lines · Corentin Labbe
cxio_dbg.cis uncompiled since commit2b540355cd2f("RDMA/cxgb3: cleanups") 10 years after, we could remove it.OK, now you could remove the prototypes and probably
CONFIG_INFINIBAND_CXGB3_DEBUGtoo.There is a DEBUG test and many uses of
pr_debugthat would have modified behavior.The
pr_debuguses would only be emitted via adynamic_debugenable and the #ifdef DEBUG is probably not necessary or useful as it guards aBUG_ON.
Quoted 5 lines
drivers/infiniband/hw/cxgb3/Kconfig | 9 --------- drivers/infiniband/hw/cxgb3/Makefile | 2 -- drivers/infiniband/hw/cxgb3/cxio_hal.h | 9 --------- drivers/infiniband/hw/cxgb3/iwch_cq.c | 7 ------- 4 files changed, 27 deletions(-)
Yes, can you resend the patch with Joe's hunks as well?
Thanks,
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 16 lines · Jason Gunthorpe
Quoted 15 lines · Joe Perches
Quoted 2 lines · Corentin Labbe
cxio_dbg.cis uncompiled since commit2b540355cd2f("RDMA/cxgb3: cleanups") 10 years after, we could remove it.OK, now you could remove the prototypes and probably
CONFIG_INFINIBAND_CXGB3_DEBUGtoo.There is a DEBUG test and many uses of
pr_debugthat would have modified behavior.The
pr_debuguses would only be emitted via adynamic_debugenable and the #ifdef DEBUG is probably not necessary or useful as it guards aBUG_ON.
Quoted 8 lines
Quoted 5 lines
drivers/infiniband/hw/cxgb3/Kconfig | 9 --------- drivers/infiniband/hw/cxgb3/Makefile | 2 -- drivers/infiniband/hw/cxgb3/cxio_hal.h | 9 --------- drivers/infiniband/hw/cxgb3/iwch_cq.c | 7 ------- 4 files changed, 27 deletions(-)Yes, can you resend the patch with Joe's hunks as well?
Yes I will do
Regards
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines
cxio_dbg.cis uncompiled since commit2b540355cd2f("RDMA/cxgb3:
cleanups")
10 years after, we could remove it.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html