diff --git a/[refs] b/[refs] index 6bf8dbd7ddf2..4a00a5f7f409 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2d5bc23b32e0ec6fe9c1cdd9f371063881dc1ffc +refs/heads/master: 68fb2e499b054bf8359965422fffac70eff56004 diff --git a/trunk/Documentation/vm/page-types.c b/trunk/Documentation/vm/page-types.c index 4793c6aac733..3ec4f2a22585 100644 --- a/trunk/Documentation/vm/page-types.c +++ b/trunk/Documentation/vm/page-types.c @@ -218,7 +218,7 @@ static void fatal(const char *x, ...) exit(EXIT_FAILURE); } -static int checked_open(const char *pathname, int flags) +int checked_open(const char *pathname, int flags) { int fd = open(pathname, flags); diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 1ba4f98c9cbc..81d68d5b7eea 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -3084,13 +3084,9 @@ F: kernel/kgdb.c KMEMCHECK M: Vegard Nossum -M: Pekka Enberg +P Pekka Enberg +M: penberg@cs.helsinki.fi S: Maintained -F: Documentation/kmemcheck.txt -F: arch/x86/include/asm/kmemcheck.h -F: arch/x86/mm/kmemcheck/ -F: include/linux/kmemcheck.h -F: mm/kmemcheck.c KMEMLEAK M: Catalin Marinas diff --git a/trunk/Makefile b/trunk/Makefile index aa3e13a7e353..827836128158 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -221,7 +221,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ HOSTCC = gcc HOSTCXX = g++ -HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer +HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer HOSTCXXFLAGS = -O2 # Decide whether to build built-in, modular, or both. diff --git a/trunk/arch/alpha/boot/tools/objstrip.c b/trunk/arch/alpha/boot/tools/objstrip.c index 367d53d031fc..9d0727d18aee 100644 --- a/trunk/arch/alpha/boot/tools/objstrip.c +++ b/trunk/arch/alpha/boot/tools/objstrip.c @@ -35,7 +35,7 @@ const char * prog_name; -static void +void usage (void) { fprintf(stderr, diff --git a/trunk/arch/alpha/include/asm/fcntl.h b/trunk/arch/alpha/include/asm/fcntl.h index 25da0017ec87..73126e4dd639 100644 --- a/trunk/arch/alpha/include/asm/fcntl.h +++ b/trunk/arch/alpha/include/asm/fcntl.h @@ -26,6 +26,8 @@ #define F_GETOWN 6 /* for sockets. */ #define F_SETSIG 10 /* for sockets. */ #define F_GETSIG 11 /* for sockets. */ +#define F_SETOWN_EX 15 +#define F_GETOWN_EX 16 /* for posix fcntl() and lockf() */ #define F_RDLCK 1 diff --git a/trunk/arch/arm/mach-at91/Kconfig b/trunk/arch/arm/mach-at91/Kconfig index 2fd88437348b..e35d54d43e70 100644 --- a/trunk/arch/arm/mach-at91/Kconfig +++ b/trunk/arch/arm/mach-at91/Kconfig @@ -289,6 +289,13 @@ config MACH_NEOCORE926 help Select this if you are using the Adeneo Neocore 926 board. +config MACH_AT91SAM9G20EK_2MMC + bool "Atmel AT91SAM9G20-EK Evaluation Kit modified for 2 MMC Slots" + depends on ARCH_AT91SAM9G20 + help + Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit + Rev A or B modified for 2 MMC Slots. + endif # ---------------------------------------------------------- @@ -315,16 +322,7 @@ config MACH_AT91SAM9G20EK bool "Atmel AT91SAM9G20-EK Evaluation Kit" depends on ARCH_AT91SAM9G20 help - Select this if you are using Atmel's AT91SAM9G20-EK Evaluation Kit - that embeds only one SD/MMC slot. - -config MACH_AT91SAM9G20EK_2MMC - bool "Atmel AT91SAM9G20-EK Evaluation Kit with 2 SD/MMC Slots" - depends on ARCH_AT91SAM9G20 - help - Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit - with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and - onwards. + Select this if you are using Atmel's AT91SAM9G20-EK Evaluation Kit. config MACH_CPU9G20 bool "Eukrea CPU9G20 board" @@ -394,7 +392,7 @@ config MTD_AT91_DATAFLASH_CARD config MTD_NAND_ATMEL_BUSWIDTH_16 bool "Enable 16-bit data bus interface to NAND flash" - depends on (MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_AT91SAM9G20EK_2MMC || MACH_AT91SAM9G45EKES || MACH_AT91CAP9ADK) + depends on (MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_AT91SAM9G45EKES || MACH_AT91CAP9ADK) help On AT91SAM926x boards both types of NAND flash can be present (8 and 16 bit data bus width). diff --git a/trunk/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c b/trunk/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c index a4102d72cc9b..a28e53faf71d 100644 --- a/trunk/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c +++ b/trunk/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c @@ -90,7 +90,7 @@ static struct at91_udc_data __initdata ek_udc_data = { * SPI devices. */ static struct spi_board_info ek_spi_devices[] = { -#if !(defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_AT91)) +#if !defined(CONFIG_MMC_ATMELMCI) { /* DataFlash chip */ .modalias = "mtd_dataflash", .chip_select = 1, @@ -113,7 +113,7 @@ static struct spi_board_info ek_spi_devices[] = { * MACB Ethernet device */ static struct at91_eth_data __initdata ek_macb_data = { - .phy_irq_pin = AT91_PIN_PB0, + .phy_irq_pin = AT91_PIN_PC12, .is_rmii = 1, }; @@ -194,27 +194,24 @@ static void __init ek_add_device_nand(void) /* * MCI (SD/MMC) - * wp_pin is not connected + * det_pin and wp_pin are not connected */ #if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE) static struct mci_platform_data __initdata ek_mmc_data = { .slot[0] = { .bus_width = 4, - .detect_pin = AT91_PIN_PC2, + .detect_pin = -ENODEV, .wp_pin = -ENODEV, }, .slot[1] = { .bus_width = 4, - .detect_pin = AT91_PIN_PC9, + .detect_pin = -ENODEV, .wp_pin = -ENODEV, }, }; #else -static struct at91_mmc_data __initdata ek_mmc_data = { - .slot_b = 1, /* Only one slot so use slot B */ - .wire4 = 1, - .det_pin = AT91_PIN_PC9, +static struct amci_platform_data __initdata ek_mmc_data = { }; #endif @@ -224,13 +221,13 @@ static struct at91_mmc_data __initdata ek_mmc_data = { static struct gpio_led ek_leds[] = { { /* "bottom" led, green, userled1 to be defined */ .name = "ds5", - .gpio = AT91_PIN_PB8, + .gpio = AT91_PIN_PB12, .active_low = 1, .default_trigger = "none", }, { /* "power" led, yellow */ .name = "ds1", - .gpio = AT91_PIN_PB9, + .gpio = AT91_PIN_PB13, .default_trigger = "heartbeat", } }; @@ -257,11 +254,7 @@ static void __init ek_board_init(void) /* Ethernet */ at91_add_device_eth(&ek_macb_data); /* MMC */ -#if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE) at91_add_device_mci(0, &ek_mmc_data); -#else - at91_add_device_mmc(0, &ek_mmc_data); -#endif /* I2C */ at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices)); /* LEDs */ diff --git a/trunk/arch/arm/mach-kirkwood/common.c b/trunk/arch/arm/mach-kirkwood/common.c index 242dd0775343..7177c4aa6342 100644 --- a/trunk/arch/arm/mach-kirkwood/common.c +++ b/trunk/arch/arm/mach-kirkwood/common.c @@ -915,14 +915,6 @@ void __init kirkwood_init(void) kirkwood_uart0_data[0].uartclk = kirkwood_tclk; kirkwood_uart1_data[0].uartclk = kirkwood_tclk; - /* - * Disable propagation of mbus errors to the CPU local bus, - * as this causes mbus errors (which can occur for example - * for PCI aborts) to throw CPU aborts, which we're not set - * up to deal with. - */ - writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG); - kirkwood_setup_cpu_mbus(); #ifdef CONFIG_CACHE_FEROCEON_L2 diff --git a/trunk/arch/arm/mach-kirkwood/include/mach/bridge-regs.h b/trunk/arch/arm/mach-kirkwood/include/mach/bridge-regs.h index 418f5017c50e..9e80d9232c83 100644 --- a/trunk/arch/arm/mach-kirkwood/include/mach/bridge-regs.h +++ b/trunk/arch/arm/mach-kirkwood/include/mach/bridge-regs.h @@ -13,9 +13,6 @@ #include -#define CPU_CONFIG (BRIDGE_VIRT_BASE | 0x0100) -#define CPU_CONFIG_ERROR_PROP 0x00000004 - #define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104) #define CPU_RESET 0x00000002 diff --git a/trunk/arch/arm/mach-mmp/include/mach/mfp-pxa910.h b/trunk/arch/arm/mach-mmp/include/mach/mfp-pxa910.h index 7e8a80f25ddc..bf1189ff9a34 100644 --- a/trunk/arch/arm/mach-mmp/include/mach/mfp-pxa910.h +++ b/trunk/arch/arm/mach-mmp/include/mach/mfp-pxa910.h @@ -160,7 +160,7 @@ #define MMC1_WP_MMC1_WP MFP_CFG_DRV(MMC1_WP, AF0, MEDIUM) /* PWM */ -#define GPIO27_PWM3_AF2 MFP_CFG(GPIO27, AF2) +#define GPIO27 PWM3 AF2 MFP_CFG(GPIO27, AF2) #define GPIO51_PWM2_OUT MFP_CFG(GPIO51, AF2) #define GPIO117_PWM1_OUT MFP_CFG(GPIO117, AF2) #define GPIO118_PWM2_OUT MFP_CFG(GPIO118, AF2) diff --git a/trunk/arch/arm/mach-pxa/colibri-pxa320.c b/trunk/arch/arm/mach-pxa/colibri-pxa320.c index ec0e14b96682..494572825c7d 100644 --- a/trunk/arch/arm/mach-pxa/colibri-pxa320.c +++ b/trunk/arch/arm/mach-pxa/colibri-pxa320.c @@ -27,7 +27,6 @@ #include #include #include -#include #include "generic.h" #include "devices.h" @@ -146,8 +145,7 @@ static void __init colibri_pxa320_init_lcd(void) static inline void colibri_pxa320_init_lcd(void) {} #endif -#if defined(CONFIG_SND_AC97_CODEC) || \ - defined(CONFIG_SND_AC97_CODEC_MODULE) +#if defined(SND_AC97_CODEC) || defined(SND_AC97_CODEC_MODULE) static mfp_cfg_t colibri_pxa320_ac97_pin_config[] __initdata = { GPIO34_AC97_SYSCLK, GPIO35_AC97_SDATA_IN_0, diff --git a/trunk/arch/arm/mach-pxa/hx4700.c b/trunk/arch/arm/mach-pxa/hx4700.c index 83bd3c6e3884..abff9e132749 100644 --- a/trunk/arch/arm/mach-pxa/hx4700.c +++ b/trunk/arch/arm/mach-pxa/hx4700.c @@ -604,7 +604,7 @@ static struct platform_device gpio_vbus = { static const struct ads7846_platform_data tsc2046_info = { .model = 7846, .vref_delay_usecs = 100, - .pressure_max = 1024, + .pressure_max = 512, .debounce_max = 10, .debounce_tol = 3, .debounce_rep = 1, diff --git a/trunk/arch/arm/mach-pxa/include/mach/entry-macro.S b/trunk/arch/arm/mach-pxa/include/mach/entry-macro.S index a73bc86a3c26..241880608ac6 100644 --- a/trunk/arch/arm/mach-pxa/include/mach/entry-macro.S +++ b/trunk/arch/arm/mach-pxa/include/mach/entry-macro.S @@ -46,6 +46,5 @@ beq 1001f bic \irqstat, \irqstat, #0x80000000 mov \irqnr, \irqstat, lsr #16 - add \irqnr, \irqnr, #(PXA_IRQ(0)) 1001: .endm diff --git a/trunk/arch/arm/mach-u300/core.c b/trunk/arch/arm/mach-u300/core.c index 653e25be3dd8..be60d6deee8b 100644 --- a/trunk/arch/arm/mach-u300/core.c +++ b/trunk/arch/arm/mach-u300/core.c @@ -408,7 +408,7 @@ static struct platform_device keypad_device = { }; static struct platform_device rtc_device = { - .name = "rtc-coh901331", + .name = "rtc0", .id = -1, .num_resources = ARRAY_SIZE(rtc_resources), .resource = rtc_resources, diff --git a/trunk/arch/arm/plat-pxa/include/plat/mfp.h b/trunk/arch/arm/plat-pxa/include/plat/mfp.h index 857a6839071c..22086e696e8e 100644 --- a/trunk/arch/arm/plat-pxa/include/plat/mfp.h +++ b/trunk/arch/arm/plat-pxa/include/plat/mfp.h @@ -16,7 +16,7 @@ #ifndef __ASM_PLAT_MFP_H #define __ASM_PLAT_MFP_H -#define mfp_to_gpio(m) ((m) % 256) +#define mfp_to_gpio(m) ((m) % 128) /* list of all the configurable MFP pins */ enum { diff --git a/trunk/arch/arm/plat-pxa/mfp.c b/trunk/arch/arm/plat-pxa/mfp.c index be58f9fe65b0..9405d0379c85 100644 --- a/trunk/arch/arm/plat-pxa/mfp.c +++ b/trunk/arch/arm/plat-pxa/mfp.c @@ -207,7 +207,7 @@ unsigned long mfp_read(int mfp) { unsigned long val, flags; - BUG_ON(mfp < 0 || mfp >= MFP_PIN_MAX); + BUG_ON(mfp >= MFP_PIN_MAX); spin_lock_irqsave(&mfp_spin_lock, flags); val = mfpr_readl(mfp_table[mfp].mfpr_off); @@ -220,7 +220,7 @@ void mfp_write(int mfp, unsigned long val) { unsigned long flags; - BUG_ON(mfp < 0 || mfp >= MFP_PIN_MAX); + BUG_ON(mfp >= MFP_PIN_MAX); spin_lock_irqsave(&mfp_spin_lock, flags); mfpr_writel(mfp_table[mfp].mfpr_off, val); diff --git a/trunk/arch/mips/Kconfig b/trunk/arch/mips/Kconfig index 1aad0d9f5074..03bd56a2fb6e 100644 --- a/trunk/arch/mips/Kconfig +++ b/trunk/arch/mips/Kconfig @@ -1,7 +1,6 @@ config MIPS bool default y - select HAVE_GENERIC_DMA_COHERENT select HAVE_IDE select HAVE_OPROFILE select HAVE_ARCH_KGDB diff --git a/trunk/arch/mips/bcm47xx/prom.c b/trunk/arch/mips/bcm47xx/prom.c index fb284c3b2cff..079e33d52783 100644 --- a/trunk/arch/mips/bcm47xx/prom.c +++ b/trunk/arch/mips/bcm47xx/prom.c @@ -100,7 +100,7 @@ static __init void prom_init_console(void) static __init void prom_init_cmdline(void) { - static char buf[CL_SIZE] __initdata; + char buf[CL_SIZE]; /* Get the kernel command line from CFE */ if (cfe_getenv("LINUX_CMDLINE", buf, CL_SIZE) >= 0) { diff --git a/trunk/arch/mips/configs/rbtx49xx_defconfig b/trunk/arch/mips/configs/rbtx49xx_defconfig index 6c6a19aebe1f..c69813b8488c 100644 --- a/trunk/arch/mips/configs/rbtx49xx_defconfig +++ b/trunk/arch/mips/configs/rbtx49xx_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.32-rc6 -# Sun Nov 8 22:59:47 2009 +# Linux kernel version: 2.6.29-rc7 +# Wed Mar 4 23:08:06 2009 # CONFIG_MIPS=y @@ -9,18 +9,16 @@ CONFIG_MIPS=y # Machine selection # # CONFIG_MACH_ALCHEMY is not set -# CONFIG_AR7 is not set # CONFIG_BASLER_EXCITE is not set # CONFIG_BCM47XX is not set -# CONFIG_BCM63XX is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MACH_JAZZ is not set # CONFIG_LASAT is not set -# CONFIG_MACH_LOONGSON is not set +# CONFIG_LEMOTE_FULONG is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SIM is not set -# CONFIG_NEC_MARKEINS is not set +# CONFIG_MACH_EMMA is not set # CONFIG_MACH_VR41XX is not set # CONFIG_NXP_STB220 is not set # CONFIG_NXP_STB225 is not set @@ -47,7 +45,6 @@ CONFIG_MACH_TX49XX=y # CONFIG_WR_PPMC is not set # CONFIG_CAVIUM_OCTEON_SIMULATOR is not set # CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set -# CONFIG_ALCHEMY_GPIO_INDIRECT is not set CONFIG_MACH_TXX9=y CONFIG_TOSHIBA_RBTX4927=y CONFIG_TOSHIBA_RBTX4938=y @@ -89,6 +86,7 @@ CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_EARLY_PRINTK=y CONFIG_SYS_HAS_EARLY_PRINTK=y +# CONFIG_HOTPLUG_CPU is not set # CONFIG_NO_IOPORT is not set CONFIG_GENERIC_GPIO=y CONFIG_CPU_BIG_ENDIAN=y @@ -103,7 +101,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5 # # CPU selection # -# CONFIG_CPU_LOONGSON2E is not set +# CONFIG_CPU_LOONGSON2 is not set # CONFIG_CPU_MIPS32_R1 is not set # CONFIG_CPU_MIPS32_R2 is not set # CONFIG_CPU_MIPS64_R1 is not set @@ -139,7 +137,6 @@ CONFIG_32BIT=y CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set -# CONFIG_PAGE_SIZE_32KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y CONFIG_MIPS_MT_DISABLED=y @@ -157,10 +154,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_PHYS_ADDR_T_64BIT is not set CONFIG_ZONE_DMA_FLAG=0 CONFIG_VIRT_TO_BUS=y -CONFIG_HAVE_MLOCK=y -CONFIG_HAVE_MLOCKED_PAGE_BIT=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_UNEVICTABLE_LRU=y CONFIG_TICK_ONESHOT=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y @@ -181,7 +175,6 @@ CONFIG_PREEMPT_NONE=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_CONSTRUCTORS=y # # General setup @@ -201,12 +194,11 @@ CONFIG_SYSVIPC_SYSCTL=y # # RCU Subsystem # -CONFIG_TREE_RCU=y -# CONFIG_TREE_PREEMPT_RCU is not set -# CONFIG_RCU_TRACE is not set -CONFIG_RCU_FANOUT=32 -# CONFIG_RCU_FANOUT_EXACT is not set +CONFIG_CLASSIC_RCU=y +# CONFIG_TREE_RCU is not set +# CONFIG_PREEMPT_RCU is not set # CONFIG_TREE_RCU_TRACE is not set +# CONFIG_PREEMPT_RCU_TRACE is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=14 @@ -217,12 +209,8 @@ CONFIG_SYSFS_DEPRECATED_V2=y # CONFIG_NAMESPACES is not set CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y CONFIG_EMBEDDED=y CONFIG_SYSCTL_SYSCALL=y CONFIG_KALLSYMS=y @@ -232,35 +220,25 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y # CONFIG_PCSPKR_PLATFORM is not set +CONFIG_COMPAT_BRK=y CONFIG_BASE_FULL=y -CONFIG_FUTEX=y +# CONFIG_FUTEX is not set +CONFIG_ANON_INODES=y # CONFIG_EPOLL is not set CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_AIO=y - -# -# Kernel Performance Events And Counters -# CONFIG_VM_EVENT_COUNTERS=y CONFIG_PCI_QUIRKS=y -CONFIG_COMPAT_BRK=y CONFIG_SLAB=y # CONFIG_SLUB is not set # CONFIG_SLOB is not set # CONFIG_PROFILING is not set CONFIG_HAVE_OPROFILE=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -# CONFIG_SLOW_WORK is not set -CONFIG_HAVE_GENERIC_DMA_COHERENT=y +# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y CONFIG_BASE_SMALL=0 CONFIG_MODULES=y # CONFIG_MODULE_FORCE_LOAD is not set @@ -268,8 +246,8 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_BLOCK=y -# CONFIG_LBDAF is not set -# CONFIG_BLK_DEV_BSG is not set +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set # CONFIG_BLK_DEV_INTEGRITY is not set # @@ -296,7 +274,6 @@ CONFIG_PCI_DOMAINS=y # CONFIG_ARCH_SUPPORTS_MSI is not set # CONFIG_PCI_LEGACY is not set # CONFIG_PCI_STUB is not set -# CONFIG_PCI_IOV is not set CONFIG_MMU=y # @@ -311,7 +288,6 @@ CONFIG_TRAD_SIGNALS=y # # Power management options # -CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y # CONFIG_PM is not set CONFIG_NET=y @@ -319,6 +295,7 @@ CONFIG_NET=y # # Networking options # +CONFIG_COMPAT_NET_DEV_OPS=y CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y @@ -334,7 +311,6 @@ CONFIG_IP_PNP=y # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set # CONFIG_SYN_COOKIES is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set @@ -360,7 +336,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set -# CONFIG_PHONET is not set # CONFIG_NET_SCHED is not set # CONFIG_DCB is not set @@ -372,6 +347,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_CAN is not set # CONFIG_IRDA is not set # CONFIG_BT is not set +# CONFIG_PHONET is not set # CONFIG_WIRELESS is not set # CONFIG_WIMAX is not set # CONFIG_RFKILL is not set @@ -389,9 +365,9 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_CONNECTOR is not set CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_TESTS is not set # CONFIG_MTD_CONCAT is not set CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_TESTS is not set # CONFIG_MTD_REDBOOT_PARTS is not set CONFIG_MTD_CMDLINE_PARTS=y # CONFIG_MTD_AR7_PARTS is not set @@ -400,9 +376,9 @@ CONFIG_MTD_CMDLINE_PARTS=y # User Modules And Translation Layers # CONFIG_MTD_CHAR=y -CONFIG_MTD_BLKDEVS=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m +# CONFIG_MTD_BLKDEVS is not set +# CONFIG_MTD_BLOCK is not set +# CONFIG_MTD_BLOCK_RO is not set # CONFIG_FTL is not set # CONFIG_NFTL is not set # CONFIG_INFTL is not set @@ -438,20 +414,16 @@ CONFIG_MTD_CFI_UTIL=y # # Mapping drivers for chip access # -CONFIG_MTD_COMPLEX_MAPPINGS=y +# CONFIG_MTD_COMPLEX_MAPPINGS is not set CONFIG_MTD_PHYSMAP=y # CONFIG_MTD_PHYSMAP_COMPAT is not set -# CONFIG_MTD_PCI is not set -# CONFIG_MTD_GPIO_ADDR is not set # CONFIG_MTD_INTEL_VR_NOR is not set -CONFIG_MTD_RBTX4939=y # CONFIG_MTD_PLATRAM is not set # # Self-contained MTD device drivers # # CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SST25L is not set # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set @@ -463,15 +435,7 @@ CONFIG_MTD_RBTX4939=y # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set # CONFIG_MTD_DOC2001PLUS is not set -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -# CONFIG_MTD_NAND_ECC_SMC is not set -# CONFIG_MTD_NAND_MUSEUM_IDS is not set -CONFIG_MTD_NAND_IDS=m -# CONFIG_MTD_NAND_CAFE is not set -# CONFIG_MTD_NAND_NANDSIM is not set -# CONFIG_MTD_NAND_PLATFORM is not set -CONFIG_MTD_NAND_TXX9NDFMC=m +# CONFIG_MTD_NAND is not set # CONFIG_MTD_ONENAND is not set # @@ -507,7 +471,6 @@ CONFIG_IDE=y # # Please see Documentation/ide/ide.txt for help/info on IDE drives # -CONFIG_IDE_XFER_MODE=y CONFIG_IDE_TIMINGS=y # CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_IDE_GD=y @@ -571,13 +534,8 @@ CONFIG_BLK_DEV_IDEDMA=y # # -# You can enable one or both FireWire driver stacks. +# A new alternative FireWire stack is available with EXPERIMENTAL=y # - -# -# See the help texts for more information. -# -# CONFIG_FIREWIRE is not set # CONFIG_IEEE1394 is not set # CONFIG_I2O is not set CONFIG_NETDEVICES=y @@ -616,8 +574,6 @@ CONFIG_MII=y # CONFIG_NET_VENDOR_3COM is not set CONFIG_SMC91X=y # CONFIG_DM9000 is not set -# CONFIG_ETHOC is not set -# CONFIG_DNET is not set # CONFIG_NET_TULIP is not set # CONFIG_HP100 is not set CONFIG_NE2000=y @@ -646,15 +602,18 @@ CONFIG_TC35815=y # CONFIG_SMSC9420 is not set # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set -# CONFIG_KS8842 is not set -# CONFIG_KS8851 is not set -# CONFIG_KS8851_MLL is not set # CONFIG_VIA_RHINE is not set # CONFIG_ATL2 is not set # CONFIG_NETDEV_1000 is not set # CONFIG_NETDEV_10000 is not set # CONFIG_TR is not set -# CONFIG_WLAN is not set + +# +# Wireless LAN +# +# CONFIG_WLAN_PRE80211 is not set +# CONFIG_WLAN_80211 is not set +# CONFIG_IWLWIFI_LEDS is not set # # Enable WiMAX (Networking options) to see the WiMAX drivers @@ -694,7 +653,6 @@ CONFIG_DEVKMEM=y # # Non-8250 serial port support # -# CONFIG_SERIAL_MAX3100 is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_TXX9=y @@ -708,9 +666,7 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_IPMI_HANDLER is not set -CONFIG_HW_RANDOM=m -# CONFIG_HW_RANDOM_TIMERIOMEM is not set -CONFIG_HW_RANDOM_TX4939=m +# CONFIG_HW_RANDOM is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set # CONFIG_RAW_DRIVER is not set @@ -730,10 +686,6 @@ CONFIG_SPI_TXX9=y # SPI Protocol Masters # # CONFIG_SPI_TLE62X0 is not set - -# -# PPS support -# CONFIG_ARCH_REQUIRE_GPIOLIB=y CONFIG_GPIOLIB=y @@ -749,22 +701,17 @@ CONFIG_GPIOLIB=y # PCI GPIO expanders: # # CONFIG_GPIO_BT8XX is not set -# CONFIG_GPIO_LANGWELL is not set # # SPI GPIO expanders: # # CONFIG_GPIO_MAX7301 is not set # CONFIG_GPIO_MCP23S08 is not set -# CONFIG_GPIO_MC33880 is not set - -# -# AC97 GPIO expanders: -# # CONFIG_W1 is not set # CONFIG_POWER_SUPPLY is not set # CONFIG_HWMON is not set # CONFIG_THERMAL is not set +# CONFIG_THERMAL_HWMON is not set CONFIG_WATCHDOG=y # CONFIG_WATCHDOG_NOWAYOUT is not set @@ -793,17 +740,28 @@ CONFIG_SSB_POSSIBLE=y # CONFIG_MFD_CORE is not set # CONFIG_MFD_SM501 is not set # CONFIG_HTC_PASIC3 is not set -# CONFIG_UCB1400_CORE is not set # CONFIG_MFD_TMIO is not set -# CONFIG_MFD_MC13783 is not set -# CONFIG_EZX_PCAP is not set # CONFIG_REGULATOR is not set -# CONFIG_MEDIA_SUPPORT is not set + +# +# Multimedia devices +# + +# +# Multimedia core support +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DVB_CORE is not set +# CONFIG_VIDEO_MEDIA is not set + +# +# Multimedia drivers +# +# CONFIG_DAB is not set # # Graphics support # -# CONFIG_VGA_ARB is not set # CONFIG_DRM is not set # CONFIG_VGASTATE is not set # CONFIG_VIDEO_OUTPUT_CONTROL is not set @@ -814,42 +772,7 @@ CONFIG_SSB_POSSIBLE=y # Display device support # # CONFIG_DISPLAY_SUPPORT is not set -CONFIG_SOUND=m -# CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -CONFIG_SND_VMASTER=y -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_AC97_CODEC=m -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_PCI is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_MIPS is not set -CONFIG_SND_SOC=m -CONFIG_SND_SOC_AC97_BUS=y -CONFIG_SND_SOC_TXX9ACLC=m -CONFIG_HAS_TXX9_ACLC=y -CONFIG_SND_SOC_TXX9ACLC_AC97=m -CONFIG_SND_SOC_TXX9ACLC_GENERIC=m -CONFIG_SND_SOC_I2C_AND_SPI=m -# CONFIG_SND_SOC_ALL_CODECS is not set -CONFIG_SND_SOC_AC97_CODEC=m -# CONFIG_SOUND_PRIME is not set -CONFIG_AC97_BUS=m +# CONFIG_SOUND is not set # CONFIG_USB_SUPPORT is not set # CONFIG_MMC is not set # CONFIG_MEMSTICK is not set @@ -860,8 +783,6 @@ CONFIG_LEDS_CLASS=y # LED drivers # CONFIG_LEDS_GPIO=y -CONFIG_LEDS_GPIO_PLATFORM=y -# CONFIG_LEDS_DAC124S085 is not set # # LED Triggers @@ -871,12 +792,7 @@ CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_IDE_DISK=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -# CONFIG_LEDS_TRIGGER_GPIO is not set # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set - -# -# iptables trigger is under Netfilter config (LED target) -# # CONFIG_ACCESSIBILITY is not set # CONFIG_INFINIBAND is not set CONFIG_RTC_LIB=y @@ -904,7 +820,6 @@ CONFIG_RTC_INTF_DEV_UIE_EMUL=y # CONFIG_RTC_DRV_R9701 is not set CONFIG_RTC_DRV_RS5C348=y # CONFIG_RTC_DRV_DS3234 is not set -# CONFIG_RTC_DRV_PCF2123 is not set # # Platform RTC drivers @@ -925,26 +840,8 @@ CONFIG_RTC_DRV_DS1742=y # on-CPU RTC drivers # CONFIG_RTC_DRV_TX4939=y -CONFIG_DMADEVICES=y - -# -# DMA Devices -# -CONFIG_TXX9_DMAC=m -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -# CONFIG_NET_DMA is not set -# CONFIG_ASYNC_TX_DMA is not set -# CONFIG_DMATEST is not set -# CONFIG_AUXDISPLAY is not set +# CONFIG_DMADEVICES is not set # CONFIG_UIO is not set - -# -# TI VLYNQ -# # CONFIG_STAGING is not set # @@ -956,10 +853,9 @@ CONFIG_DMA_ENGINE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y +CONFIG_FILE_LOCKING=y # CONFIG_XFS_FS is not set # CONFIG_OCFS2_FS is not set -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y # CONFIG_DNOTIFY is not set CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y @@ -969,10 +865,6 @@ CONFIG_INOTIFY_USER=y # CONFIG_FUSE_FS is not set CONFIG_GENERIC_ACL=y -# -# Caches -# - # # CD-ROM/DVD Filesystems # @@ -998,27 +890,7 @@ CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y # CONFIG_HUGETLB_PAGE is not set # CONFIG_CONFIGFS_FS is not set -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_HFSPLUS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_FS_WBUF_VERIFY is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -# CONFIG_JFFS2_LZO is not set -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set +# CONFIG_MISC_FILESYSTEMS is not set CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=y CONFIG_NFS_V3=y @@ -1050,7 +922,6 @@ CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_FRAME_WARN=1024 # CONFIG_MAGIC_SYSRQ is not set -CONFIG_STRIP_ASM_SYMS=y # CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_FS=y # CONFIG_HEADERS_CHECK is not set @@ -1058,9 +929,11 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_MEMORY_INIT is not set # CONFIG_RCU_CPU_STALL_DETECTOR is not set CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_TRACING_SUPPORT=y -# CONFIG_FTRACE is not set -# CONFIG_DYNAMIC_DEBUG is not set + +# +# Tracers +# +# CONFIG_DYNAMIC_PRINTK_DEBUG is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y CONFIG_CMDLINE="" @@ -1073,7 +946,6 @@ CONFIG_CMDLINE="" # CONFIG_SECURITYFS is not set # CONFIG_SECURITY_FILE_CAPABILITIES is not set # CONFIG_CRYPTO is not set -# CONFIG_BINARY_PRINTF is not set # # Library routines @@ -1087,10 +959,6 @@ CONFIG_GENERIC_FIND_LAST_BIT=y CONFIG_CRC32=y # CONFIG_CRC7 is not set # CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_DECOMPRESS_GZIP=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y -CONFIG_NLATTR=y diff --git a/trunk/arch/mips/include/asm/dma-mapping.h b/trunk/arch/mips/include/asm/dma-mapping.h index 664ba53dc32a..d16afddb09a9 100644 --- a/trunk/arch/mips/include/asm/dma-mapping.h +++ b/trunk/arch/mips/include/asm/dma-mapping.h @@ -3,7 +3,6 @@ #include #include -#include void *dma_alloc_noncoherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag); @@ -74,4 +73,14 @@ extern int dma_is_consistent(struct device *dev, dma_addr_t dma_addr); extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, enum dma_data_direction direction); +#if 0 +#define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY + +extern int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, + dma_addr_t device_addr, size_t size, int flags); +extern void dma_release_declared_memory(struct device *dev); +extern void * dma_mark_declared_memory_occupied(struct device *dev, + dma_addr_t device_addr, size_t size); +#endif + #endif /* _ASM_DMA_MAPPING_H */ diff --git a/trunk/arch/mips/kernel/cevt-smtc.c b/trunk/arch/mips/kernel/cevt-smtc.c index b102e4f1630e..98bd7de75778 100644 --- a/trunk/arch/mips/kernel/cevt-smtc.c +++ b/trunk/arch/mips/kernel/cevt-smtc.c @@ -173,12 +173,11 @@ void smtc_distribute_timer(int vpe) unsigned int mtflags; int cpu; struct clock_event_device *cd; - unsigned long nextstamp; + unsigned long nextstamp = 0L; unsigned long reference; repeat: - nextstamp = 0L; for_each_online_cpu(cpu) { /* * Find virtual CPUs within the current VPE who have diff --git a/trunk/arch/mips/math-emu/cp1emu.c b/trunk/arch/mips/math-emu/cp1emu.c index 454b53924490..890f77927d62 100644 --- a/trunk/arch/mips/math-emu/cp1emu.c +++ b/trunk/arch/mips/math-emu/cp1emu.c @@ -163,34 +163,33 @@ static int isBranchInstr(mips_instruction * i) /* * In the Linux kernel, we support selection of FPR format on the - * basis of the Status.FR bit. If an FPU is not present, the FR bit - * is hardwired to zero, which would imply a 32-bit FPU even for - * 64-bit CPUs. For 64-bit kernels with no FPU we use TIF_32BIT_REGS - * as a proxy for the FR bit so that a 64-bit FPU is emulated. In any - * case, for a 32-bit kernel which uses the O32 MIPS ABI, only the - * even FPRs are used (Status.FR = 0). + * basis of the Status.FR bit. This does imply that, if a full 32 + * FPRs are desired, there needs to be a flip-flop that can be written + * to one at that bit position. In any case, O32 MIPS ABI uses + * only the even FPRs (Status.FR = 0). */ -static inline int cop1_64bit(struct pt_regs *xcp) -{ - if (cpu_has_fpu) - return xcp->cp0_status & ST0_FR; -#ifdef CONFIG_64BIT - return !test_thread_flag(TIF_32BIT_REGS); + +#define CP0_STATUS_FR_SUPPORT + +#ifdef CP0_STATUS_FR_SUPPORT +#define FR_BIT ST0_FR #else - return 0; +#define FR_BIT 0 #endif -} - -#define SIFROMREG(si, x) ((si) = cop1_64bit(xcp) || !(x & 1) ? \ - (int)ctx->fpr[x] : (int)(ctx->fpr[x & ~1] >> 32)) -#define SITOREG(si, x) (ctx->fpr[x & ~(cop1_64bit(xcp) == 0)] = \ - cop1_64bit(xcp) || !(x & 1) ? \ +#define SIFROMREG(si, x) ((si) = \ + (xcp->cp0_status & FR_BIT) || !(x & 1) ? \ + (int)ctx->fpr[x] : \ + (int)(ctx->fpr[x & ~1] >> 32 )) +#define SITOREG(si, x) (ctx->fpr[x & ~((xcp->cp0_status & FR_BIT) == 0)] = \ + (xcp->cp0_status & FR_BIT) || !(x & 1) ? \ ctx->fpr[x & ~1] >> 32 << 32 | (u32)(si) : \ ctx->fpr[x & ~1] << 32 >> 32 | (u64)(si) << 32) -#define DIFROMREG(di, x) ((di) = ctx->fpr[x & ~(cop1_64bit(xcp) == 0)]) -#define DITOREG(di, x) (ctx->fpr[x & ~(cop1_64bit(xcp) == 0)] = (di)) +#define DIFROMREG(di, x) ((di) = \ + ctx->fpr[x & ~((xcp->cp0_status & FR_BIT) == 0)]) +#define DITOREG(di, x) (ctx->fpr[x & ~((xcp->cp0_status & FR_BIT) == 0)] \ + = (di)) #define SPFROMREG(sp, x) SIFROMREG((sp).bits, x) #define SPTOREG(sp, x) SITOREG((sp).bits, x) diff --git a/trunk/arch/mips/mm/dma-default.c b/trunk/arch/mips/mm/dma-default.c index 9367e33fbd18..7e48e76148aa 100644 --- a/trunk/arch/mips/mm/dma-default.c +++ b/trunk/arch/mips/mm/dma-default.c @@ -90,9 +90,6 @@ void *dma_alloc_coherent(struct device *dev, size_t size, { void *ret; - if (dma_alloc_from_coherent(dev, size, dma_handle, &ret)) - return ret; - gfp = massage_gfp_flags(dev, gfp); ret = (void *) __get_free_pages(gfp, get_order(size)); @@ -125,10 +122,6 @@ void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle) { unsigned long addr = (unsigned long) vaddr; - int order = get_order(size); - - if (dma_release_from_coherent(dev, order, vaddr)) - return; plat_unmap_dma_mem(dev, dma_handle, size, DMA_BIDIRECTIONAL); diff --git a/trunk/arch/mips/mti-malta/malta-memory.c b/trunk/arch/mips/mti-malta/malta-memory.c index 9035c64bc5ed..61888ff72c87 100644 --- a/trunk/arch/mips/mti-malta/malta-memory.c +++ b/trunk/arch/mips/mti-malta/malta-memory.c @@ -54,8 +54,7 @@ static struct prom_pmemblock * __init prom_getmdesc(void) { char *memsize_str; unsigned int memsize; - char *ptr; - static char cmdline[CL_SIZE] __initdata; + char cmdline[CL_SIZE], *ptr; /* otherwise look in the environment */ memsize_str = prom_getenv("memsize"); diff --git a/trunk/arch/mips/rb532/prom.c b/trunk/arch/mips/rb532/prom.c index ad5bd1097974..46ca24dbcc2d 100644 --- a/trunk/arch/mips/rb532/prom.c +++ b/trunk/arch/mips/rb532/prom.c @@ -69,7 +69,7 @@ static inline unsigned long tag2ul(char *arg, const char *tag) void __init prom_setup_cmdline(void) { - static char cmd_line[CL_SIZE] __initdata; + char cmd_line[CL_SIZE]; char *cp, *board; int prom_argc; char **prom_argv, **prom_envp; diff --git a/trunk/arch/mips/txx9/generic/setup.c b/trunk/arch/mips/txx9/generic/setup.c index d66802edebb2..e10184c1b3e1 100644 --- a/trunk/arch/mips/txx9/generic/setup.c +++ b/trunk/arch/mips/txx9/generic/setup.c @@ -160,7 +160,7 @@ static void __init prom_init_cmdline(void) int argc; int *argv32; int i; /* Always ignore the "-c" at argv[0] */ - static char builtin[CL_SIZE] __initdata; + char builtin[CL_SIZE]; if (fw_arg0 >= CKSEG0 || fw_arg1 < CKSEG0) { /* @@ -315,7 +315,7 @@ static inline void txx9_cache_fixup(void) static void __init preprocess_cmdline(void) { - static char cmdline[CL_SIZE] __initdata; + char cmdline[CL_SIZE]; char *s; strcpy(cmdline, arcs_cmdline); diff --git a/trunk/arch/parisc/include/asm/fcntl.h b/trunk/arch/parisc/include/asm/fcntl.h index 1e1c824764ee..5f39d5597ced 100644 --- a/trunk/arch/parisc/include/asm/fcntl.h +++ b/trunk/arch/parisc/include/asm/fcntl.h @@ -28,6 +28,8 @@ #define F_SETOWN 12 /* for sockets. */ #define F_SETSIG 13 /* for sockets. */ #define F_GETSIG 14 /* for sockets. */ +#define F_GETOWN_EX 15 +#define F_SETOWN_EX 16 /* for posix fcntl() and lockf() */ #define F_RDLCK 01 diff --git a/trunk/arch/powerpc/boot/addRamDisk.c b/trunk/arch/powerpc/boot/addRamDisk.c index 893f446cbd22..c02a99952be7 100644 --- a/trunk/arch/powerpc/boot/addRamDisk.c +++ b/trunk/arch/powerpc/boot/addRamDisk.c @@ -58,7 +58,7 @@ static int check_elf64(void *p, int size, struct addr_range *r) return 64; } -static void get4k(FILE *file, char *buf ) +void get4k(FILE *file, char *buf ) { unsigned j; unsigned num = fread(buf, 1, 4096, file); @@ -66,12 +66,12 @@ static void get4k(FILE *file, char *buf ) buf[j] = 0; } -static void put4k(FILE *file, char *buf ) +void put4k(FILE *file, char *buf ) { fwrite(buf, 1, 4096, file); } -static void death(const char *msg, FILE *fdesc, const char *fname) +void death(const char *msg, FILE *fdesc, const char *fname) { fprintf(stderr, msg); fclose(fdesc); diff --git a/trunk/arch/s390/kernel/early.c b/trunk/arch/s390/kernel/early.c index e49e9e0c69fd..bf8b4ae7ff2d 100644 --- a/trunk/arch/s390/kernel/early.c +++ b/trunk/arch/s390/kernel/early.c @@ -55,7 +55,6 @@ static void __init reset_tod_clock(void) disabled_wait(0); sched_clock_base_cc = TOD_UNIX_EPOCH; - S390_lowcore.last_update_clock = sched_clock_base_cc; } #ifdef CONFIG_SHARED_KERNEL @@ -168,14 +167,6 @@ static noinline __init void create_kernel_nss(void) return; } - /* re-initialize cputime accounting. */ - sched_clock_base_cc = get_clock(); - S390_lowcore.last_update_clock = sched_clock_base_cc; - S390_lowcore.last_update_timer = 0x7fffffffffffffffULL; - S390_lowcore.user_timer = 0; - S390_lowcore.system_timer = 0; - asm volatile("SPT 0(%0)" : : "a" (&S390_lowcore.last_update_timer)); - /* re-setup boot command line with new ipl vm parms */ ipl_update_parameters(); setup_boot_command_line(); diff --git a/trunk/arch/s390/kernel/entry.S b/trunk/arch/s390/kernel/entry.S index 48215d15762b..f43d2ee54464 100644 --- a/trunk/arch/s390/kernel/entry.S +++ b/trunk/arch/s390/kernel/entry.S @@ -565,10 +565,10 @@ pgm_svcper: lh %r7,0x8a # get svc number from lowcore l %r9,__LC_THREAD_INFO # load pointer to thread_info struct TRACE_IRQS_OFF - l %r8,__TI_task(%r9) - mvc __THREAD_per+__PER_atmid(2,%r8),__LC_PER_ATMID - mvc __THREAD_per+__PER_address(4,%r8),__LC_PER_ADDRESS - mvc __THREAD_per+__PER_access_id(1,%r8),__LC_PER_ACCESS_ID + l %r1,__TI_task(%r9) + mvc __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID + mvc __THREAD_per+__PER_address(4,%r1),__LC_PER_ADDRESS + mvc __THREAD_per+__PER_access_id(1,%r1),__LC_PER_ACCESS_ID oi __TI_flags+3(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP TRACE_IRQS_ON stosm __SF_EMPTY(%r15),0x03 # reenable interrupts diff --git a/trunk/arch/s390/kernel/entry64.S b/trunk/arch/s390/kernel/entry64.S index 9aff1d449b6e..a6f7b20df616 100644 --- a/trunk/arch/s390/kernel/entry64.S +++ b/trunk/arch/s390/kernel/entry64.S @@ -543,10 +543,10 @@ pgm_svcper: mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct - lg %r8,__TI_task(%r9) - mvc __THREAD_per+__PER_atmid(2,%r8),__LC_PER_ATMID - mvc __THREAD_per+__PER_address(8,%r8),__LC_PER_ADDRESS - mvc __THREAD_per+__PER_access_id(1,%r8),__LC_PER_ACCESS_ID + lg %r1,__TI_task(%r9) + mvc __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID + mvc __THREAD_per+__PER_address(8,%r1),__LC_PER_ADDRESS + mvc __THREAD_per+__PER_access_id(1,%r1),__LC_PER_ACCESS_ID oi __TI_flags+7(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP TRACE_IRQS_ON stosm __SF_EMPTY(%r15),0x03 # reenable interrupts diff --git a/trunk/arch/sparc/boot/btfixupprep.c b/trunk/arch/sparc/boot/btfixupprep.c index bbf91b9c3d39..52a4208fe4f0 100644 --- a/trunk/arch/sparc/boot/btfixupprep.c +++ b/trunk/arch/sparc/boot/btfixupprep.c @@ -61,14 +61,14 @@ unsigned long lastfoffset = -1; unsigned long lastfrelno; btfixup *lastf; -static void fatal(void) __attribute__((noreturn)); -static void fatal(void) +void fatal(void) __attribute__((noreturn)); +void fatal(void) { fprintf(stderr, "Malformed output from objdump\n%s\n", buffer); exit(1); } -static btfixup *find(int type, char *name) +btfixup *find(int type, char *name) { int i; for (i = 0; i < last; i++) { @@ -88,7 +88,7 @@ static btfixup *find(int type, char *name) return array + last - 1; } -static void set_mode (char *buffer) +void set_mode (char *buffer) { for (mode = 0;; mode++) if (buffer[mode] < '0' || buffer[mode] > '9') diff --git a/trunk/arch/sparc/boot/piggyback_32.c b/trunk/arch/sparc/boot/piggyback_32.c index ac944aec7301..e8dc9adfcd61 100644 --- a/trunk/arch/sparc/boot/piggyback_32.c +++ b/trunk/arch/sparc/boot/piggyback_32.c @@ -35,17 +35,17 @@ * as PROM looks for a.out image only. */ -static unsigned short ld2(char *p) +unsigned short ld2(char *p) { return (p[0] << 8) | p[1]; } -static unsigned int ld4(char *p) +unsigned int ld4(char *p) { return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; } -static void st4(char *p, unsigned int x) +void st4(char *p, unsigned int x) { p[0] = x >> 24; p[1] = x >> 16; @@ -53,7 +53,7 @@ static void st4(char *p, unsigned int x) p[3] = x; } -static void usage(void) +void usage(void) { /* fs_img.gz is an image of initial ramdisk. */ fprintf(stderr, "Usage: piggyback vmlinux.aout System.map fs_img.gz\n"); @@ -61,7 +61,7 @@ static void usage(void) exit(1); } -static void die(char *str) +void die(char *str) { perror (str); exit(1); diff --git a/trunk/arch/sparc/boot/piggyback_64.c b/trunk/arch/sparc/boot/piggyback_64.c index a26a686cb5aa..c63fd1b6bdd4 100644 --- a/trunk/arch/sparc/boot/piggyback_64.c +++ b/trunk/arch/sparc/boot/piggyback_64.c @@ -32,7 +32,7 @@ /* Note: run this on an a.out kernel (use elftoaout for it), as PROM looks for a.out image onlly usage: piggyback vmlinux System.map tail, where tail is gzipped fs of the initial ramdisk */ -static void die(char *str) +void die(char *str) { perror (str); exit(1); diff --git a/trunk/drivers/bluetooth/btusb.c b/trunk/drivers/bluetooth/btusb.c index 44bc8bbabf54..2fb38027f3bb 100644 --- a/trunk/drivers/bluetooth/btusb.c +++ b/trunk/drivers/bluetooth/btusb.c @@ -600,13 +600,11 @@ static int btusb_close(struct hci_dev *hdev) btusb_stop_traffic(data); err = usb_autopm_get_interface(data->intf); if (err < 0) - goto failed; + return 0; data->intf->needs_remote_wakeup = 0; usb_autopm_put_interface(data->intf); -failed: - usb_scuttle_anchored_urbs(&data->deferred); return 0; } diff --git a/trunk/drivers/char/tty_port.c b/trunk/drivers/char/tty_port.c index 2e8552dc5eda..a4bbb28f10be 100644 --- a/trunk/drivers/char/tty_port.c +++ b/trunk/drivers/char/tty_port.c @@ -221,9 +221,6 @@ int tty_port_block_til_ready(struct tty_port *port, the port has just hung up or is in another error state */ if ((filp->f_flags & O_NONBLOCK) || (tty->flags & (1 << TTY_IO_ERROR))) { - /* Indicate we are open */ - if (tty->termios->c_cflag & CBAUD) - tty_port_raise_dtr_rts(port); port->flags |= ASYNC_NORMAL_ACTIVE; return 0; } diff --git a/trunk/drivers/gpu/drm/radeon/mkregtable.c b/trunk/drivers/gpu/drm/radeon/mkregtable.c index 0d79577c1576..fb211e585dea 100644 --- a/trunk/drivers/gpu/drm/radeon/mkregtable.c +++ b/trunk/drivers/gpu/drm/radeon/mkregtable.c @@ -561,7 +561,7 @@ struct table { char *gpu_prefix; }; -static struct offset *offset_new(unsigned o) +struct offset *offset_new(unsigned o) { struct offset *offset; @@ -573,12 +573,12 @@ static struct offset *offset_new(unsigned o) return offset; } -static void table_offset_add(struct table *t, struct offset *offset) +void table_offset_add(struct table *t, struct offset *offset) { list_add_tail(&offset->list, &t->offsets); } -static void table_init(struct table *t) +void table_init(struct table *t) { INIT_LIST_HEAD(&t->offsets); t->offset_max = 0; @@ -586,7 +586,7 @@ static void table_init(struct table *t) t->table = NULL; } -static void table_print(struct table *t) +void table_print(struct table *t) { unsigned nlloop, i, j, n, c, id; @@ -611,7 +611,7 @@ static void table_print(struct table *t) printf("};\n"); } -static int table_build(struct table *t) +int table_build(struct table *t) { struct offset *offset; unsigned i, m; @@ -631,7 +631,7 @@ static int table_build(struct table *t) } static char gpu_name[10]; -static int parser_auth(struct table *t, const char *filename) +int parser_auth(struct table *t, const char *filename) { FILE *file; regex_t mask_rex; diff --git a/trunk/drivers/hwmon/adt7475.c b/trunk/drivers/hwmon/adt7475.c index b5a95193c694..d39877a7da63 100644 --- a/trunk/drivers/hwmon/adt7475.c +++ b/trunk/drivers/hwmon/adt7475.c @@ -350,7 +350,8 @@ static ssize_t show_temp(struct device *dev, struct device_attribute *attr, case FAULT: /* Note - only for remote1 and remote2 */ - out = !!(data->alarms & (sattr->index ? 0x8000 : 0x4000)); + out = data->alarms & (sattr->index ? 0x8000 : 0x4000); + out = out ? 0 : 1; break; default: @@ -862,7 +863,7 @@ static SENSOR_DEVICE_ATTR_2(pwm1_freq, S_IRUGO | S_IWUSR, show_pwmfreq, set_pwmfreq, INPUT, 0); static SENSOR_DEVICE_ATTR_2(pwm1_enable, S_IRUGO | S_IWUSR, show_pwmctrl, set_pwmctrl, INPUT, 0); -static SENSOR_DEVICE_ATTR_2(pwm1_auto_channels_temp, S_IRUGO | S_IWUSR, +static SENSOR_DEVICE_ATTR_2(pwm1_auto_channel_temp, S_IRUGO | S_IWUSR, show_pwmchan, set_pwmchan, INPUT, 0); static SENSOR_DEVICE_ATTR_2(pwm1_auto_point1_pwm, S_IRUGO | S_IWUSR, show_pwm, set_pwm, MIN, 0); @@ -874,7 +875,7 @@ static SENSOR_DEVICE_ATTR_2(pwm2_freq, S_IRUGO | S_IWUSR, show_pwmfreq, set_pwmfreq, INPUT, 1); static SENSOR_DEVICE_ATTR_2(pwm2_enable, S_IRUGO | S_IWUSR, show_pwmctrl, set_pwmctrl, INPUT, 1); -static SENSOR_DEVICE_ATTR_2(pwm2_auto_channels_temp, S_IRUGO | S_IWUSR, +static SENSOR_DEVICE_ATTR_2(pwm2_auto_channel_temp, S_IRUGO | S_IWUSR, show_pwmchan, set_pwmchan, INPUT, 1); static SENSOR_DEVICE_ATTR_2(pwm2_auto_point1_pwm, S_IRUGO | S_IWUSR, show_pwm, set_pwm, MIN, 1); @@ -886,7 +887,7 @@ static SENSOR_DEVICE_ATTR_2(pwm3_freq, S_IRUGO | S_IWUSR, show_pwmfreq, set_pwmfreq, INPUT, 2); static SENSOR_DEVICE_ATTR_2(pwm3_enable, S_IRUGO | S_IWUSR, show_pwmctrl, set_pwmctrl, INPUT, 2); -static SENSOR_DEVICE_ATTR_2(pwm3_auto_channels_temp, S_IRUGO | S_IWUSR, +static SENSOR_DEVICE_ATTR_2(pwm3_auto_channel_temp, S_IRUGO | S_IWUSR, show_pwmchan, set_pwmchan, INPUT, 2); static SENSOR_DEVICE_ATTR_2(pwm3_auto_point1_pwm, S_IRUGO | S_IWUSR, show_pwm, set_pwm, MIN, 2); @@ -946,19 +947,19 @@ static struct attribute *adt7475_attrs[] = { &sensor_dev_attr_pwm1.dev_attr.attr, &sensor_dev_attr_pwm1_freq.dev_attr.attr, &sensor_dev_attr_pwm1_enable.dev_attr.attr, - &sensor_dev_attr_pwm1_auto_channels_temp.dev_attr.attr, + &sensor_dev_attr_pwm1_auto_channel_temp.dev_attr.attr, &sensor_dev_attr_pwm1_auto_point1_pwm.dev_attr.attr, &sensor_dev_attr_pwm1_auto_point2_pwm.dev_attr.attr, &sensor_dev_attr_pwm2.dev_attr.attr, &sensor_dev_attr_pwm2_freq.dev_attr.attr, &sensor_dev_attr_pwm2_enable.dev_attr.attr, - &sensor_dev_attr_pwm2_auto_channels_temp.dev_attr.attr, + &sensor_dev_attr_pwm2_auto_channel_temp.dev_attr.attr, &sensor_dev_attr_pwm2_auto_point1_pwm.dev_attr.attr, &sensor_dev_attr_pwm2_auto_point2_pwm.dev_attr.attr, &sensor_dev_attr_pwm3.dev_attr.attr, &sensor_dev_attr_pwm3_freq.dev_attr.attr, &sensor_dev_attr_pwm3_enable.dev_attr.attr, - &sensor_dev_attr_pwm3_auto_channels_temp.dev_attr.attr, + &sensor_dev_attr_pwm3_auto_channel_temp.dev_attr.attr, &sensor_dev_attr_pwm3_auto_point1_pwm.dev_attr.attr, &sensor_dev_attr_pwm3_auto_point2_pwm.dev_attr.attr, NULL, @@ -1151,7 +1152,7 @@ static struct adt7475_data *adt7475_update_device(struct device *dev) } /* Limits and settings, should never change update every 60 seconds */ - if (time_after(jiffies, data->limits_updated + HZ * 60) || + if (time_after(jiffies, data->limits_updated + HZ * 2) || !data->valid) { data->config5 = adt7475_read(REG_CONFIG5); diff --git a/trunk/drivers/hwmon/s3c-hwmon.c b/trunk/drivers/hwmon/s3c-hwmon.c index 71835412529f..3a524f2fe493 100644 --- a/trunk/drivers/hwmon/s3c-hwmon.c +++ b/trunk/drivers/hwmon/s3c-hwmon.c @@ -323,21 +323,14 @@ static int __devinit s3c_hwmon_probe(struct platform_device *dev) } for (i = 0; i < ARRAY_SIZE(pdata->in); i++) { - struct s3c24xx_adc_hwmon_incfg *cfg = pdata->in[i]; - - if (!cfg) + if (!pdata->in[i]) continue; - if (cfg->mult >= 0x10000) + if (pdata->in[i]->mult >= 0x10000) dev_warn(&dev->dev, "channel %d multiplier too large\n", i); - if (cfg->divider == 0) { - dev_err(&dev->dev, "channel %d divider zero\n", i); - continue; - } - ret = s3c_hwmon_create_attr(&dev->dev, pdata->in[i], &hwmon->attrs[i], i); if (ret) { diff --git a/trunk/drivers/input/ff-core.c b/trunk/drivers/input/ff-core.c index 38df81fcdc3a..72c63e5dd630 100644 --- a/trunk/drivers/input/ff-core.c +++ b/trunk/drivers/input/ff-core.c @@ -337,16 +337,16 @@ int input_ff_create(struct input_dev *dev, int max_effects) dev->ff = ff; dev->flush = flush_effects; dev->event = input_ff_event; - __set_bit(EV_FF, dev->evbit); + set_bit(EV_FF, dev->evbit); /* Copy "true" bits into ff device bitmap */ for (i = 0; i <= FF_MAX; i++) if (test_bit(i, dev->ffbit)) - __set_bit(i, ff->ffbit); + set_bit(i, ff->ffbit); /* we can emulate RUMBLE with periodic effects */ if (test_bit(FF_PERIODIC, ff->ffbit)) - __set_bit(FF_RUMBLE, dev->ffbit); + set_bit(FF_RUMBLE, dev->ffbit); return 0; } @@ -362,14 +362,12 @@ EXPORT_SYMBOL_GPL(input_ff_create); */ void input_ff_destroy(struct input_dev *dev) { - struct ff_device *ff = dev->ff; - - __clear_bit(EV_FF, dev->evbit); - if (ff) { - if (ff->destroy) - ff->destroy(ff); - kfree(ff->private); - kfree(ff); + clear_bit(EV_FF, dev->evbit); + if (dev->ff) { + if (dev->ff->destroy) + dev->ff->destroy(dev->ff); + kfree(dev->ff->private); + kfree(dev->ff); dev->ff = NULL; } } diff --git a/trunk/drivers/input/ff-memless.c b/trunk/drivers/input/ff-memless.c index b483b2995fa9..2d1415e16834 100644 --- a/trunk/drivers/input/ff-memless.c +++ b/trunk/drivers/input/ff-memless.c @@ -61,6 +61,7 @@ struct ml_device { struct ml_effect_state states[FF_MEMLESS_EFFECTS]; int gain; struct timer_list timer; + spinlock_t timer_lock; struct input_dev *dev; int (*play_effect)(struct input_dev *dev, void *data, @@ -367,38 +368,38 @@ static void ml_effect_timer(unsigned long timer_data) { struct input_dev *dev = (struct input_dev *)timer_data; struct ml_device *ml = dev->ff->private; - unsigned long flags; debug("timer: updating effects"); - spin_lock_irqsave(&dev->event_lock, flags); + spin_lock(&ml->timer_lock); ml_play_effects(ml); - spin_unlock_irqrestore(&dev->event_lock, flags); + spin_unlock(&ml->timer_lock); } -/* - * Sets requested gain for FF effects. Called with dev->event_lock held. - */ static void ml_ff_set_gain(struct input_dev *dev, u16 gain) { struct ml_device *ml = dev->ff->private; int i; + spin_lock_bh(&ml->timer_lock); + ml->gain = gain; for (i = 0; i < FF_MEMLESS_EFFECTS; i++) __clear_bit(FF_EFFECT_PLAYING, &ml->states[i].flags); ml_play_effects(ml); + + spin_unlock_bh(&ml->timer_lock); } -/* - * Start/stop specified FF effect. Called with dev->event_lock held. - */ static int ml_ff_playback(struct input_dev *dev, int effect_id, int value) { struct ml_device *ml = dev->ff->private; struct ml_effect_state *state = &ml->states[effect_id]; + unsigned long flags; + + spin_lock_irqsave(&ml->timer_lock, flags); if (value > 0) { debug("initiated play"); @@ -424,6 +425,8 @@ static int ml_ff_playback(struct input_dev *dev, int effect_id, int value) ml_play_effects(ml); } + spin_unlock_irqrestore(&ml->timer_lock, flags); + return 0; } @@ -433,7 +436,7 @@ static int ml_ff_upload(struct input_dev *dev, struct ml_device *ml = dev->ff->private; struct ml_effect_state *state = &ml->states[effect->id]; - spin_lock_irq(&dev->event_lock); + spin_lock_bh(&ml->timer_lock); if (test_bit(FF_EFFECT_STARTED, &state->flags)) { __clear_bit(FF_EFFECT_PLAYING, &state->flags); @@ -445,7 +448,7 @@ static int ml_ff_upload(struct input_dev *dev, ml_schedule_timer(ml); } - spin_unlock_irq(&dev->event_lock); + spin_unlock_bh(&ml->timer_lock); return 0; } @@ -479,6 +482,7 @@ int input_ff_create_memless(struct input_dev *dev, void *data, ml->private = data; ml->play_effect = play_effect; ml->gain = 0xffff; + spin_lock_init(&ml->timer_lock); setup_timer(&ml->timer, ml_effect_timer, (unsigned long)dev); set_bit(FF_GAIN, dev->ffbit); diff --git a/trunk/drivers/input/input.c b/trunk/drivers/input/input.c index 2266ecbfbc01..cc763c96fada 100644 --- a/trunk/drivers/input/input.c +++ b/trunk/drivers/input/input.c @@ -1292,24 +1292,17 @@ static int input_dev_uevent(struct device *device, struct kobj_uevent_env *env) return 0; } -#define INPUT_DO_TOGGLE(dev, type, bits, on) \ - do { \ - int i; \ - bool active; \ - \ - if (!test_bit(EV_##type, dev->evbit)) \ - break; \ - \ - for (i = 0; i < type##_MAX; i++) { \ - if (!test_bit(i, dev->bits##bit)) \ - continue; \ - \ - active = test_bit(i, dev->bits); \ - if (!active && !on) \ - continue; \ - \ - dev->event(dev, EV_##type, i, on ? active : 0); \ - } \ +#define INPUT_DO_TOGGLE(dev, type, bits, on) \ + do { \ + int i; \ + if (!test_bit(EV_##type, dev->evbit)) \ + break; \ + for (i = 0; i < type##_MAX; i++) { \ + if (!test_bit(i, dev->bits##bit) || \ + !test_bit(i, dev->bits)) \ + continue; \ + dev->event(dev, EV_##type, i, on); \ + } \ } while (0) #ifdef CONFIG_PM diff --git a/trunk/drivers/input/keyboard/atkbd.c b/trunk/drivers/input/keyboard/atkbd.c index 28e6110d1ff8..4452eabbee6d 100644 --- a/trunk/drivers/input/keyboard/atkbd.c +++ b/trunk/drivers/input/keyboard/atkbd.c @@ -1174,18 +1174,6 @@ static int atkbd_reconnect(struct serio *serio) return -1; atkbd_activate(atkbd); - - /* - * Restore LED state and repeat rate. While input core - * will do this for us at resume time reconnect may happen - * because user requested it via sysfs or simply because - * keyboard was unplugged and plugged in again so we need - * to do it ourselves here. - */ - atkbd_set_leds(atkbd); - if (!atkbd->softrepeat) - atkbd_set_repeat_rate(atkbd); - } atkbd_enable(atkbd); @@ -1434,7 +1422,6 @@ static ssize_t atkbd_set_set(struct atkbd *atkbd, const char *buf, size_t count) atkbd->dev = new_dev; atkbd->set = atkbd_select_set(atkbd, value, atkbd->extra); - atkbd_reset_state(atkbd); atkbd_activate(atkbd); atkbd_set_keycode_table(atkbd); atkbd_set_device_attrs(atkbd); diff --git a/trunk/drivers/input/mouse/lifebook.c b/trunk/drivers/input/mouse/lifebook.c index 82811558ec33..5e6308694408 100644 --- a/trunk/drivers/input/mouse/lifebook.c +++ b/trunk/drivers/input/mouse/lifebook.c @@ -107,7 +107,8 @@ static const struct dmi_system_id lifebook_dmi_table[] = { .matches = { DMI_MATCH(DMI_PRODUCT_NAME, "CF-72"), }, - .callback = lifebook_set_6byte_proto, + .callback = lifebook_set_serio_phys, + .driver_data = "isa0060/serio3", }, { .ident = "Lifebook B142", diff --git a/trunk/drivers/input/mouse/psmouse-base.c b/trunk/drivers/input/mouse/psmouse-base.c index 07c53798301a..690aed905436 100644 --- a/trunk/drivers/input/mouse/psmouse-base.c +++ b/trunk/drivers/input/mouse/psmouse-base.c @@ -581,7 +581,7 @@ static int cortron_detect(struct psmouse *psmouse, bool set_properties) static int psmouse_extensions(struct psmouse *psmouse, unsigned int max_proto, bool set_properties) { - bool synaptics_hardware = false; + bool synaptics_hardware = true; /* * We always check for lifebook because it does not disturb mouse @@ -1673,7 +1673,7 @@ static int psmouse_get_maxproto(char *buffer, struct kernel_param *kp) { int type = *((unsigned int *)kp->arg); - return sprintf(buffer, "%s", psmouse_protocol_by_type(type)->name); + return sprintf(buffer, "%s\n", psmouse_protocol_by_type(type)->name); } static int __init psmouse_init(void) diff --git a/trunk/drivers/leds/leds-gpio.c b/trunk/drivers/leds/leds-gpio.c index e5225d28f392..7467980b8cf9 100644 --- a/trunk/drivers/leds/leds-gpio.c +++ b/trunk/drivers/leds/leds-gpio.c @@ -78,8 +78,6 @@ static int __devinit create_gpio_led(const struct gpio_led *template, { int ret, state; - led_dat->gpio = -1; - /* skip leds that aren't available */ if (!gpio_is_valid(template->gpio)) { printk(KERN_INFO "Skipping unavailable LED gpio %d (%s)\n", diff --git a/trunk/drivers/md/md.c b/trunk/drivers/md/md.c index b182f86a19dd..e64c971038d1 100644 --- a/trunk/drivers/md/md.c +++ b/trunk/drivers/md/md.c @@ -944,14 +944,6 @@ static int super_90_validate(mddev_t *mddev, mdk_rdev_t *rdev) desc->raid_disk < mddev->raid_disks */) { set_bit(In_sync, &rdev->flags); rdev->raid_disk = desc->raid_disk; - } else if (desc->state & (1<minor_version >= 91) { - rdev->recovery_offset = 0; - rdev->raid_disk = desc->raid_disk; - } } if (desc->state & (1<flags); @@ -1040,19 +1032,8 @@ static void super_90_sync(mddev_t *mddev, mdk_rdev_t *rdev) list_for_each_entry(rdev2, &mddev->disks, same_set) { mdp_disk_t *d; int desc_nr; - int is_active = test_bit(In_sync, &rdev2->flags); - - if (rdev2->raid_disk >= 0 && - sb->minor_version >= 91) - /* we have nowhere to store the recovery_offset, - * but if it is not below the reshape_position, - * we can piggy-back on that. - */ - is_active = 1; - if (rdev2->raid_disk < 0 || - test_bit(Faulty, &rdev2->flags)) - is_active = 0; - if (is_active) + if (rdev2->raid_disk >= 0 && test_bit(In_sync, &rdev2->flags) + && !test_bit(Faulty, &rdev2->flags)) desc_nr = rdev2->raid_disk; else desc_nr = next_spare++; @@ -1062,16 +1043,16 @@ static void super_90_sync(mddev_t *mddev, mdk_rdev_t *rdev) d->number = rdev2->desc_nr; d->major = MAJOR(rdev2->bdev->bd_dev); d->minor = MINOR(rdev2->bdev->bd_dev); - if (is_active) + if (rdev2->raid_disk >= 0 && test_bit(In_sync, &rdev2->flags) + && !test_bit(Faulty, &rdev2->flags)) d->raid_disk = rdev2->raid_disk; else d->raid_disk = rdev2->desc_nr; /* compatibility */ if (test_bit(Faulty, &rdev2->flags)) d->state = (1<flags)) { d->state = (1<flags)) - d->state |= (1<state |= (1<raid_disk >= 0 && !test_bit(In_sync, &rdev->flags)) { + if (mddev->curr_resync_completed > rdev->recovery_offset) + rdev->recovery_offset = mddev->curr_resync_completed; if (rdev->recovery_offset > 0) { sb->feature_map |= cpu_to_le32(MD_FEATURE_RECOVERY_OFFSET); @@ -1934,14 +1917,6 @@ static void sync_sbs(mddev_t * mddev, int nospares) */ mdk_rdev_t *rdev; - /* First make sure individual recovery_offsets are correct */ - list_for_each_entry(rdev, &mddev->disks, same_set) { - if (rdev->raid_disk >= 0 && - !test_bit(In_sync, &rdev->flags) && - mddev->curr_resync_completed > rdev->recovery_offset) - rdev->recovery_offset = mddev->curr_resync_completed; - - } list_for_each_entry(rdev, &mddev->disks, same_set) { if (rdev->sb_events == mddev->events || (nospares && diff --git a/trunk/drivers/md/raid5.c b/trunk/drivers/md/raid5.c index d29215d966da..dcce204b6c73 100644 --- a/trunk/drivers/md/raid5.c +++ b/trunk/drivers/md/raid5.c @@ -4823,40 +4823,11 @@ static raid5_conf_t *setup_conf(mddev_t *mddev) return ERR_PTR(-ENOMEM); } - -static int only_parity(int raid_disk, int algo, int raid_disks, int max_degraded) -{ - switch (algo) { - case ALGORITHM_PARITY_0: - if (raid_disk < max_degraded) - return 1; - break; - case ALGORITHM_PARITY_N: - if (raid_disk >= raid_disks - max_degraded) - return 1; - break; - case ALGORITHM_PARITY_0_6: - if (raid_disk == 0 || - raid_disk == raid_disks - 1) - return 1; - break; - case ALGORITHM_LEFT_ASYMMETRIC_6: - case ALGORITHM_RIGHT_ASYMMETRIC_6: - case ALGORITHM_LEFT_SYMMETRIC_6: - case ALGORITHM_RIGHT_SYMMETRIC_6: - if (raid_disk == raid_disks - 1) - return 1; - } - return 0; -} - static int run(mddev_t *mddev) { raid5_conf_t *conf; int working_disks = 0, chunk_size; - int dirty_parity_disks = 0; mdk_rdev_t *rdev; - sector_t reshape_offset = 0; if (mddev->recovery_cp != MaxSector) printk(KERN_NOTICE "raid5: %s is not clean" @@ -4890,7 +4861,6 @@ static int run(mddev_t *mddev) "on a stripe boundary\n"); return -EINVAL; } - reshape_offset = here_new * mddev->new_chunk_sectors; /* here_new is the stripe we will write to */ here_old = mddev->reshape_position; sector_div(here_old, mddev->chunk_sectors * @@ -4946,51 +4916,10 @@ static int run(mddev_t *mddev) /* * 0 for a fully functional array, 1 or 2 for a degraded array. */ - list_for_each_entry(rdev, &mddev->disks, same_set) { - if (rdev->raid_disk < 0) - continue; - if (test_bit(In_sync, &rdev->flags)) + list_for_each_entry(rdev, &mddev->disks, same_set) + if (rdev->raid_disk >= 0 && + test_bit(In_sync, &rdev->flags)) working_disks++; - /* This disc is not fully in-sync. However if it - * just stored parity (beyond the recovery_offset), - * when we don't need to be concerned about the - * array being dirty. - * When reshape goes 'backwards', we never have - * partially completed devices, so we only need - * to worry about reshape going forwards. - */ - /* Hack because v0.91 doesn't store recovery_offset properly. */ - if (mddev->major_version == 0 && - mddev->minor_version > 90) - rdev->recovery_offset = reshape_offset; - - printk("%d: w=%d pa=%d pr=%d m=%d a=%d r=%d op1=%d op2=%d\n", - rdev->raid_disk, working_disks, conf->prev_algo, - conf->previous_raid_disks, conf->max_degraded, - conf->algorithm, conf->raid_disks, - only_parity(rdev->raid_disk, - conf->prev_algo, - conf->previous_raid_disks, - conf->max_degraded), - only_parity(rdev->raid_disk, - conf->algorithm, - conf->raid_disks, - conf->max_degraded)); - if (rdev->recovery_offset < reshape_offset) { - /* We need to check old and new layout */ - if (!only_parity(rdev->raid_disk, - conf->algorithm, - conf->raid_disks, - conf->max_degraded)) - continue; - } - if (!only_parity(rdev->raid_disk, - conf->prev_algo, - conf->previous_raid_disks, - conf->max_degraded)) - continue; - dirty_parity_disks++; - } mddev->degraded = (max(conf->raid_disks, conf->previous_raid_disks) - working_disks); @@ -5006,7 +4935,7 @@ static int run(mddev_t *mddev) mddev->dev_sectors &= ~(mddev->chunk_sectors - 1); mddev->resync_max_sectors = mddev->dev_sectors; - if (mddev->degraded > dirty_parity_disks && + if (mddev->degraded > 0 && mddev->recovery_cp != MaxSector) { if (mddev->ok_start_degraded) printk(KERN_WARNING @@ -5432,11 +5361,9 @@ static int raid5_start_reshape(mddev_t *mddev) !test_bit(Faulty, &rdev->flags)) { if (raid5_add_disk(mddev, rdev) == 0) { char nm[20]; - if (rdev->raid_disk >= conf->previous_raid_disks) - set_bit(In_sync, &rdev->flags); - else - rdev->recovery_offset = 0; + set_bit(In_sync, &rdev->flags); added_devices++; + rdev->recovery_offset = 0; sprintf(nm, "rd%d", rdev->raid_disk); if (sysfs_create_link(&mddev->kobj, &rdev->kobj, nm)) diff --git a/trunk/drivers/mtd/maps/sa1100-flash.c b/trunk/drivers/mtd/maps/sa1100-flash.c index d7a47574d21e..fdb97f3d30e9 100644 --- a/trunk/drivers/mtd/maps/sa1100-flash.c +++ b/trunk/drivers/mtd/maps/sa1100-flash.c @@ -209,8 +209,8 @@ static int sa1100_probe_subdev(struct sa_subdev_info *subdev, struct resource *r } subdev->mtd->owner = THIS_MODULE; - printk(KERN_INFO "SA1100 flash: CFI device at 0x%08lx, %uMiB, %d-bit\n", - phys, (unsigned)(subdev->mtd->size >> 20), + printk(KERN_INFO "SA1100 flash: CFI device at 0x%08lx, %dMiB, " + "%d-bit\n", phys, subdev->mtd->size >> 20, subdev->map.bankwidth * 8); return 0; diff --git a/trunk/drivers/pci/dmar.c b/trunk/drivers/pci/dmar.c index e5f8fc164fd3..22b02c6df854 100644 --- a/trunk/drivers/pci/dmar.c +++ b/trunk/drivers/pci/dmar.c @@ -175,6 +175,15 @@ dmar_parse_one_drhd(struct acpi_dmar_header *header) int ret = 0; drhd = (struct acpi_dmar_hardware_unit *)header; + if (!drhd->address) { + /* Promote an attitude of violence to a BIOS engineer today */ + WARN(1, "Your BIOS is broken; DMAR reported at address zero!\n" + "BIOS vendor: %s; Ver: %s; Product Version: %s\n", + dmi_get_system_info(DMI_BIOS_VENDOR), + dmi_get_system_info(DMI_BIOS_VERSION), + dmi_get_system_info(DMI_PRODUCT_VERSION)); + return -ENODEV; + } dmaru = kzalloc(sizeof(*dmaru), GFP_KERNEL); if (!dmaru) return -ENOMEM; @@ -582,50 +591,12 @@ int __init dmar_table_init(void) return 0; } -int __init check_zero_address(void) -{ - struct acpi_table_dmar *dmar; - struct acpi_dmar_header *entry_header; - struct acpi_dmar_hardware_unit *drhd; - - dmar = (struct acpi_table_dmar *)dmar_tbl; - entry_header = (struct acpi_dmar_header *)(dmar + 1); - - while (((unsigned long)entry_header) < - (((unsigned long)dmar) + dmar_tbl->length)) { - /* Avoid looping forever on bad ACPI tables */ - if (entry_header->length == 0) { - printk(KERN_WARNING PREFIX - "Invalid 0-length structure\n"); - return 0; - } - - if (entry_header->type == ACPI_DMAR_TYPE_HARDWARE_UNIT) { - drhd = (void *)entry_header; - if (!drhd->address) { - /* Promote an attitude of violence to a BIOS engineer today */ - WARN(1, "Your BIOS is broken; DMAR reported at address zero!\n" - "BIOS vendor: %s; Ver: %s; Product Version: %s\n", - dmi_get_system_info(DMI_BIOS_VENDOR), - dmi_get_system_info(DMI_BIOS_VERSION), - dmi_get_system_info(DMI_PRODUCT_VERSION)); - return 0; - } - break; - } - - entry_header = ((void *)entry_header + entry_header->length); - } - return 1; -} - void __init detect_intel_iommu(void) { int ret; ret = dmar_table_detect(); - if (ret) - ret = check_zero_address(); + { #ifdef CONFIG_INTR_REMAP struct acpi_table_dmar *dmar; diff --git a/trunk/drivers/pci/intel-iommu.c b/trunk/drivers/pci/intel-iommu.c index 1840a0578a42..b1e97e682500 100644 --- a/trunk/drivers/pci/intel-iommu.c +++ b/trunk/drivers/pci/intel-iommu.c @@ -2767,15 +2767,7 @@ static void *intel_alloc_coherent(struct device *hwdev, size_t size, size = PAGE_ALIGN(size); order = get_order(size); - - if (!iommu_no_mapping(hwdev)) - flags &= ~(GFP_DMA | GFP_DMA32); - else if (hwdev->coherent_dma_mask < dma_get_required_mask(hwdev)) { - if (hwdev->coherent_dma_mask < DMA_BIT_MASK(32)) - flags |= GFP_DMA; - else - flags |= GFP_DMA32; - } + flags &= ~(GFP_DMA | GFP_DMA32); vaddr = (void *)__get_free_pages(flags, order); if (!vaddr) @@ -3215,33 +3207,6 @@ static int __init init_iommu_sysfs(void) } #endif /* CONFIG_PM */ -/* - * Here we only respond to action of unbound device from driver. - * - * Added device is not attached to its DMAR domain here yet. That will happen - * when mapping the device to iova. - */ -static int device_notifier(struct notifier_block *nb, - unsigned long action, void *data) -{ - struct device *dev = data; - struct pci_dev *pdev = to_pci_dev(dev); - struct dmar_domain *domain; - - domain = find_domain(pdev); - if (!domain) - return 0; - - if (action == BUS_NOTIFY_UNBOUND_DRIVER && !iommu_pass_through) - domain_remove_one_dev_info(domain, pdev); - - return 0; -} - -static struct notifier_block device_nb = { - .notifier_call = device_notifier, -}; - int __init intel_iommu_init(void) { int ret = 0; @@ -3294,8 +3259,6 @@ int __init intel_iommu_init(void) register_iommu(&intel_iommu_ops); - bus_register_notifier(&pci_bus_type, &device_nb); - return 0; } diff --git a/trunk/drivers/regulator/core.c b/trunk/drivers/regulator/core.c index efe568deda12..744ea1d0b59b 100644 --- a/trunk/drivers/regulator/core.c +++ b/trunk/drivers/regulator/core.c @@ -1283,8 +1283,7 @@ static int _regulator_disable(struct regulator_dev *rdev) return -EIO; /* are we the last user and permitted to disable ? */ - if (rdev->use_count == 1 && - (rdev->constraints && !rdev->constraints->always_on)) { + if (rdev->use_count == 1 && !rdev->constraints->always_on) { /* we are last user */ if (_regulator_can_change_status(rdev) && diff --git a/trunk/drivers/regulator/fixed.c b/trunk/drivers/regulator/fixed.c index f9f516a3028a..f8b295700d7d 100644 --- a/trunk/drivers/regulator/fixed.c +++ b/trunk/drivers/regulator/fixed.c @@ -196,11 +196,12 @@ static int regulator_fixed_voltage_remove(struct platform_device *pdev) struct fixed_voltage_data *drvdata = platform_get_drvdata(pdev); regulator_unregister(drvdata->dev); - if (gpio_is_valid(drvdata->gpio)) - gpio_free(drvdata->gpio); kfree(drvdata->desc.name); kfree(drvdata); + if (gpio_is_valid(drvdata->gpio)) + gpio_free(drvdata->gpio); + return 0; } diff --git a/trunk/drivers/regulator/wm831x-ldo.c b/trunk/drivers/regulator/wm831x-ldo.c index 902db56ce099..bb61aede4801 100644 --- a/trunk/drivers/regulator/wm831x-ldo.c +++ b/trunk/drivers/regulator/wm831x-ldo.c @@ -175,18 +175,18 @@ static unsigned int wm831x_gp_ldo_get_mode(struct regulator_dev *rdev) struct wm831x *wm831x = ldo->wm831x; int ctrl_reg = ldo->base + WM831X_LDO_CONTROL; int on_reg = ldo->base + WM831X_LDO_ON_CONTROL; - int ret; + unsigned int ret; ret = wm831x_reg_read(wm831x, on_reg); if (ret < 0) - return ret; + return 0; if (!(ret & WM831X_LDO1_ON_MODE)) return REGULATOR_MODE_NORMAL; ret = wm831x_reg_read(wm831x, ctrl_reg); if (ret < 0) - return ret; + return 0; if (ret & WM831X_LDO1_LP_MODE) return REGULATOR_MODE_STANDBY; diff --git a/trunk/drivers/rtc/rtc-coh901331.c b/trunk/drivers/rtc/rtc-coh901331.c index 03ea530981d1..7fe1fa26c52c 100644 --- a/trunk/drivers/rtc/rtc-coh901331.c +++ b/trunk/drivers/rtc/rtc-coh901331.c @@ -58,16 +58,7 @@ static irqreturn_t coh901331_interrupt(int irq, void *data) clk_enable(rtap->clk); /* Ack IRQ */ writel(1, rtap->virtbase + COH901331_IRQ_EVENT); - /* - * Disable the interrupt. This is necessary because - * the RTC lives on a lower-clocked line and will - * not release the IRQ line until after a few (slower) - * clock cycles. The interrupt will be re-enabled when - * a new alarm is set anyway. - */ - writel(0, rtap->virtbase + COH901331_IRQ_MASK); clk_disable(rtap->clk); - /* Set alarm flag */ rtc_update_irq(rtap->rtc, 1, RTC_AF); @@ -137,8 +128,6 @@ static int coh901331_alarm_irq_enable(struct device *dev, unsigned int enabled) else writel(0, rtap->virtbase + COH901331_IRQ_MASK); clk_disable(rtap->clk); - - return 0; } static struct rtc_class_ops coh901331_ops = { diff --git a/trunk/drivers/s390/char/monreader.c b/trunk/drivers/s390/char/monreader.c index 66e21dd23154..89ece1c235aa 100644 --- a/trunk/drivers/s390/char/monreader.c +++ b/trunk/drivers/s390/char/monreader.c @@ -357,7 +357,6 @@ static int mon_close(struct inode *inode, struct file *filp) atomic_set(&monpriv->msglim_count, 0); monpriv->write_index = 0; monpriv->read_index = 0; - dev_set_drvdata(monreader_device, NULL); for (i = 0; i < MON_MSGLIM; i++) kfree(monpriv->msg_array[i]); diff --git a/trunk/drivers/s390/char/sclp_quiesce.c b/trunk/drivers/s390/char/sclp_quiesce.c index 05909a7df8b3..84c191c1cd62 100644 --- a/trunk/drivers/s390/char/sclp_quiesce.c +++ b/trunk/drivers/s390/char/sclp_quiesce.c @@ -20,12 +20,9 @@ #include "sclp.h" -static void (*old_machine_restart)(char *); -static void (*old_machine_halt)(void); -static void (*old_machine_power_off)(void); - /* Shutdown handler. Signal completion of shutdown by loading special PSW. */ -static void do_machine_quiesce(void) +static void +do_machine_quiesce(void) { psw_t quiesce_psw; @@ -36,48 +33,23 @@ static void do_machine_quiesce(void) } /* Handler for quiesce event. Start shutdown procedure. */ -static void sclp_quiesce_handler(struct evbuf_header *evbuf) +static void +sclp_quiesce_handler(struct evbuf_header *evbuf) { - if (_machine_restart != (void *) do_machine_quiesce) { - old_machine_restart = _machine_restart; - old_machine_halt = _machine_halt; - old_machine_power_off = _machine_power_off; - _machine_restart = (void *) do_machine_quiesce; - _machine_halt = do_machine_quiesce; - _machine_power_off = do_machine_quiesce; - } + _machine_restart = (void *) do_machine_quiesce; + _machine_halt = do_machine_quiesce; + _machine_power_off = do_machine_quiesce; ctrl_alt_del(); } -/* Undo machine restart/halt/power_off modification on resume */ -static void sclp_quiesce_pm_event(struct sclp_register *reg, - enum sclp_pm_event sclp_pm_event) -{ - switch (sclp_pm_event) { - case SCLP_PM_EVENT_RESTORE: - if (old_machine_restart) { - _machine_restart = old_machine_restart; - _machine_halt = old_machine_halt; - _machine_power_off = old_machine_power_off; - old_machine_restart = NULL; - old_machine_halt = NULL; - old_machine_power_off = NULL; - } - break; - case SCLP_PM_EVENT_FREEZE: - case SCLP_PM_EVENT_THAW: - break; - } -} - static struct sclp_register sclp_quiesce_event = { .receive_mask = EVTYP_SIGQUIESCE_MASK, - .receiver_fn = sclp_quiesce_handler, - .pm_event_fn = sclp_quiesce_pm_event + .receiver_fn = sclp_quiesce_handler }; /* Initialize quiesce driver. */ -static int __init sclp_quiesce_init(void) +static int __init +sclp_quiesce_init(void) { return sclp_register(&sclp_quiesce_event); } diff --git a/trunk/drivers/scsi/bfa/bfad_fwimg.c b/trunk/drivers/scsi/bfa/bfad_fwimg.c index bd34b0db2d6b..b2f6949bc8d3 100644 --- a/trunk/drivers/scsi/bfa/bfad_fwimg.c +++ b/trunk/drivers/scsi/bfa/bfad_fwimg.c @@ -41,8 +41,6 @@ u32 *bfi_image_cb; #define BFAD_FW_FILE_CT "ctfw.bin" #define BFAD_FW_FILE_CB "cbfw.bin" -MODULE_FIRMWARE(BFAD_FW_FILE_CT); -MODULE_FIRMWARE(BFAD_FW_FILE_CB); u32 * bfad_read_firmware(struct pci_dev *pdev, u32 **bfi_image, diff --git a/trunk/drivers/scsi/bfa/bfad_im.c b/trunk/drivers/scsi/bfa/bfad_im.c index 55d012a9a668..158c99243c08 100644 --- a/trunk/drivers/scsi/bfa/bfad_im.c +++ b/trunk/drivers/scsi/bfa/bfad_im.c @@ -948,7 +948,7 @@ bfad_os_fc_host_init(struct bfad_im_port_s *im_port) if (bfad_supported_fc4s & (BFA_PORT_ROLE_FCP_IM | BFA_PORT_ROLE_FCP_TM)) /* For FCP type 0x08 */ fc_host_supported_fc4s(host)[2] = 1; - if (bfad_supported_fc4s & BFA_PORT_ROLE_FCP_IPFC) + if (bfad_supported_fc4s | BFA_PORT_ROLE_FCP_IPFC) /* For LLC/SNAP type 0x05 */ fc_host_supported_fc4s(host)[3] = 0x20; /* For fibre channel services type 0x20 */ diff --git a/trunk/drivers/scsi/gdth.c b/trunk/drivers/scsi/gdth.c index 9e8fce0f0c1b..185e6bc4dd40 100644 --- a/trunk/drivers/scsi/gdth.c +++ b/trunk/drivers/scsi/gdth.c @@ -2900,7 +2900,7 @@ static int gdth_read_event(gdth_ha_str *ha, int handle, gdth_evt_str *estr) eindex = handle; estr->event_source = 0; - if (eindex < 0 || eindex >= MAX_EVENTS) { + if (eindex >= MAX_EVENTS) { spin_unlock_irqrestore(&ha->smp_lock, flags); return eindex; } diff --git a/trunk/drivers/scsi/ipr.c b/trunk/drivers/scsi/ipr.c index 76d294fc7846..5f045505a1f4 100644 --- a/trunk/drivers/scsi/ipr.c +++ b/trunk/drivers/scsi/ipr.c @@ -4188,25 +4188,6 @@ static irqreturn_t ipr_handle_other_interrupt(struct ipr_ioa_cfg *ioa_cfg, return rc; } -/** - * ipr_isr_eh - Interrupt service routine error handler - * @ioa_cfg: ioa config struct - * @msg: message to log - * - * Return value: - * none - **/ -static void ipr_isr_eh(struct ipr_ioa_cfg *ioa_cfg, char *msg) -{ - ioa_cfg->errors_logged++; - dev_err(&ioa_cfg->pdev->dev, "%s\n", msg); - - if (WAIT_FOR_DUMP == ioa_cfg->sdt_state) - ioa_cfg->sdt_state = GET_DUMP; - - ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_NONE); -} - /** * ipr_isr - Interrupt service routine * @irq: irq number @@ -4222,7 +4203,6 @@ static irqreturn_t ipr_isr(int irq, void *devp) volatile u32 int_reg, int_mask_reg; u32 ioasc; u16 cmd_index; - int num_hrrq = 0; struct ipr_cmnd *ipr_cmd; irqreturn_t rc = IRQ_NONE; @@ -4253,7 +4233,13 @@ static irqreturn_t ipr_isr(int irq, void *devp) IPR_HRRQ_REQ_RESP_HANDLE_MASK) >> IPR_HRRQ_REQ_RESP_HANDLE_SHIFT; if (unlikely(cmd_index >= IPR_NUM_CMD_BLKS)) { - ipr_isr_eh(ioa_cfg, "Invalid response handle from IOA"); + ioa_cfg->errors_logged++; + dev_err(&ioa_cfg->pdev->dev, "Invalid response handle from IOA\n"); + + if (WAIT_FOR_DUMP == ioa_cfg->sdt_state) + ioa_cfg->sdt_state = GET_DUMP; + + ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_NONE); spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); return IRQ_HANDLED; } @@ -4280,18 +4266,8 @@ static irqreturn_t ipr_isr(int irq, void *devp) if (ipr_cmd != NULL) { /* Clear the PCI interrupt */ - do { - writel(IPR_PCII_HRRQ_UPDATED, ioa_cfg->regs.clr_interrupt_reg); - int_reg = readl(ioa_cfg->regs.sense_interrupt_reg) & ~int_mask_reg; - } while (int_reg & IPR_PCII_HRRQ_UPDATED && - num_hrrq++ < IPR_MAX_HRRQ_RETRIES); - - if (int_reg & IPR_PCII_HRRQ_UPDATED) { - ipr_isr_eh(ioa_cfg, "Error clearing HRRQ"); - spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); - return IRQ_HANDLED; - } - + writel(IPR_PCII_HRRQ_UPDATED, ioa_cfg->regs.clr_interrupt_reg); + int_reg = readl(ioa_cfg->regs.sense_interrupt_reg) & ~int_mask_reg; } else break; } diff --git a/trunk/drivers/scsi/ipr.h b/trunk/drivers/scsi/ipr.h index 19bbcf39f0c9..163245a1c3e5 100644 --- a/trunk/drivers/scsi/ipr.h +++ b/trunk/drivers/scsi/ipr.h @@ -144,7 +144,6 @@ #define IPR_IOA_MAX_SECTORS 32767 #define IPR_VSET_MAX_SECTORS 512 #define IPR_MAX_CDB_LEN 16 -#define IPR_MAX_HRRQ_RETRIES 3 #define IPR_DEFAULT_BUS_WIDTH 16 #define IPR_80MBs_SCSI_RATE ((80 * 10) / (IPR_DEFAULT_BUS_WIDTH / 8)) diff --git a/trunk/drivers/scsi/libsas/sas_expander.c b/trunk/drivers/scsi/libsas/sas_expander.c index 33cf988c8c8a..b3381959acce 100644 --- a/trunk/drivers/scsi/libsas/sas_expander.c +++ b/trunk/drivers/scsi/libsas/sas_expander.c @@ -960,6 +960,7 @@ static int sas_ex_discover_dev(struct domain_device *dev, int phy_id) } } + res = 0; } return res; diff --git a/trunk/drivers/scsi/pmcraid.c b/trunk/drivers/scsi/pmcraid.c index 0a97bc9074bb..f7c70e2a8224 100644 --- a/trunk/drivers/scsi/pmcraid.c +++ b/trunk/drivers/scsi/pmcraid.c @@ -1071,7 +1071,7 @@ static struct pmcraid_cmd *pmcraid_init_hcam ioarcb->data_transfer_length = cpu_to_le32(rcb_size); - ioadl[0].flags |= IOADL_FLAGS_READ_LAST; + ioadl[0].flags |= cpu_to_le32(IOADL_FLAGS_READ_LAST); ioadl[0].data_len = cpu_to_le32(rcb_size); ioadl[0].address = cpu_to_le32(dma); @@ -2251,7 +2251,7 @@ static void pmcraid_request_sense(struct pmcraid_cmd *cmd) ioadl->address = cpu_to_le64(cmd->sense_buffer_dma); ioadl->data_len = cpu_to_le32(SCSI_SENSE_BUFFERSIZE); - ioadl->flags = IOADL_FLAGS_LAST_DESC; + ioadl->flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC); /* request sense might be called as part of error response processing * which runs in tasklets context. It is possible that mid-layer might @@ -3017,7 +3017,7 @@ static int pmcraid_build_ioadl( ioadl[i].flags = 0; } /* setup last descriptor */ - ioadl[i - 1].flags = IOADL_FLAGS_LAST_DESC; + ioadl[i - 1].flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC); return 0; } @@ -3387,7 +3387,7 @@ static int pmcraid_build_passthrough_ioadls( } /* setup the last descriptor */ - ioadl[i - 1].flags = IOADL_FLAGS_LAST_DESC; + ioadl[i - 1].flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC); return 0; } @@ -5314,7 +5314,7 @@ static void pmcraid_querycfg(struct pmcraid_cmd *cmd) cpu_to_le32(sizeof(struct pmcraid_config_table)); ioadl = &(ioarcb->add_data.u.ioadl[0]); - ioadl->flags = IOADL_FLAGS_LAST_DESC; + ioadl->flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC); ioadl->address = cpu_to_le64(pinstance->cfg_table_bus_addr); ioadl->data_len = cpu_to_le32(sizeof(struct pmcraid_config_table)); diff --git a/trunk/drivers/scsi/scsi_transport_fc.c b/trunk/drivers/scsi/scsi_transport_fc.c index c6f70dae9b2e..a67fed10598a 100644 --- a/trunk/drivers/scsi/scsi_transport_fc.c +++ b/trunk/drivers/scsi/scsi_transport_fc.c @@ -3656,7 +3656,6 @@ fc_bsg_host_dispatch(struct request_queue *q, struct Scsi_Host *shost, fail_host_msg: /* return the errno failure code as the only status */ BUG_ON(job->reply_len < sizeof(uint32_t)); - job->reply->reply_payload_rcv_len = 0; job->reply->result = ret; job->reply_len = sizeof(uint32_t); fc_bsg_jobdone(job); @@ -3742,7 +3741,6 @@ fc_bsg_rport_dispatch(struct request_queue *q, struct Scsi_Host *shost, fail_rport_msg: /* return the errno failure code as the only status */ BUG_ON(job->reply_len < sizeof(uint32_t)); - job->reply->reply_payload_rcv_len = 0; job->reply->result = ret; job->reply_len = sizeof(uint32_t); fc_bsg_jobdone(job); @@ -3799,7 +3797,6 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost, /* check if we have the msgcode value at least */ if (job->request_len < sizeof(uint32_t)) { BUG_ON(job->reply_len < sizeof(uint32_t)); - job->reply->reply_payload_rcv_len = 0; job->reply->result = -ENOMSG; job->reply_len = sizeof(uint32_t); fc_bsg_jobdone(job); diff --git a/trunk/drivers/spi/spi_stmp.c b/trunk/drivers/spi/spi_stmp.c index 2552bb364005..d871dc23909c 100644 --- a/trunk/drivers/spi/spi_stmp.c +++ b/trunk/drivers/spi/spi_stmp.c @@ -242,7 +242,7 @@ static int stmp_spi_txrx_dma(struct stmp_spi *ss, int cs, wait_for_completion(&ss->done); if (!busy_wait(readl(ss->regs + HW_SSP_CTRL0) & BM_SSP_CTRL0_RUN)) - status = -ETIMEDOUT; + status = ETIMEDOUT; if (!dma_buf) dma_unmap_single(ss->master_dev, spi_buf_dma, len, dir); diff --git a/trunk/drivers/uio/uio_pdrv_genirq.c b/trunk/drivers/uio/uio_pdrv_genirq.c index 02347c57357d..aa53db9f2e88 100644 --- a/trunk/drivers/uio/uio_pdrv_genirq.c +++ b/trunk/drivers/uio/uio_pdrv_genirq.c @@ -178,6 +178,7 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev) return 0; bad1: kfree(priv); + pm_runtime_disable(&pdev->dev); bad0: return ret; } diff --git a/trunk/drivers/usb/class/cdc-acm.c b/trunk/drivers/usb/class/cdc-acm.c index e4eca7810bcf..e3861b21e776 100644 --- a/trunk/drivers/usb/class/cdc-acm.c +++ b/trunk/drivers/usb/class/cdc-acm.c @@ -609,9 +609,9 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp) acm->throttle = 0; + tasklet_schedule(&acm->urb_task); set_bit(ASYNCB_INITIALIZED, &acm->port.flags); rv = tty_port_block_til_ready(&acm->port, tty, filp); - tasklet_schedule(&acm->urb_task); done: mutex_unlock(&acm->mutex); err_out: @@ -686,21 +686,15 @@ static void acm_tty_close(struct tty_struct *tty, struct file *filp) /* Perform the closing process and see if we need to do the hardware shutdown */ - if (!acm) - return; - if (tty_port_close_start(&acm->port, tty, filp) == 0) { - mutex_lock(&open_mutex); - if (!acm->dev) { - tty_port_tty_set(&acm->port, NULL); - acm_tty_unregister(acm); - tty->driver_data = NULL; - } - mutex_unlock(&open_mutex); + if (!acm || tty_port_close_start(&acm->port, tty, filp) == 0) return; - } acm_port_down(acm, 0); tty_port_close_end(&acm->port, tty); + mutex_lock(&open_mutex); tty_port_tty_set(&acm->port, NULL); + if (!acm->dev) + acm_tty_unregister(acm); + mutex_unlock(&open_mutex); } static int acm_tty_write(struct tty_struct *tty, diff --git a/trunk/drivers/usb/host/ohci-hcd.c b/trunk/drivers/usb/host/ohci-hcd.c index 24eb74781919..78bb7710f36d 100644 --- a/trunk/drivers/usb/host/ohci-hcd.c +++ b/trunk/drivers/usb/host/ohci-hcd.c @@ -87,7 +87,6 @@ static int ohci_restart (struct ohci_hcd *ohci); #ifdef CONFIG_PCI static void quirk_amd_pll(int state); static void amd_iso_dev_put(void); -static void sb800_prefetch(struct ohci_hcd *ohci, int on); #else static inline void quirk_amd_pll(int state) { @@ -97,10 +96,6 @@ static inline void amd_iso_dev_put(void) { return; } -static inline void sb800_prefetch(struct ohci_hcd *ohci, int on) -{ - return; -} #endif diff --git a/trunk/drivers/usb/host/ohci-pci.c b/trunk/drivers/usb/host/ohci-pci.c index b8a1148f248e..d2ba04dd785e 100644 --- a/trunk/drivers/usb/host/ohci-pci.c +++ b/trunk/drivers/usb/host/ohci-pci.c @@ -177,13 +177,6 @@ static int ohci_quirk_amd700(struct usb_hcd *hcd) return 0; pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev); - - /* SB800 needs pre-fetch fix */ - if ((rev >= 0x40) && (rev <= 0x4f)) { - ohci->flags |= OHCI_QUIRK_AMD_PREFETCH; - ohci_dbg(ohci, "enabled AMD prefetch quirk\n"); - } - if ((rev > 0x3b) || (rev < 0x30)) { pci_dev_put(amd_smbus_dev); amd_smbus_dev = NULL; @@ -269,19 +262,6 @@ static void amd_iso_dev_put(void) } -static void sb800_prefetch(struct ohci_hcd *ohci, int on) -{ - struct pci_dev *pdev; - u16 misc; - - pdev = to_pci_dev(ohci_to_hcd(ohci)->self.controller); - pci_read_config_word(pdev, 0x50, &misc); - if (on == 0) - pci_write_config_word(pdev, 0x50, misc & 0xfcff); - else - pci_write_config_word(pdev, 0x50, misc | 0x0300); -} - /* List of quirks for OHCI */ static const struct pci_device_id ohci_pci_quirks[] = { { diff --git a/trunk/drivers/usb/host/ohci-q.c b/trunk/drivers/usb/host/ohci-q.c index 35288bcae0db..16fecb8ecc39 100644 --- a/trunk/drivers/usb/host/ohci-q.c +++ b/trunk/drivers/usb/host/ohci-q.c @@ -49,12 +49,9 @@ __acquires(ohci->lock) switch (usb_pipetype (urb->pipe)) { case PIPE_ISOCHRONOUS: ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs--; - if (ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0) { - if (quirk_amdiso(ohci)) - quirk_amd_pll(1); - if (quirk_amdprefetch(ohci)) - sb800_prefetch(ohci, 0); - } + if (ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0 + && quirk_amdiso(ohci)) + quirk_amd_pll(1); break; case PIPE_INTERRUPT: ohci_to_hcd(ohci)->self.bandwidth_int_reqs--; @@ -683,12 +680,9 @@ static void td_submit_urb ( data + urb->iso_frame_desc [cnt].offset, urb->iso_frame_desc [cnt].length, urb, cnt); } - if (ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0) { - if (quirk_amdiso(ohci)) - quirk_amd_pll(0); - if (quirk_amdprefetch(ohci)) - sb800_prefetch(ohci, 1); - } + if (ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0 + && quirk_amdiso(ohci)) + quirk_amd_pll(0); periodic = ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs++ == 0 && ohci_to_hcd(ohci)->self.bandwidth_int_reqs == 0; break; diff --git a/trunk/drivers/usb/host/ohci.h b/trunk/drivers/usb/host/ohci.h index 5bf15fed0d9f..222011f6172c 100644 --- a/trunk/drivers/usb/host/ohci.h +++ b/trunk/drivers/usb/host/ohci.h @@ -402,7 +402,6 @@ struct ohci_hcd { #define OHCI_QUIRK_FRAME_NO 0x80 /* no big endian frame_no shift */ #define OHCI_QUIRK_HUB_POWER 0x100 /* distrust firmware power/oc setup */ #define OHCI_QUIRK_AMD_ISO 0x200 /* ISO transfers*/ -#define OHCI_QUIRK_AMD_PREFETCH 0x400 /* pre-fetch for ISO transfer */ // there are also chip quirks/bugs in init logic struct work_struct nec_work; /* Worker for NEC quirk */ @@ -434,10 +433,6 @@ static inline int quirk_amdiso(struct ohci_hcd *ohci) { return ohci->flags & OHCI_QUIRK_AMD_ISO; } -static inline int quirk_amdprefetch(struct ohci_hcd *ohci) -{ - return ohci->flags & OHCI_QUIRK_AMD_PREFETCH; -} #else static inline int quirk_nec(struct ohci_hcd *ohci) { @@ -451,10 +446,6 @@ static inline int quirk_amdiso(struct ohci_hcd *ohci) { return 0; } -static inline int quirk_amdprefetch(struct ohci_hcd *ohci) -{ - return 0; -} #endif /* convert between an hcd pointer and the corresponding ohci_hcd */ diff --git a/trunk/drivers/usb/host/xhci-mem.c b/trunk/drivers/usb/host/xhci-mem.c index b8fd270a8b0d..1db4fea8c170 100644 --- a/trunk/drivers/usb/host/xhci-mem.c +++ b/trunk/drivers/usb/host/xhci-mem.c @@ -802,11 +802,9 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) int i; /* Free the Event Ring Segment Table and the actual Event Ring */ - if (xhci->ir_set) { - xhci_writel(xhci, 0, &xhci->ir_set->erst_size); - xhci_write_64(xhci, 0, &xhci->ir_set->erst_base); - xhci_write_64(xhci, 0, &xhci->ir_set->erst_dequeue); - } + xhci_writel(xhci, 0, &xhci->ir_set->erst_size); + xhci_write_64(xhci, 0, &xhci->ir_set->erst_base); + xhci_write_64(xhci, 0, &xhci->ir_set->erst_dequeue); size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries); if (xhci->erst.entries) pci_free_consistent(pdev, size, @@ -843,9 +841,9 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) xhci->dcbaa, xhci->dcbaa->dma); xhci->dcbaa = NULL; - scratchpad_free(xhci); xhci->page_size = 0; xhci->page_shift = 0; + scratchpad_free(xhci); } int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) diff --git a/trunk/drivers/usb/host/xhci-ring.c b/trunk/drivers/usb/host/xhci-ring.c index 821b7b4709de..173c39c76489 100644 --- a/trunk/drivers/usb/host/xhci-ring.c +++ b/trunk/drivers/usb/host/xhci-ring.c @@ -864,11 +864,9 @@ static struct xhci_segment *trb_in_td( cur_seg = start_seg; do { - if (start_dma == 0) - return 0; /* We may get an event for a Link TRB in the middle of a TD */ end_seg_dma = xhci_trb_virt_to_dma(cur_seg, - &cur_seg->trbs[TRBS_PER_SEGMENT - 1]); + &start_seg->trbs[TRBS_PER_SEGMENT - 1]); /* If the end TRB isn't in this segment, this is set to 0 */ end_trb_dma = xhci_trb_virt_to_dma(cur_seg, end_trb); @@ -895,9 +893,8 @@ static struct xhci_segment *trb_in_td( } cur_seg = cur_seg->next; start_dma = xhci_trb_virt_to_dma(cur_seg, &cur_seg->trbs[0]); - } while (cur_seg != start_seg); + } while (1); - return 0; } /* diff --git a/trunk/drivers/usb/mon/mon_bin.c b/trunk/drivers/usb/mon/mon_bin.c index 10f3205798e8..9ed3e741bee1 100644 --- a/trunk/drivers/usb/mon/mon_bin.c +++ b/trunk/drivers/usb/mon/mon_bin.c @@ -348,12 +348,12 @@ static unsigned int mon_buff_area_alloc_contiguous(struct mon_reader_bin *rp, /* * Return a few (kilo-)bytes to the head of the buffer. - * This is used if a data fetch fails. + * This is used if a DMA fetch fails. */ static void mon_buff_area_shrink(struct mon_reader_bin *rp, unsigned int size) { - /* size &= ~(PKT_ALIGN-1); -- we're called with aligned size */ + size = (size + PKT_ALIGN-1) & ~(PKT_ALIGN-1); rp->b_cnt -= size; if (rp->b_in < size) rp->b_in += rp->b_size; @@ -433,7 +433,6 @@ static void mon_bin_event(struct mon_reader_bin *rp, struct urb *urb, unsigned int urb_length; unsigned int offset; unsigned int length; - unsigned int delta; unsigned int ndesc, lendesc; unsigned char dir; struct mon_bin_hdr *ep; @@ -538,10 +537,8 @@ static void mon_bin_event(struct mon_reader_bin *rp, struct urb *urb, if (length != 0) { ep->flag_data = mon_bin_get_data(rp, offset, urb, length); if (ep->flag_data != 0) { /* Yes, it's 0x00, not '0' */ - delta = (ep->len_cap + PKT_ALIGN-1) & ~(PKT_ALIGN-1); - ep->len_cap -= length; - delta -= (ep->len_cap + PKT_ALIGN-1) & ~(PKT_ALIGN-1); - mon_buff_area_shrink(rp, delta); + ep->len_cap = 0; + mon_buff_area_shrink(rp, length); } } else { ep->flag_data = data_tag; diff --git a/trunk/drivers/usb/serial/cp210x.c b/trunk/drivers/usb/serial/cp210x.c index bd254ec97d14..698252a4dc5d 100644 --- a/trunk/drivers/usb/serial/cp210x.c +++ b/trunk/drivers/usb/serial/cp210x.c @@ -50,8 +50,6 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *, static void cp210x_break_ctl(struct tty_struct *, int); static int cp210x_startup(struct usb_serial *); static void cp210x_disconnect(struct usb_serial *); -static void cp210x_dtr_rts(struct usb_serial_port *p, int on); -static int cp210x_carrier_raised(struct usb_serial_port *p); static int debug; @@ -145,8 +143,6 @@ static struct usb_serial_driver cp210x_device = { .tiocmset = cp210x_tiocmset, .attach = cp210x_startup, .disconnect = cp210x_disconnect, - .dtr_rts = cp210x_dtr_rts, - .carrier_raised = cp210x_carrier_raised }; /* Config request types */ @@ -750,14 +746,6 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *file, return cp210x_set_config(port, CP210X_SET_MHS, &control, 2); } -static void cp210x_dtr_rts(struct usb_serial_port *p, int on) -{ - if (on) - cp210x_tiocmset_port(p, NULL, TIOCM_DTR|TIOCM_RTS, 0); - else - cp210x_tiocmset_port(p, NULL, 0, TIOCM_DTR|TIOCM_RTS); -} - static int cp210x_tiocmget (struct tty_struct *tty, struct file *file) { struct usb_serial_port *port = tty->driver_data; @@ -780,15 +768,6 @@ static int cp210x_tiocmget (struct tty_struct *tty, struct file *file) return result; } -static int cp210x_carrier_raised(struct usb_serial_port *p) -{ - unsigned int control; - cp210x_get_config(p, CP210X_GET_MDMSTS, &control, 1); - if (control & CONTROL_DCD) - return 1; - return 0; -} - static void cp210x_break_ctl (struct tty_struct *tty, int break_state) { struct usb_serial_port *port = tty->driver_data; diff --git a/trunk/drivers/usb/serial/option.c b/trunk/drivers/usb/serial/option.c index 319aaf9725b3..cd44c68954df 100644 --- a/trunk/drivers/usb/serial/option.c +++ b/trunk/drivers/usb/serial/option.c @@ -308,7 +308,6 @@ static int option_resume(struct usb_serial *serial); #define DLINK_VENDOR_ID 0x1186 #define DLINK_PRODUCT_DWM_652 0x3e04 -#define DLINK_PRODUCT_DWM_652_U5 0xce16 #define QISDA_VENDOR_ID 0x1da5 #define QISDA_PRODUCT_H21_4512 0x4512 @@ -587,7 +586,6 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, - { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */ { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) }, { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) }, { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) }, diff --git a/trunk/drivers/video/backlight/corgi_lcd.c b/trunk/drivers/video/backlight/corgi_lcd.c index 96774949cd30..2211a852af9c 100644 --- a/trunk/drivers/video/backlight/corgi_lcd.c +++ b/trunk/drivers/video/backlight/corgi_lcd.c @@ -433,9 +433,8 @@ static int corgi_bl_update_status(struct backlight_device *bd) if (corgibl_flags & CORGIBL_SUSPENDED) intensity = 0; - - if ((corgibl_flags & CORGIBL_BATTLOW) && intensity > lcd->limit_mask) - intensity = lcd->limit_mask; + if (corgibl_flags & CORGIBL_BATTLOW) + intensity &= lcd->limit_mask; return corgi_bl_set_intensity(lcd, intensity); } diff --git a/trunk/drivers/video/backlight/lcd.c b/trunk/drivers/video/backlight/lcd.c index a482dd7b0311..b6449470106c 100644 --- a/trunk/drivers/video/backlight/lcd.c +++ b/trunk/drivers/video/backlight/lcd.c @@ -56,7 +56,7 @@ static int fb_notifier_callback(struct notifier_block *self, static int lcd_register_fb(struct lcd_device *ld) { - memset(&ld->fb_notif, 0, sizeof(ld->fb_notif)); + memset(&ld->fb_notif, 0, sizeof(&ld->fb_notif)); ld->fb_notif.notifier_call = fb_notifier_callback; return fb_register_client(&ld->fb_notif); } diff --git a/trunk/drivers/video/da8xx-fb.c b/trunk/drivers/video/da8xx-fb.c index 035d56835b75..d065894ce38f 100644 --- a/trunk/drivers/video/da8xx-fb.c +++ b/trunk/drivers/video/da8xx-fb.c @@ -704,7 +704,7 @@ static int __init fb_probe(struct platform_device *device) if (i == ARRAY_SIZE(known_lcd_panels)) { dev_err(&device->dev, "GLCD: No valid panel found\n"); - ret = -ENODEV; + ret = ENODEV; goto err_clk_disable; } else dev_info(&device->dev, "GLCD: Found %s panel\n", diff --git a/trunk/fs/cifs/misc.c b/trunk/fs/cifs/misc.c index d27d4ec6579b..1e25efcb55c8 100644 --- a/trunk/fs/cifs/misc.c +++ b/trunk/fs/cifs/misc.c @@ -720,7 +720,7 @@ void cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb) { if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { - cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_SERVER_INUM; + cifs_sb->mnt_cifs_flags &= CIFS_MOUNT_SERVER_INUM; cERROR(1, ("Autodisabling the use of server inode numbers on " "%s. This server doesn't seem to support them " "properly. Hardlinks will not be recognized on this " diff --git a/trunk/fs/fcntl.c b/trunk/fs/fcntl.c index 2cf93ec40a67..fc089f2f7f56 100644 --- a/trunk/fs/fcntl.c +++ b/trunk/fs/fcntl.c @@ -284,7 +284,7 @@ static int f_setown_ex(struct file *filp, unsigned long arg) type = PIDTYPE_PID; break; - case F_OWNER_PGRP: + case F_OWNER_GID: type = PIDTYPE_PGID; break; @@ -321,7 +321,7 @@ static int f_getown_ex(struct file *filp, unsigned long arg) break; case PIDTYPE_PGID: - owner.type = F_OWNER_PGRP; + owner.type = F_OWNER_GID; break; default: diff --git a/trunk/fs/nfsd/nfs3xdr.c b/trunk/fs/nfsd/nfs3xdr.c index d0a2ce1b4324..edf926e1062f 100644 --- a/trunk/fs/nfsd/nfs3xdr.c +++ b/trunk/fs/nfsd/nfs3xdr.c @@ -958,7 +958,7 @@ encode_entry(struct readdir_cd *ccd, const char *name, int namlen, p1 = encode_entry_baggage(cd, p1, name, namlen, ino); if (plus) - p1 = encode_entryplus_baggage(cd, p1, name, namlen); + p = encode_entryplus_baggage(cd, p1, name, namlen); /* determine entry word length and lengths to go in pages */ num_entry_words = p1 - tmp; diff --git a/trunk/fs/nilfs2/cpfile.c b/trunk/fs/nilfs2/cpfile.c index 3f5d5d06f53c..1c6cfb59128d 100644 --- a/trunk/fs/nilfs2/cpfile.c +++ b/trunk/fs/nilfs2/cpfile.c @@ -871,6 +871,7 @@ int nilfs_cpfile_change_cpmode(struct inode *cpfile, __u64 cno, int mode) * exclusive with a new mount job. Though it doesn't cover * umount, it's enough for the purpose. */ + mutex_lock(&nilfs->ns_mount_mutex); if (nilfs_checkpoint_is_mounted(nilfs, cno, 1)) { /* Current implementation does not have to protect plain read-only mounts since they are exclusive @@ -879,6 +880,7 @@ int nilfs_cpfile_change_cpmode(struct inode *cpfile, __u64 cno, int mode) ret = -EBUSY; } else ret = nilfs_cpfile_clear_snapshot(cpfile, cno); + mutex_unlock(&nilfs->ns_mount_mutex); return ret; case NILFS_SNAPSHOT: return nilfs_cpfile_set_snapshot(cpfile, cno); diff --git a/trunk/fs/nilfs2/inode.c b/trunk/fs/nilfs2/inode.c index 2a0a5a3ac134..5040220c3732 100644 --- a/trunk/fs/nilfs2/inode.c +++ b/trunk/fs/nilfs2/inode.c @@ -664,6 +664,7 @@ int nilfs_load_inode_block(struct nilfs_sb_info *sbi, struct inode *inode, int err; spin_lock(&sbi->s_inode_lock); + /* Caller of this function MUST lock s_inode_lock */ if (ii->i_bh == NULL) { spin_unlock(&sbi->s_inode_lock); err = nilfs_ifile_get_inode_block(sbi->s_ifile, inode->i_ino, diff --git a/trunk/fs/nilfs2/ioctl.c b/trunk/fs/nilfs2/ioctl.c index f6af76042d80..d24057d58f17 100644 --- a/trunk/fs/nilfs2/ioctl.c +++ b/trunk/fs/nilfs2/ioctl.c @@ -99,8 +99,7 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs, static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp, unsigned int cmd, void __user *argp) { - struct the_nilfs *nilfs = NILFS_SB(inode->i_sb)->s_nilfs; - struct inode *cpfile = nilfs->ns_cpfile; + struct inode *cpfile = NILFS_SB(inode->i_sb)->s_nilfs->ns_cpfile; struct nilfs_transaction_info ti; struct nilfs_cpmode cpmode; int ret; @@ -110,17 +109,14 @@ static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp, if (copy_from_user(&cpmode, argp, sizeof(cpmode))) return -EFAULT; - mutex_lock(&nilfs->ns_mount_mutex); nilfs_transaction_begin(inode->i_sb, &ti, 0); ret = nilfs_cpfile_change_cpmode( cpfile, cpmode.cm_cno, cpmode.cm_mode); if (unlikely(ret < 0)) { nilfs_transaction_abort(inode->i_sb); - mutex_unlock(&nilfs->ns_mount_mutex); return ret; } nilfs_transaction_commit(inode->i_sb); /* never fails */ - mutex_unlock(&nilfs->ns_mount_mutex); return ret; } diff --git a/trunk/fs/proc/array.c b/trunk/fs/proc/array.c index 822c2d506518..07f77a7945c3 100644 --- a/trunk/fs/proc/array.c +++ b/trunk/fs/proc/array.c @@ -571,7 +571,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, rsslim, mm ? mm->start_code : 0, mm ? mm->end_code : 0, - (permitted && mm) ? task->stack_start : 0, + (permitted) ? task->stack_start : 0, esp, eip, /* The signal information here is obsolete. diff --git a/trunk/fs/xfs/xfs_log_recover.c b/trunk/fs/xfs/xfs_log_recover.c index fb17f8226b09..1099395d7d6c 100644 --- a/trunk/fs/xfs/xfs_log_recover.c +++ b/trunk/fs/xfs/xfs_log_recover.c @@ -1980,7 +1980,7 @@ xlog_recover_do_reg_buffer( "XFS: NULL dquot in %s.", __func__); goto next; } - if (item->ri_buf[i].i_len < sizeof(xfs_disk_dquot_t)) { + if (item->ri_buf[i].i_len < sizeof(xfs_dqblk_t)) { cmn_err(CE_ALERT, "XFS: dquot too small (%d) in %s.", item->ri_buf[i].i_len, __func__); @@ -2635,7 +2635,7 @@ xlog_recover_do_dquot_trans( "XFS: NULL dquot in %s.", __func__); return XFS_ERROR(EIO); } - if (item->ri_buf[1].i_len < sizeof(xfs_disk_dquot_t)) { + if (item->ri_buf[1].i_len < sizeof(xfs_dqblk_t)) { cmn_err(CE_ALERT, "XFS: dquot too small (%d) in %s.", item->ri_buf[1].i_len, __func__); diff --git a/trunk/fs/xfs/xfs_trans_ail.c b/trunk/fs/xfs/xfs_trans_ail.c index 2ffc570679be..f31271c30de9 100644 --- a/trunk/fs/xfs/xfs_trans_ail.c +++ b/trunk/fs/xfs/xfs_trans_ail.c @@ -467,7 +467,6 @@ xfs_trans_ail_update( { xfs_log_item_t *dlip = NULL; xfs_log_item_t *mlip; /* ptr to minimum lip */ - xfs_lsn_t tail_lsn; mlip = xfs_ail_min(ailp); @@ -484,16 +483,8 @@ xfs_trans_ail_update( if (mlip == dlip) { mlip = xfs_ail_min(ailp); - /* - * It is not safe to access mlip after the AIL lock is - * dropped, so we must get a copy of li_lsn before we do - * so. This is especially important on 32-bit platforms - * where accessing and updating 64-bit values like li_lsn - * is not atomic. - */ - tail_lsn = mlip->li_lsn; spin_unlock(&ailp->xa_lock); - xfs_log_move_tail(ailp->xa_mount, tail_lsn); + xfs_log_move_tail(ailp->xa_mount, mlip->li_lsn); } else { spin_unlock(&ailp->xa_lock); } @@ -523,7 +514,6 @@ xfs_trans_ail_delete( { xfs_log_item_t *dlip; xfs_log_item_t *mlip; - xfs_lsn_t tail_lsn; if (lip->li_flags & XFS_LI_IN_AIL) { mlip = xfs_ail_min(ailp); @@ -537,16 +527,9 @@ xfs_trans_ail_delete( if (mlip == dlip) { mlip = xfs_ail_min(ailp); - /* - * It is not safe to access mlip after the AIL lock - * is dropped, so we must get a copy of li_lsn - * before we do so. This is especially important - * on 32-bit platforms where accessing and updating - * 64-bit values like li_lsn is not atomic. - */ - tail_lsn = mlip ? mlip->li_lsn : 0; spin_unlock(&ailp->xa_lock); - xfs_log_move_tail(ailp->xa_mount, tail_lsn); + xfs_log_move_tail(ailp->xa_mount, + (mlip ? mlip->li_lsn : 0)); } else { spin_unlock(&ailp->xa_lock); } diff --git a/trunk/include/asm-generic/fcntl.h b/trunk/include/asm-generic/fcntl.h index 495dc8af4044..cd2d7896e34b 100644 --- a/trunk/include/asm-generic/fcntl.h +++ b/trunk/include/asm-generic/fcntl.h @@ -89,7 +89,7 @@ #define F_OWNER_TID 0 #define F_OWNER_PID 1 -#define F_OWNER_PGRP 2 +#define F_OWNER_GID 2 struct f_owner_ex { int type; diff --git a/trunk/include/linux/input.h b/trunk/include/linux/input.h index c2b1a7d244d9..0ccfc30cd40f 100644 --- a/trunk/include/linux/input.h +++ b/trunk/include/linux/input.h @@ -1377,10 +1377,6 @@ extern struct class input_class; * methods; erase() is optional. set_gain() and set_autocenter() need * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER * bits. - * - * Note that playback(), set_gain() and set_autocenter() are called with - * dev->event_lock spinlock held and interrupts off and thus may not - * sleep. */ struct ff_device { int (*upload)(struct input_dev *dev, struct ff_effect *effect, diff --git a/trunk/include/linux/nilfs2_fs.h b/trunk/include/linux/nilfs2_fs.h index ce520402e840..79fec6af3f9f 100644 --- a/trunk/include/linux/nilfs2_fs.h +++ b/trunk/include/linux/nilfs2_fs.h @@ -424,6 +424,15 @@ struct nilfs_dat_entry { __le64 de_rsv; }; +/** + * struct nilfs_dat_group_desc - block group descriptor + * @dg_nfrees: number of free virtual block numbers in block group + */ +struct nilfs_dat_group_desc { + __le32 dg_nfrees; +}; + + /** * struct nilfs_snapshot_list - snapshot list * @ssl_next: next checkpoint number on snapshot list diff --git a/trunk/include/linux/suspend.h b/trunk/include/linux/suspend.h index 5e781d824e6d..cd15df6c63cd 100644 --- a/trunk/include/linux/suspend.h +++ b/trunk/include/linux/suspend.h @@ -301,8 +301,6 @@ static inline int unregister_pm_notifier(struct notifier_block *nb) #define pm_notifier(fn, pri) do { (void)(fn); } while (0) #endif /* !CONFIG_PM_SLEEP */ -extern struct mutex pm_mutex; - #ifndef CONFIG_HIBERNATION static inline void register_nosave_region(unsigned long b, unsigned long e) { @@ -310,23 +308,8 @@ static inline void register_nosave_region(unsigned long b, unsigned long e) static inline void register_nosave_region_late(unsigned long b, unsigned long e) { } - -static inline void lock_system_sleep(void) {} -static inline void unlock_system_sleep(void) {} - -#else - -/* Let some subsystems like memory hotadd exclude hibernation */ - -static inline void lock_system_sleep(void) -{ - mutex_lock(&pm_mutex); -} - -static inline void unlock_system_sleep(void) -{ - mutex_unlock(&pm_mutex); -} #endif +extern struct mutex pm_mutex; + #endif /* _LINUX_SUSPEND_H */ diff --git a/trunk/include/scsi/scsi_host.h b/trunk/include/scsi/scsi_host.h index 47941fc5aba7..6e728b176904 100644 --- a/trunk/include/scsi/scsi_host.h +++ b/trunk/include/scsi/scsi_host.h @@ -797,23 +797,30 @@ static inline unsigned int scsi_host_get_prot(struct Scsi_Host *shost) static inline unsigned int scsi_host_dif_capable(struct Scsi_Host *shost, unsigned int target_type) { - static unsigned char cap[] = { 0, - SHOST_DIF_TYPE1_PROTECTION, - SHOST_DIF_TYPE2_PROTECTION, - SHOST_DIF_TYPE3_PROTECTION }; + switch (target_type) { + case 1: + if (shost->prot_capabilities & SHOST_DIF_TYPE1_PROTECTION) + return target_type; + case 2: + if (shost->prot_capabilities & SHOST_DIF_TYPE2_PROTECTION) + return target_type; + case 3: + if (shost->prot_capabilities & SHOST_DIF_TYPE3_PROTECTION) + return target_type; + } - return shost->prot_capabilities & cap[target_type] ? target_type : 0; + return 0; } static inline unsigned int scsi_host_dix_capable(struct Scsi_Host *shost, unsigned int target_type) { #if defined(CONFIG_BLK_DEV_INTEGRITY) - static unsigned char cap[] = { SHOST_DIX_TYPE0_PROTECTION, - SHOST_DIX_TYPE1_PROTECTION, - SHOST_DIX_TYPE2_PROTECTION, - SHOST_DIX_TYPE3_PROTECTION }; - - return shost->prot_capabilities & cap[target_type]; + switch (target_type) { + case 0: return shost->prot_capabilities & SHOST_DIX_TYPE0_PROTECTION; + case 1: return shost->prot_capabilities & SHOST_DIX_TYPE1_PROTECTION; + case 2: return shost->prot_capabilities & SHOST_DIX_TYPE2_PROTECTION; + case 3: return shost->prot_capabilities & SHOST_DIX_TYPE3_PROTECTION; + } #endif return 0; } diff --git a/trunk/kernel/workqueue.c b/trunk/kernel/workqueue.c index 67e526b6ae81..12328147132c 100644 --- a/trunk/kernel/workqueue.c +++ b/trunk/kernel/workqueue.c @@ -692,29 +692,31 @@ int schedule_on_each_cpu(work_func_t func) if (!works) return -ENOMEM; - get_online_cpus(); - /* - * When running in keventd don't schedule a work item on - * itself. Can just call directly because the work queue is - * already bound. This also is faster. + * when running in keventd don't schedule a work item on itself. + * Can just call directly because the work queue is already bound. + * This also is faster. + * Make this a generic parameter for other workqueues? */ - if (current_is_keventd()) + if (current_is_keventd()) { orig = raw_smp_processor_id(); + INIT_WORK(per_cpu_ptr(works, orig), func); + func(per_cpu_ptr(works, orig)); + } + get_online_cpus(); for_each_online_cpu(cpu) { struct work_struct *work = per_cpu_ptr(works, cpu); + if (cpu == orig) + continue; INIT_WORK(work, func); + schedule_work_on(cpu, work); + } + for_each_online_cpu(cpu) { if (cpu != orig) - schedule_work_on(cpu, work); + flush_work(per_cpu_ptr(works, cpu)); } - if (orig >= 0) - func(per_cpu_ptr(works, orig)); - - for_each_online_cpu(cpu) - flush_work(per_cpu_ptr(works, cpu)); - put_online_cpus(); free_percpu(works); return 0; diff --git a/trunk/mm/Kconfig b/trunk/mm/Kconfig index 44cf6f0a3a6d..fd3386242cf0 100644 --- a/trunk/mm/Kconfig +++ b/trunk/mm/Kconfig @@ -128,9 +128,12 @@ config SPARSEMEM_VMEMMAP config MEMORY_HOTPLUG bool "Allow for memory hot-add" depends on SPARSEMEM || X86_64_ACPI_NUMA - depends on HOTPLUG && ARCH_ENABLE_MEMORY_HOTPLUG + depends on HOTPLUG && !(HIBERNATION && !S390) && ARCH_ENABLE_MEMORY_HOTPLUG depends on (IA64 || X86 || PPC_BOOK3S_64 || SUPERH || S390) +comment "Memory hotplug is currently incompatible with Software Suspend" + depends on SPARSEMEM && HOTPLUG && HIBERNATION && !S390 + config MEMORY_HOTPLUG_SPARSE def_bool y depends on SPARSEMEM && MEMORY_HOTPLUG diff --git a/trunk/mm/memory_hotplug.c b/trunk/mm/memory_hotplug.c index 2047465cd27c..821dee596377 100644 --- a/trunk/mm/memory_hotplug.c +++ b/trunk/mm/memory_hotplug.c @@ -26,7 +26,6 @@ #include #include #include -#include #include @@ -448,8 +447,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages) } #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ -/* we are OK calling __meminit stuff here - we have CONFIG_MEMORY_HOTPLUG */ -static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start) +static pg_data_t *hotadd_new_pgdat(int nid, u64 start) { struct pglist_data *pgdat; unsigned long zones_size[MAX_NR_ZONES] = {0}; @@ -486,18 +484,14 @@ int __ref add_memory(int nid, u64 start, u64 size) struct resource *res; int ret; - lock_system_sleep(); - res = register_memory_resource(start, size); - ret = -EEXIST; if (!res) - goto out; + return -EEXIST; if (!node_online(nid)) { pgdat = hotadd_new_pgdat(nid, start); - ret = -ENOMEM; if (!pgdat) - goto out; + return -ENOMEM; new_pgdat = 1; } @@ -520,8 +514,7 @@ int __ref add_memory(int nid, u64 start, u64 size) BUG_ON(ret); } - goto out; - + return ret; error: /* rollback pgdat allocation and others */ if (new_pgdat) @@ -529,8 +522,6 @@ int __ref add_memory(int nid, u64 start, u64 size) if (res) release_memory_resource(res); -out: - unlock_system_sleep(); return ret; } EXPORT_SYMBOL_GPL(add_memory); @@ -767,8 +758,6 @@ int offline_pages(unsigned long start_pfn, if (!test_pages_in_a_zone(start_pfn, end_pfn)) return -EINVAL; - lock_system_sleep(); - zone = page_zone(pfn_to_page(start_pfn)); node = zone_to_nid(zone); nr_pages = end_pfn - start_pfn; @@ -776,7 +765,7 @@ int offline_pages(unsigned long start_pfn, /* set above range as isolated */ ret = start_isolate_page_range(start_pfn, end_pfn); if (ret) - goto out; + return ret; arg.start_pfn = start_pfn; arg.nr_pages = nr_pages; @@ -854,7 +843,6 @@ int offline_pages(unsigned long start_pfn, writeback_set_ratelimit(); memory_notify(MEM_OFFLINE, &arg); - unlock_system_sleep(); return 0; failed_removal: @@ -864,8 +852,6 @@ int offline_pages(unsigned long start_pfn, /* pushback to free area */ undo_isolate_page_range(start_pfn, end_pfn); -out: - unlock_system_sleep(); return ret; } diff --git a/trunk/mm/percpu.c b/trunk/mm/percpu.c index 5adfc268b408..d90797160c2a 100644 --- a/trunk/mm/percpu.c +++ b/trunk/mm/percpu.c @@ -355,86 +355,62 @@ static struct pcpu_chunk *pcpu_chunk_addr_search(void *addr) } /** - * pcpu_need_to_extend - determine whether chunk area map needs to be extended - * @chunk: chunk of interest + * pcpu_extend_area_map - extend area map for allocation + * @chunk: target chunk * - * Determine whether area map of @chunk needs to be extended to - * accomodate a new allocation. + * Extend area map of @chunk so that it can accomodate an allocation. + * A single allocation can split an area into three areas, so this + * function makes sure that @chunk->map has at least two extra slots. * * CONTEXT: - * pcpu_lock. + * pcpu_alloc_mutex, pcpu_lock. pcpu_lock is released and reacquired + * if area map is extended. * * RETURNS: - * New target map allocation length if extension is necessary, 0 - * otherwise. + * 0 if noop, 1 if successfully extended, -errno on failure. */ -static int pcpu_need_to_extend(struct pcpu_chunk *chunk) +static int pcpu_extend_area_map(struct pcpu_chunk *chunk, unsigned long *flags) { int new_alloc; + int *new; + size_t size; + /* has enough? */ if (chunk->map_alloc >= chunk->map_used + 2) return 0; + spin_unlock_irqrestore(&pcpu_lock, *flags); + new_alloc = PCPU_DFL_MAP_ALLOC; while (new_alloc < chunk->map_used + 2) new_alloc *= 2; - return new_alloc; -} - -/** - * pcpu_extend_area_map - extend area map of a chunk - * @chunk: chunk of interest - * @new_alloc: new target allocation length of the area map - * - * Extend area map of @chunk to have @new_alloc entries. - * - * CONTEXT: - * Does GFP_KERNEL allocation. Grabs and releases pcpu_lock. - * - * RETURNS: - * 0 on success, -errno on failure. - */ -static int pcpu_extend_area_map(struct pcpu_chunk *chunk, int new_alloc) -{ - int *old = NULL, *new = NULL; - size_t old_size = 0, new_size = new_alloc * sizeof(new[0]); - unsigned long flags; - - new = pcpu_mem_alloc(new_size); - if (!new) + new = pcpu_mem_alloc(new_alloc * sizeof(new[0])); + if (!new) { + spin_lock_irqsave(&pcpu_lock, *flags); return -ENOMEM; + } - /* acquire pcpu_lock and switch to new area map */ - spin_lock_irqsave(&pcpu_lock, flags); - - if (new_alloc <= chunk->map_alloc) - goto out_unlock; + /* + * Acquire pcpu_lock and switch to new area map. Only free + * could have happened inbetween, so map_used couldn't have + * grown. + */ + spin_lock_irqsave(&pcpu_lock, *flags); + BUG_ON(new_alloc < chunk->map_used + 2); - old_size = chunk->map_alloc * sizeof(chunk->map[0]); - memcpy(new, chunk->map, old_size); + size = chunk->map_alloc * sizeof(chunk->map[0]); + memcpy(new, chunk->map, size); /* * map_alloc < PCPU_DFL_MAP_ALLOC indicates that the chunk is * one of the first chunks and still using static map. */ if (chunk->map_alloc >= PCPU_DFL_MAP_ALLOC) - old = chunk->map; + pcpu_mem_free(chunk->map, size); chunk->map_alloc = new_alloc; chunk->map = new; - new = NULL; - -out_unlock: - spin_unlock_irqrestore(&pcpu_lock, flags); - - /* - * pcpu_mem_free() might end up calling vfree() which uses - * IRQ-unsafe lock and thus can't be called under pcpu_lock. - */ - pcpu_mem_free(old, old_size); - pcpu_mem_free(new, new_size); - return 0; } @@ -1073,7 +1049,7 @@ static void *pcpu_alloc(size_t size, size_t align, bool reserved) static int warn_limit = 10; struct pcpu_chunk *chunk; const char *err; - int slot, off, new_alloc; + int slot, off; unsigned long flags; if (unlikely(!size || size > PCPU_MIN_UNIT_SIZE || align > PAGE_SIZE)) { @@ -1088,25 +1064,14 @@ static void *pcpu_alloc(size_t size, size_t align, bool reserved) /* serve reserved allocations from the reserved chunk if available */ if (reserved && pcpu_reserved_chunk) { chunk = pcpu_reserved_chunk; - - if (size > chunk->contig_hint) { - err = "alloc from reserved chunk failed"; + if (size > chunk->contig_hint || + pcpu_extend_area_map(chunk, &flags) < 0) { + err = "failed to extend area map of reserved chunk"; goto fail_unlock; } - - while ((new_alloc = pcpu_need_to_extend(chunk))) { - spin_unlock_irqrestore(&pcpu_lock, flags); - if (pcpu_extend_area_map(chunk, new_alloc) < 0) { - err = "failed to extend area map of reserved chunk"; - goto fail_unlock_mutex; - } - spin_lock_irqsave(&pcpu_lock, flags); - } - off = pcpu_alloc_area(chunk, size, align); if (off >= 0) goto area_found; - err = "alloc from reserved chunk failed"; goto fail_unlock; } @@ -1118,20 +1083,14 @@ static void *pcpu_alloc(size_t size, size_t align, bool reserved) if (size > chunk->contig_hint) continue; - new_alloc = pcpu_need_to_extend(chunk); - if (new_alloc) { - spin_unlock_irqrestore(&pcpu_lock, flags); - if (pcpu_extend_area_map(chunk, - new_alloc) < 0) { - err = "failed to extend area map"; - goto fail_unlock_mutex; - } - spin_lock_irqsave(&pcpu_lock, flags); - /* - * pcpu_lock has been dropped, need to - * restart cpu_slot list walking. - */ - goto restart; + switch (pcpu_extend_area_map(chunk, &flags)) { + case 0: + break; + case 1: + goto restart; /* pcpu_lock dropped, restart */ + default: + err = "failed to extend area map"; + goto fail_unlock; } off = pcpu_alloc_area(chunk, size, align); diff --git a/trunk/scripts/dtc/data.c b/trunk/scripts/dtc/data.c index fe555e819bf8..dd2e3d39d4c1 100644 --- a/trunk/scripts/dtc/data.c +++ b/trunk/scripts/dtc/data.c @@ -217,7 +217,7 @@ struct data data_insert_at_marker(struct data d, struct marker *m, return d; } -static struct data data_append_markers(struct data d, struct marker *m) +struct data data_append_markers(struct data d, struct marker *m) { struct marker **mp = &d.markers; diff --git a/trunk/scripts/dtc/dtc-lexer.l b/trunk/scripts/dtc/dtc-lexer.l index a627bbee91d4..44dbfd3f0976 100644 --- a/trunk/scripts/dtc/dtc-lexer.l +++ b/trunk/scripts/dtc/dtc-lexer.l @@ -18,7 +18,7 @@ * USA */ -%option noyywrap noinput nounput yylineno +%option noyywrap nounput yylineno %x INCLUDE %x BYTESTRING diff --git a/trunk/scripts/dtc/dtc-lexer.lex.c_shipped b/trunk/scripts/dtc/dtc-lexer.lex.c_shipped index e27cc636e326..ac392cb040f6 100644 --- a/trunk/scripts/dtc/dtc-lexer.lex.c_shipped +++ b/trunk/scripts/dtc/dtc-lexer.lex.c_shipped @@ -9,7 +9,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_SUBMINOR_VERSION 34 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -54,6 +54,7 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -84,8 +85,6 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif -#endif /* ! C99 */ - #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -142,15 +141,7 @@ typedef unsigned int flex_uint32_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else #define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -201,6 +192,13 @@ extern FILE *yyin, *yyout; #define unput(c) yyunput( c, (yytext_ptr) ) +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + * Given that the standard has decreed that size_t exists since 1989, + * I guess we can afford to depend on it. Manoj. + */ + #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; @@ -606,7 +604,6 @@ char *yytext; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ -#define YY_NO_INPUT 1 @@ -637,7 +634,7 @@ static int dts_version; /* = 0 */ static void push_input_file(const char *filename); static int pop_input_file(void); -#line 641 "dtc-lexer.lex.c" +#line 638 "dtc-lexer.lex.c" #define INITIAL 0 #define INCLUDE 1 @@ -659,35 +656,6 @@ static int pop_input_file(void); static int yy_init_globals (void ); -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int yylex_destroy (void ); - -int yyget_debug (void ); - -void yyset_debug (int debug_flag ); - -YY_EXTRA_TYPE yyget_extra (void ); - -void yyset_extra (YY_EXTRA_TYPE user_defined ); - -FILE *yyget_in (void ); - -void yyset_in (FILE * in_str ); - -FILE *yyget_out (void ); - -void yyset_out (FILE * out_str ); - -int yyget_leng (void ); - -char *yyget_text (void ); - -int yyget_lineno (void ); - -void yyset_lineno (int line_number ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ @@ -720,12 +688,7 @@ static int input (void ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else #define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -733,7 +696,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) +#define ECHO fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -744,7 +707,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + int n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -828,7 +791,7 @@ YY_DECL #line 64 "dtc-lexer.l" -#line 832 "dtc-lexer.lex.c" +#line 795 "dtc-lexer.lex.c" if ( !(yy_init) ) { @@ -1153,7 +1116,7 @@ YY_RULE_SETUP #line 222 "dtc-lexer.l" ECHO; YY_BREAK -#line 1157 "dtc-lexer.lex.c" +#line 1120 "dtc-lexer.lex.c" case YY_END_OF_BUFFER: { @@ -1877,8 +1840,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ diff --git a/trunk/scripts/dtc/libfdt/fdt_ro.c b/trunk/scripts/dtc/libfdt/fdt_ro.c index 22e692919ff9..fbbba44fcd0d 100644 --- a/trunk/scripts/dtc/libfdt/fdt_ro.c +++ b/trunk/scripts/dtc/libfdt/fdt_ro.c @@ -411,7 +411,7 @@ int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle) &phandle, sizeof(phandle)); } -static int _stringlist_contains(const char *strlist, int listlen, const char *str) +int _stringlist_contains(const char *strlist, int listlen, const char *str) { int len = strlen(str); const char *p; diff --git a/trunk/scripts/dtc/treesource.c b/trunk/scripts/dtc/treesource.c index 1521ff11bb97..ebeb6eb27907 100644 --- a/trunk/scripts/dtc/treesource.c +++ b/trunk/scripts/dtc/treesource.c @@ -52,7 +52,7 @@ static void write_prefix(FILE *f, int level) fputc('\t', f); } -static int isstring(char c) +int isstring(char c) { return (isprint(c) || (c == '\0') diff --git a/trunk/scripts/genksyms/keywords.c_shipped b/trunk/scripts/genksyms/keywords.c_shipped index 287467a2e8c7..971e0113ae7a 100644 --- a/trunk/scripts/genksyms/keywords.c_shipped +++ b/trunk/scripts/genksyms/keywords.c_shipped @@ -1,4 +1,4 @@ -/* ANSI-C code produced by gperf version 3.0.3 */ +/* ANSI-C code produced by gperf version 3.0.2 */ /* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf */ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ @@ -30,9 +30,7 @@ #line 1 "scripts/genksyms/keywords.gperf" -struct resword; -static const struct resword *is_reserved_word(register const char *str, register unsigned int len); -#line 5 "scripts/genksyms/keywords.gperf" +#line 3 "scripts/genksyms/keywords.gperf" struct resword { const char *name; int token; }; /* maximum key range = 62, duplicates = 0 */ @@ -80,9 +78,6 @@ is_reserved_hash (register const char *str, register unsigned int len) #ifdef __GNUC__ __inline -#ifdef __GNUC_STDC_INLINE__ -__attribute__ ((__gnu_inline__)) -#endif #endif const struct resword * is_reserved_word (register const char *str, register unsigned int len) @@ -99,105 +94,105 @@ is_reserved_word (register const char *str, register unsigned int len) static const struct resword wordlist[] = { {""}, {""}, {""}, -#line 28 "scripts/genksyms/keywords.gperf" +#line 26 "scripts/genksyms/keywords.gperf" {"asm", ASM_KEYW}, {""}, -#line 10 "scripts/genksyms/keywords.gperf" +#line 8 "scripts/genksyms/keywords.gperf" {"__asm", ASM_KEYW}, {""}, -#line 11 "scripts/genksyms/keywords.gperf" +#line 9 "scripts/genksyms/keywords.gperf" {"__asm__", ASM_KEYW}, {""}, {""}, -#line 54 "scripts/genksyms/keywords.gperf" +#line 52 "scripts/genksyms/keywords.gperf" {"__typeof__", TYPEOF_KEYW}, {""}, -#line 14 "scripts/genksyms/keywords.gperf" +#line 12 "scripts/genksyms/keywords.gperf" {"__const", CONST_KEYW}, -#line 13 "scripts/genksyms/keywords.gperf" +#line 11 "scripts/genksyms/keywords.gperf" {"__attribute__", ATTRIBUTE_KEYW}, -#line 15 "scripts/genksyms/keywords.gperf" +#line 13 "scripts/genksyms/keywords.gperf" {"__const__", CONST_KEYW}, -#line 20 "scripts/genksyms/keywords.gperf" +#line 18 "scripts/genksyms/keywords.gperf" {"__signed__", SIGNED_KEYW}, -#line 46 "scripts/genksyms/keywords.gperf" +#line 44 "scripts/genksyms/keywords.gperf" {"static", STATIC_KEYW}, -#line 22 "scripts/genksyms/keywords.gperf" +#line 20 "scripts/genksyms/keywords.gperf" {"__volatile__", VOLATILE_KEYW}, -#line 41 "scripts/genksyms/keywords.gperf" +#line 39 "scripts/genksyms/keywords.gperf" {"int", INT_KEYW}, -#line 34 "scripts/genksyms/keywords.gperf" +#line 32 "scripts/genksyms/keywords.gperf" {"char", CHAR_KEYW}, -#line 35 "scripts/genksyms/keywords.gperf" +#line 33 "scripts/genksyms/keywords.gperf" {"const", CONST_KEYW}, -#line 47 "scripts/genksyms/keywords.gperf" +#line 45 "scripts/genksyms/keywords.gperf" {"struct", STRUCT_KEYW}, -#line 26 "scripts/genksyms/keywords.gperf" +#line 24 "scripts/genksyms/keywords.gperf" {"__restrict__", RESTRICT_KEYW}, -#line 27 "scripts/genksyms/keywords.gperf" - {"restrict", RESTRICT_KEYW}, #line 25 "scripts/genksyms/keywords.gperf" + {"restrict", RESTRICT_KEYW}, +#line 23 "scripts/genksyms/keywords.gperf" {"_restrict", RESTRICT_KEYW}, -#line 18 "scripts/genksyms/keywords.gperf" +#line 16 "scripts/genksyms/keywords.gperf" {"__inline__", INLINE_KEYW}, -#line 12 "scripts/genksyms/keywords.gperf" +#line 10 "scripts/genksyms/keywords.gperf" {"__attribute", ATTRIBUTE_KEYW}, {""}, -#line 16 "scripts/genksyms/keywords.gperf" +#line 14 "scripts/genksyms/keywords.gperf" {"__extension__", EXTENSION_KEYW}, -#line 37 "scripts/genksyms/keywords.gperf" +#line 35 "scripts/genksyms/keywords.gperf" {"enum", ENUM_KEYW}, -#line 21 "scripts/genksyms/keywords.gperf" +#line 19 "scripts/genksyms/keywords.gperf" {"__volatile", VOLATILE_KEYW}, -#line 38 "scripts/genksyms/keywords.gperf" +#line 36 "scripts/genksyms/keywords.gperf" {"extern", EXTERN_KEYW}, {""}, -#line 19 "scripts/genksyms/keywords.gperf" +#line 17 "scripts/genksyms/keywords.gperf" {"__signed", SIGNED_KEYW}, -#line 9 "scripts/genksyms/keywords.gperf" +#line 7 "scripts/genksyms/keywords.gperf" {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, {""}, -#line 53 "scripts/genksyms/keywords.gperf" +#line 51 "scripts/genksyms/keywords.gperf" {"typeof", TYPEOF_KEYW}, -#line 48 "scripts/genksyms/keywords.gperf" +#line 46 "scripts/genksyms/keywords.gperf" {"typedef", TYPEDEF_KEYW}, -#line 17 "scripts/genksyms/keywords.gperf" +#line 15 "scripts/genksyms/keywords.gperf" {"__inline", INLINE_KEYW}, -#line 33 "scripts/genksyms/keywords.gperf" +#line 31 "scripts/genksyms/keywords.gperf" {"auto", AUTO_KEYW}, -#line 49 "scripts/genksyms/keywords.gperf" +#line 47 "scripts/genksyms/keywords.gperf" {"union", UNION_KEYW}, {""}, {""}, -#line 50 "scripts/genksyms/keywords.gperf" +#line 48 "scripts/genksyms/keywords.gperf" {"unsigned", UNSIGNED_KEYW}, -#line 51 "scripts/genksyms/keywords.gperf" +#line 49 "scripts/genksyms/keywords.gperf" {"void", VOID_KEYW}, -#line 44 "scripts/genksyms/keywords.gperf" +#line 42 "scripts/genksyms/keywords.gperf" {"short", SHORT_KEYW}, {""}, {""}, -#line 52 "scripts/genksyms/keywords.gperf" +#line 50 "scripts/genksyms/keywords.gperf" {"volatile", VOLATILE_KEYW}, {""}, -#line 39 "scripts/genksyms/keywords.gperf" +#line 37 "scripts/genksyms/keywords.gperf" {"float", FLOAT_KEYW}, -#line 36 "scripts/genksyms/keywords.gperf" +#line 34 "scripts/genksyms/keywords.gperf" {"double", DOUBLE_KEYW}, {""}, -#line 7 "scripts/genksyms/keywords.gperf" +#line 5 "scripts/genksyms/keywords.gperf" {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, {""}, {""}, -#line 40 "scripts/genksyms/keywords.gperf" +#line 38 "scripts/genksyms/keywords.gperf" {"inline", INLINE_KEYW}, -#line 8 "scripts/genksyms/keywords.gperf" +#line 6 "scripts/genksyms/keywords.gperf" {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, -#line 43 "scripts/genksyms/keywords.gperf" +#line 41 "scripts/genksyms/keywords.gperf" {"register", REGISTER_KEYW}, {""}, -#line 24 "scripts/genksyms/keywords.gperf" +#line 22 "scripts/genksyms/keywords.gperf" {"_Bool", BOOL_KEYW}, -#line 45 "scripts/genksyms/keywords.gperf" +#line 43 "scripts/genksyms/keywords.gperf" {"signed", SIGNED_KEYW}, {""}, {""}, -#line 42 "scripts/genksyms/keywords.gperf" +#line 40 "scripts/genksyms/keywords.gperf" {"long", LONG_KEYW} }; diff --git a/trunk/scripts/genksyms/keywords.gperf b/trunk/scripts/genksyms/keywords.gperf index 8fe977a4d57b..5ef3733225fb 100644 --- a/trunk/scripts/genksyms/keywords.gperf +++ b/trunk/scripts/genksyms/keywords.gperf @@ -1,6 +1,4 @@ %{ -struct resword; -static const struct resword *is_reserved_word(register const char *str, register unsigned int len); %} struct resword { const char *name; int token; } %% diff --git a/trunk/scripts/kconfig/lex.zconf.c_shipped b/trunk/scripts/kconfig/lex.zconf.c_shipped index fdc7113b08d1..dc3e81807d13 100644 --- a/trunk/scripts/kconfig/lex.zconf.c_shipped +++ b/trunk/scripts/kconfig/lex.zconf.c_shipped @@ -160,15 +160,7 @@ typedef unsigned int flex_uint32_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else #define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -810,7 +802,7 @@ static int last_ts, first_ts; static void zconf_endhelp(void); static void zconf_endfile(void); -static void new_string(void) +void new_string(void) { text = malloc(START_STRSIZE); text_asize = START_STRSIZE; @@ -818,7 +810,7 @@ static void new_string(void) *text = 0; } -static void append_string(const char *str, int size) +void append_string(const char *str, int size) { int new_size = text_size + size + 1; if (new_size > text_asize) { @@ -832,7 +824,7 @@ static void append_string(const char *str, int size) text[text_size] = 0; } -static void alloc_string(const char *str, int size) +void alloc_string(const char *str, int size) { text = malloc(size + 1); memcpy(text, str, size); @@ -922,12 +914,7 @@ static int input (void ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else #define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -935,7 +922,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0) +#define ECHO fwrite( zconftext, zconfleng, 1, zconfout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -2073,8 +2060,8 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr ) /** Setup the input buffer state to scan the given bytes. The next call to zconflex() will * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ diff --git a/trunk/scripts/kconfig/zconf.gperf b/trunk/scripts/kconfig/zconf.gperf index d8bc74249622..25ef5d01c0af 100644 --- a/trunk/scripts/kconfig/zconf.gperf +++ b/trunk/scripts/kconfig/zconf.gperf @@ -9,8 +9,6 @@ struct kconf_id; -static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); - %% mainmenu, T_MAINMENU, TF_COMMAND menu, T_MENU, TF_COMMAND diff --git a/trunk/scripts/kconfig/zconf.hash.c_shipped b/trunk/scripts/kconfig/zconf.hash.c_shipped index c1748faf4634..5c73d51339d8 100644 --- a/trunk/scripts/kconfig/zconf.hash.c_shipped +++ b/trunk/scripts/kconfig/zconf.hash.c_shipped @@ -30,8 +30,6 @@ #endif struct kconf_id; - -static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); /* maximum key range = 47, duplicates = 0 */ #ifdef __GNUC__ diff --git a/trunk/scripts/kconfig/zconf.l b/trunk/scripts/kconfig/zconf.l index d8f7236cb0a3..21ff69c9ad4e 100644 --- a/trunk/scripts/kconfig/zconf.l +++ b/trunk/scripts/kconfig/zconf.l @@ -39,7 +39,7 @@ static int last_ts, first_ts; static void zconf_endhelp(void); static void zconf_endfile(void); -static void new_string(void) +void new_string(void) { text = malloc(START_STRSIZE); text_asize = START_STRSIZE; @@ -47,7 +47,7 @@ static void new_string(void) *text = 0; } -static void append_string(const char *str, int size) +void append_string(const char *str, int size) { int new_size = text_size + size + 1; if (new_size > text_asize) { @@ -61,7 +61,7 @@ static void append_string(const char *str, int size) text[text_size] = 0; } -static void alloc_string(const char *str, int size) +void alloc_string(const char *str, int size) { text = malloc(size + 1); memcpy(text, str, size); diff --git a/trunk/scripts/kconfig/zconf.tab.c_shipped b/trunk/scripts/kconfig/zconf.tab.c_shipped index 6e9dcd59aa87..95df833b5a9d 100644 --- a/trunk/scripts/kconfig/zconf.tab.c_shipped +++ b/trunk/scripts/kconfig/zconf.tab.c_shipped @@ -1,23 +1,24 @@ - -/* A Bison parser, made by GNU Bison 2.4.1. */ +/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - + the Free Software Foundation; either version 2, or (at your option) + any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -28,7 +29,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -46,7 +47,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.1" +#define YYBISON_VERSION "2.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -54,23 +55,94 @@ /* Pure parsers. */ #define YYPURE 0 -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ -#define yyparse zconfparse -#define yylex zconflex -#define yyerror zconferror -#define yylval zconflval -#define yychar zconfchar -#define yydebug zconfdebug -#define yynerrs zconfnerrs +#define yyparse zconfparse +#define yylex zconflex +#define yyerror zconferror +#define yylval zconflval +#define yychar zconfchar +#define yydebug zconfdebug +#define yynerrs zconfnerrs + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + T_MAINMENU = 258, + T_MENU = 259, + T_ENDMENU = 260, + T_SOURCE = 261, + T_CHOICE = 262, + T_ENDCHOICE = 263, + T_COMMENT = 264, + T_CONFIG = 265, + T_MENUCONFIG = 266, + T_HELP = 267, + T_HELPTEXT = 268, + T_IF = 269, + T_ENDIF = 270, + T_DEPENDS = 271, + T_OPTIONAL = 272, + T_PROMPT = 273, + T_TYPE = 274, + T_DEFAULT = 275, + T_SELECT = 276, + T_RANGE = 277, + T_OPTION = 278, + T_ON = 279, + T_WORD = 280, + T_WORD_QUOTE = 281, + T_UNEQUAL = 282, + T_CLOSE_PAREN = 283, + T_OPEN_PAREN = 284, + T_EOL = 285, + T_OR = 286, + T_AND = 287, + T_EQUAL = 288, + T_NOT = 289 + }; +#endif +/* Tokens. */ +#define T_MAINMENU 258 +#define T_MENU 259 +#define T_ENDMENU 260 +#define T_SOURCE 261 +#define T_CHOICE 262 +#define T_ENDCHOICE 263 +#define T_COMMENT 264 +#define T_CONFIG 265 +#define T_MENUCONFIG 266 +#define T_HELP 267 +#define T_HELPTEXT 268 +#define T_IF 269 +#define T_ENDIF 270 +#define T_DEPENDS 271 +#define T_OPTIONAL 272 +#define T_PROMPT 273 +#define T_TYPE 274 +#define T_DEFAULT 275 +#define T_SELECT 276 +#define T_RANGE 277 +#define T_OPTION 278 +#define T_ON 279 +#define T_WORD 280 +#define T_WORD_QUOTE 281 +#define T_UNEQUAL 282 +#define T_CLOSE_PAREN 283 +#define T_OPEN_PAREN 284 +#define T_EOL 285 +#define T_OR 286 +#define T_AND 287 +#define T_EQUAL 288 +#define T_NOT 289 + + /* Copy the first part of user declarations. */ @@ -91,6 +163,8 @@ #define LKC_DIRECT_LINK #include "lkc.h" +#include "zconf.hash.c" + #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) #define PRINTD 0x0001 @@ -114,7 +188,6 @@ static struct menu *current_menu, *current_entry; #endif - /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -133,77 +206,31 @@ static struct menu *current_menu, *current_entry; # define YYTOKEN_TABLE 0 #endif - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - T_MAINMENU = 258, - T_MENU = 259, - T_ENDMENU = 260, - T_SOURCE = 261, - T_CHOICE = 262, - T_ENDCHOICE = 263, - T_COMMENT = 264, - T_CONFIG = 265, - T_MENUCONFIG = 266, - T_HELP = 267, - T_HELPTEXT = 268, - T_IF = 269, - T_ENDIF = 270, - T_DEPENDS = 271, - T_OPTIONAL = 272, - T_PROMPT = 273, - T_TYPE = 274, - T_DEFAULT = 275, - T_SELECT = 276, - T_RANGE = 277, - T_OPTION = 278, - T_ON = 279, - T_WORD = 280, - T_WORD_QUOTE = 281, - T_UNEQUAL = 282, - T_CLOSE_PAREN = 283, - T_OPEN_PAREN = 284, - T_EOL = 285, - T_OR = 286, - T_AND = 287, - T_EQUAL = 288, - T_NOT = 289 - }; -#endif - - - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -{ - +{ char *string; struct file *file; struct symbol *symbol; struct expr *expr; struct menu *menu; struct kconf_id *id; +} +/* Line 187 of yacc.c. */ - - -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 + YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 #endif + /* Copy the second part of user declarations. */ -/* Include zconf.hash.c here so it can see the token constants. */ -#include "zconf.hash.c" - +/* Line 216 of yacc.c. */ #ifdef short @@ -279,14 +306,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int yyi) +YYID (int i) #else static int -YYID (yyi) - int yyi; +YYID (i) + int i; #endif { - return yyi; + return i; } #endif @@ -367,9 +394,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; + yytype_int16 yyss; + YYSTYPE yyvs; + }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -403,12 +430,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ +# define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -531,18 +558,18 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 107, 107, 109, 111, 112, 113, 114, 115, 116, - 117, 121, 125, 125, 125, 125, 125, 125, 125, 129, - 130, 131, 132, 133, 134, 138, 139, 145, 153, 159, - 167, 177, 179, 180, 181, 182, 183, 184, 187, 195, - 201, 211, 217, 223, 226, 228, 239, 240, 245, 254, - 259, 267, 270, 272, 273, 274, 275, 276, 279, 285, - 296, 302, 312, 314, 319, 327, 335, 338, 340, 341, - 342, 347, 354, 359, 367, 370, 372, 373, 374, 377, - 385, 392, 399, 405, 412, 414, 415, 416, 419, 427, - 429, 434, 435, 438, 439, 440, 444, 445, 448, 449, - 452, 453, 454, 455, 456, 457, 458, 461, 462, 465, - 466 + 0, 104, 104, 106, 108, 109, 110, 111, 112, 113, + 114, 118, 122, 122, 122, 122, 122, 122, 122, 126, + 127, 128, 129, 130, 131, 135, 136, 142, 150, 156, + 164, 174, 176, 177, 178, 179, 180, 181, 184, 192, + 198, 208, 214, 220, 223, 225, 236, 237, 242, 251, + 256, 264, 267, 269, 270, 271, 272, 273, 276, 282, + 293, 299, 309, 311, 316, 324, 332, 335, 337, 338, + 339, 344, 351, 356, 364, 367, 369, 370, 371, 374, + 382, 389, 396, 402, 409, 411, 412, 413, 416, 424, + 426, 431, 432, 435, 436, 437, 441, 442, 445, 446, + 449, 450, 451, 452, 453, 454, 455, 458, 459, 462, + 463 }; #endif @@ -958,20 +985,17 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; #endif { YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } @@ -1005,11 +1029,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - YYFPRINTF (stderr, " $%d = ", yyi + 1); + fprintf (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - YYFPRINTF (stderr, "\n"); + fprintf (stderr, "\n"); } } @@ -1319,8 +1343,10 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } + /* Prevent warnings from -Wmissing-prototypes. */ + #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -1336,10 +1362,11 @@ int yyparse (); #endif /* ! YYPARSE_PARAM */ -/* The lookahead symbol. */ + +/* The look-ahead symbol. */ int yychar; -/* The semantic value of the lookahead symbol. */ +/* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ @@ -1347,9 +1374,9 @@ int yynerrs; -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ +/*----------. +| yyparse. | +`----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1373,68 +1400,66 @@ yyparse () #endif #endif { + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - YYSIZE_T yystacksize; +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + YYSIZE_T yystacksize = YYINITDEPTH; - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ + yyssp = yyss; yyvsp = yyvs; @@ -1464,6 +1489,7 @@ yyparse () YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; + /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -1471,6 +1497,7 @@ yyparse () yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); yyss = yyss1; @@ -1493,8 +1520,9 @@ yyparse () (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -1505,6 +1533,7 @@ yyparse () yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; + YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -1514,9 +1543,6 @@ yyparse () YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - if (yystate == YYFINAL) - YYACCEPT; - goto yybackup; /*-----------. @@ -1525,16 +1551,16 @@ yyparse () yybackup: /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ + look-ahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to lookahead token. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ + /* Not known => get a look-ahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1566,16 +1592,20 @@ yybackup: goto yyreduce; } + if (yyn == YYFINAL) + YYACCEPT; + /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the lookahead token. */ + /* Shift the look-ahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token. */ - yychar = YYEMPTY; + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -1999,6 +2029,7 @@ yyreduce: break; +/* Line 1267 of yacc.c. */ default: break; } @@ -2010,6 +2041,7 @@ yyreduce: *++yyvsp = yyval; + /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -2074,7 +2106,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an + /* If just tried and failed to reuse look-ahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -2091,7 +2123,7 @@ yyerrlab: } } - /* Else will try to reuse lookahead token after shifting the error + /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; @@ -2148,6 +2180,9 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } + if (yyn == YYFINAL) + YYACCEPT; + *++yyvsp = yylval; @@ -2172,7 +2207,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#ifndef yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2183,7 +2218,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEMPTY) + if (yychar != YYEOF && yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered @@ -2249,7 +2284,7 @@ void conf_parse(const char *name) sym_set_change_count(1); } -static const char *zconf_tokenname(int token) +const char *zconf_tokenname(int token) { switch (token) { case T_MENU: return "menu"; @@ -2313,7 +2348,7 @@ static void zconferror(const char *err) #endif } -static void print_quoted_string(FILE *out, const char *str) +void print_quoted_string(FILE *out, const char *str) { const char *p; int len; @@ -2330,7 +2365,7 @@ static void print_quoted_string(FILE *out, const char *str) putc('"', out); } -static void print_symbol(FILE *out, struct menu *menu) +void print_symbol(FILE *out, struct menu *menu) { struct symbol *sym = menu->sym; struct property *prop; diff --git a/trunk/scripts/kconfig/zconf.y b/trunk/scripts/kconfig/zconf.y index 8c43491f8cc9..9710b82466f2 100644 --- a/trunk/scripts/kconfig/zconf.y +++ b/trunk/scripts/kconfig/zconf.y @@ -14,6 +14,8 @@ #define LKC_DIRECT_LINK #include "lkc.h" +#include "zconf.hash.c" + #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) #define PRINTD 0x0001 @@ -98,11 +100,6 @@ static struct menu *current_menu, *current_entry; menu_end_menu(); } if_entry menu_entry choice_entry -%{ -/* Include zconf.hash.c here so it can see the token constants. */ -#include "zconf.hash.c" -%} - %% input: stmt_list; @@ -504,7 +501,7 @@ void conf_parse(const char *name) sym_set_change_count(1); } -static const char *zconf_tokenname(int token) +const char *zconf_tokenname(int token) { switch (token) { case T_MENU: return "menu"; @@ -568,7 +565,7 @@ static void zconferror(const char *err) #endif } -static void print_quoted_string(FILE *out, const char *str) +void print_quoted_string(FILE *out, const char *str) { const char *p; int len; @@ -585,7 +582,7 @@ static void print_quoted_string(FILE *out, const char *str) putc('"', out); } -static void print_symbol(FILE *out, struct menu *menu) +void print_symbol(FILE *out, struct menu *menu) { struct symbol *sym = menu->sym; struct property *prop; diff --git a/trunk/sound/oss/hex2hex.c b/trunk/sound/oss/hex2hex.c index 041ef5c52bc2..5460faae98c9 100644 --- a/trunk/sound/oss/hex2hex.c +++ b/trunk/sound/oss/hex2hex.c @@ -12,7 +12,7 @@ #define MAX_SIZE (256*1024) unsigned char buf[MAX_SIZE]; -static int loadhex(FILE *inf, unsigned char *buf) +int loadhex(FILE *inf, unsigned char *buf) { int l=0, c, i; diff --git a/trunk/sound/pci/hda/patch_nvhdmi.c b/trunk/sound/pci/hda/patch_nvhdmi.c index 6afdab09bab7..9fb60276f5c9 100644 --- a/trunk/sound/pci/hda/patch_nvhdmi.c +++ b/trunk/sound/pci/hda/patch_nvhdmi.c @@ -397,7 +397,6 @@ static int patch_nvhdmi_2ch(struct hda_codec *codec) static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { { .id = 0x10de0002, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, { .id = 0x10de0003, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, - { .id = 0x10de0005, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, { .id = 0x10de0006, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, { .id = 0x10de0007, .name = "MCP7A HDMI", .patch = patch_nvhdmi_8ch }, { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, @@ -407,7 +406,6 @@ static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { MODULE_ALIAS("snd-hda-codec-id:10de0002"); MODULE_ALIAS("snd-hda-codec-id:10de0003"); -MODULE_ALIAS("snd-hda-codec-id:10de0005"); MODULE_ALIAS("snd-hda-codec-id:10de0006"); MODULE_ALIAS("snd-hda-codec-id:10de0007"); MODULE_ALIAS("snd-hda-codec-id:10de0067"); diff --git a/trunk/sound/pci/hda/patch_realtek.c b/trunk/sound/pci/hda/patch_realtek.c index 84a52efdb2d6..daf6975b0c2e 100644 --- a/trunk/sound/pci/hda/patch_realtek.c +++ b/trunk/sound/pci/hda/patch_realtek.c @@ -8911,11 +8911,10 @@ static struct snd_pci_quirk alc882_ssid_cfg_tbl[] = { SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3), SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24), SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC885_MB5), - /* FIXME: HP jack sense seems not working for MBP 5,1 or 5,2, - * so apparently no perfect solution yet + /* FIXME: HP jack sense seems not working for MBP 5,1, so apparently + * no perfect solution yet */ SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC885_MB5), - SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC885_MB5), {} /* terminator */ }; diff --git a/trunk/sound/pci/hda/patch_sigmatel.c b/trunk/sound/pci/hda/patch_sigmatel.c index 86de305fc9f2..8eb6508cd991 100644 --- a/trunk/sound/pci/hda/patch_sigmatel.c +++ b/trunk/sound/pci/hda/patch_sigmatel.c @@ -1590,8 +1590,6 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { "Dell Studio 17", STAC_DELL_M6_DMIC), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02be, "Dell Studio 1555", STAC_DELL_M6_DMIC), - SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02bd, - "Dell Studio 1557", STAC_DELL_M6_DMIC), {} /* terminator */ }; diff --git a/trunk/sound/pci/ice1712/ice1712.h b/trunk/sound/pci/ice1712/ice1712.h index d063149e7047..9da2dae64c5b 100644 --- a/trunk/sound/pci/ice1712/ice1712.h +++ b/trunk/sound/pci/ice1712/ice1712.h @@ -382,8 +382,8 @@ struct snd_ice1712 { #ifdef CONFIG_PM int (*pm_suspend)(struct snd_ice1712 *); int (*pm_resume)(struct snd_ice1712 *); - unsigned int pm_suspend_enabled:1; - unsigned int pm_saved_is_spdif_master:1; + int pm_suspend_enabled:1; + int pm_saved_is_spdif_master:1; unsigned int pm_saved_spdif_ctrl; unsigned char pm_saved_spdif_cfg; unsigned int pm_saved_route; diff --git a/trunk/sound/pci/ice1712/prodigy_hifi.c b/trunk/sound/pci/ice1712/prodigy_hifi.c index 6a9fee3ee78f..c75515f5be6f 100644 --- a/trunk/sound/pci/ice1712/prodigy_hifi.c +++ b/trunk/sound/pci/ice1712/prodigy_hifi.c @@ -1100,7 +1100,7 @@ static void ak4396_init(struct snd_ice1712 *ice) } #ifdef CONFIG_PM -static int prodigy_hd2_resume(struct snd_ice1712 *ice) +static int __devinit prodigy_hd2_resume(struct snd_ice1712 *ice) { /* initialize ak4396 codec and restore previous mixer volumes */ struct prodigy_hifi_spec *spec = ice->spec;