Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2486762ybp; Sat, 12 Oct 2019 11:08:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzO78IQXQ2WUs/RKncgFBmOnS9ZQKq9/NFiWt6zNPUyU9BtkHPXnzm1qH6jjSEh+c2vg7Ql X-Received: by 2002:a17:906:f0d2:: with SMTP id dk18mr19668652ejb.281.1570903713276; Sat, 12 Oct 2019 11:08:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570903713; cv=none; d=google.com; s=arc-20160816; b=R0GXEJ51XStvbbGinOo0KeBcpTzn7sTKTS+reSLh5F0KQ6VfTqrJZzBlTdQn3A/sPt CS1aGbCRwTqYXntX9b7fzmGd5JSFzKokOxePC/7NyvY/44kIKglunEHtE2Xaa2u46KOK ZynxEDJwRT1GnP/rw/1ZDUFkZOSBezaxmrwa/iwDuIeX06MSKSVUF4kx4hctAfTTtVe1 Jh1XeDTfoRIjdImQAMExkk/b6QE9ubh67VsrjuOkdf1BLnuro3HpYrXFPhsL1FUWMd8o 1R0bpcIXYu8o8pFv4UQfO0M43Qy7Y3ZkmmX9fhQjYALPXhiOvav53C1z9lxfCAfvv7S8 S62w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=W8TBrANdRshN+5yx0SA5yPFRIQNY5exzm8qSnlTsABE=; b=pcRdkzqAEqnQqeM7mFksIY2KC3FAJBycKqSgxC52f08ph/F7FHC2GnooM649HDTD0F WEcIz75C2+utrdY4pO2tcYqN9RQeCMNeSbzQlbkA8KEyI3ahxtYWuic5DSsPyoSHurf1 xXLSJBvO49fp3mzbOXHzotyQpHdTBgN/yPuY/+g6dzy4dgTmpD5ngiiobYdCDVqb5vvB /LWjdaLD+KSY/3xAR3SicZ/7qWukqI1DJZe/lSmYei+gKCjQCKfz9mKyktU0/7Voeqvx TYb5GBZJn+JiFmnUo0Adg1IicaY5JMsHFIxIrz7ruYNDRyd9LqcFXPkabZnv2ZTBOjI6 YUmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="oO/2/jj1"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64si6668233eda.384.2019.10.12.11.08.09; Sat, 12 Oct 2019 11:08:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="oO/2/jj1"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729556AbfJLSF5 (ORCPT + 99 others); Sat, 12 Oct 2019 14:05:57 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:43851 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728162AbfJLSF4 (ORCPT ); Sat, 12 Oct 2019 14:05:56 -0400 Received: by mail-pl1-f193.google.com with SMTP id f21so6003245plj.10 for ; Sat, 12 Oct 2019 11:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W8TBrANdRshN+5yx0SA5yPFRIQNY5exzm8qSnlTsABE=; b=oO/2/jj1HnbagEmggvNbKwOI2Z7uZQfhq6544cr5FI6RBprZ8iC/KwgjfYp9CUiTy2 hn8U/r2YfnPy0X/mDUMJgp1WBel7rjhZYXXs7zpef2gSpFVAymvYI2RvG6/f74K15gi7 7fea6bpIymn98RIHPCtBVfI9XqGxuWSJ89/7Mc9MnmQh/N7sYyJj6IB9hnUpGvq8J2ge tY3EKuD22iSJSnPXtICE40p7afrlpanZOlhQxRPsP85clz/TCMColI/3g4k6B05ieYhF dEIU0i0Qj1YfVmtWUgw2A60zlK0E5trk6ryyeNWIdKeo8xoE2BJ3Q13xCQ9QplZaVt3x Yjpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=W8TBrANdRshN+5yx0SA5yPFRIQNY5exzm8qSnlTsABE=; b=XvQoXH2yMqE+ty78LqlULaLw5/nue0KKLcgyZOyCphlBgR+IwdJaVXP667N4ZEJuJn 1/Pg9pQp4R7HV7YXBqsIF4ZYhKgPMirP1+xPnfbYdb3XWWhdw61vBHDEqeCx2qZ2z/2H vJQDh3PYvDeZR8lvYoPFN3/iMbfhqvkMnOQwc9xGJoDcbsiF/vgCkCC5fB6yfzbkzzOD zDCb5AKQuTf//mjCNbL8wbGBv0jqrfoQQ2OaQR66guponNkoAUyZG6+XA2Towno2yYPj 2t6x9Xp7sAle71EEzuPd5TtCbTL5uzyIA+EQJ388tn7gRjygGRf/JsJAF2ig8LHd5T8p Jmhg== X-Gm-Message-State: APjAAAV9vNMlHCKlvGJ4TYuSaZLupLhTvk+Hgn4H//lGCU+JIn0v0Tbz kRHe9/80U2XHiZdaQw1qk+U= X-Received: by 2002:a17:902:b08f:: with SMTP id p15mr20503594plr.229.1570903554758; Sat, 12 Oct 2019 11:05:54 -0700 (PDT) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id p17sm12183475pfn.50.2019.10.12.11.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Oct 2019 11:05:54 -0700 (PDT) From: Wambui Karuga To: outreachy-kernel@googlegroups.com Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Wambui Karuga Subject: [PATCH v2 2/5] staging: octeon: remove typedef declaration for cvmx_helper_link_info Date: Sat, 12 Oct 2019 21:04:32 +0300 Message-Id: X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove declaration of union cvmx_helper_link_info as typedef. Also replace its previous uses with new union declaration. Issue found by checkpatch.pl Signed-off-by: Wambui Karuga --- drivers/staging/octeon/ethernet-mdio.c | 6 +++--- drivers/staging/octeon/ethernet-rgmii.c | 4 ++-- drivers/staging/octeon/ethernet.c | 4 ++-- drivers/staging/octeon/octeon-ethernet.h | 2 +- drivers/staging/octeon/octeon-stubs.h | 10 +++++----- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c index ffac0c4b3f5c..c798672d61b2 100644 --- a/drivers/staging/octeon/ethernet-mdio.c +++ b/drivers/staging/octeon/ethernet-mdio.c @@ -65,7 +65,7 @@ int cvm_oct_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) } void cvm_oct_note_carrier(struct octeon_ethernet *priv, - cvmx_helper_link_info_t li) + union cvmx_helper_link_info li) { if (li.s.link_up) { pr_notice_ratelimited("%s: %u Mbps %s duplex, port %d, queue %d\n", @@ -81,7 +81,7 @@ void cvm_oct_note_carrier(struct octeon_ethernet *priv, void cvm_oct_adjust_link(struct net_device *dev) { struct octeon_ethernet *priv = netdev_priv(dev); - cvmx_helper_link_info_t link_info; + union cvmx_helper_link_info link_info; link_info.u64 = 0; link_info.s.link_up = dev->phydev->link ? 1 : 0; @@ -106,7 +106,7 @@ int cvm_oct_common_stop(struct net_device *dev) { struct octeon_ethernet *priv = netdev_priv(dev); int interface = INTERFACE(priv->port); - cvmx_helper_link_info_t link_info; + union cvmx_helper_link_info link_info; union cvmx_gmxx_prtx_cfg gmx_cfg; int index = INDEX(priv->port); diff --git a/drivers/staging/octeon/ethernet-rgmii.c b/drivers/staging/octeon/ethernet-rgmii.c index d91fd5ce9e68..0c4fac31540a 100644 --- a/drivers/staging/octeon/ethernet-rgmii.c +++ b/drivers/staging/octeon/ethernet-rgmii.c @@ -53,7 +53,7 @@ static void cvm_oct_set_hw_preamble(struct octeon_ethernet *priv, bool enable) static void cvm_oct_check_preamble_errors(struct net_device *dev) { struct octeon_ethernet *priv = netdev_priv(dev); - cvmx_helper_link_info_t link_info; + union cvmx_helper_link_info link_info; unsigned long flags; link_info.u64 = priv->link_info; @@ -103,7 +103,7 @@ static void cvm_oct_check_preamble_errors(struct net_device *dev) static void cvm_oct_rgmii_poll(struct net_device *dev) { struct octeon_ethernet *priv = netdev_priv(dev); - cvmx_helper_link_info_t link_info; + union cvmx_helper_link_info link_info; bool status_change; link_info = cvmx_helper_link_get(priv->port); diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c index f892f1ad4638..f42c3816ce49 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c @@ -460,7 +460,7 @@ int cvm_oct_common_open(struct net_device *dev, struct octeon_ethernet *priv = netdev_priv(dev); int interface = INTERFACE(priv->port); int index = INDEX(priv->port); - cvmx_helper_link_info_t link_info; + union cvmx_helper_link_info link_info; int rv; rv = cvm_oct_phy_setup_device(dev); @@ -496,7 +496,7 @@ int cvm_oct_common_open(struct net_device *dev, void cvm_oct_link_poll(struct net_device *dev) { struct octeon_ethernet *priv = netdev_priv(dev); - cvmx_helper_link_info_t link_info; + union cvmx_helper_link_info link_info; link_info = cvmx_helper_link_get(priv->port); if (link_info.u64 == priv->link_info) diff --git a/drivers/staging/octeon/octeon-ethernet.h b/drivers/staging/octeon/octeon-ethernet.h index 042220d86d33..a6140705706f 100644 --- a/drivers/staging/octeon/octeon-ethernet.h +++ b/drivers/staging/octeon/octeon-ethernet.h @@ -91,7 +91,7 @@ int cvm_oct_common_stop(struct net_device *dev); int cvm_oct_common_open(struct net_device *dev, void (*link_poll)(struct net_device *)); void cvm_oct_note_carrier(struct octeon_ethernet *priv, - cvmx_helper_link_info_t li); + union cvmx_helper_link_info li); void cvm_oct_link_poll(struct net_device *dev); extern int always_use_pow; diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon/octeon-stubs.h index 7c29cfbd55d1..0991be329139 100644 --- a/drivers/staging/octeon/octeon-stubs.h +++ b/drivers/staging/octeon/octeon-stubs.h @@ -191,7 +191,7 @@ struct cvmx_wqe { uint8_t packet_data[96]; }; -typedef union { +union cvmx_helper_link_info { uint64_t u64; struct { uint64_t reserved_20_63:44; @@ -199,7 +199,7 @@ typedef union { uint64_t full_duplex:1; /**< 1 if the link is full duplex */ uint64_t speed:18; /**< Speed of the link in Mbps */ } s; -} cvmx_helper_link_info_t; +}; typedef enum { CVMX_FAU_REG_32_START = 0, @@ -1267,15 +1267,15 @@ static inline cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int return 0; } -static inline cvmx_helper_link_info_t cvmx_helper_link_get(int ipd_port) +static inline union cvmx_helper_link_info cvmx_helper_link_get(int ipd_port) { - cvmx_helper_link_info_t ret = { .u64 = 0 }; + union cvmx_helper_link_info ret = { .u64 = 0 }; return ret; } static inline int cvmx_helper_link_set(int ipd_port, - cvmx_helper_link_info_t link_info) + union cvmx_helper_link_info link_info) { return 0; } -- 2.23.0