From patchwork Mon Aug 5 13:05:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 264658 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 17BF32C0090 for ; Mon, 5 Aug 2013 23:05:42 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753012Ab3HENFh (ORCPT ); Mon, 5 Aug 2013 09:05:37 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:39116 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753001Ab3HENFg (ORCPT ); Mon, 5 Aug 2013 09:05:36 -0400 Received: by mail-wi0-f174.google.com with SMTP id j17so1432635wiw.7 for ; Mon, 05 Aug 2013 06:05:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=FD7ktNcdw25AyxBtsevH1iywLCDzmEbhtNWVEJQUQmw=; b=nGhv4TUXjJPD2Q4vtcEbryKitX5QO+WxuXS7Bd4ncsnK0JFBCxq64ajZ0hAQBELeBs oyaryg1EpBTiJTszv8EDN/Ve3KqzWmYID8jhmMD5IGOV0OgM0vaQlCqvle8U5gaOmJj0 RUHtqTsqdiVOV3vR1X8x94tAsP0rxMNccGP4ccMp33v1JE4IH6lz2Wt0eYh+wWiJOKJE 2lW8NLkwKdrZsyAWPzDWe0jafvrB0ZBENQZQzNI41MmybxE/XizskOXDD4jyHyDuEkTi c8HEyFZ2v5dbbhIN2CACSux7xtyVbItTQu0YxGHKby6BnCyTp5KfKMzbfECV/b9bIMww Dw3A== X-Gm-Message-State: ALoCoQlNJJeaY0Vz9/D3o8nv/BwqmjDa6wGVXgKNTDnVDUT9vWSuUDo8IR14IrNjHq6bijPB5DqF X-Received: by 10.181.13.145 with SMTP id ey17mr6702714wid.43.1375707935305; Mon, 05 Aug 2013 06:05:35 -0700 (PDT) Received: from localhost (out.voltaire.com. [193.47.165.251]) by mx.google.com with ESMTPSA id nb12sm21366100wic.7.2013.08.05.06.05.33 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 05 Aug 2013 06:05:34 -0700 (PDT) Date: Mon, 5 Aug 2013 16:05:32 +0300 From: Eli Cohen To: davem@davemloft.net Cc: dborkman@redhat.com, netdev@vger.kernel.org, ogerlitz@mellanox.com Subject: [PATCH] mlx5: remove health handler plugin Message-ID: <20130805130532.GA26634@mtldesk30> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Remove this code, per Dave Miller's request, since it is not being used anywhere in the kernel. Signed-off-by: Eli Cohen --- drivers/net/ethernet/mellanox/mlx5/core/health.c | 29 +----------------------- include/linux/mlx5/driver.h | 3 --- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c index 748f10a..3e6670c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/health.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c @@ -55,33 +55,9 @@ enum { }; static DEFINE_SPINLOCK(health_lock); - static LIST_HEAD(health_list); static struct work_struct health_work; -static health_handler_t reg_handler; -int mlx5_register_health_report_handler(health_handler_t handler) -{ - spin_lock_irq(&health_lock); - if (reg_handler) { - spin_unlock_irq(&health_lock); - return -EEXIST; - } - reg_handler = handler; - spin_unlock_irq(&health_lock); - - return 0; -} -EXPORT_SYMBOL(mlx5_register_health_report_handler); - -void mlx5_unregister_health_report_handler(void) -{ - spin_lock_irq(&health_lock); - reg_handler = NULL; - spin_unlock_irq(&health_lock); -} -EXPORT_SYMBOL(mlx5_unregister_health_report_handler); - static void health_care(struct work_struct *work) { struct mlx5_core_health *health, *n; @@ -98,11 +74,8 @@ static void health_care(struct work_struct *work) priv = container_of(health, struct mlx5_priv, health); dev = container_of(priv, struct mlx5_core_dev, priv); mlx5_core_warn(dev, "handling bad device here\n"); + /* nothing yet */ spin_lock_irq(&health_lock); - if (reg_handler) - reg_handler(dev->pdev, health->health, - sizeof(health->health)); - list_del_init(&health->list); spin_unlock_irq(&health_lock); } diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index 2aa258b..611e65e 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@ -731,9 +731,6 @@ void mlx5_cq_debugfs_cleanup(struct mlx5_core_dev *dev); int mlx5_db_alloc(struct mlx5_core_dev *dev, struct mlx5_db *db); void mlx5_db_free(struct mlx5_core_dev *dev, struct mlx5_db *db); -typedef void (*health_handler_t)(struct pci_dev *pdev, struct health_buffer __iomem *buf, int size); -int mlx5_register_health_report_handler(health_handler_t handler); -void mlx5_unregister_health_report_handler(void); const char *mlx5_command_str(int command); int mlx5_cmdif_debugfs_init(struct mlx5_core_dev *dev); void mlx5_cmdif_debugfs_cleanup(struct mlx5_core_dev *dev);