Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a051019 authored by Douglas Gilbert's avatar Douglas Gilbert Committed by Martin K. Petersen
Browse files

scsi: scsi_debug: tab, kstrto changes



Some of my development tools tend to add spaces (my preference) rather
than tabs (kernel convention). Running unexpand to clean these spaces
up found more of them than checkpatch.pl did. Then checkpatch.pl
complained about other style violations in those newly tabbed lines.

Signed-off-by: default avatarDouglas Gilbert <dgilbert@interlog.com>
Reviewed-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent dbec4c90
Loading
Loading
Loading
Loading
+87 −87
Original line number Diff line number Diff line
@@ -308,8 +308,8 @@ struct opcode_info_t {
	u32 flags;		/* OR-ed set of SDEB_F_* */
	int (*pfp)(struct scsi_cmnd *, struct sdebug_dev_info *);
	const struct opcode_info_t *arrp;  /* num_attached elements or NULL */
	u8 len_mask[16];	/* len=len_mask[0], then mask for cdb[1]... */
				/* ignore cdb bytes after position 15 */
	u8 len_mask[16];	/* len_mask[0]-->cdb_len, then mask for cdb */
				/* 1 to min(cdb_len, 15); ignore cdb[15...] */
};

/* SCSI opcodes (first byte of cdb) of interest mapped onto these indexes */
@@ -344,7 +344,7 @@ enum sdeb_opcode_index {
	SDEB_I_WRITE_SAME = 27,		/* 10, 16 */
	SDEB_I_SYNC_CACHE = 28,		/* 10 only */
	SDEB_I_COMP_WRITE = 29,
	SDEB_I_LAST_ELEMENT = 30,	/* keep this last */
	SDEB_I_LAST_ELEMENT = 30,	/* keep this last (previous + 1) */
};


@@ -4493,12 +4493,12 @@ static ssize_t opts_store(struct device_driver *ddp, const char *buf,
	int opts;
	char work[20];

        if (1 == sscanf(buf, "%10s", work)) {
		if (0 == strncasecmp(work,"0x", 2)) {
			if (1 == sscanf(&work[2], "%x", &opts))
	if (sscanf(buf, "%10s", work) == 1) {
		if (strncasecmp(work, "0x", 2) == 0) {
			if (kstrtoint(work + 2, 16, &opts) == 0)
				goto opts_done;
		} else {
			if (1 == sscanf(work, "%d", &opts))
			if (kstrtoint(work, 10, &opts) == 0)
				goto opts_done;
		}
	}
@@ -5258,7 +5258,7 @@ static int sdebug_add_adapter(void)
	struct sdebug_dev_info *sdbg_devinfo, *tmp;

	sdbg_host = kzalloc(sizeof(*sdbg_host), GFP_KERNEL);
        if (NULL == sdbg_host) {
	if (sdbg_host == NULL) {
		pr_err("out of memory at line %d\n", __LINE__);
		return -ENOMEM;
	}