RDMA/nes: Delete impossible debug prints
authorLeon Romanovsky <leonro@mellanox.com>
Wed, 5 Sep 2018 05:58:31 +0000 (08:58 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 5 Sep 2018 21:58:30 +0000 (15:58 -0600)
The pci-core and net-core logic ensure that parameters provided
to nes_probe() and nes_netdev_open() are valid, hence the assert
print are not possible.

Cc: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/nes/nes.c
drivers/infiniband/hw/nes/nes.h
drivers/infiniband/hw/nes/nes_nic.c

index 42b68aa999fcfa2e16396a267bd292d24927f80f..e00add6d78ec77178444fc4628d69f36e577676e 100644 (file)
@@ -456,9 +456,6 @@ static int nes_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
        void __iomem *mmio_regs = NULL;
        u8 hw_rev;
 
-       assert(pcidev != NULL);
-       assert(ent != NULL);
-
        printk(KERN_INFO PFX "NetEffect RNIC driver v%s loading. (%s)\n",
                        DRV_VERSION, pci_name(pcidev));
 
index bedaa02749fbf5020deedc81cbfd5e6b03833499..a895fe980d10acf2539df74e7627102cf1f5bdda 100644 (file)
@@ -149,18 +149,9 @@ do { \
                printk(KERN_ERR PFX "%s[%u]: " fmt, __func__, __LINE__, ##args); \
 } while (0)
 
-#define assert(expr) \
-do { \
-       if (!(expr)) { \
-               printk(KERN_ERR PFX "Assertion failed! %s, %s, %s, line %d\n", \
-                          #expr, __FILE__, __func__, __LINE__); \
-       } \
-} while (0)
-
 #define NES_EVENT_TIMEOUT   1200000
 #else
 #define nes_debug(level, fmt, args...) no_printk(fmt, ##args)
-#define assert(expr)          do {} while (0)
 
 #define NES_EVENT_TIMEOUT   100000
 #endif
index 61014e2515558241391430cd9b84d11786116ee4..16f33454c198d2bf3de6fb226e764b42a7be6023 100644 (file)
@@ -146,8 +146,6 @@ static int nes_netdev_open(struct net_device *netdev)
        struct list_head *list_pos, *list_temp;
        unsigned long flags;
 
-       assert(nesdev != NULL);
-
        if (nesvnic->netdev_open == 1)
                return 0;