forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/memstick/host/tifm_ms.c
....@@ -1,15 +1,11 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * TI FlashMedia driver
34 *
45 * Copyright (C) 2007 Alex Dubov <oakad@yahoo.com>
56 *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
9
- *
107 * Special thanks to Carlos Corbacho for providing various MemoryStick cards
118 * that made this driver possible.
12
- *
139 */
1410
1511 #include <linux/tifm.h>
....@@ -166,9 +162,11 @@
166162 case 3:
167163 host->io_word |= buf[off + 2] << 16;
168164 host->io_pos++;
165
+ fallthrough;
169166 case 2:
170167 host->io_word |= buf[off + 1] << 8;
171168 host->io_pos++;
169
+ fallthrough;
172170 case 1:
173171 host->io_word |= buf[off];
174172 host->io_pos++;
....@@ -200,7 +198,7 @@
200198 host->block_pos);
201199
202200 while (length) {
203
- unsigned int uninitialized_var(p_off);
201
+ unsigned int p_off;
204202
205203 if (host->req->long_data) {
206204 pg = nth_page(sg_page(&host->req->sg),
....@@ -254,7 +252,6 @@
254252 static int tifm_ms_issue_cmd(struct tifm_ms *host)
255253 {
256254 struct tifm_dev *sock = host->dev;
257
- unsigned char *data;
258255 unsigned int data_len, cmd, sys_param;
259256
260257 host->cmd_flags = 0;
....@@ -262,8 +259,6 @@
262259 host->io_pos = 0;
263260 host->io_word = 0;
264261 host->cmd_flags = 0;
265
-
266
- data = host->req->data;
267262
268263 host->use_dma = !no_dma;
269264