hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/scsi/scsi_trace.c
....@@ -1,19 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2010 FUJITSU LIMITED
34 * Copyright (C) 2010 Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com>
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2 as
7
- * published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License
15
- * along with this program; if not, write to the Free Software
16
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
175 */
186 #include <linux/kernel.h>
197 #include <linux/trace_seq.h>
....@@ -30,11 +18,9 @@
3018 scsi_trace_rw6(struct trace_seq *p, unsigned char *cdb, int len)
3119 {
3220 const char *ret = trace_seq_buffer_ptr(p);
33
- u32 lba = 0, txlen;
21
+ u32 lba, txlen;
3422
35
- lba |= ((cdb[1] & 0x1F) << 16);
36
- lba |= (cdb[2] << 8);
37
- lba |= cdb[3];
23
+ lba = get_unaligned_be24(&cdb[1]) & 0x1fffff;
3824 /*
3925 * From SBC-2: a TRANSFER LENGTH field set to zero specifies that 256
4026 * logical blocks shall be read (READ(6)) or written (WRITE(6)).