Skip to content

Commit 883ab4e

Browse files
committed
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
2 parents 1c83601 + e822b8f commit 883ab4e

File tree

7 files changed

+41
-100
lines changed

7 files changed

+41
-100
lines changed

arch/parisc/include/asm/io.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,6 @@ static inline void gsc_writeq(unsigned long long val, unsigned long addr)
135135

136136
#define pci_iounmap pci_iounmap
137137

138-
void memcpy_fromio(void *dst, const volatile void __iomem *src, int count);
139-
#define memcpy_fromio memcpy_fromio
140-
141138
/* Port-space IO */
142139

143140
#define inb_p inb

arch/parisc/kernel/parisc_ksyms.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ EXPORT_SYMBOL($global$);
4343
#endif
4444

4545
#include <asm/io.h>
46-
EXPORT_SYMBOL(memcpy_fromio);
4746

4847
extern void $$divI(void);
4948
extern void $$divU(void);

arch/parisc/kernel/pdt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ static unsigned long pdt_entry[MAX_PDT_ENTRIES] __page_aligned_bss;
6363
#define PDT_ADDR_PERM_ERR (pdt_type != PDT_PDC ? 2UL : 0UL)
6464
#define PDT_ADDR_SINGLE_ERR 1UL
6565

66+
#ifdef CONFIG_PROC_FS
6667
/* report PDT entries via /proc/meminfo */
6768
void arch_report_meminfo(struct seq_file *m)
6869
{
@@ -74,6 +75,7 @@ void arch_report_meminfo(struct seq_file *m)
7475
seq_printf(m, "PDT_cur_entries: %7lu\n",
7576
pdt_status.pdt_entries);
7677
}
78+
#endif
7779

7880
static int get_info_pat_new(void)
7981
{

arch/parisc/kernel/perf.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,9 @@ static const struct file_operations perf_fops = {
475475
};
476476

477477
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,
481481
};
482482

483483
/*

arch/parisc/lib/io.c

Lines changed: 29 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -12,67 +12,6 @@
1212
#include <linux/module.h>
1313
#include <asm/io.h>
1414

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-
7615
/*
7716
* Read COUNT 8-bit bytes from port PORT into memory starting at
7817
* SRC.
@@ -123,15 +62,15 @@ void insw (unsigned long port, void *dst, unsigned long count)
12362
unsigned char *p;
12463

12564
p = (unsigned char *)dst;
126-
65+
12766
if (!count)
12867
return;
129-
68+
13069
switch (((unsigned long)p) & 0x3)
13170
{
13271
case 0x00: /* Buffer 32-bit aligned */
13372
while (count>=2) {
134-
73+
13574
count -= 2;
13675
l = cpu_to_le16(inw(port)) << 16;
13776
l |= cpu_to_le16(inw(port));
@@ -142,13 +81,13 @@ void insw (unsigned long port, void *dst, unsigned long count)
14281
*(unsigned short *)p = cpu_to_le16(inw(port));
14382
}
14483
break;
145-
84+
14685
case 0x02: /* Buffer 16-bit aligned */
14786
*(unsigned short *)p = cpu_to_le16(inw(port));
14887
p += 2;
14988
count--;
15089
while (count>=2) {
151-
90+
15291
count -= 2;
15392
l = cpu_to_le16(inw(port)) << 16;
15493
l |= cpu_to_le16(inw(port));
@@ -159,13 +98,13 @@ void insw (unsigned long port, void *dst, unsigned long count)
15998
*(unsigned short *)p = cpu_to_le16(inw(port));
16099
}
161100
break;
162-
101+
163102
case 0x01: /* Buffer 8-bit aligned */
164103
case 0x03:
165104
/* I don't bother with 32bit transfers
166105
* in this case, 16bit will have to do -- DE */
167106
--count;
168-
107+
169108
l = cpu_to_le16(inw(port));
170109
*p = l >> 8;
171110
p++;
@@ -195,10 +134,10 @@ void insl (unsigned long port, void *dst, unsigned long count)
195134
unsigned char *p;
196135

197136
p = (unsigned char *)dst;
198-
137+
199138
if (!count)
200139
return;
201-
140+
202141
switch (((unsigned long) dst) & 0x3)
203142
{
204143
case 0x00: /* Buffer 32-bit aligned */
@@ -208,14 +147,14 @@ void insl (unsigned long port, void *dst, unsigned long count)
208147
p += 4;
209148
}
210149
break;
211-
150+
212151
case 0x02: /* Buffer 16-bit aligned */
213152
--count;
214-
153+
215154
l = cpu_to_le32(inl(port));
216155
*(unsigned short *)p = l >> 16;
217156
p += 2;
218-
157+
219158
while (count--)
220159
{
221160
l2 = cpu_to_le32(inl(port));
@@ -227,7 +166,7 @@ void insl (unsigned long port, void *dst, unsigned long count)
227166
break;
228167
case 0x01: /* Buffer 8-bit aligned */
229168
--count;
230-
169+
231170
l = cpu_to_le32(inl(port));
232171
*(unsigned char *)p = l >> 24;
233172
p++;
@@ -244,7 +183,7 @@ void insl (unsigned long port, void *dst, unsigned long count)
244183
break;
245184
case 0x03: /* Buffer 8-bit aligned */
246185
--count;
247-
186+
248187
l = cpu_to_le32(inl(port));
249188
*p = l >> 24;
250189
p++;
@@ -293,10 +232,10 @@ void outsw (unsigned long port, const void *src, unsigned long count)
293232
const unsigned char *p;
294233

295234
p = (const unsigned char *)src;
296-
235+
297236
if (!count)
298237
return;
299-
238+
300239
switch (((unsigned long)p) & 0x3)
301240
{
302241
case 0x00: /* Buffer 32-bit aligned */
@@ -311,13 +250,13 @@ void outsw (unsigned long port, const void *src, unsigned long count)
311250
outw(le16_to_cpu(*(unsigned short*)p), port);
312251
}
313252
break;
314-
253+
315254
case 0x02: /* Buffer 16-bit aligned */
316-
255+
317256
outw(le16_to_cpu(*(unsigned short*)p), port);
318257
p += 2;
319258
count--;
320-
259+
321260
while (count>=2) {
322261
count -= 2;
323262
l = *(unsigned int *)p;
@@ -329,11 +268,11 @@ void outsw (unsigned long port, const void *src, unsigned long count)
329268
outw(le16_to_cpu(*(unsigned short *)p), port);
330269
}
331270
break;
332-
333-
case 0x01: /* Buffer 8-bit aligned */
271+
272+
case 0x01: /* Buffer 8-bit aligned */
334273
/* I don't bother with 32bit transfers
335274
* in this case, 16bit will have to do -- DE */
336-
275+
337276
l = *p << 8;
338277
p++;
339278
count--;
@@ -348,7 +287,7 @@ void outsw (unsigned long port, const void *src, unsigned long count)
348287
l2 = *(unsigned char *)p;
349288
outw (le16_to_cpu(l | l2>>8), port);
350289
break;
351-
290+
352291
}
353292
}
354293

@@ -365,10 +304,10 @@ void outsl (unsigned long port, const void *src, unsigned long count)
365304
const unsigned char *p;
366305

367306
p = (const unsigned char *)src;
368-
307+
369308
if (!count)
370309
return;
371-
310+
372311
switch (((unsigned long)p) & 0x3)
373312
{
374313
case 0x00: /* Buffer 32-bit aligned */
@@ -378,13 +317,13 @@ void outsl (unsigned long port, const void *src, unsigned long count)
378317
p += 4;
379318
}
380319
break;
381-
320+
382321
case 0x02: /* Buffer 16-bit aligned */
383322
--count;
384-
323+
385324
l = *(unsigned short *)p;
386325
p += 2;
387-
326+
388327
while (count--)
389328
{
390329
l2 = *(unsigned int *)p;
@@ -415,7 +354,7 @@ void outsl (unsigned long port, const void *src, unsigned long count)
415354
break;
416355
case 0x03: /* Buffer 8-bit aligned */
417356
--count;
418-
357+
419358
l = *p << 24;
420359
p++;
421360

drivers/input/serio/gscps2.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ static bool gscps2_report_data(struct gscps2port *ps2port)
251251

252252
/**
253253
* gscps2_interrupt() - Interruption service routine
254+
* @irq: interrupt number which triggered (unused)
255+
* @dev: device pointer (unused)
254256
*
255257
* This function reads received PS/2 bytes and processes them on
256258
* all interfaces.
@@ -329,6 +331,8 @@ static void gscps2_close(struct serio *port)
329331

330332
/**
331333
* gscps2_probe() - Probes PS2 devices
334+
* @dev: pointer to parisc_device struct which will be probed
335+
*
332336
* @return: success/error report
333337
*/
334338

@@ -420,6 +424,8 @@ static int __init gscps2_probe(struct parisc_device *dev)
420424

421425
/**
422426
* gscps2_remove() - Removes PS2 devices
427+
* @dev: pointer to parisc_device which shall be removed
428+
*
423429
* @return: success/error report
424430
*/
425431

drivers/parisc/led.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ static unsigned char led_type; /* bitmask of LED_HAS_XXX */
3939
static unsigned char lastleds; /* LED state from most recent update */
4040
static unsigned char lcd_new_text;
4141
static unsigned char lcd_text[20];
42-
static unsigned char lcd_text_default[20];
4342
static unsigned char lcd_no_led_support; /* KittyHawk doesn't support LED on its LCD */
4443

4544
struct lcd_block {
@@ -456,9 +455,8 @@ static int __init early_led_init(void)
456455
struct pdc_chassis_info chassis_info;
457456
int ret;
458457

459-
snprintf(lcd_text_default, sizeof(lcd_text_default),
458+
scnprintf(lcd_text, sizeof(lcd_text),
460459
"Linux %s", init_utsname()->release);
461-
strcpy(lcd_text, lcd_text_default);
462460
lcd_new_text = 1;
463461

464462
/* Work around the buggy PDC of KittyHawk-machines */

0 commit comments

Comments
 (0)