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

Merge tag 'parisc-for-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parisc updates from Helge Deller:

- drop parisc specific memcpy_fromio() function

- clean up coding style and fix compile warnings

* tag 'parisc-for-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: led: Use scnprintf() to avoid string truncation warning
Input: gscps2 - Describe missing function parameters
parisc: perf: use named initializers for struct miscdevice
parisc: PDT: Fix missing prototype warning
parisc: Remove memcpy_fromio
parisc: Fix formatting errors in io.c

+41 -100
-3
arch/parisc/include/asm/io.h
··· 135 135 136 136 #define pci_iounmap pci_iounmap 137 137 138 - void memcpy_fromio(void *dst, const volatile void __iomem *src, int count); 139 - #define memcpy_fromio memcpy_fromio 140 - 141 138 /* Port-space IO */ 142 139 143 140 #define inb_p inb
-1
arch/parisc/kernel/parisc_ksyms.c
··· 43 43 #endif 44 44 45 45 #include <asm/io.h> 46 - EXPORT_SYMBOL(memcpy_fromio); 47 46 48 47 extern void $$divI(void); 49 48 extern void $$divU(void);
+2
arch/parisc/kernel/pdt.c
··· 63 63 #define PDT_ADDR_PERM_ERR (pdt_type != PDT_PDC ? 2UL : 0UL) 64 64 #define PDT_ADDR_SINGLE_ERR 1UL 65 65 66 + #ifdef CONFIG_PROC_FS 66 67 /* report PDT entries via /proc/meminfo */ 67 68 void arch_report_meminfo(struct seq_file *m) 68 69 { ··· 75 74 seq_printf(m, "PDT_cur_entries: %7lu\n", 76 75 pdt_status.pdt_entries); 77 76 } 77 + #endif 78 78 79 79 static int get_info_pat_new(void) 80 80 {
+3 -3
arch/parisc/kernel/perf.c
··· 475 475 }; 476 476 477 477 static struct miscdevice perf_dev = { 478 - MISC_DYNAMIC_MINOR, 479 - PA_PERF_DEV, 480 - &perf_fops 478 + .minor = MISC_DYNAMIC_MINOR, 479 + .name = PA_PERF_DEV, 480 + .fops = &perf_fops, 481 481 }; 482 482 483 483 /*
+29 -90
arch/parisc/lib/io.c
··· 13 13 #include <asm/io.h> 14 14 15 15 /* 16 - ** Copies a block of memory from a device in an efficient manner. 17 - ** Assumes the device can cope with 32-bit transfers. If it can't, 18 - ** don't use this function. 19 - ** 20 - ** CR16 counts on C3000 reading 256 bytes from Symbios 896 RAM: 21 - ** 27341/64 = 427 cyc per int 22 - ** 61311/128 = 478 cyc per short 23 - ** 122637/256 = 479 cyc per byte 24 - ** Ergo bus latencies dominant (not transfer size). 25 - ** Minimize total number of transfers at cost of CPU cycles. 26 - ** TODO: only look at src alignment and adjust the stores to dest. 27 - */ 28 - void memcpy_fromio(void *dst, const volatile void __iomem *src, int count) 29 - { 30 - /* first compare alignment of src/dst */ 31 - if ( (((unsigned long)dst ^ (unsigned long)src) & 1) || (count < 2) ) 32 - goto bytecopy; 33 - 34 - if ( (((unsigned long)dst ^ (unsigned long)src) & 2) || (count < 4) ) 35 - goto shortcopy; 36 - 37 - /* Then check for misaligned start address */ 38 - if ((unsigned long)src & 1) { 39 - *(u8 *)dst = readb(src); 40 - src++; 41 - dst++; 42 - count--; 43 - if (count < 2) goto bytecopy; 44 - } 45 - 46 - if ((unsigned long)src & 2) { 47 - *(u16 *)dst = __raw_readw(src); 48 - src += 2; 49 - dst += 2; 50 - count -= 2; 51 - } 52 - 53 - while (count > 3) { 54 - *(u32 *)dst = __raw_readl(src); 55 - dst += 4; 56 - src += 4; 57 - count -= 4; 58 - } 59 - 60 - shortcopy: 61 - while (count > 1) { 62 - *(u16 *)dst = __raw_readw(src); 63 - src += 2; 64 - dst += 2; 65 - count -= 2; 66 - } 67 - 68 - bytecopy: 69 - while (count--) { 70 - *(char *)dst = readb(src); 71 - src++; 72 - dst++; 73 - } 74 - } 75 - 76 - /* 77 16 * Read COUNT 8-bit bytes from port PORT into memory starting at 78 17 * SRC. 79 18 */ ··· 62 123 unsigned char *p; 63 124 64 125 p = (unsigned char *)dst; 65 - 126 + 66 127 if (!count) 67 128 return; 68 - 129 + 69 130 switch (((unsigned long)p) & 0x3) 70 131 { 71 132 case 0x00: /* Buffer 32-bit aligned */ 72 133 while (count>=2) { 73 - 134 + 74 135 count -= 2; 75 136 l = cpu_to_le16(inw(port)) << 16; 76 137 l |= cpu_to_le16(inw(port)); ··· 81 142 *(unsigned short *)p = cpu_to_le16(inw(port)); 82 143 } 83 144 break; 84 - 145 + 85 146 case 0x02: /* Buffer 16-bit aligned */ 86 147 *(unsigned short *)p = cpu_to_le16(inw(port)); 87 148 p += 2; 88 149 count--; 89 150 while (count>=2) { 90 - 151 + 91 152 count -= 2; 92 153 l = cpu_to_le16(inw(port)) << 16; 93 154 l |= cpu_to_le16(inw(port)); ··· 98 159 *(unsigned short *)p = cpu_to_le16(inw(port)); 99 160 } 100 161 break; 101 - 162 + 102 163 case 0x01: /* Buffer 8-bit aligned */ 103 164 case 0x03: 104 165 /* I don't bother with 32bit transfers 105 166 * in this case, 16bit will have to do -- DE */ 106 167 --count; 107 - 168 + 108 169 l = cpu_to_le16(inw(port)); 109 170 *p = l >> 8; 110 171 p++; ··· 134 195 unsigned char *p; 135 196 136 197 p = (unsigned char *)dst; 137 - 198 + 138 199 if (!count) 139 200 return; 140 - 201 + 141 202 switch (((unsigned long) dst) & 0x3) 142 203 { 143 204 case 0x00: /* Buffer 32-bit aligned */ ··· 147 208 p += 4; 148 209 } 149 210 break; 150 - 211 + 151 212 case 0x02: /* Buffer 16-bit aligned */ 152 213 --count; 153 - 214 + 154 215 l = cpu_to_le32(inl(port)); 155 216 *(unsigned short *)p = l >> 16; 156 217 p += 2; 157 - 218 + 158 219 while (count--) 159 220 { 160 221 l2 = cpu_to_le32(inl(port)); ··· 166 227 break; 167 228 case 0x01: /* Buffer 8-bit aligned */ 168 229 --count; 169 - 230 + 170 231 l = cpu_to_le32(inl(port)); 171 232 *(unsigned char *)p = l >> 24; 172 233 p++; ··· 183 244 break; 184 245 case 0x03: /* Buffer 8-bit aligned */ 185 246 --count; 186 - 247 + 187 248 l = cpu_to_le32(inl(port)); 188 249 *p = l >> 24; 189 250 p++; ··· 232 293 const unsigned char *p; 233 294 234 295 p = (const unsigned char *)src; 235 - 296 + 236 297 if (!count) 237 298 return; 238 - 299 + 239 300 switch (((unsigned long)p) & 0x3) 240 301 { 241 302 case 0x00: /* Buffer 32-bit aligned */ ··· 250 311 outw(le16_to_cpu(*(unsigned short*)p), port); 251 312 } 252 313 break; 253 - 314 + 254 315 case 0x02: /* Buffer 16-bit aligned */ 255 - 316 + 256 317 outw(le16_to_cpu(*(unsigned short*)p), port); 257 318 p += 2; 258 319 count--; 259 - 320 + 260 321 while (count>=2) { 261 322 count -= 2; 262 323 l = *(unsigned int *)p; ··· 268 329 outw(le16_to_cpu(*(unsigned short *)p), port); 269 330 } 270 331 break; 271 - 272 - case 0x01: /* Buffer 8-bit aligned */ 332 + 333 + case 0x01: /* Buffer 8-bit aligned */ 273 334 /* I don't bother with 32bit transfers 274 335 * in this case, 16bit will have to do -- DE */ 275 - 336 + 276 337 l = *p << 8; 277 338 p++; 278 339 count--; ··· 287 348 l2 = *(unsigned char *)p; 288 349 outw (le16_to_cpu(l | l2>>8), port); 289 350 break; 290 - 351 + 291 352 } 292 353 } 293 354 ··· 304 365 const unsigned char *p; 305 366 306 367 p = (const unsigned char *)src; 307 - 368 + 308 369 if (!count) 309 370 return; 310 - 371 + 311 372 switch (((unsigned long)p) & 0x3) 312 373 { 313 374 case 0x00: /* Buffer 32-bit aligned */ ··· 317 378 p += 4; 318 379 } 319 380 break; 320 - 381 + 321 382 case 0x02: /* Buffer 16-bit aligned */ 322 383 --count; 323 - 384 + 324 385 l = *(unsigned short *)p; 325 386 p += 2; 326 - 387 + 327 388 while (count--) 328 389 { 329 390 l2 = *(unsigned int *)p; ··· 354 415 break; 355 416 case 0x03: /* Buffer 8-bit aligned */ 356 417 --count; 357 - 418 + 358 419 l = *p << 24; 359 420 p++; 360 421
+6
drivers/input/serio/gscps2.c
··· 251 251 252 252 /** 253 253 * gscps2_interrupt() - Interruption service routine 254 + * @irq: interrupt number which triggered (unused) 255 + * @dev: device pointer (unused) 254 256 * 255 257 * This function reads received PS/2 bytes and processes them on 256 258 * all interfaces. ··· 331 329 332 330 /** 333 331 * gscps2_probe() - Probes PS2 devices 332 + * @dev: pointer to parisc_device struct which will be probed 333 + * 334 334 * @return: success/error report 335 335 */ 336 336 ··· 424 420 425 421 /** 426 422 * gscps2_remove() - Removes PS2 devices 423 + * @dev: pointer to parisc_device which shall be removed 424 + * 427 425 * @return: success/error report 428 426 */ 429 427
+1 -3
drivers/parisc/led.c
··· 39 39 static unsigned char lastleds; /* LED state from most recent update */ 40 40 static unsigned char lcd_new_text; 41 41 static unsigned char lcd_text[20]; 42 - static unsigned char lcd_text_default[20]; 43 42 static unsigned char lcd_no_led_support; /* KittyHawk doesn't support LED on its LCD */ 44 43 45 44 struct lcd_block { ··· 455 456 struct pdc_chassis_info chassis_info; 456 457 int ret; 457 458 458 - snprintf(lcd_text_default, sizeof(lcd_text_default), 459 + scnprintf(lcd_text, sizeof(lcd_text), 459 460 "Linux %s", init_utsname()->release); 460 - strcpy(lcd_text, lcd_text_default); 461 461 lcd_new_text = 1; 462 462 463 463 /* Work around the buggy PDC of KittyHawk-machines */