Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/arch/sh/boards/mach-hp6xx/pm.c b/arch/sh/boards/mach-hp6xx/pm.c
- index 8b50cf763c0..eba497b5f04 100644
- --- a/arch/sh/boards/mach-hp6xx/pm.c
- +++ b/arch/sh/boards/mach-hp6xx/pm.c
- @@ -105,15 +105,15 @@ static int hp6x0_pm_enter(suspend_state_t state)
- #endif
- #ifdef CONFIG_HD64461_ENABLER
- - outb(0, HD64461_PCC1CSCIER);
- + __raw_writeb(0, HD64461_PCC1CSCIER);
- - scr = inb(HD64461_PCC1SCR);
- + scr = __raw_readb(HD64461_PCC1SCR);
- scr |= HD64461_PCCSCR_VCC1;
- - outb(scr, HD64461_PCC1SCR);
- + __raw_writeb(scr, HD64461_PCC1SCR);
- - hd64461_stbcr = inw(HD64461_STBCR);
- + hd64461_stbcr = __raw_readw(HD64461_STBCR);
- hd64461_stbcr |= HD64461_STBCR_SPC1ST;
- - outw(hd64461_stbcr, HD64461_STBCR);
- + __raw_writew(hd64461_stbcr, HD64461_STBCR);
- #endif
- __raw_writeb(0x1f, DACR);
- @@ -124,21 +124,21 @@ static int hp6x0_pm_enter(suspend_state_t state)
- stbcr2 = __raw_readb(STBCR2);
- __raw_writeb(0x7f , STBCR2);
- - outw(0xf07f, HD64461_SCPUCR);
- + __raw_writew(0xf07f, HD64461_SCPUCR);
- pm_enter();
- - outw(0, HD64461_SCPUCR);
- + __raw_writew(0, HD64461_SCPUCR);
- __raw_writeb(stbcr, STBCR);
- __raw_writeb(stbcr2, STBCR2);
- #ifdef CONFIG_HD64461_ENABLER
- - hd64461_stbcr = inw(HD64461_STBCR);
- + hd64461_stbcr = __raw_readw(HD64461_STBCR);
- hd64461_stbcr &= ~HD64461_STBCR_SPC1ST;
- - outw(hd64461_stbcr, HD64461_STBCR);
- + __raw_writew(hd64461_stbcr, HD64461_STBCR);
- - outb(0x4c, HD64461_PCC1CSCIER);
- - outb(0x00, HD64461_PCC1CSCR);
- + __raw_writeb(0x4c, HD64461_PCC1CSCIER);
- + __raw_writeb(0x00, HD64461_PCC1CSCR);
- #endif
- return 0;
- diff --git a/arch/sh/boards/mach-hp6xx/setup.c b/arch/sh/boards/mach-hp6xx/setup.c
- index 8c9add5f4cf..d480b5d446e 100644
- --- a/arch/sh/boards/mach-hp6xx/setup.c
- +++ b/arch/sh/boards/mach-hp6xx/setup.c
- @@ -58,14 +58,14 @@ static void dac_audio_start(struct dac_audio_pdata *pdata)
- u8 v8;
- /* HP Jornada 680/690 speaker on */
- - v = inw(HD64461_GPADR);
- + v = __raw_readw(HD64461_GPADR);
- v &= ~HD64461_GPADR_SPEAKER;
- - outw(v, HD64461_GPADR);
- + __raw_writew(v, HD64461_GPADR);
- /* HP Palmtop 620lx/660lx speaker on */
- - v8 = inb(PKDR);
- + v8 = __raw_readb(PKDR);
- v8 &= ~PKDR_SPEAKER;
- - outb(v8, PKDR);
- + __raw_writeb(v8, PKDR);
- sh_dac_enable(pdata->channel);
- }
- @@ -76,14 +76,14 @@ static void dac_audio_stop(struct dac_audio_pdata *pdata)
- u8 v8;
- /* HP Jornada 680/690 speaker off */
- - v = inw(HD64461_GPADR);
- + v = __raw_readw(HD64461_GPADR);
- v |= HD64461_GPADR_SPEAKER;
- - outw(v, HD64461_GPADR);
- + __raw_writew(v, HD64461_GPADR);
- /* HP Palmtop 620lx/660lx speaker off */
- - v8 = inb(PKDR);
- + v8 = __raw_readb(PKDR);
- v8 |= PKDR_SPEAKER;
- - outb(v8, PKDR);
- + __raw_writeb(v8, PKDR);
- sh_dac_output(0, pdata->channel);
- sh_dac_disable(pdata->channel);
- @@ -127,7 +127,7 @@ static void __init hp6xx_setup(char **cmdline_p)
- u8 v8;
- u16 v;
- - v = inw(HD64461_STBCR);
- + v = __raw_readw(HD64461_STBCR);
- v |= HD64461_STBCR_SURTST | HD64461_STBCR_SIRST |
- HD64461_STBCR_STM1ST | HD64461_STBCR_STM0ST |
- HD64461_STBCR_SAFEST | HD64461_STBCR_SPC0ST |
- @@ -136,15 +136,15 @@ static void __init hp6xx_setup(char **cmdline_p)
- #ifndef CONFIG_HD64461_ENABLER
- v |= HD64461_STBCR_SPC1ST;
- #endif
- - outw(v, HD64461_STBCR);
- - v = inw(HD64461_GPADR);
- + __raw_writew(v, HD64461_STBCR);
- + v = __raw_readw(HD64461_GPADR);
- v |= HD64461_GPADR_SPEAKER | HD64461_GPADR_PCMCIA0;
- - outw(v, HD64461_GPADR);
- + __raw_writew(v, HD64461_GPADR);
- - outw(HD64461_PCCGCR_VCC0 | HD64461_PCCSCR_VCC1, HD64461_PCC0GCR);
- + __raw_writew(HD64461_PCCGCR_VCC0 | HD64461_PCCSCR_VCC1, HD64461_PCC0GCR);
- #ifndef CONFIG_HD64461_ENABLER
- - outw(HD64461_PCCGCR_VCC0 | HD64461_PCCSCR_VCC1, HD64461_PCC1GCR);
- + __raw_writew(HD64461_PCCGCR_VCC0 | HD64461_PCCSCR_VCC1, HD64461_PCC1GCR);
- #endif
- sh_dac_output(0, DAC_SPEAKER_VOLUME);
- diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c
- index 38aa0027214..bb82384ba66 100644
- --- a/drivers/video/backlight/hp680_bl.c
- +++ b/drivers/video/backlight/hp680_bl.c
- @@ -45,16 +45,16 @@ static void hp680bl_send_intensity(struct backlight_device *bd)
- spin_lock_irqsave(&bl_lock, flags);
- if (intensity && current_intensity == 0) {
- sh_dac_enable(DAC_LCD_BRIGHTNESS);
- - v = inw(HD64461_GPBDR);
- + v = __raw_readw(HD64461_GPBDR);
- v &= ~HD64461_GPBDR_LCDOFF;
- - outw(v, HD64461_GPBDR);
- + __raw_writew(v, HD64461_GPBDR);
- sh_dac_output(255-(u8)intensity, DAC_LCD_BRIGHTNESS);
- } else if (intensity == 0 && current_intensity != 0) {
- sh_dac_output(255-(u8)intensity, DAC_LCD_BRIGHTNESS);
- sh_dac_disable(DAC_LCD_BRIGHTNESS);
- - v = inw(HD64461_GPBDR);
- + v = __raw_readw(HD64461_GPBDR);
- v |= HD64461_GPBDR_LCDOFF;
- - outw(v, HD64461_GPBDR);
- + __raw_writew(v, HD64461_GPBDR);
- } else if (intensity) {
- sh_dac_output(255-(u8)intensity, DAC_LCD_BRIGHTNESS);
- }
- diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h
- index e69de29bb2d..2f4079175af 100644
- --- a/include/linux/compiler-gcc5.h
- +++ b/include/linux/compiler-gcc5.h
- @@ -0,0 +1,58 @@
- +#ifndef __LINUX_COMPILER_H
- +#error "Please don't include <linux/compiler-gcc4.h> directly, include <linux/compiler.h> instead."
- +#endif
- +
- +/* GCC 4.1.[01] miscompiles __weak */
- +#ifdef __KERNEL__
- +# if __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ <= 1
- +# error Your version of gcc miscompiles the __weak directive
- +# endif
- +#endif
- +
- +#define __used __attribute__((__used__))
- +#define __must_check __attribute__((warn_unused_result))
- +#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
- +
- +#if __GNUC_MINOR__ >= 3
- +/* Mark functions as cold. gcc will assume any path leading to a call
- + to them will be unlikely. This means a lot of manual unlikely()s
- + are unnecessary now for any paths leading to the usual suspects
- + like BUG(), printk(), panic() etc. [but let's keep them for now for
- + older compilers]
- +
- + Early snapshots of gcc 4.3 don't support this and we can't detect this
- + in the preprocessor, but we can live with this because they're unreleased.
- + Maketime probing would be overkill here.
- +
- + gcc also has a __attribute__((__hot__)) to move hot functions into
- + a special section, but I don't see any sense in this right now in
- + the kernel context */
- +#define __cold __attribute__((__cold__))
- +
- +#define __linktime_error(message) __attribute__((__error__(message)))
- +
- +#if __GNUC_MINOR__ >= 5
- +/*
- + * Mark a position in code as unreachable. This can be used to
- + * suppress control flow warnings after asm blocks that transfer
- + * control elsewhere.
- + *
- + * Early snapshots of gcc 4.5 don't support this and we can't detect
- + * this in the preprocessor, but we can live with this because they're
- + * unreleased. Really, we need to have autoconf for the kernel.
- + */
- +#define unreachable() __builtin_unreachable()
- +
- +/* Mark a function definition as prohibited from being cloned. */
- +#define __noclone __attribute__((__noclone__))
- +
- +#endif
- +#endif
- +
- +#if __GNUC_MINOR__ > 0
- +#define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
- +#endif
- +#if __GNUC_MINOR__ >= 4 && !defined(__CHECKER__)
- +#define __compiletime_warning(message) __attribute__((warning(message)))
- +#define __compiletime_error(message) __attribute__((error(message)))
- +#endif
- diff --git a/kernel/timeconst.pl b/kernel/timeconst.pl
- index eb51d76e058..04612394c53 100644
- --- a/kernel/timeconst.pl
- +++ b/kernel/timeconst.pl
- @@ -370,7 +370,7 @@ if ($hz eq '--can') {
- }
- @val = @{$canned_values{$hz}};
- - if (!defined(@val)) {
- + if (!@val) {
- @val = compute_values($hz);
- }
- output($hz, @val);
Add Comment
Please, Sign In to add comment