hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/hsi/clients/ssi_protocol.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * ssi_protocol.c
34 *
....@@ -7,20 +8,6 @@
78 * Copyright (C) 2013 Sebastian Reichel <sre@kernel.org>
89 *
910 * Contact: Carlos Chinea <carlos.chinea@nokia.com>
10
- *
11
- * This program is free software; you can redistribute it and/or
12
- * modify it under the terms of the GNU General Public License
13
- * version 2 as published by the Free Software Foundation.
14
- *
15
- * This program is distributed in the hope that it will be useful, but
16
- * WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
- * General Public License for more details.
19
- *
20
- * You should have received a copy of the GNU General Public License
21
- * along with this program; if not, write to the Free Software
22
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23
- * 02110-1301 USA
2411 */
2512
2613 #include <linux/atomic.h>
....@@ -194,7 +181,8 @@
194181 sg = sg_next(sg);
195182 BUG_ON(!sg);
196183 frag = &skb_shinfo(skb)->frags[i];
197
- sg_set_page(sg, frag->page.p, frag->size, frag->page_offset);
184
+ sg_set_page(sg, skb_frag_page(frag), skb_frag_size(frag),
185
+ skb_frag_off(frag));
198186 }
199187 }
200188
....@@ -303,7 +291,7 @@
303291 /* CMT speech workaround */
304292 if (atomic_read(&ssi->tx_usecnt))
305293 break;
306
- /* Otherwise fall through */
294
+ fallthrough;
307295 case RECEIVING:
308296 mod_timer(&ssi->keep_alive, jiffies +
309297 msecs_to_jiffies(SSIP_KATOUT));
....@@ -478,9 +466,10 @@
478466 case SEND_READY:
479467 if (atomic_read(&ssi->tx_usecnt) == 0)
480468 break;
469
+ fallthrough;
481470 /*
482
- * Fall through. Workaround for cmt-speech
483
- * in that case we relay on audio timers.
471
+ * Workaround for cmt-speech in that case
472
+ * we relay on audio timers.
484473 */
485474 case SEND_IDLE:
486475 spin_unlock(&ssi->lock);
....@@ -679,7 +668,7 @@
679668 case ACTIVE:
680669 dev_err(&cl->device, "Boot info req on active state\n");
681670 ssip_error(cl);
682
- /* Fall through */
671
+ fallthrough;
683672 case INIT:
684673 case HANDSHAKE:
685674 spin_lock_bh(&ssi->lock);