From patchwork Sun Mar 29 12:54:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 6115611 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C26039F32E for ; Sun, 29 Mar 2015 13:03:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EECA020268 for ; Sun, 29 Mar 2015 13:03:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0EAAB20225 for ; Sun, 29 Mar 2015 13:03:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753011AbbC2NCc (ORCPT ); Sun, 29 Mar 2015 09:02:32 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:45691 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752734AbbC2NCP (ORCPT ); Sun, 29 Mar 2015 09:02:15 -0400 X-IronPort-AV: E=Sophos;i="5.11,488,1422918000"; d="scan'208";a="130599851" Received: from palace.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Mar 2015 15:02:10 +0200 From: Julia Lawall To: Steve Wise Cc: kernel-janitors@vger.kernel.org, Roland Dreier , Sean Hefty , Hal Rosenstock , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] cxgb4: Drop unneeded cast on netdev_priv Date: Sun, 29 Mar 2015 14:54:15 +0200 Message-Id: <1427633655-32103-4-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.8.3.2 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Julia Lawall The result of netdev_priv is already implicitly cast to the type of the left side of the assignment. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ type T; T *x; @@ x = - (T *) netdev_priv(...) // Signed-off-by: Julia Lawall --- drivers/infiniband/hw/cxgb4/cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -u -p a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c @@ -3677,14 +3677,14 @@ static int rx_pkt(struct c4iw_dev *dev, pdev = ip_dev_find(&init_net, iph->daddr); e = cxgb4_l2t_get(dev->rdev.lldi.l2t, neigh, pdev, 0); - pi = (struct port_info *)netdev_priv(pdev); + pi = netdev_priv(pdev); tx_chan = cxgb4_port_chan(pdev); dev_put(pdev); } else { pdev = get_real_dev(neigh->dev); e = cxgb4_l2t_get(dev->rdev.lldi.l2t, neigh, pdev, 0); - pi = (struct port_info *)netdev_priv(pdev); + pi = netdev_priv(pdev); tx_chan = cxgb4_port_chan(pdev); } neigh_release(neigh);