<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/net/can/ti_hecc.c, branch doc/4.8-fixes</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=doc%2F4.8-fixes</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=doc%2F4.8-fixes'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2015-11-23T08:37:38+00:00</updated>
<entry>
<title>can: remove obsolete assignment for CAN protocol error type</title>
<updated>2015-11-23T08:37:38+00:00</updated>
<author>
<name>Oliver Hartkopp</name>
<email>socketcan@hartkopp.net</email>
</author>
<published>2015-11-21T17:41:21+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a2ec19f888f1fb06e2424486423a16f86ad1fcc4'/>
<id>urn:sha1:a2ec19f888f1fb06e2424486423a16f86ad1fcc4</id>
<content type='text'>
The assignment 'cf-&gt;data[2] |= CAN_ERR_PROT_UNSPEC' used at CAN error message
creation time is obsolete as CAN_ERR_PROT_UNSPEC is zero and cf-&gt;data[2] is
initialized with zero in alloc_can_err_skb() anyway.

So we could either assign 'cf-&gt;data[2] = CAN_ERR_PROT_UNSPEC' correctly or we
can remove the obsolete OR operation entirely.

Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: fix assignment of error location in CAN error messages</title>
<updated>2015-11-23T08:37:34+00:00</updated>
<author>
<name>Oliver Hartkopp</name>
<email>socketcan@hartkopp.net</email>
</author>
<published>2015-11-21T17:41:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ffd461f80d536336811d573f197f3e6d9872d054'/>
<id>urn:sha1:ffd461f80d536336811d573f197f3e6d9872d054</id>
<content type='text'>
As Dan Carpenter reported in http://marc.info/?l=linux-can&amp;m=144793696016187
the assignment of the error location in CAN error messages had some bit wise
overlaps. Indeed the value to be assigned in data[3] is no bitfield but defines
a single value which points to a location inside the CAN frame on the wire.

This patch fixes the assignments for the error locations in error messages.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: ti_heccn: don't touch skb after netif_rx()</title>
<updated>2015-07-15T07:04:27+00:00</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2015-07-11T19:16:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=05c4456538e9551b8ac47762b21127bf9cf6cc8e'/>
<id>urn:sha1:05c4456538e9551b8ac47762b21127bf9cf6cc8e</id>
<content type='text'>
There is no guarantee that the skb is in the same state after calling
net_receive_skb() or netif_rx(). It might be freed or reused. Not really
harmful as its a read access, except you turn on the proper debugging options
which catch a use after free.

Cc: Anant Gole &lt;anantgole@ti.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: move can_stats.bus_off++ from can_bus_off into can_change_state</title>
<updated>2015-01-20T12:56:53+00:00</updated>
<author>
<name>Andri Yngvason</name>
<email>andri.yngvason@marel.com</email>
</author>
<published>2015-01-16T14:30:28+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=be38a6f9f4093b0f1fa9e7d8cb47d588bc117c21'/>
<id>urn:sha1:be38a6f9f4093b0f1fa9e7d8cb47d588bc117c21</id>
<content type='text'>
In order to be able to move the stats increment from can_bus_off() into
can_change_state(), the increment had to be moved back into code that was using
can_bus_off() but not can_change_state().

As a side-effect, this patch fixes the following bugs:
 * Redundant call to can_bus_off() in c_can.
 * Bus-off counted twice in xilinx_can.

Signed-off-by: Andri Yngvason &lt;andri.yngvason@marel.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>net: can: drop owner assignment from platform_drivers</title>
<updated>2014-10-20T14:20:59+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa@the-dreams.de</email>
</author>
<published>2014-10-20T14:20:59+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0e9063242671dcbc9ca1a10ff5a0cd2dc078397e'/>
<id>urn:sha1:0e9063242671dcbc9ca1a10ff5a0cd2dc078397e</id>
<content type='text'>
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>can: Unify MTU settings for CAN interfaces</title>
<updated>2014-03-17T08:20:16+00:00</updated>
<author>
<name>Oliver Hartkopp</name>
<email>socketcan@hartkopp.net</email>
</author>
<published>2014-03-07T08:23:41+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c971fa2ae42e73e9ccc2f5e93f268c8742da4c5d'/>
<id>urn:sha1:c971fa2ae42e73e9ccc2f5e93f268c8742da4c5d</id>
<content type='text'>
CAN interfaces only support MTU values of 16 (CAN 2.0) and 72 (CAN FD).
Setting the MTU to other values is pointless but it does not really hurt.
With the introduction of the CAN FD support in drivers/net/can a new
function to switch the MTU for CAN FD has been introduced.

This patch makes use of this can_change_mtu() function to check for correct
MTU settings also in legacy CAN (2.0) devices.

Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>drivers/net: delete non-required instances of include &lt;linux/init.h&gt;</title>
<updated>2014-01-16T19:53:26+00:00</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2014-01-08T20:32:47+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a81ab36bf52d0ca3a32251a923be1dbced726141'/>
<id>urn:sha1:a81ab36bf52d0ca3a32251a923be1dbced726141</id>
<content type='text'>
None of these files are actually using any __init type directives
and hence don't need to include &lt;linux/init.h&gt;.   Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

This covers everything under drivers/net except for wireless, which
has been submitted separately.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>can: ti_hecc: fix endianness related sparse warning</title>
<updated>2014-01-11T18:43:26+00:00</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2014-01-11T18:11:24+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ea79c1c18520c3a60a2fc8193e2fb58710812d4e'/>
<id>urn:sha1:ea79c1c18520c3a60a2fc8193e2fb58710812d4e</id>
<content type='text'>
This patch fixes the following sparse warning, which occurs in casts when
accessing the data in the CAN frames (struct can_frame) in the RX and TX
routines:

drivers/net/can/ti_hecc.c:521:17: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:521:17: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:521:17: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:521:17: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:521:17: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:521:17: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:524:25: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:524:25: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:524:25: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:524:25: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:524:25: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:524:25: warning: cast to restricted __be32
drivers/net/can/ti_hecc.c:572:28: warning: incorrect type in assignment (different base types)
drivers/net/can/ti_hecc.c:572:28:    expected unsigned int [unsigned] [usertype] &lt;noident&gt;
drivers/net/can/ti_hecc.c:572:28:    got restricted __be32 [usertype] &lt;noident&gt;
drivers/net/can/ti_hecc.c:575:40: warning: incorrect type in assignment (different base types)
drivers/net/can/ti_hecc.c:575:40:    expected unsigned int [unsigned] [usertype] &lt;noident&gt;
drivers/net/can/ti_hecc.c:575:40:    got restricted __be32 [usertype] &lt;noident&gt;

As the data is indeed big endian, use "__be32" instead of "u32", when casting
it.

Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: ti_hecc: remove priv-&gt;can.do_get_state() callback</title>
<updated>2013-10-31T19:55:16+00:00</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2013-10-04T11:18:01+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=26896fd98130cdda73b19c75849a0d25cb850cb8'/>
<id>urn:sha1:26896fd98130cdda73b19c75849a0d25cb850cb8</id>
<content type='text'>
This patch removes the priv-&gt;can.do_get_state() callback, as it just returns
priv-&gt;can.state. The callback's only user can_fill_info() has direct access to
priv-&gt;can.state.

Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: ti_hecc: use dev_get_platdata()</title>
<updated>2013-09-21T13:43:15+00:00</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-09-10T08:43:12+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=fc218471c69edd43c34d304cd737f0958d8ce195'/>
<id>urn:sha1:fc218471c69edd43c34d304cd737f0958d8ce195</id>
<content type='text'>
Use the wrapper function for retrieving the platform data instead of
accessing dev-&gt;platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
</feed>
