Skip to content

Commit 2c5d955

Browse files
committed
Merge branch 'parisc-4.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull two parisc fixes from Helge Deller: "One fix to avoid usage of BITS_PER_LONG in user-space exported swab.h header which breaks compiling qemu, and one trivial fix for printk continuation in the parisc parport driver" * 'parisc-4.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Don't use BITS_PER_LONG in userspace-exported swab.h header parisc, parport_gsc: Fixes for printk continuation lines
2 parents 53cd1ad + 2ad5d52 commit 2c5d955

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

arch/parisc/include/asm/bitops.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#endif
77

88
#include <linux/compiler.h>
9-
#include <asm/types.h> /* for BITS_PER_LONG/SHIFT_PER_LONG */
9+
#include <asm/types.h>
1010
#include <asm/byteorder.h>
1111
#include <asm/barrier.h>
1212
#include <linux/atomic.h>
@@ -17,6 +17,12 @@
1717
* to include/asm-i386/bitops.h or kerneldoc
1818
*/
1919

20+
#if __BITS_PER_LONG == 64
21+
#define SHIFT_PER_LONG 6
22+
#else
23+
#define SHIFT_PER_LONG 5
24+
#endif
25+
2026
#define CHOP_SHIFTCOUNT(x) (((unsigned long) (x)) & (BITS_PER_LONG - 1))
2127

2228

arch/parisc/include/uapi/asm/bitsperlong.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33

44
#if defined(__LP64__)
55
#define __BITS_PER_LONG 64
6-
#define SHIFT_PER_LONG 6
76
#else
87
#define __BITS_PER_LONG 32
9-
#define SHIFT_PER_LONG 5
108
#endif
119

1210
#include <asm-generic/bitsperlong.h>

arch/parisc/include/uapi/asm/swab.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef _PARISC_SWAB_H
22
#define _PARISC_SWAB_H
33

4+
#include <asm/bitsperlong.h>
45
#include <linux/types.h>
56
#include <linux/compiler.h>
67

@@ -38,7 +39,7 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
3839
}
3940
#define __arch_swab32 __arch_swab32
4041

41-
#if BITS_PER_LONG > 32
42+
#if __BITS_PER_LONG > 32
4243
/*
4344
** From "PA-RISC 2.0 Architecture", HP Professional Books.
4445
** See Appendix I page 8 , "Endian Byte Swapping".
@@ -61,6 +62,6 @@ static inline __attribute_const__ __u64 __arch_swab64(__u64 x)
6162
return x;
6263
}
6364
#define __arch_swab64 __arch_swab64
64-
#endif /* BITS_PER_LONG > 32 */
65+
#endif /* __BITS_PER_LONG > 32 */
6566

6667
#endif /* _PARISC_SWAB_H */

drivers/parport/parport_gsc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ struct parport *parport_gsc_probe_port(unsigned long base,
293293
p->irq = PARPORT_IRQ_NONE;
294294
}
295295
if (p->irq != PARPORT_IRQ_NONE) {
296-
printk(", irq %d", p->irq);
296+
pr_cont(", irq %d", p->irq);
297297

298298
if (p->dma == PARPORT_DMA_AUTO) {
299299
p->dma = PARPORT_DMA_NONE;
@@ -303,8 +303,8 @@ struct parport *parport_gsc_probe_port(unsigned long base,
303303
is mandatory (see above) */
304304
p->dma = PARPORT_DMA_NONE;
305305

306-
printk(" [");
307-
#define printmode(x) {if(p->modes&PARPORT_MODE_##x){printk("%s%s",f?",":"",#x);f++;}}
306+
pr_cont(" [");
307+
#define printmode(x) {if(p->modes&PARPORT_MODE_##x){pr_cont("%s%s",f?",":"",#x);f++;}}
308308
{
309309
int f = 0;
310310
printmode(PCSPP);
@@ -315,7 +315,7 @@ struct parport *parport_gsc_probe_port(unsigned long base,
315315
// printmode(DMA);
316316
}
317317
#undef printmode
318-
printk("]\n");
318+
pr_cont("]\n");
319319

320320
if (p->irq != PARPORT_IRQ_NONE) {
321321
if (request_irq (p->irq, parport_irq_handler,

0 commit comments

Comments
 (0)