Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers: dio: code indent should use tabs

This patch fixes the checkpatch.pl error:

< ERROR: code indent should use tabs where possible
< #61: FILE: drivers/dio/dio.c:61:
< + int id;$
<
< WARNING: please, no spaces at the start of a line
< #61: FILE: drivers/dio/dio.c:61:
< + int id;$
<
< ERROR: code indent should use tabs where possible
< #62: FILE: drivers/dio/dio.c:62:
< + const char *name;$
<
< WARNING: please, no spaces at the start of a line
< #62: FILE: drivers/dio/dio.c:62:
< + const char *name;$

+ 44 more errors of type "code indent should use tabs where
possible"
+ 41 more warnings of type "please, no spaces at the start of a
line"

Signed-off-by: Aleksa Vučković <aleksav013@gmail.com>
Link: https://lore.kernel.org/r/20220127135054.27281-6-aleksav013@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Aleksa Vučković and committed by
Greg Kroah-Hartman
dffae938 f8b187c2

+46 -46
+46 -46
drivers/dio/dio.c
··· 58 58 * marking the names[] array as .initdata ? 59 59 */ 60 60 struct dioname { 61 - int id; 62 - const char *name; 61 + int id; 62 + const char *name; 63 63 }; 64 64 65 65 /* useful macro */ ··· 67 67 #define DIOFBNAME(x) { DIO_ENCODE_ID(DIO_ID_FBUFFER, DIO_ID2_##x), DIO_DESC2_##x } 68 68 69 69 static struct dioname names[] = { 70 - DIONAME(DCA0), DIONAME(DCA0REM), DIONAME(DCA1), DIONAME(DCA1REM), 71 - DIONAME(DCM), DIONAME(DCMREM), 72 - DIONAME(LAN), 73 - DIONAME(FHPIB), DIONAME(NHPIB), 74 - DIONAME(SCSI0), DIONAME(SCSI1), DIONAME(SCSI2), DIONAME(SCSI3), 75 - DIONAME(FBUFFER), 76 - DIONAME(PARALLEL), DIONAME(VME), DIONAME(DCL), DIONAME(DCLREM), 77 - DIONAME(MISC0), DIONAME(MISC1), DIONAME(MISC2), DIONAME(MISC3), 78 - DIONAME(MISC4), DIONAME(MISC5), DIONAME(MISC6), DIONAME(MISC7), 70 + DIONAME(DCA0), DIONAME(DCA0REM), DIONAME(DCA1), DIONAME(DCA1REM), 71 + DIONAME(DCM), DIONAME(DCMREM), 72 + DIONAME(LAN), 73 + DIONAME(FHPIB), DIONAME(NHPIB), 74 + DIONAME(SCSI0), DIONAME(SCSI1), DIONAME(SCSI2), DIONAME(SCSI3), 75 + DIONAME(FBUFFER), 76 + DIONAME(PARALLEL), DIONAME(VME), DIONAME(DCL), DIONAME(DCLREM), 77 + DIONAME(MISC0), DIONAME(MISC1), DIONAME(MISC2), DIONAME(MISC3), 78 + DIONAME(MISC4), DIONAME(MISC5), DIONAME(MISC6), DIONAME(MISC7), 79 79 DIONAME(MISC8), DIONAME(MISC9), DIONAME(MISC10), DIONAME(MISC11), 80 - DIONAME(MISC12), DIONAME(MISC13), 81 - DIOFBNAME(GATORBOX), DIOFBNAME(TOPCAT), DIOFBNAME(RENAISSANCE), 82 - DIOFBNAME(LRCATSEYE), DIOFBNAME(HRCCATSEYE), DIOFBNAME(HRMCATSEYE), 83 - DIOFBNAME(DAVINCI), DIOFBNAME(XXXCATSEYE), DIOFBNAME(HYPERION), 80 + DIONAME(MISC12), DIONAME(MISC13), 81 + DIOFBNAME(GATORBOX), DIOFBNAME(TOPCAT), DIOFBNAME(RENAISSANCE), 82 + DIOFBNAME(LRCATSEYE), DIOFBNAME(HRCCATSEYE), DIOFBNAME(HRMCATSEYE), 83 + DIOFBNAME(DAVINCI), DIOFBNAME(XXXCATSEYE), DIOFBNAME(HYPERION), 84 84 DIOFBNAME(XGENESIS), DIOFBNAME(TIGER), DIOFBNAME(YGENESIS) 85 85 }; 86 86 ··· 92 92 93 93 static const char *dio_getname(int id) 94 94 { 95 - /* return pointer to a constant string describing the board with given ID */ 95 + /* return pointer to a constant string describing the board with given ID */ 96 96 unsigned int i; 97 97 for (i = 0; i < ARRAY_SIZE(names); i++) 98 98 if (names[i].id == id) 99 - return names[i].name; 99 + return names[i].name; 100 100 101 - return unknowndioname; 101 + return unknowndioname; 102 102 } 103 103 104 104 #else ··· 120 120 void *va; 121 121 unsigned long pa; 122 122 123 - if (DIO_SCINHOLE(scode)) 124 - continue; 123 + if (DIO_SCINHOLE(scode)) 124 + continue; 125 125 126 - pa = dio_scodetophysaddr(scode); 126 + pa = dio_scodetophysaddr(scode); 127 127 128 128 if (!pa) 129 129 continue; ··· 137 137 (unsigned char *)va + DIO_IDOFF, 1)) { 138 138 if (scode >= DIOII_SCBASE) 139 139 iounmap(va); 140 - continue; /* no board present at that select code */ 140 + continue; /* no board present at that select code */ 141 141 } 142 142 143 143 prid = DIO_ID(va); 144 144 145 - if (DIO_NEEDSSECID(prid)) { 146 - secid = DIO_SECID(va); 147 - id = DIO_ENCODE_ID(prid, secid); 148 - } else 145 + if (DIO_NEEDSSECID(prid)) { 146 + secid = DIO_SECID(va); 147 + id = DIO_ENCODE_ID(prid, secid); 148 + } else 149 149 id = prid; 150 150 151 151 if (id == deviceid) { ··· 189 189 190 190 /* Register all devices */ 191 191 for (scode = 0; scode < DIO_SCMAX; ++scode) { 192 - u_char prid, secid = 0; /* primary, secondary ID bytes */ 193 - u_char *va; 192 + u_char prid, secid = 0; /* primary, secondary ID bytes */ 193 + u_char *va; 194 194 unsigned long pa; 195 195 196 - if (DIO_SCINHOLE(scode)) 197 - continue; 196 + if (DIO_SCINHOLE(scode)) 197 + continue; 198 198 199 199 pa = dio_scodetophysaddr(scode); 200 200 ··· 210 210 (unsigned char *)va + DIO_IDOFF, 1)) { 211 211 if (scode >= DIOII_SCBASE) 212 212 iounmap(va); 213 - continue; /* no board present at that select code */ 213 + continue; /* no board present at that select code */ 214 214 } 215 215 216 - /* Found a board, allocate it an entry in the list */ 216 + /* Found a board, allocate it an entry in the list */ 217 217 dev = kzalloc(sizeof(struct dio_dev), GFP_KERNEL); 218 218 if (!dev) 219 219 return -ENOMEM; ··· 226 226 dev->resource.end = pa + DIO_SIZE(scode, va); 227 227 dev_set_name(&dev->dev, "%02x", scode); 228 228 229 - /* read the ID byte(s) and encode if necessary. */ 229 + /* read the ID byte(s) and encode if necessary. */ 230 230 prid = DIO_ID(va); 231 231 232 - if (DIO_NEEDSSECID(prid)) { 233 - secid = DIO_SECID(va); 234 - dev->id = DIO_ENCODE_ID(prid, secid); 235 - } else 236 - dev->id = prid; 232 + if (DIO_NEEDSSECID(prid)) { 233 + secid = DIO_SECID(va); 234 + dev->id = DIO_ENCODE_ID(prid, secid); 235 + } else 236 + dev->id = prid; 237 237 238 - dev->ipl = DIO_IPL(va); 238 + dev->ipl = DIO_IPL(va); 239 239 strcpy(dev->name, dio_getname(dev->id)); 240 240 printk(KERN_INFO "select code %3d: ipl %d: ID %02X", dev->scode, dev->ipl, prid); 241 - if (DIO_NEEDSSECID(prid)) 241 + if (DIO_NEEDSSECID(prid)) 242 242 printk(":%02X", secid); 243 243 printk(": %s\n", dev->name); 244 244 ··· 253 253 error = dio_create_sysfs_dev_files(dev); 254 254 if (error) 255 255 dev_err(&dev->dev, "Error creating sysfs files\n"); 256 - } 256 + } 257 257 return 0; 258 258 } 259 259 ··· 265 265 unsigned long dio_scodetophysaddr(int scode) 266 266 { 267 267 if (scode >= DIOII_SCBASE) 268 - return (DIOII_BASE + (scode - 132) * DIOII_DEVSIZE); 268 + return (DIOII_BASE + (scode - 132) * DIOII_DEVSIZE); 269 269 else if (scode > DIO_SCMAX || scode < 0) 270 - return 0; 271 - else if (DIO_SCINHOLE(scode)) 272 - return 0; 270 + return 0; 271 + else if (DIO_SCINHOLE(scode)) 272 + return 0; 273 273 274 - return (DIO_BASE + scode * DIO_DEVSIZE); 274 + return (DIO_BASE + scode * DIO_DEVSIZE); 275 275 }