Skip to content

Commit

Permalink
Merge branch 'parisc-4.10-3' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/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
  • Loading branch information
Linus Torvalds committed Jan 29, 2017
2 parents 53cd1ad + 2ad5d52 commit 2c5d955
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
8 changes: 7 additions & 1 deletion arch/parisc/include/asm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#endif

#include <linux/compiler.h>
#include <asm/types.h> /* for BITS_PER_LONG/SHIFT_PER_LONG */
#include <asm/types.h>
#include <asm/byteorder.h>
#include <asm/barrier.h>
#include <linux/atomic.h>
Expand All @@ -17,6 +17,12 @@
* to include/asm-i386/bitops.h or kerneldoc
*/

#if __BITS_PER_LONG == 64
#define SHIFT_PER_LONG 6
#else
#define SHIFT_PER_LONG 5
#endif

#define CHOP_SHIFTCOUNT(x) (((unsigned long) (x)) & (BITS_PER_LONG - 1))


Expand Down
2 changes: 0 additions & 2 deletions arch/parisc/include/uapi/asm/bitsperlong.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@

#if defined(__LP64__)
#define __BITS_PER_LONG 64
#define SHIFT_PER_LONG 6
#else
#define __BITS_PER_LONG 32
#define SHIFT_PER_LONG 5
#endif

#include <asm-generic/bitsperlong.h>
Expand Down
5 changes: 3 additions & 2 deletions arch/parisc/include/uapi/asm/swab.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef _PARISC_SWAB_H
#define _PARISC_SWAB_H

#include <asm/bitsperlong.h>
#include <linux/types.h>
#include <linux/compiler.h>

Expand Down Expand Up @@ -38,7 +39,7 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
}
#define __arch_swab32 __arch_swab32

#if BITS_PER_LONG > 32
#if __BITS_PER_LONG > 32
/*
** From "PA-RISC 2.0 Architecture", HP Professional Books.
** See Appendix I page 8 , "Endian Byte Swapping".
Expand All @@ -61,6 +62,6 @@ static inline __attribute_const__ __u64 __arch_swab64(__u64 x)
return x;
}
#define __arch_swab64 __arch_swab64
#endif /* BITS_PER_LONG > 32 */
#endif /* __BITS_PER_LONG > 32 */

#endif /* _PARISC_SWAB_H */
8 changes: 4 additions & 4 deletions drivers/parport/parport_gsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ struct parport *parport_gsc_probe_port(unsigned long base,
p->irq = PARPORT_IRQ_NONE;
}
if (p->irq != PARPORT_IRQ_NONE) {
printk(", irq %d", p->irq);
pr_cont(", irq %d", p->irq);

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

printk(" [");
#define printmode(x) {if(p->modes&PARPORT_MODE_##x){printk("%s%s",f?",":"",#x);f++;}}
pr_cont(" [");
#define printmode(x) {if(p->modes&PARPORT_MODE_##x){pr_cont("%s%s",f?",":"",#x);f++;}}
{
int f = 0;
printmode(PCSPP);
Expand All @@ -315,7 +315,7 @@ struct parport *parport_gsc_probe_port(unsigned long base,
// printmode(DMA);
}
#undef printmode
printk("]\n");
pr_cont("]\n");

if (p->irq != PARPORT_IRQ_NONE) {
if (request_irq (p->irq, parport_irq_handler,
Expand Down

0 comments on commit 2c5d955

Please sign in to comment.