lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1547695326-31553-4-git-send-email-Tristram.Ha@microchip.com>
Date:   Wed, 16 Jan 2019 19:22:05 -0800
From:   <Tristram.Ha@...rochip.com>
To:     Sergio Paracuellos <sergio.paracuellos@...il.com>,
        Marek Vasut <marex@...x.de>, Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Pavel Machek <pavel@....cz>,
        Dan Carpenter <dan.carpenter@...cle.com>
CC:     Tristram Ha <Tristram.Ha@...rochip.com>,
        <vivien.didelot@...oirfairelinux.com>,
        <UNGLinuxDriver@...rochip.com>, <netdev@...r.kernel.org>
Subject: [PATCH RFC 3/4] net: dsa: microchip: remove ksz9477_get_port_addr

From: Tristram Ha <Tristram.Ha@...rochip.com>

Remove ksz9477_get_port_addr as it is considered too slow and the macro
PORT_CTRL_ADDR can be used directly.

Signed-off-by: Tristram Ha <Tristram.Ha@...rochip.com>
---
 drivers/net/dsa/microchip/ksz9477.c  | 11 +----------
 drivers/net/dsa/microchip/ksz_priv.h |  1 -
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
index 14b6371..3cf8ad7 100644
--- a/drivers/net/dsa/microchip/ksz9477.c
+++ b/drivers/net/dsa/microchip/ksz9477.c
@@ -2,12 +2,9 @@
 /*
  * Microchip KSZ9477 switch driver main logic
  *
- * Copyright (C) 2017-2018 Microchip Technology Inc.
+ * Copyright (C) 2017-2019 Microchip Technology Inc.
  */
 
-#include <linux/delay.h>
-#include <linux/export.h>
-#include <linux/gpio.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/platform_data/microchip-ksz.h>
@@ -1157,11 +1154,6 @@ static int ksz9477_setup(struct dsa_switch *ds)
 	.port_mirror_del	= ksz9477_port_mirror_del,
 };
 
-static u32 ksz9477_get_port_addr(int port, int offset)
-{
-	return PORT_CTRL_ADDR(port, offset);
-}
-
 static int ksz9477_switch_detect(struct ksz_device *dev)
 {
 	u8 data8;
@@ -1278,7 +1270,6 @@ static void ksz9477_switch_exit(struct ksz_device *dev)
 }
 
 static const struct ksz_dev_ops ksz9477_dev_ops = {
-	.get_port_addr = ksz9477_get_port_addr,
 	.cfg_port_member = ksz9477_cfg_port_member,
 	.flush_dyn_mac_table = ksz9477_flush_dyn_mac_table,
 	.port_setup = ksz9477_port_setup,
diff --git a/drivers/net/dsa/microchip/ksz_priv.h b/drivers/net/dsa/microchip/ksz_priv.h
index 526cd0f..00ab370 100644
--- a/drivers/net/dsa/microchip/ksz_priv.h
+++ b/drivers/net/dsa/microchip/ksz_priv.h
@@ -115,7 +115,6 @@ struct alu_struct {
 };
 
 struct ksz_dev_ops {
-	u32 (*get_port_addr)(int port, int offset);
 	void (*cfg_port_member)(struct ksz_device *dev, int port, u8 member);
 	void (*flush_dyn_mac_table)(struct ksz_device *dev, int port);
 	void (*port_setup)(struct ksz_device *dev, int port, bool cpu_port);
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ