Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp504063ybp; Thu, 10 Oct 2019 23:04:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqwN/CLY7szaFpNNNxHbRMFMzzmRr43OK29HPMY2uCnuh0ykP26wjn+m6UJRlizlADgj4R2/ X-Received: by 2002:aa7:dc50:: with SMTP id g16mr11908603edu.67.1570773865341; Thu, 10 Oct 2019 23:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570773865; cv=none; d=google.com; s=arc-20160816; b=I5wtCrWWyMP9bV14fnzLY6D/YYqXl/htMdPUv9GNqtNmiOVsya2IdDypDxg/axU4ZF U70XhJp80j6HPuUH8wCLdJ/lhBqzbzSiKBPWqtbrl7+uubIfSpNSdSDxVpogbWPcyG1G RfOMmhxnCF0Zp75wWzZAJBs3HBpUgjhX/uJNiMxgTZ9MhUaT4MeJ5PQ0FleoYB7DaLJH XUL3ptUFWYYrh/d7c0QiwRyoYfh/5P0ug063mW9ptdMu07IQ4WEFINA6cLNU1iWeL13f vVkpiwwlCJ5Cytu5YJuPEQflNGoFLvsJuIyVuf6uv7wHTguJipDaedTBROT1He439yJ/ 4yxw== 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=Qz3Pn3iXTIAiE5Vxrx22/mL18yJZNqUc+hQQr9LyuGk=; b=EaTRY3vmliMXo9bMUQcUYR6zxLhYo/tJfHKEQ1O8Mwh3utJaRaZXIyAi+bM9N6l74L Os/ggEhhata1Es6ib8PtICOHV2WZ48lhZ3DlyMCc1NMpgPod+CRmVB1FObUqB0w2JKKx +Fh82nAXNql6rJgr36A3qZix7ZIrHnbX7BIhkAFF1TLaw1cx6FztV4xr2kDwCNa4cVfw +Lg01ClYsp1YE8xKEhdlHksj+kYqFyELfDGqD1SwwOjYVZL9Yi5Kv8iFXuMeqwgZ8/qO ga/UJauhZI2PLbZYvwuyPZaFhg9kP7drs6RrDxdL/P60+P492VG1UHXaBoTzhVm5mYCm 3xdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qRw947YL; 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 ha16si4360596ejb.258.2019.10.10.23.04.02; Thu, 10 Oct 2019 23:04:25 -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=qRw947YL; 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 S1727361AbfJKGD0 (ORCPT + 99 others); Fri, 11 Oct 2019 02:03:26 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:40082 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726116AbfJKGDT (ORCPT ); Fri, 11 Oct 2019 02:03:19 -0400 Received: by mail-pg1-f193.google.com with SMTP id d26so5144622pgl.7 for ; Thu, 10 Oct 2019 23:03:19 -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=Qz3Pn3iXTIAiE5Vxrx22/mL18yJZNqUc+hQQr9LyuGk=; b=qRw947YLIcc9aPdljmXnyA/xH0POdjYEa92ZTsYn+nL5Xdk2MjpmQIMKvPT+Fk8PNT CNoQPCcCnEkBxcZlxSeGajPaVjv8ive0kdMZN1tZhV5xmpbZbdnrruqT70ceWXUsNjEH tVPp++edETPFa5n7v/TL2CRj11yWwyTWoUMQS1Mg2lfcxByj5xKSlb2xNCivzshc/F2z vdEk1+Pup1096N721pH2WV7vA+B4OQgGF4q8StprvbbbSUsPWl6hSLUy0L3Qn6bYiaWp 3/nYTzz9v2MpWYcIdbnyavV6lyeX2W0QMecnG8E+wxFwXH7F2XW8FX6G352oXeYOz8QH WGgQ== 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=Qz3Pn3iXTIAiE5Vxrx22/mL18yJZNqUc+hQQr9LyuGk=; b=lbNdjMtWHKClYIGDC11Gm2JPyhSoW94XEZUCe8yM2TP3zvRCWudthcvOTyrRwZX+23 DCg5XZ4c1g+OG6fo65PhCT6llD9Hu7g5iQPQyCFPSkgxi//wkfMaWpHHx5ijSKia01zm K0MqN2qINEyc813CEuaFm3P7Mlo4fa+ByOMazBvgVdFkVvwCqgQ+GbolG8KcAkWB/rLn Hy/leGnE8cf290cf5h3RyVLA9vH7Ktq5zB5BnowJMrJUtDKDfVXjMpML2/SviCQ1vHN1 dBVM6DhOKQDmKi9CqJcAaEZ0NNRMtGkTjWeUyznW0F5/zpmFzR7c8JslnsM//PRGaV/e uW8A== X-Gm-Message-State: APjAAAXyXvx1LtYDQzdqr9yrcyPczyTZL6qtoSWM42U706CF6pzDrJa6 HBuBKwGuynqM0bRk7bg5Pe0= X-Received: by 2002:a17:90a:de14:: with SMTP id m20mr15695383pjv.10.1570773798627; Thu, 10 Oct 2019 23:03:18 -0700 (PDT) Received: from wambui.zuku.co.ke ([197.237.61.225]) by smtp.googlemail.com with ESMTPSA id p11sm9395715pgb.1.2019.10.10.23.03.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 23:03:17 -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 2/5] staging: octeon: remove typedef declaration for cvmx_helper_link_info_t Date: Fri, 11 Oct 2019 09:02:39 +0300 Message-Id: <78e2c3a4089261e416e9b890cdf81ef029966b75.1570773209.git.wambui.karugax@gmail.com> 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_t as typedef in drivers/staging/octeon/octeon-stubs.h. 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..847081549373 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_t 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_t 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_t 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..f815be830ce0 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_t 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_t 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 3de209b7d0ec..1f7a7ebe1a60 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_t 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_t 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..5a0d754b0c70 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_t 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 fd7522f70f7e..78f42597cee5 100644 --- a/drivers/staging/octeon/octeon-stubs.h +++ b/drivers/staging/octeon/octeon-stubs.h @@ -191,7 +191,7 @@ struct cvmx_wqe_t { uint8_t packet_data[96]; }; -typedef union { +union cvmx_helper_link_info_t { 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_t cvmx_helper_link_get(int ipd_port) { - cvmx_helper_link_info_t ret = { .u64 = 0 }; + union cvmx_helper_link_info_t 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_t link_info) { return 0; } -- 2.23.0