<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/bluetooth/bfusb.c, branch linux-4.20.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-07-23T16:05:00+00:00</updated>
<entry>
<title>bluetooth: bfusb: Replace GFP_ATOMIC with GFP_KERNEL in bfusb_send_frame()</title>
<updated>2018-07-23T16:05:00+00:00</updated>
<author>
<name>Jia-Ju Bai</name>
<email>baijiaju1990@gmail.com</email>
</author>
<published>2018-07-23T03:09:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6709514f266e9163f9f579006496fbc8bc986d80'/>
<id>urn:sha1:6709514f266e9163f9f579006496fbc8bc986d80</id>
<content type='text'>
bfusb_send_frame() is only set to hdev-&gt;send, and hdev-&gt;send() is never
called in atomic context.

bfusb_send_frame() calls bt_skb_alloc() with GFP_ATOMIC, which is not
necessary. GFP_ATOMIC can be replaced with GFP_KERNEL.

This is found by a static analysis tool named DCNS written by myself.
I also manually check the kernel code before reporting it.

Signed-off-by: Jia-Ju Bai &lt;baijiaju1990@gmail.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>networking: introduce and use skb_put_data()</title>
<updated>2017-06-16T15:48:37+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2017-06-16T12:29:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=59ae1d127ac0ae404baf414c434ba2651b793f46'/>
<id>urn:sha1:59ae1d127ac0ae404baf414c434ba2651b793f46</id>
<content type='text'>
A common pattern with skb_put() is to just want to memcpy()
some data into the new space, introduce skb_put_data() for
this.

An spatch similar to the one for skb_put_zero() converts many
of the places using it:

    @@
    identifier p, p2;
    expression len, skb, data;
    type t, t2;
    @@
    (
    -p = skb_put(skb, len);
    +p = skb_put_data(skb, data, len);
    |
    -p = (t)skb_put(skb, len);
    +p = skb_put_data(skb, data, len);
    )
    (
    p2 = (t2)p;
    -memcpy(p2, data, len);
    |
    -memcpy(p, data, len);
    )

    @@
    type t, t2;
    identifier p, p2;
    expression skb, data;
    @@
    t *p;
    ...
    (
    -p = skb_put(skb, sizeof(t));
    +p = skb_put_data(skb, data, sizeof(t));
    |
    -p = (t *)skb_put(skb, sizeof(t));
    +p = skb_put_data(skb, data, sizeof(t));
    )
    (
    p2 = (t2)p;
    -memcpy(p2, data, sizeof(*p));
    |
    -memcpy(p, data, sizeof(*p));
    )

    @@
    expression skb, len, data;
    @@
    -memcpy(skb_put(skb, len), data, len);
    +skb_put_data(skb, data, len);

(again, manually post-processed to retain some comments)

Reviewed-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Bluetooth: bfusb: Fix the return error code</title>
<updated>2015-12-22T14:25:33+00:00</updated>
<author>
<name>Syam Sidhardhan</name>
<email>s.syam@samsung.com</email>
</author>
<published>2015-12-22T14:00:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7ddb69222d0fdc0bc83b60dbb21d9864ebf2907e'/>
<id>urn:sha1:7ddb69222d0fdc0bc83b60dbb21d9864ebf2907e</id>
<content type='text'>
-ENOMEM is the appropriate error code instead of -EIO.

Signed-off-by: Syam Sidhardhan &lt;s.syam@samsung.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: bfusb: Remove redundant error message</title>
<updated>2015-12-22T14:25:33+00:00</updated>
<author>
<name>Syam Sidhardhan</name>
<email>s.syam@samsung.com</email>
</author>
<published>2015-12-22T14:00:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f71e823b8776b3ce0073087d7b8ec8a7d31fe818'/>
<id>urn:sha1:f71e823b8776b3ce0073087d7b8ec8a7d31fe818</id>
<content type='text'>
devm_kzalloc prints its own OOM message upon failure.

Signed-off-by: Syam Sidhardhan &lt;s.syam@samsung.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Use new hci_skb_pkt_* wrappers for drivers</title>
<updated>2015-11-19T16:50:27+00:00</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2015-11-05T06:33:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=618e8bc228cda7b8c517caac40a45ee909b8672d'/>
<id>urn:sha1:618e8bc228cda7b8c517caac40a45ee909b8672d</id>
<content type='text'>
The new hci_skb_pkt_* wrappers are mainly intented for drivers to
require less knowledge about bt_cb(sbk) handling. So after converting
the core packet handling, convert all drivers.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Move handling of HCI_RUNNING flag into core</title>
<updated>2015-10-05T07:30:25+00:00</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2015-10-04T21:34:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e9ca8bf157f2b45f8f670517c96da313083ee9b2'/>
<id>urn:sha1:e9ca8bf157f2b45f8f670517c96da313083ee9b2</id>
<content type='text'>
Setting and clearing of HCI_RUNNING flag in each and every driver is
just duplicating the same code all over the place. So instead of having
the driver do it in their hdev-&gt;open and hdev-&gt;close callbacks, set it
globally in the core transport handling.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Move HCI_RUNNING check into hci_send_frame</title>
<updated>2015-10-05T07:30:10+00:00</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2015-10-04T21:34:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=73d0d3c8671190ea982a8e79a7c79fbfe88f8f47'/>
<id>urn:sha1:73d0d3c8671190ea982a8e79a7c79fbfe88f8f47</id>
<content type='text'>
In all callbacks for hdev-&gt;send the status of HCI_RUNNING is checked. So
instead of repeating that code in every driver, move the check into the
hci_send_frame function before calling hdev-&gt;send.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: bfusb: Coding style fix reported by coccinelle</title>
<updated>2015-07-23T15:10:49+00:00</updated>
<author>
<name>Prasanna Karthik</name>
<email>mkarthi3@visteon.com</email>
</author>
<published>2015-07-05T09:49:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a03e33da5f1f10cc93bd5de140a131dac1db97f0'/>
<id>urn:sha1:a03e33da5f1f10cc93bd5de140a131dac1db97f0</id>
<content type='text'>
Removed semicolon at the end of switch case statement

Signed-off-by: Prasanna Karthik &lt;mkarthi3@visteon.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: bfusb: Set the HCI_QUIRK_BROKEN_LOCAL_COMMANDS quirk</title>
<updated>2014-12-26T18:16:12+00:00</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2014-12-26T03:42:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9ef80d40e901feb875660101dabdeddaa27e837c'/>
<id>urn:sha1:9ef80d40e901feb875660101dabdeddaa27e837c</id>
<content type='text'>
The AVM BlueFritz! 1.0 USB dongles do not support the HCI command for
reading the local supported commands. So set this quirk to let the
core know about it.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Remove assignments in if-statements</title>
<updated>2014-03-05T18:52:17+00:00</updated>
<author>
<name>Valentin Ilie</name>
<email>valentin.ilie@gmail.com</email>
</author>
<published>2013-08-12T15:46:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a08b15e66e8ec700992641cf8ec015032e8365c8'/>
<id>urn:sha1:a08b15e66e8ec700992641cf8ec015032e8365c8</id>
<content type='text'>
Remove assignment in if-statements to be consistent with the coding
style.

Signed-off-by: Valentin Ilie &lt;valentin.ilie@gmail.com&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
</feed>
