Commit 91bd2855 authored by Andrew F. Davis's avatar Andrew F. Davis Committed by Greg Kroah-Hartman

w1: Remove unneeded use of assert() and remove w1_log.h

The only use of assert() is in matrox_w1.c and is used to check the input
to probe() from the PCI subsystem for NULL values, these are guaranteed
to be populated and no other PCI driver makes this check, remove this.

As this was the only definition in w1_log.h, remove this also.
Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b04e0854
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include "../w1.h" #include "../w1.h"
#include "../w1_int.h" #include "../w1_int.h"
#include "../w1_log.h"
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>"); MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>");
...@@ -157,9 +156,6 @@ static int matrox_w1_probe(struct pci_dev *pdev, const struct pci_device_id *ent ...@@ -157,9 +156,6 @@ static int matrox_w1_probe(struct pci_dev *pdev, const struct pci_device_id *ent
struct matrox_device *dev; struct matrox_device *dev;
int err; int err;
assert(pdev != NULL);
assert(ent != NULL);
if (pdev->vendor != PCI_VENDOR_ID_MATROX || pdev->device != PCI_DEVICE_ID_MATROX_G400) if (pdev->vendor != PCI_VENDOR_ID_MATROX || pdev->device != PCI_DEVICE_ID_MATROX_G400)
return -ENODEV; return -ENODEV;
...@@ -224,8 +220,6 @@ static void matrox_w1_remove(struct pci_dev *pdev) ...@@ -224,8 +220,6 @@ static void matrox_w1_remove(struct pci_dev *pdev)
{ {
struct matrox_device *dev = pci_get_drvdata(pdev); struct matrox_device *dev = pci_get_drvdata(pdev);
assert(dev != NULL);
if (dev->found) { if (dev->found) {
w1_remove_master_device(dev->bus_master); w1_remove_master_device(dev->bus_master);
iounmap(dev->virt_addr); iounmap(dev->virt_addr);
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <linux/atomic.h> #include <linux/atomic.h>
#include "w1.h" #include "w1.h"
#include "w1_log.h"
#include "w1_int.h" #include "w1_int.h"
#include "w1_family.h" #include "w1_family.h"
#include "w1_netlink.h" #include "w1_netlink.h"
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include "w1.h" #include "w1.h"
#include "w1_log.h"
#include "w1_netlink.h" #include "w1_netlink.h"
#include "w1_int.h" #include "w1_int.h"
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <linux/module.h> #include <linux/module.h>
#include "w1.h" #include "w1.h"
#include "w1_log.h"
static int w1_delay_parm = 1; static int w1_delay_parm = 1;
module_param_named(delay_coef, w1_delay_parm, int, 0); module_param_named(delay_coef, w1_delay_parm, int, 0);
......
/*
* Copyright (c) 2004 Evgeniy Polyakov <zbr@ioremap.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __W1_LOG_H
#define __W1_LOG_H
#define DEBUG
#ifdef W1_DEBUG
# define assert(expr) do {} while (0)
#else
# define assert(expr) \
if(unlikely(!(expr))) { \
pr_err("Assertion failed! %s,%s,%s,line=%d\n", \
#expr, __FILE__, __func__, __LINE__); \
}
#endif
#endif /* __W1_LOG_H */
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <linux/connector.h> #include <linux/connector.h>
#include "w1.h" #include "w1.h"
#include "w1_log.h"
#include "w1_netlink.h" #include "w1_netlink.h"
#if defined(CONFIG_W1_CON) && (defined(CONFIG_CONNECTOR) || (defined(CONFIG_CONNECTOR_MODULE) && defined(CONFIG_W1_MODULE))) #if defined(CONFIG_W1_CON) && (defined(CONFIG_CONNECTOR) || (defined(CONFIG_CONNECTOR_MODULE) && defined(CONFIG_W1_MODULE)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment