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: <1515581725-29242-4-git-send-email-faiz_abbas@ti.com>
Date:   Wed, 10 Jan 2018 16:25:20 +0530
From:   Faiz Abbas <faiz_abbas@...com>
To:     <wg@...ndegger.com>, <mkl@...gutronix.de>, <robh+dt@...nel.org>,
        <mark.rutland@....com>
CC:     <linux-can@...r.kernel.org>, <netdev@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <faiz_abbas@...com>, <nsekhar@...com>, <fcooper@...com>,
        <robh@...nel.org>, <Wenyou.Yang@...rochip.com>,
        <sergei.shtylyov@...entembedded.com>, <linux-omap@...r.kernel.org>,
        <b29396@...escale.com>
Subject: [PATCH v7 3/8] can: m_can: Remove check for version when allocating m_can net device

Currently the m_can version is used to set the tx_fifo_count to 1 when
allocating the net device. However, this is redundant as a value of 1
for the tx_fifo_count needs to be provided in the bosch,mram-cfg
property of the device tree node anyway.

Therefore, remove check for version when allocating the net device.

Signed-off-by: Faiz Abbas <faiz_abbas@...com>
---
 drivers/net/can/m_can/m_can.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index f72116e..893edbb 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -1213,7 +1213,6 @@ static struct net_device *alloc_m_can_dev(struct platform_device *pdev,
 	struct net_device *dev;
 	struct m_can_priv *priv;
 	int m_can_version;
-	unsigned int echo_buffer_count;
 
 	m_can_version = m_can_check_core_release(addr);
 	/* return if unsupported version */
@@ -1222,12 +1221,7 @@ static struct net_device *alloc_m_can_dev(struct platform_device *pdev,
 		goto return_dev;
 	}
 
-	/* If version < 3.1.x, then only one echo buffer is used */
-	echo_buffer_count = ((m_can_version == 30)
-				? 1U
-				: (unsigned int)tx_fifo_size);
-
-	dev = alloc_candev(sizeof(*priv), echo_buffer_count);
+	dev = alloc_candev(sizeof(*priv), tx_fifo_size);
 	if (!dev) {
 		dev = NULL;
 		goto return_dev;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ