Repalce strncmp by memcmp
Subsystems (172)
PATCH 1/1 Repalce strncmp by memcmp
This patch replace all strncmp(a, b, c) by memcmp(a, b, c).
I test on x86_64 (AMD Opteron 285).
#include <string.h>
char *A = "0000";
void test_memcmp(void) {
memcmp(A, "TEST", 4);
}
void test_strn(void) {
strncmp(A, "TEST", 4);
}
# gcc -c -O2 test.c
# objdump -d test.o
...0000000000000020 <test_strncmp>:
20: f3 c3 repz retq 22: 66 66 66 66 66 2e 0f data32 data32 data32 data32 nopw
%cs:0x0(%rax,%rax,1)
29: 1f 84 00 00 00 00 00
0000000000000030 <test_memcmp>:
30: f3 c3 repz retq
Wow, minus one commad :)
Signature · 1 line
Pavel.
Documentation/hwmon/hpfall.c +1 -1
@@ -25,7 +25,7 @@ int set_unload_heads_path(char *device) {char devname[64 ]; -if (strlen (device) <=5 ||strncmp (device,"/dev/" ,5 ) !=0 ) +if (strlen (device) <=5 ||memcmp (device,"/dev/" ,5 ) !=0 )return -EINVAL ;strncpy (devname, device +5 ,sizeof (devname));
Documentation/lguest/lguest.c +1 -1
@@ -1532,7 +1532,7 @@ static void setup_tun_net(char *arg)err (1 ,"opening IP socket" );/* If the command line was --tunnet=bridge:<name> do bridging. */ -if (!strncmp (BRIDGE_PFX , arg,strlen (BRIDGE_PFX ))) { +if (!memcmp (BRIDGE_PFX , arg,strlen (BRIDGE_PFX ))) { arg +=strlen (BRIDGE_PFX ); bridging = true; }
Documentation/vm/page-types.c +2 -2
@@ -844,13 +844,13 @@ static uint64_t parse_flag_name(const char *str, int len)if (!*str || !len)return 0 ; -if (len <=8 && !strncmp (str,"compound" , len)) +if (len <=8 && !memcmp (str,"compound" , len))return BITS_COMPOUND ;for (i =0 ; i <ARRAY_SIZE (page_flag_names); i++) {if (!page_flag_names[i])continue ; -if (!strncmp (str, page_flag_names[i] +2 , len)) +if (!memcmp (str, page_flag_names[i] +2 , len))return 1ULL << i; }
Documentation/vm/slabinfo.c +1 -1
@@ -311,7 +311,7 @@ static struct aliasinfo *find_one_alias(struct slabinfo *find)if (a->slab == find && (!best ||strlen (best->name) <strlen (a->name))) { best = a; -if (strncmp (a->name,"kmall" ,5 ) ==0 ) +if (memcmp (a->name,"kmall" ,5 ) ==0 )return best; } }
arch/alpha/boot/tools/objstrip.c +1 -1
@@ -144,7 +144,7 @@ main (int argc, char *argv[])#ifdef __ELF__ elf = (struct elfhdr *) buf; -if (elf->e_ident[0 ] ==0x7f &&strncmp ((char *)elf->e_ident +1 ,"ELF" ,3 ) ==0 ) { +if (elf->e_ident[0 ] ==0x7f &&memcmp ((char *)elf->e_ident +1 ,"ELF" ,3 ) ==0 ) {if (elf->e_type !=ET_EXEC ) {fprintf (stderr,"%s: %s is not an ELF executable\n" , prog_name, inname);
arch/alpha/kernel/setup.c +8 -8
@@ -532,7 +532,7 @@ setup_arch(char **cmdline_p)#ifdef CONFIG_ALPHA_GENERIC /* Assume that we've booted from SRM if we haven't booted from MILO. Detect the later by looking for "MILO" in the system serial nr. */ - alpha_using_srm =strncmp ((const char *)hwrpb->ssn,"MILO" ,4 ) !=0 ; + alpha_using_srm =memcmp ((const char *)hwrpb->ssn,"MILO" ,4 ) !=0 ;#endif /* If we are using SRM, we want to allow callbacks
@@ -560,33 +560,33 @@ setup_arch(char **cmdline_p)*/ while ((p =strsep (&args," \t" )) !=NULL ) {if (!*p)continue ; -if (strncmp (p,"alpha_mv=" ,9 ) ==0 ) { +if (memcmp (p,"alpha_mv=" ,9 ) ==0 ) { vec =get_sysvec_byname (p+9 );continue ; } -if (strncmp (p,"cycle=" ,6 ) ==0 ) { +if (memcmp (p,"cycle=" ,6 ) ==0 ) { est_cycle_freq =simple_strtol (p+6 ,NULL ,0 );continue ; } -if (strncmp (p,"mem=" ,4 ) ==0 ) { +if (memcmp (p,"mem=" ,4 ) ==0 ) { mem_size_limit =get_mem_size_limit (p+4 );continue ; } -if (strncmp (p,"srmcons" ,7 ) ==0 ) { +if (memcmp (p,"srmcons" ,7 ) ==0 ) { srmcons_output |=1 ;continue ; } -if (strncmp (p,"console=srm" ,11 ) ==0 ) { +if (memcmp (p,"console=srm" ,11 ) ==0 ) { srmcons_output |=2 ;continue ; } -if (strncmp (p,"gartsize=" ,9 ) ==0 ) { +if (memcmp (p,"gartsize=" ,9 ) ==0 ) { alpha_agpgart_size =get_mem_size_limit (p+9 ) <<PAGE_SHIFT ;continue ; }#ifdef CONFIG_VERBOSE_MCHECK -if (strncmp (p,"verbose_mcheck=" ,15 ) ==0 ) { +if (memcmp (p,"verbose_mcheck=" ,15 ) ==0 ) { alpha_verbose_mcheck =simple_strtol (p+15 ,NULL ,0 );continue ; }
arch/arm/kernel/leds.c +5 -5
@@ -41,10 +41,10 @@ static ssize_t leds_store(struct sys_device *dev,if (len >0 && buf[len] =='\0' ) len--; -if (strncmp (buf,"claim" , len) ==0 ) { +if (memcmp (buf,"claim" , len) ==0 ) {leds_event (led_claim); ret = size; - }else if (strncmp (buf,"release" , len) ==0 ) { + }else if (memcmp (buf,"release" , len) ==0 ) {leds_event (led_release); ret = size; }else {
@@ -52,12 +52,12 @@ static ssize_t leds_store(struct sys_device *dev,for (i =0 ; i <ARRAY_SIZE (evt_names); i++) {if (strlen (evt_names[i].name) != len || -strncmp (buf, evt_names[i].name, len) !=0 ) +memcmp (buf, evt_names[i].name, len) !=0 )continue ; -if (strncmp (buf+len," on" ,3 ) ==0 ) { +if (memcmp (buf+len," on" ,3 ) ==0 ) {leds_event (evt_names[i].on); ret = size; - }else if (strncmp (buf+len," off" ,4 ) ==0 ) { + }else if (memcmp (buf+len," off" ,4 ) ==0 ) {leds_event (evt_names[i].off); ret = size; }
arch/arm/mach-iop13xx/include/mach/memory.h +1 -1
@@ -34,7 +34,7 @@ static inline unsigned long __lbus_to_virt(dma_addr_t x)/* Device is an lbus device if it is on the platform bus of the IOP13XX */ #define is_lbus_device (dev) \ - (dev && strncmp(dev->bus->name, "platform", 8) == 0) + (dev && memcmp(dev->bus->name, "platform", 8) == 0)#define __arch_dma_to_virt (dev, addr) \ ({ \
arch/arm/mach-kirkwood/openrd-setup.c +2 -2
@@ -93,9 +93,9 @@ static int __init sd_uart_selection(char *str)if (!str)return 0 ; -if (!strncmp (str,"232" ,3 )) { +if (!memcmp (str,"232" ,3 )) { uart1 =232 ; - }else if (!strncmp (str,"485" ,3 )) { + }else if (!memcmp (str,"485" ,3 )) {/* OpenRD-Base doesn't have RS485. Treat is as an * unknown argument & just have default setting - * which is SD */
arch/arm/mach-omap2/mux.c +1 -1
@@ -145,7 +145,7 @@ int __init omap_mux_init_signal(const char *muxname, int val)int i;/* First check for full name in mode0.muxmode format */ -if (mode0_len &&strncmp (muxname, m0_entry, mode0_len)) +if (mode0_len &&memcmp (muxname, m0_entry, mode0_len))continue ;/* Then check for muxmode only */
arch/arm/mach-omap2/pm-debug.c +4 -4
@@ -377,7 +377,7 @@ static int clkdm_dbg_show_counter(struct clockdomain *clkdm, void *user)if (strcmp (clkdm->name,"emu_clkdm" ) ==0 ||strcmp (clkdm->name,"wkup_clkdm" ) ==0 || -strncmp (clkdm->name,"dpll" ,4 ) ==0 ) +memcmp (clkdm->name,"dpll" ,4 ) ==0 )return 0 ; seq_printf(s, "%s->%s (%d)", clkdm->name,
@@ -395,7 +395,7 @@ static int pwrdm_dbg_show_counter(struct powerdomain *pwrdm, void *user)if (strcmp (pwrdm->name,"emu_pwrdm" ) ==0 ||strcmp (pwrdm->name,"wkup_pwrdm" ) ==0 || -strncmp (pwrdm->name,"dpll" ,4 ) ==0 ) +memcmp (pwrdm->name,"dpll" ,4 ) ==0 )return 0 ;if (pwrdm->state !=pwrdm_read_pwrst (pwrdm))
@@ -425,7 +425,7 @@ static int pwrdm_dbg_show_timer(struct powerdomain *pwrdm, void *user)if (strcmp (pwrdm->name,"emu_pwrdm" ) ==0 ||strcmp (pwrdm->name,"wkup_pwrdm" ) ==0 || -strncmp (pwrdm->name,"dpll" ,4 ) ==0 ) +memcmp (pwrdm->name,"dpll" ,4 ) ==0 )return 0 ;pwrdm_state_switch (pwrdm);
@@ -551,7 +551,7 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *dir) pwrdm->timer = t; -if (strncmp (pwrdm->name,"dpll" ,4 ) ==0 ) +if (memcmp (pwrdm->name,"dpll" ,4 ) ==0 )return 0 ; d =debugfs_create_dir (pwrdm->name, (struct dentry *)dir);
arch/arm/mach-orion5x/ts78xx-setup.c +2 -2
@@ -458,9 +458,9 @@ static ssize_t ts78xx_fpga_store(struct kobject *kobj,return -EBUSY ; } -if (strncmp (buf,"online" ,sizeof ("online" ) -1 ) ==0 ) +if (memcmp (buf,"online" ,sizeof ("online" ) -1 ) ==0 ) value =1 ; -else if (strncmp (buf,"offline" ,sizeof ("offline" ) -1 ) ==0 ) +else if (memcmp (buf,"offline" ,sizeof ("offline" ) -1 ) ==0 ) value =0 ;else {printk (KERN_ERR "ts78xx_fpga_store: Invalid value\n" );
arch/arm/plat-omap/include/plat/memory.h +2 -2
@@ -48,7 +48,7 @@* OMAP bus type is lbus. We do the address translation based on the * device overriding the defaults used in the dma-mapping API. * Note that the is_lbus_device() test is not very efficient on 1510 -* because of the strncmp(). +* because of the memcmp(). */ #ifdef CONFIG_ARCH_OMAP15XX
@@ -59,7 +59,7 @@#define virt_to_lbus (x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET)#define lbus_to_virt (x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) -#define is_lbus_device (dev) (cpu_is_omap15xx() && dev && (strncmp(dev_name(dev), "ohci", 4) == 0)) +#define is_lbus_device (dev) (cpu_is_omap15xx() && dev && (memcmp(dev_name(dev), "ohci", 4) == 0))#define __arch_page_to_dma (dev, page) \ ({ dma_addr_t __dma = page_to_phys(page); \
arch/blackfin/kernel/bfin_dma_5xx.c +1 -1
@@ -115,7 +115,7 @@ int request_dma(unsigned int channel, const char *device_id)if (channel >=CH_UART2_RX && channel <=CH_UART3_TX ) {unsigned int per_map; per_map = dma_ch[channel].regs->peripheral_map &0xFFF ; -if (strncmp (device_id,"BFIN_UART" ,9 ) ==0 ) +if (memcmp (device_id,"BFIN_UART" ,9 ) ==0 ) dma_ch[channel].regs->peripheral_map = per_map | ((channel -CH_UART2_RX +0xC )<<12 );else
arch/blackfin/kernel/early_printk.c +2 -2
@@ -126,7 +126,7 @@ int __init setup_early_printk(char *buf)#ifdef CONFIG_SERIAL_BFIN /* Check for Blackfin Serial */ -if (!strncmp (buf,"serial,uart" ,11 )) { +if (!memcmp (buf,"serial,uart" ,11 )) { buf +=11 ; early_console =earlyserial_init (buf); }
@@ -134,7 +134,7 @@ int __init setup_early_printk(char *buf)#ifdef CONFIG_BFIN_JTAG_COMM /* Check for Blackfin JTAG */ -if (!strncmp (buf,"jtag" ,4 )) { +if (!memcmp (buf,"jtag" ,4 )) { buf +=4 ; early_console =bfin_jc_early_init (); }
arch/frv/mb93090-mb00/pci-vdk.c +1 -1
@@ -437,7 +437,7 @@ char * __init pcibios_setup(char *str)if (!strcmp (str,"off" )) { pci_probe =0 ;return NULL ; - }else if (!strncmp (str,"lastbus=" ,8 )) { + }else if (!memcmp (str,"lastbus=" ,8 )) { pcibios_last_bus =simple_strtol (str+8 ,NULL ,0 );return NULL ; }
arch/ia64/hp/common/sba_iommu.c +1 -1
@@ -2060,7 +2060,7 @@ acpi_sba_ioc_add(struct acpi_device *device)* For HWP0001, only SBA appears in ACPI namespace. It encloses the PCI * root bridges, and its CSR space includes the IOC function. */ -if (strncmp ("HWP0001" , adi->hardware_id.string,7 ) ==0 ) { +if (memcmp ("HWP0001" , adi->hardware_id.string,7 ) ==0 ) { hpa +=ZX1_IOC_OFFSET ;/* zx1 based systems default to kernel page size iommu pages */ if (!iovp_shift)
arch/ia64/hp/sim/boot/bootloader.c +1 -1
@@ -112,7 +112,7 @@ start_bootloader (void)ssc ((long ) &stat,0 ,0 ,0 ,SSC_WAIT_COMPLETION ); elf = (struct elfhdr *) mem; -if (elf->e_ident[0 ] ==0x7f &&strncmp (elf->e_ident +1 ,"ELF" ,3 ) !=0 ) { +if (elf->e_ident[0 ] ==0x7f &&memcmp (elf->e_ident +1 ,"ELF" ,3 ) !=0 ) {cons_write ("not an ELF file\n" );return ; }
arch/ia64/hp/sim/simeth.c +1 -1
@@ -265,7 +265,7 @@ simeth_open(struct net_device *dev)/* copied from lapbether.c */ static __inline__int dev_is_ethdev (struct net_device *dev) { -return ( dev->type ==ARPHRD_ETHER &&strncmp (dev->name,"dummy" ,5 )); +return ( dev->type ==ARPHRD_ETHER &&memcmp (dev->name,"dummy" ,5 )); }
arch/ia64/kernel/acpi.c +4 -4
@@ -100,7 +100,7 @@ acpi_get_sysname(void) } rsdp = (struct acpi_table_rsdp *)__va (rsdp_phys); -if (strncmp (rsdp->signature,ACPI_SIG_RSDP ,sizeof (ACPI_SIG_RSDP ) -1 )) { +if (memcmp (rsdp->signature,ACPI_SIG_RSDP ,sizeof (ACPI_SIG_RSDP ) -1 )) {printk (KERN_ERR "ACPI 2.0 RSDP signature incorrect, default to \"dig\"\n" );return "dig" ;
@@ -108,7 +108,7 @@ acpi_get_sysname(void) xsdt = (struct acpi_table_xsdt *)__va (rsdp->xsdt_physical_address); hdr = &xsdt->header; -if (strncmp (hdr->signature,ACPI_SIG_XSDT ,sizeof (ACPI_SIG_XSDT ) -1 )) { +if (memcmp (hdr->signature,ACPI_SIG_XSDT ,sizeof (ACPI_SIG_XSDT ) -1 )) {printk (KERN_ERR "ACPI 2.0 XSDT signature incorrect, default to \"dig\"\n" );return "dig" ;
@@ -131,7 +131,7 @@ acpi_get_sysname(void)sizeof (xsdt->table_offset_entry[0 ]);for (i =0 ; i < nentries; i++) { hdr =__va (xsdt->table_offset_entry[i]); -if (strncmp (hdr->signature,ACPI_SIG_DMAR , +if (memcmp (hdr->signature,ACPI_SIG_DMAR ,sizeof (ACPI_SIG_DMAR ) -1 ) ==0 )return "dig_vtd" ; }
@@ -373,7 +373,7 @@ acpi_parse_nmi_src(struct acpi_subtable_header * header, const unsigned long endstatic void __init acpi_madt_oem_check (char *oem_id,char *oem_table_id) { -if (!strncmp (oem_id,"IBM" ,3 ) && (!strncmp (oem_table_id,"SERMOW" ,6 ))) { +if (!memcmp (oem_id,"IBM" ,3 ) && (!strncmp (oem_table_id,"SERMOW" ,6 ))) {/* * Unfortunately ITC_DRIFT is not yet part of the
arch/ia64/kernel/efi.c +1 -1
@@ -426,7 +426,7 @@ static void __init handle_palo(unsigned long palo_phys)struct palo_table *palo =__va (palo_phys);u8 checksum; -if (strncmp (palo->signature,PALO_SIG ,sizeof (PALO_SIG ) -1 )) { +if (memcmp (palo->signature,PALO_SIG ,sizeof (PALO_SIG ) -1 )) {printk (KERN_INFO "PALO signature incorrect.\n" );return ; }
arch/ia64/kernel/esi.c +1 -1
@@ -69,7 +69,7 @@ static int __init esi_init (void) systab =__va (esi); -if (strncmp (systab->signature,"ESIT" ,4 ) !=0 ) { +if (memcmp (systab->signature,"ESIT" ,4 ) !=0 ) {printk (KERN_ERR "bad signature in ESI system table!" );return -ENODEV ; }
arch/ia64/kernel/sal.c +1 -1
@@ -314,7 +314,7 @@ ia64_sal_init (struct ia64_sal_systab *systab)return ; } -if (strncmp (systab->signature,"SST_" ,4 ) !=0 ) +if (memcmp (systab->signature,"SST_" ,4 ) !=0 )printk (KERN_ERR "bad signature in system table!" );check_versions (systab);
arch/m32r/kernel/process.c +2 -2
@@ -121,10 +121,10 @@ void machine_power_off(void)static int __init idle_setup (char *str) { -if (!strncmp (str,"poll" ,4 )) { +if (!memcmp (str,"poll" ,4 )) {printk ("using poll in idle threads.\n" ); pm_idle = poll_idle; - }else if (!strncmp (str,"sleep" ,4 )) { + }else if (!memcmp (str,"sleep" ,4 )) {printk ("using sleep in idle threads.\n" ); pm_idle = default_idle; }
arch/m68k/atari/config.c +1 -1
@@ -165,7 +165,7 @@ static int __init atari_switches_setup(char *str)if (!*p)continue ; ovsc_shift =0 ; -if (strncmp (p,"ov_" ,3 ) ==0 ) { +if (memcmp (p,"ov_" ,3 ) ==0 ) { p +=3 ; ovsc_shift =ATARI_SWITCH_OVSC_SHIFT ; }
arch/m68k/mvme16x/config.c +1 -1
@@ -142,7 +142,7 @@ void __init config_mvme16x(void)/* Report board revision */ -if (strncmp ("BDID" , p->bdid,4 )) +if (memcmp ("BDID" , p->bdid,4 )) {printk ("\n\nBug call .BRD_ID returned garbage - giving up\n\n" );while (1 )
arch/m68k/q40/config.c +1 -1
@@ -83,7 +83,7 @@ static void q40_mem_console_write(struct console *co, const char *s,static int __init q40_debug_setup (char *arg) {/* useful for early debugging stages - writes kernel messages into SRAM */ -if (MACH_IS_Q40 && !strncmp (arg,"mem" ,3 )) { +if (MACH_IS_Q40 && !memcmp (arg,"mem" ,3 )) {/*printk("using NVRAM debug, q40_mem_cptr=%p\n",q40_mem_cptr);*/ _cpleft =2000 - ((long )q40_mem_cptr-0xff020000 ) /4 ;register_console (&q40_console_driver);
arch/m68k/sun3/prom/console.c +3 -3
@@ -92,7 +92,7 @@ prom_query_input_device()if (prom_node_has_property (st_p,"keyboard" ))return PROMDEV_IKBD ;prom_getproperty (st_p,"device_type" , propb,sizeof (propb)); -if (strncmp (propb,"serial" ,sizeof ("serial" ))) +if (memcmp (propb,"serial" ,sizeof ("serial" )))return PROMDEV_I_UNK ;prom_getproperty (prom_root_node,"stdin-path" , propb,sizeof (propb)); p = propb;
@@ -139,12 +139,12 @@ prom_query_output_device()local_irq_restore (flags); propl =prom_getproperty (st_p,"device_type" , propb,sizeof (propb));if (propl >=0 && propl ==sizeof ("display" ) && -strncmp ("display" , propb,sizeof ("display" )) ==0 ) +memcmp ("display" , propb,sizeof ("display" )) ==0 ) {return PROMDEV_OSCREEN ; }if (prom_vers ==PROM_V3 ) { -if (strncmp ("serial" , propb,sizeof ("serial" ))) +if (memcmp ("serial" , propb,sizeof ("serial" )))return PROMDEV_O_UNK ;prom_getproperty (prom_root_node,"stdout-path" , propb,sizeof (propb)); p = propb;
arch/m68knommu/platform/532x/config.c +1 -1
@@ -255,7 +255,7 @@ void __init config_BSP(char *commandp, int size)#if !defined(CONFIG_BOOTPARAM )/* Copy command line from FLASH to local buffer... */ memcpy (commandp, (char *)0x4000 ,4 ); -if (strncmp (commandp,"kcl " ,4 ) ==0 ){ +if (memcmp (commandp,"kcl " ,4 ) ==0 ){memcpy (commandp, (char *)0x4004 , size); commandp[size-1 ] =0 ; }else {
arch/microblaze/kernel/prom.c +7 -7
@@ -64,16 +64,16 @@ static int __init early_init_dt_scan_serial(unsigned long node,pr_debug ("search \"chosen\", depth: %d, uname: %s\n" , depth, uname);/* find all serial nodes */ -if (strncmp (uname,"serial" ,6 ) !=0 ) +if (memcmp (uname,"serial" ,6 ) !=0 )return 0 ;early_init_dt_check_for_initrd (node);/* find compatible node with uartlite */ p =of_get_flat_dt_prop (node,"compatible" , &l); -if ((strncmp (p,"xlnx,xps-uartlite" ,17 ) !=0 ) && - (strncmp (p,"xlnx,opb-uartlite" ,17 ) !=0 ) && - (strncmp (p,"xlnx,axi-uartlite" ,17 ) !=0 )) +if ((memcmp (p,"xlnx,xps-uartlite" ,17 ) !=0 ) && + (memcmp (p,"xlnx,opb-uartlite" ,17 ) !=0 ) && + (memcmp (p,"xlnx,axi-uartlite" ,17 ) !=0 ))return 0 ; addr =of_get_flat_dt_prop (node,"reg" , &l);
@@ -97,7 +97,7 @@ static int __init early_init_dt_scan_serial_full(unsigned long node,pr_debug ("search \"chosen\", depth: %d, uname: %s\n" , depth, uname);/* find all serial nodes */ -if (strncmp (uname,"serial" ,6 ) !=0 ) +if (memcmp (uname,"serial" ,6 ) !=0 )return 0 ;early_init_dt_check_for_initrd (node);
@@ -105,8 +105,8 @@ static int __init early_init_dt_scan_serial_full(unsigned long node,/* find compatible node with uartlite */ p =of_get_flat_dt_prop (node,"compatible" , &l); -if ((strncmp (p,"xlnx,xps-uart16550" ,18 ) !=0 ) && - (strncmp (p,"xlnx,axi-uart16550" ,18 ) !=0 )) +if ((memcmp (p,"xlnx,xps-uart16550" ,18 ) !=0 ) && + (memcmp (p,"xlnx,axi-uart16550" ,18 ) !=0 ))return 0 ; addr = *(u32 *)of_get_flat_dt_prop (node,"reg" , &l);
arch/mips/alchemy/common/prom.c +1 -1
@@ -69,7 +69,7 @@ char *prom_getenv(char *envname)if (yamon) {if (strcmp (envname, *env++) ==0 )return *env; - }else if (strncmp (envname, *env, i) ==0 && (*env)[i] =='=' ) + }else if (memcmp (envname, *env, i) ==0 && (*env)[i] =='=' )return *env + i +1 ; env++; }
arch/mips/bcm47xx/nvram.c +1 -1
@@ -84,7 +84,7 @@ int nvram_getenv(char *name, char *val, size_t val_len)break ; value = eq +1 ;if ((eq - var) ==strlen (name) && -strncmp (var, name, (eq - var)) ==0 ) { +memcmp (var, name, (eq - var)) ==0 ) {snprintf (val, val_len,"%s" , value);return 0 ; }
arch/mips/bcm47xx/prom.c +1 -1
@@ -113,7 +113,7 @@ static __init void prom_init_cmdline(void)if ((strstr (arcs_cmdline,"console=" )) ==NULL ) {/* Try to read the default serial port used by CFE */ if ((cfe_getenv ("BOOT_CONSOLE" , buf,COMMAND_LINE_SIZE ) <0 ) - || (strncmp ("uart" , buf,4 ))) + || (memcmp ("uart" , buf,4 )))/* Default to uart0 */ strcpy (buf,"uart0" );
arch/mips/bcm63xx/boards/board_bcm963xx.c +1 -1
@@ -737,7 +737,7 @@ void __init board_prom_init(void)/* find board by name */ for (i =0 ; i <ARRAY_SIZE (bcm963xx_boards); i++) { -if (strncmp (nvram.name, bcm963xx_boards[i]->name, +if (memcmp (nvram.name, bcm963xx_boards[i]->name,sizeof (nvram.name)))continue ;/* copy, board desc array is marked initdata */
arch/mips/cavium-octeon/executive/cvmx-bootmem.c +1 -1
@@ -547,7 +547,7 @@ struct cvmx_bootmem_named_block_desc *for (i =0 ; i < cvmx_bootmem_desc->named_block_num_blocks; i++) {if ((name && named_block_array_ptr[i].size - && !strncmp (name, named_block_array_ptr[i].name, + && !memcmp (name, named_block_array_ptr[i].name, cvmx_bootmem_desc->named_block_name_len -1 )) || (!name && !named_block_array_ptr[i].size)) {
arch/mips/cavium-octeon/setup.c +2 -2
@@ -586,8 +586,8 @@ void __init prom_init(void)for (i =0 ; i < argc; i++) {const char *arg =cvmx_phys_to_ptr (octeon_boot_desc_ptr->argv[i]); -if ((strncmp (arg,"MEM=" ,4 ) ==0 ) || - (strncmp (arg,"mem=" ,4 ) ==0 )) { +if ((memcmp (arg,"MEM=" ,4 ) ==0 ) || + (memcmp (arg,"mem=" ,4 ) ==0 )) {sscanf (arg +4 ,"%llu" , &MAX_MEMORY );MAX_MEMORY <<=20 ;if (MAX_MEMORY ==0 )
arch/mips/fw/arc/cmdline.c +2 -2
@@ -42,7 +42,7 @@ static char * __init move_firmware_args(char* cp)for (i =0 ; i <ARRAY_SIZE (used_arc); i++) {int len =strlen (used_arc[i][0 ]); -if (!strncmp (prom_argv (actr), used_arc[i][0 ], len)) { +if (!memcmp (prom_argv (actr), used_arc[i][0 ], len)) {/* Ok, we want it. First append the replacement... */ strcat (cp, used_arc[i][1 ]); cp +=strlen (used_arc[i][1 ]);
@@ -81,7 +81,7 @@ void __init prom_init_cmdline(void)for (i =0 ; i <ARRAY_SIZE (ignored); i++) {int len =strlen (ignored[i]); -if (!strncmp (prom_argv (actr), ignored[i], len)) +if (!memcmp (prom_argv (actr), ignored[i], len)) goto pic_cont; }/* Ok, we want it. */
arch/mips/kernel/vpe.c +3 -3
@@ -324,7 +324,7 @@ static void layout_sections(struct module *mod, const Elf_Ehdr * hdr,for (i =0 ; i < hdr->e_shnum; ++i) {Elf_Shdr *s = &sechdrs[i]; -// || strncmp(secstrings + s->sh_name, ".init", 5) == 0) +// || memcmp(secstrings + s->sh_name, ".init", 5) == 0) if ((s->sh_flags & masks[m][0 ]) != masks[m][0 ] || (s->sh_flags & masks[m][1 ]) || s->sh_entsize != ~0UL )
@@ -621,7 +621,7 @@ static void simplify_symbols(Elf_Shdr * sechdrs,/* find the .bss section for COMMON symbols */ for (i =0 ; i < nsecs; i++) { -if (strncmp (secstrings + sechdrs[i].sh_name,".bss" ,4 ) ==0 ) { +if (memcmp (secstrings + sechdrs[i].sh_name,".bss" ,4 ) ==0 ) { bssbase = sechdrs[i].sh_addr;break ; }
@@ -658,7 +658,7 @@ static void simplify_symbols(Elf_Shdr * sechdrs,default : secbase = sechdrs[sym[i].st_shndx].sh_addr; -if (strncmp (strtab + sym[i].st_name,"_gp" ,3 ) ==0 ) { +if (memcmp (strtab + sym[i].st_name,"_gp" ,3 ) ==0 ) {save_gp_address (secbase, sym[i].st_value); }
arch/mips/loongson/common/env.c +1 -1
@@ -29,7 +29,7 @@ unsigned long memsize, highmemsize;#define parse_even_earlier (res, option, p) \ do { \ - if (strncmp(option, (char *)p, strlen(option)) == 0) \ + if (memcmp(option, (char *)p, strlen(option)) == 0) \ strict_strtol((char *)p + strlen(option"="), \ 10, &res); \ } while (0)
arch/mips/mti-malta/malta-init.c +1 -1
@@ -75,7 +75,7 @@ char *prom_getenv(char *envname) i =strlen (envname);while (prom_envp (index)) { -if (strncmp (envname,prom_envp (index), i) ==0 ) { +if (memcmp (envname,prom_envp (index), i) ==0 ) {return (prom_envp (index+1 )); } index +=2 ;
arch/mips/pci/ops-tx4927.c +3 -3
@@ -201,17 +201,17 @@ char *__devinit tx4927_pcibios_setup(char *str) {unsigned long val; -if (!strncmp (str,"trdyto=" ,7 )) { +if (!memcmp (str,"trdyto=" ,7 )) {if (strict_strtoul (str +7 ,0 , &val) ==0 ) tx4927_pci_opts.trdyto = val;return NULL ; } -if (!strncmp (str,"retryto=" ,8 )) { +if (!memcmp (str,"retryto=" ,8 )) {if (strict_strtoul (str +8 ,0 , &val) ==0 ) tx4927_pci_opts.retryto = val;return NULL ; } -if (!strncmp (str,"gbwc=" ,5 )) { +if (!memcmp (str,"gbwc=" ,5 )) {if (strict_strtoul (str +5 ,0 , &val) ==0 ) tx4927_pci_opts.gbwc = val;return NULL ;
arch/mips/pmc-sierra/msp71xx/msp_prom.c +1 -1
@@ -294,7 +294,7 @@ char *prom_getenv(char *env_name)int i =strlen (env_name);while (*var) { -if (strncmp (env_name, *var, i) ==0 ) { +if (memcmp (env_name, *var, i) ==0 ) {return (*var +strlen (env_name) +1 ); } var++;
arch/mips/pmc-sierra/yosemite/prom.c +2 -2
@@ -116,12 +116,12 @@ void __init prom_init(void)#endif while (*env) { -if (strncmp ("ocd_base" , *env,strlen ("ocd_base" )) ==0 ) +if (memcmp ("ocd_base" , *env,strlen ("ocd_base" )) ==0 ) yosemite_base =simple_strtol (*env +strlen ("ocd_base=" ),NULL ,16 ); -if (strncmp ("cpuclock" , *env,strlen ("cpuclock" )) ==0 ) +if (memcmp ("cpuclock" , *env,strlen ("cpuclock" )) ==0 ) cpu_clock_freq =simple_strtol (*env +strlen ("cpuclock=" ),NULL ,10 );
arch/mips/pnx833x/common/prom.c +1 -1
@@ -51,7 +51,7 @@ char __init *prom_getenv(char *envname) i =strlen (envname);while (*env) { -if (strncmp (envname, *env, i) ==0 && *(*env+i) =='=' ) +if (memcmp (envname, *env, i) ==0 && *(*env+i) =='=' )return *env + i +1 ; env++; }
arch/mips/pnx8550/common/prom.c +1 -1
@@ -59,7 +59,7 @@ char *prom_getenv(char *envname) i =strlen (envname);while (env->name) { -if (strncmp (envname, env->name, i) ==0 ) { +if (memcmp (envname, env->name, i) ==0 ) {return (env->name +strlen (envname) +1 ); } env++;
arch/mips/powertv/init.c +1 -1
@@ -59,7 +59,7 @@ char *prom_getenv(char *envname) i =strlen (envname);while (prom_envp (index)) { -if (strncmp (envname,prom_envp (index), i) ==0 ) { +if (memcmp (envname,prom_envp (index), i) ==0 ) { result =prom_envp (index +1 );break ; }
arch/mips/rb532/prom.c +1 -1
@@ -56,7 +56,7 @@ void __init prom_free_prom_memory(void)static inline int match_tag (char *arg,const char *tag) { -return strncmp (arg, tag,strlen (tag)) ==0 ; +return memcmp (arg, tag,strlen (tag)) ==0 ; }static inline unsigned long tag2ul (char *arg,const char *tag)
arch/mips/sibyte/common/cfe.c +1 -1
@@ -305,7 +305,7 @@ void __init prom_init(void)while (*ptr ==' ' ) { ptr++; } -if (!strncmp (ptr,"initrd=" ,7 )) { +if (!memcmp (ptr,"initrd=" ,7 )) {initrd_setup (ptr+7 );break ; }else {
arch/mips/sni/setup.c +2 -2
@@ -63,7 +63,7 @@ static void __init sni_console_setup(void)static char options[8 ]__initdata ; cdev =prom_getenv ("console_dev" ); -if (strncmp (cdev,"tty" ,3 ) ==0 ) { +if (memcmp (cdev,"tty" ,3 ) ==0 ) { ctype =prom_getenv ("console" );switch (*ctype) {default :
@@ -78,7 +78,7 @@ static void __init sni_console_setup(void) }if (baud)strcpy (options, baud); -if (strncmp (cdev,"tty552" ,6 ) ==0 ) +if (memcmp (cdev,"tty552" ,6 ) ==0 )add_preferred_console ("ttyS" , port, baud ? options :NULL );else
arch/mips/txx9/generic/pci.c +2 -2
@@ -417,7 +417,7 @@ char *__devinit txx9_pcibios_setup(char *str)RBHBK4100,RBHBK4200, Interface PCM-PCM05, etc.) */ txx9_pci_option &= ~TXX9_PCI_OPT_PICMG ;return NULL ; - }else if (!strncmp (str,"clk=" ,4 )) { + }else if (!memcmp (str,"clk=" ,4 )) {char *val = str +4 ; txx9_pci_option &= ~TXX9_PCI_OPT_CLK_MASK ;if (strcmp (val,"33" ) ==0 )
@@ -427,7 +427,7 @@ char *__devinit txx9_pcibios_setup(char *str)else /* "auto" */ txx9_pci_option |=TXX9_PCI_OPT_CLK_AUTO ;return NULL ; - }else if (!strncmp (str,"err=" ,4 )) { + }else if (!memcmp (str,"err=" ,4 )) {if (!strcmp (str +4 ,"panic" )) txx9_pci_err_action =TXX9_PCI_ERR_PANIC ;else if (!strcmp (str +4 ,"ignore" ))
arch/mips/txx9/generic/setup.c +2 -2
@@ -304,10 +304,10 @@ static void __init preprocess_cmdline(void) arcs_cmdline[0 ] ='\0' ;while (s && *s) {char *str =strsep (&s," " ); -if (strncmp (str,"board=" ,6 ) ==0 ) { +if (memcmp (str,"board=" ,6 ) ==0 ) { txx9_board_vec =find_board_byname (str +6 );continue ; - }else if (strncmp (str,"masterclk=" ,10 ) ==0 ) { + }else if (memcmp (str,"masterclk=" ,10 ) ==0 ) {unsigned long val;if (strict_strtoul (str +10 ,10 , &val) ==0 ) txx9_master_clock = val;
arch/mn10300/unit-asb2305/pci.c +1 -1
@@ -439,7 +439,7 @@ char *__init pcibios_setup(char *str) pci_probe =0 ;return NULL ; - }else if (!strncmp (str,"lastbus=" ,8 )) { + }else if (!memcmp (str,"lastbus=" ,8 )) { pcibios_last_bus =simple_strtol (str+8 ,NULL ,0 );return NULL ; }
arch/parisc/kernel/firmware.c +1 -1
@@ -793,7 +793,7 @@ int pdc_get_initiator(struct hardware_path *hwpath, struct pdc_initiator *initia/* BCJ-XXXX series boxes. E.G. "9000/785/C3000" */ #define IS_SPROCKETS () (strlen(boot_cpu_data.pdc.sys_model_name) == 14 && \ - strncmp(boot_cpu_data.pdc.sys_model_name, "9000/785", 8) == 0) + memcmp(boot_cpu_data.pdc.sys_model_name, "9000/785", 8) == 0) retval =mem_pdc_call (PDC_INITIATOR ,PDC_GET_INITIATOR ,__pa (pdc_result),__pa (hwpath));
arch/parisc/kernel/module.c +3 -3
@@ -331,7 +331,7 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr,unsigned long nrels = sechdrs[i].sh_size /sizeof (*rels);unsigned int count, s; -if (strncmp (secstrings + sechdrs[i].sh_name, +if (memcmp (secstrings + sechdrs[i].sh_name,".PARISC.unwind" ,14 ) ==0 ) me->arch.unwind_section = i;
@@ -783,7 +783,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs, } }else { val = sym->st_value; -if (strncmp (strtab + sym->st_name,"$$" ,2 ) +if (memcmp (strtab + sym->st_name,"$$" ,2 ) ==0 ) val =get_stub (me, val, addend,ELF_STUB_MILLI , loc0, targetsec);
@@ -928,7 +928,7 @@ int module_finalize(const Elf_Ehdr *hdr,for (i =1 ; i < nsyms; i++) { oldptr++;/* note, count starts at 1 so preincrement */ -if (strncmp (strtab + oldptr->st_name, +if (memcmp (strtab + oldptr->st_name,".L" ,2 ) ==0 )continue ;
arch/powerpc/boot/planetcore.c +1 -1
@@ -43,7 +43,7 @@ const char *planetcore_get_key(const char *table, const char *key)int keylen =strlen (key); do { - if (!strncmp(table, key, keylen) && table[keylen] == '=') + if (!memcmp(table, key, keylen) && table[keylen] == '=') return table + keylen + 1; table += strlen(table) + 1;
arch/powerpc/include/asm/string.h +1 -1
@@ -19,7 +19,7 @@ extern char * strcpy(char *,const char *);extern char *strncpy (char *,const char *,__kernel_size_t );extern __kernel_size_t strlen (const char *);extern int strcmp (const char *,const char *); -extern int strncmp (const char *,const char *,__kernel_size_t ); +extern int memcmp (const char *,const char *,__kernel_size_t );extern char *strcat (char *,const char *);extern void *memset (void *,int ,__kernel_size_t );extern void *memcpy (void *,const void *,__kernel_size_t );
arch/powerpc/kernel/prom_init.c +3 -3
@@ -603,9 +603,9 @@ static void __init early_cmdline_parse(void) opt +=6 ;while (*opt && *opt ==' ' ) opt++; -if (!strncmp (opt,RELOC ("off" ),3 )) +if (!memcmp (opt,RELOC ("off" ),3 ))RELOC (prom_iommu_off) =1 ; -else if (!strncmp (opt,RELOC ("force" ),5 )) +else if (!memcmp (opt,RELOC ("force" ),5 )) RELOC(prom_iommu_force_on) = 1; }#endif
@@ -1582,7 +1582,7 @@ static void __init prom_find_mmu(void)/* XXX might need to add other versions here */ if (strcmp (version,"Open Firmware, 1.0.5" ) ==0 ) of_workarounds =OF_WA_CLAIM ; -else if (strncmp (version,"FirmWorks,3." ,12 ) ==0 ) { +else if (memcmp (version,"FirmWorks,3." ,12 ) ==0 ) { of_workarounds =OF_WA_CLAIM |OF_WA_LONGTRAIL ;call_prom ("interpret" ,1 ,1 ,"dev /memory 0 to allow-reclaim" ); }else
arch/powerpc/kernel/rtas_flash.c +2 -2
@@ -436,9 +436,9 @@ static ssize_t manage_flash_write(struct file *file, const char __user *buf,if (copy_from_user (stkbuf, buf, count)) {return -EFAULT ; } -if (strncmp (stkbuf, reject_str,strlen (reject_str)) ==0 ) +if (memcmp (stkbuf, reject_str,strlen (reject_str)) ==0 ) op =RTAS_REJECT_TMP_IMG ; -else if (strncmp (stkbuf, commit_str,strlen (commit_str)) ==0 ) +else if (memcmp (stkbuf, commit_str,strlen (commit_str)) ==0 ) op =RTAS_COMMIT_TMP_IMG ; }
arch/powerpc/kernel/setup_32.c +1 -1
@@ -149,7 +149,7 @@ notrace void __init machine_init(unsigned long dt_ptr)/* Checks wdt=x and wdt_period=xx command-line option */ notrace int __init early_parse_wdt(char *p) { -if (p &&strncmp (p,"0" ,1 ) !=0 ) +if (p &&memcmp (p,"0" ,1 ) !=0 ) booke_wdt_enabled =1 ;return 0 ;
arch/powerpc/kernel/vio.c +1 -1
@@ -1089,7 +1089,7 @@ static const struct vio_device_id *vio_match_device( const struct vio_device_id *ids, const struct vio_dev *dev) { while (ids->type[0] != '\0') { - if ((strncmp(dev->type, ids->type, strlen(ids->type)) == 0) && + if ((memcmp(dev->type, ids->type, strlen(ids->type)) == 0) && of_device_is_compatible(dev->dev.of_node, ids->compat)) return ids;
arch/powerpc/kvm/44x.c +1 -1
@@ -43,7 +43,7 @@ int kvmppc_core_check_processor_compat(void) {int r; -if (strncmp (cur_cpu_spec->platform,"ppc440" ,6 ) ==0 ) +if (memcmp (cur_cpu_spec->platform,"ppc440" ,6 ) ==0 ) r =0 ;else r = -ENOTSUPP ;
arch/powerpc/platforms/chrp/pci.c +7 -7
@@ -222,11 +222,11 @@ chrp_find_bridges(void)*/ machine =of_get_property (root,"model" ,NULL );if (machine !=NULL ) { - is_longtrail =strncmp (machine,"IBM,LongTrail" ,13 ) ==0 ; - is_mot =strncmp (machine,"MOT" ,3 ) ==0 ; -if (strncmp (machine,"Pegasos2" ,8 ) ==0 ) + is_longtrail =memcmp (machine,"IBM,LongTrail" ,13 ) ==0 ; + is_mot =memcmp (machine,"MOT" ,3 ) ==0 ; +if (memcmp (machine,"Pegasos2" ,8 ) ==0 ) is_pegasos =2 ; -else if (strncmp (machine,"Pegasos" ,7 ) ==0 ) +else if (memcmp (machine,"Pegasos" ,7 ) ==0 ) is_pegasos =1 ; }for (dev = root->child; dev !=NULL ; dev = dev->sibling) {
@@ -267,10 +267,10 @@ chrp_find_bridges(void) model =of_get_property (dev,"model" ,NULL );if (model ==NULL ) model ="<none>" ; -if (strncmp (model,"IBM, Python" ,11 ) ==0 ) { +if (memcmp (model,"IBM, Python" ,11 ) ==0 ) {setup_python (hose, dev); }else if (is_mot - ||strncmp (model,"Motorola, Grackle" ,17 ) ==0 ) { + ||memcmp (model,"Motorola, Grackle" ,17 ) ==0 ) {setup_grackle (hose); }else if (is_longtrail) {void __iomem *p =ioremap (GG2_PCI_CONFIG_BASE ,0x80000 );
@@ -281,7 +281,7 @@ chrp_find_bridges(void)setup_indirect_pci (hose,0xfec00cf8 ,0xfee00cfc ,0 ); }else if (is_pegasos ==2 ) {setup_peg2 (hose, dev); - }else if (!strncmp (model,"IBM,CPC710" ,10 )) { + }else if (!memcmp (model,"IBM,CPC710" ,10 )) { setup_indirect_pci(hose, r.start + 0x000f8000, r.start + 0x000f8010,
arch/powerpc/platforms/chrp/setup.c +6 -6
@@ -106,7 +106,7 @@ void chrp_show_cpuinfo(struct seq_file *m)seq_printf (m,"machine\t\t: CHRP %s\n" , model);/* longtrail (goldengate) stuff */ -if (model && !strncmp (model,"IBM,LongTrail" ,13 )) { +if (model && !memcmp (model,"IBM,LongTrail" ,13 )) {/* VLSI VAS96011/12 `Golden Gate 2' */ /* Memory banks */ sdramen = (in_le32(gg2_pci_config_base + GG2_PCI_DRAM_CTRL)
@@ -201,7 +201,7 @@ static void __init sio_init(void)return ; model =of_get_property (root,"model" ,NULL ); -if (model && !strncmp (model,"IBM,LongTrail" ,13 )) { +if (model && !memcmp (model,"IBM,LongTrail" ,13 )) {/* logical device 0 (KBC/Keyboard) */ sio_fixup_irq ("keyboard" ,0 ,1 ,2 );/* select logical device 1 (KBC/Mouse) */
@@ -308,13 +308,13 @@ void __init chrp_setup_arch(void)if (root) machine =of_get_property (root,"model" ,NULL ); -if (machine &&strncmp (machine,"Pegasos" ,7 ) ==0 ) { +if (machine &&memcmp (machine,"Pegasos" ,7 ) ==0 ) { _chrp_type = _CHRP_Pegasos; - }else if (machine &&strncmp (machine,"IBM" ,3 ) ==0 ) { + }else if (machine &&memcmp (machine,"IBM" ,3 ) ==0 ) { _chrp_type = _CHRP_IBM; - }else if (machine &&strncmp (machine,"MOT" ,3 ) ==0 ) { + }else if (machine &&memcmp (machine,"MOT" ,3 ) ==0 ) { _chrp_type = _CHRP_Motorola; - }else if (machine &&strncmp (machine,"TotalImpact,BRIQ-1" ,18 ) ==0 ) { + }else if (machine &&memcmp (machine,"TotalImpact,BRIQ-1" ,18 ) ==0 ) { _chrp_type = _CHRP_briq;/* Map the SPOR register on briq and change the restart hook */ briq_SPOR =ioremap (0xff0000e8 ,4 );
arch/powerpc/platforms/powermac/backlight.c +1 -1
@@ -61,7 +61,7 @@ int pmac_has_backlight_type(const char *type)if (bk_node) {const char *prop =of_get_property (bk_node,"backlight-control" ,NULL ); -if (prop &&strncmp (prop, type,strlen (type)) ==0 ) { +if (prop &&memcmp (prop, type,strlen (type)) ==0 ) {of_node_put (bk_node);return 1 ; }
arch/powerpc/platforms/powermac/feature.c +6 -6
@@ -1104,11 +1104,11 @@ core99_usb_enable(struct device_node *node, long param, long value) prop =of_get_property (node,"AAPL,clock-id" ,NULL );if (!prop)return -ENODEV ; -if (strncmp (prop,"usb0u048" ,8 ) ==0 ) +if (memcmp (prop,"usb0u048" ,8 ) ==0 ) number =0 ; -else if (strncmp (prop,"usb1u148" ,8 ) ==0 ) +else if (memcmp (prop,"usb1u148" ,8 ) ==0 ) number =2 ; -else if (strncmp (prop,"usb2u248" ,8 ) ==0 ) +else if (memcmp (prop,"usb2u248" ,8 ) ==0 ) number =4 ;else return -ENODEV ;
@@ -1465,7 +1465,7 @@ static long g5_i2s_enable(struct device_node *node, long param, long value)if (macio->type != macio_keylargo2 && macio->type != macio_shasta)return -ENODEV ; -if (strncmp (node->name,"i2s-" ,4 )) +if (memcmp (node->name,"i2s-" ,4 ))return -ENODEV ; cell = node->name[4 ] -'a' ;switch (cell) {
@@ -2550,8 +2550,8 @@ found:#endif /* CONFIG_POWER4 */ /* Check for "mobile" machine */ -if (model && (strncmp (model,"PowerBook" ,9 ) ==0 - ||strncmp (model,"iBook" ,5 ) ==0 )) +if (model && (memcmp (model,"PowerBook" ,9 ) ==0 + ||memcmp (model,"iBook" ,5 ) ==0 )) pmac_mb.board_flags |=PMAC_MB_MOBILE ;
arch/powerpc/platforms/powermac/pfunc_core.c +1 -1
@@ -687,7 +687,7 @@ static int pmf_add_functions(struct pmf_device *dev, void *driverdata)for (pp = dev->node->properties; pp !=0 ; pp = pp->next) {char *name; -if (strncmp (pp->name,PP_PREFIX , plen) !=0 ) +if (memcmp (pp->name,PP_PREFIX , plen) !=0 )continue ; name = pp->name + plen;if (strlen (name) && pp->length >=12 )
arch/powerpc/platforms/pseries/lpar.c +1 -1
@@ -220,7 +220,7 @@ void __init find_udbg_vterm(void) }/* Check if it's a virtual terminal */ -if (strncmp (name,"vty" ,3 ) !=0 ) +if (memcmp (name,"vty" ,3 ) !=0 ) goto out; termno =of_get_property (stdout_node,"reg" ,NULL );if (termno ==NULL )
arch/powerpc/platforms/pseries/phyp_dump.c +2 -2
@@ -493,9 +493,9 @@ static int __init early_phyp_dump_enabled(char *p)if (!p)return 0 ; -if (strncmp (p,"1" ,1 ) ==0 ) +if (memcmp (p,"1" ,1 ) ==0 ) phyp_dump_info->phyp_dump_at_boot =1 ; -else if (strncmp (p,"0" ,1 ) ==0 ) +else if (memcmp (p,"0" ,1 ) ==0 ) phyp_dump_info->phyp_dump_at_boot =0 ;return 0 ;
arch/powerpc/platforms/pseries/scanlog.c +1 -1
@@ -128,7 +128,7 @@ static ssize_t scanlog_write(struct file * file, const char __user * buf, stkbuf[count] =0 ;if (buf) { -if (strncmp (stkbuf,"reset" ,5 ) ==0 ) { +if (memcmp (stkbuf,"reset" ,5 ) ==0 ) {pr_debug ("scanlog: reset scanlog\n" ); status =rtas_call (ibm_scan_log_dump,2 ,1 ,NULL ,0 ,0 );pr_debug ("scanlog: rtas returns %d\n" , status);
arch/powerpc/xmon/xmon.c +4 -4
@@ -2909,15 +2909,15 @@ static int __initdata xmon_early, xmon_off;static int __init early_parse_xmon (char *p) { -if (!p ||strncmp (p,"early" ,5 ) ==0 ) { +if (!p ||memcmp (p,"early" ,5 ) ==0 ) {/* just "xmon" is equivalent to "xmon=early" */ xmon_init (1 ); xmon_early =1 ; - }else if (strncmp (p,"on" ,2 ) ==0 ) + }else if (memcmp (p,"on" ,2 ) ==0 )xmon_init (1 ); -else if (strncmp (p,"off" ,3 ) ==0 ) +else if (memcmp (p,"off" ,3 ) ==0 ) xmon_off =1 ; -else if (strncmp (p,"nobt" ,4 ) ==0 ) +else if (memcmp (p,"nobt" ,4 ) ==0 ) xmon_no_auto_backtrace =1 ;else return 1 ;
arch/s390/kernel/ipl.c +6 -6
@@ -1004,11 +1004,11 @@ static ssize_t reipl_type_store(struct kobject *kobj, {int rc = -EINVAL ; -if (strncmp (buf,IPL_CCW_STR ,strlen (IPL_CCW_STR )) ==0 ) +if (memcmp (buf,IPL_CCW_STR ,strlen (IPL_CCW_STR )) ==0 ) rc =reipl_set_type (IPL_TYPE_CCW ); -else if (strncmp (buf,IPL_FCP_STR ,strlen (IPL_FCP_STR )) ==0 ) +else if (memcmp (buf,IPL_FCP_STR ,strlen (IPL_FCP_STR )) ==0 ) rc =reipl_set_type (IPL_TYPE_FCP ); -else if (strncmp (buf,IPL_NSS_STR ,strlen (IPL_NSS_STR )) ==0 ) +else if (memcmp (buf,IPL_NSS_STR ,strlen (IPL_NSS_STR )) ==0 ) rc =reipl_set_type (IPL_TYPE_NSS );return (rc !=0 ) ? rc : len; }
@@ -1368,11 +1368,11 @@ static ssize_t dump_type_store(struct kobject *kobj, {int rc = -EINVAL ; -if (strncmp (buf,DUMP_NONE_STR ,strlen (DUMP_NONE_STR )) ==0 ) +if (memcmp (buf,DUMP_NONE_STR ,strlen (DUMP_NONE_STR )) ==0 ) rc =dump_set_type (DUMP_TYPE_NONE ); -else if (strncmp (buf,DUMP_CCW_STR ,strlen (DUMP_CCW_STR )) ==0 ) +else if (memcmp (buf,DUMP_CCW_STR ,strlen (DUMP_CCW_STR )) ==0 ) rc =dump_set_type (DUMP_TYPE_CCW ); -else if (strncmp (buf,DUMP_FCP_STR ,strlen (DUMP_FCP_STR )) ==0 ) +else if (memcmp (buf,DUMP_FCP_STR ,strlen (DUMP_FCP_STR )) ==0 ) rc =dump_set_type (DUMP_TYPE_FCP );return (rc !=0 ) ? rc : len; }
arch/s390/kernel/setup.c +6 -6
@@ -143,15 +143,15 @@ static void __init set_preferred_console(void)static int __init conmode_setup (char *str) {#if defined(CONFIG_SCLP_CONSOLE ) || defined(CONFIG_SCLP_VT220_CONSOLE ) -if (strncmp (str,"hwc" ,4 ) ==0 ||strncmp (str,"sclp" ,5 ) ==0 ) +if (memcmp (str,"hwc" ,4 ) ==0 ||strncmp (str,"sclp" ,5 ) ==0 )SET_CONSOLE_SCLP ;#endif #if defined(CONFIG_TN3215_CONSOLE ) -if (strncmp (str,"3215" ,5 ) ==0 ) +if (memcmp (str,"3215" ,5 ) ==0 )SET_CONSOLE_3215 ;#endif #if defined(CONFIG_TN3270_CONSOLE ) -if (strncmp (str,"3270" ,5 ) ==0 ) +if (memcmp (str,"3270" ,5 ) ==0 )SET_CONSOLE_3270 ;#endif set_preferred_console ();
@@ -186,7 +186,7 @@ static void __init conmode_default(void)#endif return ; } -if (strncmp (ptr +8 ,"3270" ,4 ) ==0 ) { +if (memcmp (ptr +8 ,"3270" ,4 ) ==0 ) {#if defined(CONFIG_TN3270_CONSOLE )SET_CONSOLE_3270 ;#elif defined(CONFIG_TN3215_CONSOLE )
@@ -194,7 +194,7 @@ static void __init conmode_default(void)#elif defined(CONFIG_SCLP_CONSOLE ) || defined(CONFIG_SCLP_VT220_CONSOLE )SET_CONSOLE_SCLP ;#endif - }else if (strncmp (ptr +8 ,"3215" ,4 ) ==0 ) { + }else if (memcmp (ptr +8 ,"3215" ,4 ) ==0 ) {#if defined(CONFIG_TN3215_CONSOLE )SET_CONSOLE_3215 ;#elif defined(CONFIG_TN3270_CONSOLE )
@@ -343,7 +343,7 @@ early_param("user_mode", early_parse_user_mode);*/ static int __init early_parse_noexec (char *p) { -if (!strncmp (p,"off" ,3 )) +if (!memcmp (p,"off" ,3 ))return 0 ; user_mode =SECONDARY_SPACE_MODE ;return 0 ;
arch/s390/kernel/time.c +6 -6
@@ -403,13 +403,13 @@ static int etr_steai_available;static int __init early_parse_etr (char *p) { -if (strncmp (p,"off" ,3 ) ==0 ) +if (memcmp (p,"off" ,3 ) ==0 ) etr_port0_online = etr_port1_online =0 ; -else if (strncmp (p,"port0" ,5 ) ==0 ) +else if (memcmp (p,"port0" ,5 ) ==0 ) etr_port0_online =1 ; -else if (strncmp (p,"port1" ,5 ) ==0 ) +else if (memcmp (p,"port1" ,5 ) ==0 ) etr_port1_online =1 ; -else if (strncmp (p,"on" ,2 ) ==0 ) +else if (memcmp (p,"on" ,2 ) ==0 ) etr_port0_online = etr_port1_online =1 ;return 0 ; }
@@ -1411,9 +1411,9 @@ static struct timer_list stp_timer;static int __init early_parse_stp (char *p) { -if (strncmp (p,"off" ,3 ) ==0 ) +if (memcmp (p,"off" ,3 ) ==0 ) stp_online =0 ; -else if (strncmp (p,"on" ,2 ) ==0 ) +else if (memcmp (p,"on" ,2 ) ==0 ) stp_online =1 ;return 0 ; }
arch/s390/kernel/topology.c +1 -1
@@ -276,7 +276,7 @@ static void set_topology_timer(void)static int __init early_parse_topology (char *p) { -if (strncmp (p,"off" ,3 )) +if (memcmp (p,"off" ,3 ))return 0 ; topology_enabled =0 ;return 0 ;
arch/s390/kernel/vdso.c +2 -2
@@ -58,9 +58,9 @@ static int __init vdso_setup(char *s)int rc; rc =0 ; -if (strncmp (s,"on" ,3 ) ==0 ) +if (memcmp (s,"on" ,3 ) ==0 ) vdso_enabled =1 ; -else if (strncmp (s,"off" ,4 ) ==0 ) +else if (memcmp (s,"off" ,4 ) ==0 ) vdso_enabled =0 ;else { rc =strict_strtoul (s,0 , &val);
arch/s390/mm/cmm.c +3 -3
@@ -368,21 +368,21 @@ static void cmm_smsg_target(const char *from, char *msg)return ;if (!cmm_skip_blanks (msg +strlen (SMSG_PREFIX ), &msg))return ; -if (strncmp (msg,"SHRINK" ,6 ) ==0 ) { +if (memcmp (msg,"SHRINK" ,6 ) ==0 ) {if (!cmm_skip_blanks (msg +6 , &msg))return ; nr =simple_strtoul (msg, &msg,0 );cmm_skip_blanks (msg, &msg);if (*msg =='\0' )cmm_set_pages (nr); - }else if (strncmp (msg,"RELEASE" ,7 ) ==0 ) { + }else if (memcmp (msg,"RELEASE" ,7 ) ==0 ) {if (!cmm_skip_blanks (msg +7 , &msg))return ; nr =simple_strtoul (msg, &msg,0 );cmm_skip_blanks (msg, &msg);if (*msg =='\0' )cmm_add_timed_pages (nr); - }else if (strncmp (msg,"REUSE" ,5 ) ==0 ) { + }else if (memcmp (msg,"REUSE" ,5 ) ==0 ) {if (!cmm_skip_blanks (msg +5 , &msg))return ; nr =simple_strtoul (msg, &msg,0 );
arch/sh/drivers/pci/pci-dreamcast.c +1 -1
@@ -66,7 +66,7 @@ static int __init gapspci_init(void)for (i=0 ; i<16 ; i++) idbuf[i] =inb (GAPSPCI_REGS +i); -if (strncmp (idbuf,"GAPSPCI_BRIDGE_2" ,16 )) +if (memcmp (idbuf,"GAPSPCI_BRIDGE_2" ,16 ))return -ENODEV ;outl (0x5a14a501 ,GAPSPCI_REGS +0x18 );
arch/sh/kernel/sh_bios.c +1 -1
@@ -156,7 +156,7 @@ static int __init setup_early_printk(char *buf)if (strstr (buf,"keep" )) keep_early =1 ; -if (!strncmp (buf,"bios" ,4 )) +if (!memcmp (buf,"bios" ,4 )) early_console = &bios_console;if (likely (early_console)) {
arch/sh/mm/consistent.c +1 -1
@@ -113,7 +113,7 @@ static void __init memchunk_cmdline_override(char *name, unsigned long *sizep)while ((p =strstr (p,"memchunk." ))) { p +=9 ;/* strlen("memchunk.") */ -if (!strncmp (name, p, k) && p[k] =='=' ) { +if (!memcmp (name, p, k) && p[k] =='=' ) { p += k +1 ; *sizep =memparse (p,NULL ); pr_info("%s: forcing memory chunk size to 0x%08lx\n",
arch/sparc/boot/btfixupprep.c +14 -14
@@ -112,13 +112,13 @@ int main(int argc,char **argv) symlen =strlen (symtab);while (fgets (buffer,1024 , stdin) !=NULL ) -if (!strncmp (buffer, symtab, symlen)) +if (!memcmp (buffer, symtab, symlen)) goto main0;fatal (); main0: rellen =strlen (relrec);while (fgets (buffer,1024 , stdin) !=NULL ) -if (!strncmp (buffer, relrec, rellen)) +if (!memcmp (buffer, relrec, rellen)) goto main1;fatal (); main1:
@@ -132,7 +132,7 @@ main1:fatal ();while (fgets (buffer,1024 , stdin) !=NULL ) {int nbase; -if (!strncmp (buffer, relrec, rellen)) +if (!memcmp (buffer, relrec, rellen)) goto main1;if (mode ==0 )set_mode (buffer);
@@ -140,7 +140,7 @@ main1:if (p) *p =0 ;if (strlen (buffer) <22 +mode)continue ; -if (strncmp (buffer + mode," R_SPARC_" ,9 )) +if (memcmp (buffer + mode," R_SPARC_" ,9 ))continue ; nbase =27 -8 + mode;if (buffer[nbase] !='_' || buffer[nbase+1 ] !='_' || buffer[nbase+2 ] !='_' )
@@ -220,13 +220,13 @@ main1:exit (1 ); }if (!strcmp (sect,"__ksymtab" )) { -if (strncmp (buffer + mode+9 ,"32 " ,10 )) { +if (memcmp (buffer + mode+9 ,"32 " ,10 )) {fprintf (stderr,"BTFIXUP_CALL in EXPORT_SYMBOL results in relocation other than R_SPARC_32\n\%s\n" , buffer);exit (1 ); } - }else if (strncmp (buffer + mode+9 ,"WDISP30 " ,10 ) && -strncmp (buffer + mode+9 ,"HI22 " ,10 ) && -strncmp (buffer + mode+9 ,"LO10 " ,10 )) { + }else if (memcmp (buffer + mode+9 ,"WDISP30 " ,10 ) && +memcmp (buffer + mode+9 ,"HI22 " ,10 ) && +memcmp (buffer + mode+9 ,"LO10 " ,10 )) {fprintf (stderr,"BTFIXUP_CALL results in relocation other than R_SPARC_WDISP30, R_SPARC_HI22 or R_SPARC_LO10\n%s\n" , buffer);exit (1 ); }
@@ -236,7 +236,7 @@ main1:fprintf (stderr,"Cannot use pre-initialized fixups for blackboxes\n%s\n" , buffer);exit (1 ); } -if (strncmp (buffer + mode+9 ,"HI22 " ,10 )) { +if (memcmp (buffer + mode+9 ,"HI22 " ,10 )) {fprintf (stderr,"BTFIXUP_BLACKBOX results in relocation other than R_SPARC_HI22\n%s\n" , buffer);exit (1 ); }
@@ -246,7 +246,7 @@ main1:fprintf (stderr,"Wrong initializer for SIMM13. Has to be from $fffff000 to $00000fff\n%s\n" , buffer);exit (1 ); } -if (strncmp (buffer + mode+9 ,"13 " ,10 )) { +if (memcmp (buffer + mode+9 ,"13 " ,10 )) {fprintf (stderr,"BTFIXUP_SIMM13 results in relocation other than R_SPARC_13\n%s\n" , buffer);exit (1 ); }
@@ -256,7 +256,7 @@ main1:fprintf (stderr,"Wrong initializer for HALF.\n%s\n" , buffer);exit (1 ); } -if (strncmp (buffer + mode+9 ,"13 " ,10 )) { +if (memcmp (buffer + mode+9 ,"13 " ,10 )) {fprintf (stderr,"BTFIXUP_HALF results in relocation other than R_SPARC_13\n%s\n" , buffer);exit (1 ); }
@@ -266,7 +266,7 @@ main1:fprintf (stderr,"Wrong initializer for SETHI. Cannot have set low 10 bits\n%s\n" , buffer);exit (1 ); } -if (strncmp (buffer + mode+9 ,"HI22 " ,10 )) { +if (memcmp (buffer + mode+9 ,"HI22 " ,10 )) {fprintf (stderr,"BTFIXUP_SETHI results in relocation other than R_SPARC_HI22\n%s\n" , buffer);exit (1 ); }
@@ -276,7 +276,7 @@ main1:fprintf (stderr,"Cannot use pre-initialized fixups for INT\n%s\n" , buffer);exit (1 ); } -if (strncmp (buffer + mode+9 ,"HI22 " ,10 ) &&strncmp (buffer + mode+9 ,"LO10 " ,10 )) { +if (memcmp (buffer + mode+9 ,"HI22 " ,10 ) &&strncmp (buffer + mode+9 ,"LO10 " ,10 )) {fprintf (stderr,"BTFIXUP_INT results in relocation other than R_SPARC_HI22 and R_SPARC_LO10\n%s\n" , buffer);exit (1 ); }
@@ -300,7 +300,7 @@ main1:exit (1 ); } offset =strtoul (buffer, &q,16 ); -if (q != buffer + mode || (!offset && (mode ==8 ?strncmp (buffer,"00000000 " ,9 ) :strncmp (buffer,"0000000000000000 " ,17 )))) { +if (q != buffer + mode || (!offset && (mode ==8 ?memcmp (buffer,"00000000 " ,9 ) :strncmp (buffer,"0000000000000000 " ,17 )))) {fprintf (stderr,"Malformed relocation address in\n%s\n" , buffer);exit (1 ); }
arch/sparc/include/asm/floppy_64.h +2 -2
@@ -590,7 +590,7 @@ static unsigned long __init sun_floppy_init(void)return 0 ; state_prop =of_get_property (op->dev.of_node,"status" ,NULL ); -if (state_prop && !strncmp (state_prop,"disabled" ,8 )) +if (state_prop && !memcmp (state_prop,"disabled" ,8 ))return 0 ;FLOPPY_IRQ = op->archdata.irqs[0 ];
@@ -717,7 +717,7 @@ static unsigned long __init sun_floppy_init(void)return sun_floppy_types[0 ]; } prop =of_get_property (op->dev.of_node,"status" ,NULL ); -if (prop && !strncmp (state,"disabled" ,8 )) +if (prop && !memcmp (state,"disabled" ,8 ))return 0 ;/*
arch/sparc/include/asm/prom.h +1 -1
@@ -26,7 +26,7 @@#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 -#define of_compat_cmp (s1, s2, l) strncmp((s1), (s2), (l)) +#define of_compat_cmp (s1, s2, l) memcmp((s1), (s2), (l))#define of_prop_cmp (s1, s2) strcasecmp((s1), (s2))#define of_node_cmp (s1, s2) strcmp((s1), (s2))
arch/sparc/kernel/apc.c +1 -1
@@ -43,7 +43,7 @@ static int apc_no_idle __devinitdata = 0;*/ static int __init apc_setup (char *str) { -if (!strncmp (str,"noidle" ,strlen ("noidle" ))) { +if (!memcmp (str,"noidle" ,strlen ("noidle" ))) { apc_no_idle =1 ;return 1 ; }
arch/sparc/kernel/nmi.c +1 -1
@@ -278,7 +278,7 @@ int __init nmi_init(void)static int __init setup_nmi_watchdog (char *str) { -if (!strncmp (str,"panic" ,5 )) +if (!memcmp (str,"panic" ,5 )) panic_on_timeout =1 ;return 0 ;
arch/sparc/kernel/setup_32.c +2 -2
@@ -158,7 +158,7 @@ static void __init boot_flags_init(char *commands)process_switch (*commands++);continue ; } -if (!strncmp (commands,"mem=" ,4 )) { +if (!memcmp (commands,"mem=" ,4 )) {/* * "mem=XXX[kKmM] overrides the PROM-reported * memory size.
@@ -233,7 +233,7 @@ void __init setup_arch(char **cmdline_p) sparc_cpu_model = sun4e;if (!strcmp (&cputypval,"sun4u" )) sparc_cpu_model = sun4u; -if (!strncmp (&cputypval,"leon" ,4 )) +if (!memcmp (&cputypval,"leon" ,4 )) sparc_cpu_model = sparc_leon;printk ("ARCH: " );
arch/sparc/kernel/setup_64.c +1 -1
@@ -138,7 +138,7 @@ static void __init boot_flags_init(char *commands)process_switch (*commands++);continue ; } -if (!strncmp (commands,"mem=" ,4 )) { +if (!memcmp (commands,"mem=" ,4 )) {/* * "mem=XXX[kKmM]" overrides the PROM-reported * memory size.
arch/sparc/kernel/tadpole.c +1 -1
@@ -104,7 +104,7 @@ void __init clock_stop_probe(void)char name[20 ];prom_getstring (prom_root_node,"name" , name,sizeof (name)); -if (strncmp (name,"Tadpole" ,7 )) +if (memcmp (name,"Tadpole" ,7 ))return ; node =prom_getchild (prom_root_node); node =prom_searchsiblings (node,"obio" );
arch/tile/kernel/early_printk.c +1 -1
@@ -71,7 +71,7 @@ static int __init setup_early_printk(char *str)if (early_console_initialized)return 1 ; -if (str !=NULL &&strncmp (str,"keep" ,4 ) ==0 ) +if (str !=NULL &&memcmp (str,"keep" ,4 ) ==0 ) keep_early =1 ; early_console = &early_hv_console;
arch/tile/mm/init.c +1 -1
@@ -363,7 +363,7 @@ static int __init setup_ktext(char *str)return -EINVAL ;/* If you have a leading "nocache", turn off ktext caching */ -if (strncmp (str,"nocache" ,7 ) ==0 ) { +if (memcmp (str,"nocache" ,7 ) ==0 ) { ktext_nocache =1 ;pr_info ("ktext: disabling local caching of kernel text\n" ); str +=7 ;
arch/um/drivers/chan_kern.c +1 -1
@@ -502,7 +502,7 @@ static struct chan *parse_chan(struct line *line, char *str, int device, data =NULL ;for (i =0 ; i <ARRAY_SIZE (chan_table); i++) { entry = &chan_table[i]; -if (!strncmp (str, entry->key,strlen (entry->key))) { +if (!memcmp (str, entry->key,strlen (entry->key))) { ops = entry->ops; str +=strlen (entry->key);break ;
arch/um/drivers/mconsole_kern.c +2 -2
@@ -338,7 +338,7 @@ static struct mc_device *mconsole_find_dev(char *name)list_for_each (ele, &mconsole_devices) { dev = list_entry(ele, struct mc_device, list); -if (!strncmp (name, dev->name,strlen (dev->name))) +if (!memcmp (name, dev->name,strlen (dev->name)))return dev; }return NULL ;
@@ -880,7 +880,7 @@ __initcall(create_proc_mconsole);static int mconsole_setup (char *str) { -if (!strncmp (str,NOTIFY ,strlen (NOTIFY ))) { +if (!memcmp (str,NOTIFY ,strlen (NOTIFY ))) { str +=strlen (NOTIFY ); notify_socket = str; }
arch/um/drivers/mconsole_user.c +1 -1
@@ -65,7 +65,7 @@ static struct mconsole_command *mconsole_parse(struct mc_request *req)for (i =0 ; i <ARRAY_SIZE (commands); i++) { cmd = &commands[i]; -if (!strncmp (req->request.data, cmd->command, +if (!memcmp (req->request.data, cmd->command,strlen (cmd->command))) {return cmd; }
arch/um/drivers/net_kern.c +1 -1
@@ -560,7 +560,7 @@ static int check_transport(struct transport *transport, char *eth, int n,int len; len =strlen (transport->name); -if (strncmp (eth, transport->name, len)) +if (memcmp (eth, transport->name, len))return 0 ; eth += len;
arch/um/kernel/um_arch.c +1 -1
@@ -205,7 +205,7 @@ static void __init uml_checksetup(char *line, int *add)size_t n; n =strlen (p->str); -if (!strncmp (line, p->str, n) && p->setup_func (line + n, add)) +if (!memcmp (line, p->str, n) && p->setup_func (line + n, add))return ; p++; }
arch/um/os-Linux/mem.c +2 -2
@@ -129,7 +129,7 @@ static void which_tmpdir(void)if (found !=1 )break ; -if (!strncmp (buf,"/dev/shm" ,strlen ("/dev/shm" ))) +if (!memcmp (buf,"/dev/shm" ,strlen ("/dev/shm" ))) goto found; found =next (fd, buf,ARRAY_SIZE (buf),'\n' );
@@ -153,7 +153,7 @@ found:if (found !=1 ) goto err; -if (strncmp (buf,"tmpfs" ,strlen ("tmpfs" ))) { +if (memcmp (buf,"tmpfs" ,strlen ("tmpfs" ))) {printf ("not tmpfs\n" ); goto out; }
arch/x86/ia32/sys_ia32.c +1 -1
@@ -502,7 +502,7 @@ long sys32_vm86_warning(void)struct task_struct *me = current;static char lastcomm[sizeof (me->comm)]; -if (strncmp (lastcomm, me->comm,sizeof (lastcomm))) { +if (memcmp (lastcomm, me->comm,sizeof (lastcomm))) {compat_printk (KERN_INFO "%s: vm86 mode not supported on 64 bit kernel\n" , me->comm);
arch/x86/kernel/acpi/sleep.c +7 -7
@@ -153,24 +153,24 @@ void __init acpi_reserve_wakeup_memory(void)static int __init acpi_sleep_setup (char *str) {while ((str !=NULL ) && (*str !='\0' )) { -if (strncmp (str,"s3_bios" ,7 ) ==0 ) +if (memcmp (str,"s3_bios" ,7 ) ==0 ) acpi_realmode_flags |=1 ; -if (strncmp (str,"s3_mode" ,7 ) ==0 ) +if (memcmp (str,"s3_mode" ,7 ) ==0 ) acpi_realmode_flags |=2 ; -if (strncmp (str,"s3_beep" ,7 ) ==0 ) +if (memcmp (str,"s3_beep" ,7 ) ==0 ) acpi_realmode_flags |=4 ;#ifdef CONFIG_HIBERNATION -if (strncmp (str,"s4_nohwsig" ,10 ) ==0 ) +if (memcmp (str,"s4_nohwsig" ,10 ) ==0 )acpi_no_s4_hw_signature (); -if (strncmp (str,"s4_nonvs" ,8 ) ==0 ) { +if (memcmp (str,"s4_nonvs" ,8 ) ==0 ) {pr_warning ("ACPI: acpi_sleep=s4_nonvs is deprecated, " "please use acpi_sleep=nonvs instead" );acpi_nvs_nosave (); }#endif -if (strncmp (str,"nonvs" ,5 ) ==0 ) +if (memcmp (str,"nonvs" ,5 ) ==0 )acpi_nvs_nosave (); -if (strncmp (str,"old_ordering" ,12 ) ==0 ) +if (memcmp (str,"old_ordering" ,12 ) ==0 )acpi_old_suspend_ordering (); str =strchr (str,',' );if (str !=NULL )
arch/x86/kernel/amd_iommu_init.c +2 -2
@@ -1536,9 +1536,9 @@ static int __init parse_amd_iommu_dump(char *str)static int __init parse_amd_iommu_options (char *str) {for (; *str; ++str) { -if (strncmp (str,"fullflush" ,9 ) ==0 ) +if (memcmp (str,"fullflush" ,9 ) ==0 ) amd_iommu_unmap_flush = true; -if (strncmp (str,"off" ,3 ) ==0 ) +if (memcmp (str,"off" ,3 ) ==0 ) amd_iommu_disabled = true; }
arch/x86/kernel/aperture_64.c +2 -2
@@ -259,9 +259,9 @@ static int __init parse_gart_mem(char *p)if (!p)return -EINVAL ; -if (!strncmp (p,"off" ,3 )) +if (!memcmp (p,"off" ,3 )) gart_fix_e820 =0 ; -else if (!strncmp (p,"on" ,2 )) +else if (!memcmp (p,"on" ,2 )) gart_fix_e820 =1 ;return 0 ;
arch/x86/kernel/apic/apic_flat_64.c +1 -1
@@ -241,7 +241,7 @@ static int physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)return 1 ; } -if (!strncmp (oem_id,"IBM" ,3 ) && !strncmp (oem_table_id,"EXA" ,3 )) { +if (!memcmp (oem_id,"IBM" ,3 ) && !strncmp (oem_table_id,"EXA" ,3 )) {printk (KERN_DEBUG "IBM Summit detected, will use apic physical" );return 1 ; }
arch/x86/kernel/apic/es7000_32.c +2 -2
@@ -282,7 +282,7 @@ static int es7000_check_dsdt(void)struct acpi_table_header header;if (ACPI_SUCCESS (acpi_get_table_header (ACPI_SIG_DSDT ,0 , &header)) && - !strncmp (header.oem_id,"UNISYS" ,6 )) + !memcmp (header.oem_id,"UNISYS" ,6 ))return 1 ;return 0 ; }
@@ -614,7 +614,7 @@ static int es7000_mps_oem_check(struct mpc_table *mpc, char *oem,struct mpc_oemtable *oem_table = (struct mpc_oemtable *)mpc->oemptr; -if (!strncmp (oem,"UNISYS" ,6 )) +if (!memcmp (oem,"UNISYS" ,6 )) ret =parse_unisys_oem ((char *)oem_table); }
arch/x86/kernel/apic/nmi.c +3 -3
@@ -192,7 +192,7 @@ static int __init setup_nmi_watchdog(char *str) {unsigned int nmi; -if (!strncmp (str,"panic" ,5 )) { +if (!memcmp (str,"panic" ,5 )) { panic_on_timeout =1 ; str =strchr (str,',' );if (!str)
@@ -200,9 +200,9 @@ static int __init setup_nmi_watchdog(char *str) ++str; } -if (!strncmp (str,"lapic" ,5 )) +if (!memcmp (str,"lapic" ,5 )) nmi_watchdog =NMI_LOCAL_APIC ; -else if (!strncmp (str,"ioapic" ,6 )) +else if (!memcmp (str,"ioapic" ,6 )) nmi_watchdog =NMI_IO_APIC ;else {get_option (&str, &nmi);
arch/x86/kernel/apic/numaq_32.c +1 -1
@@ -439,7 +439,7 @@ static inline int numaq_phys_pkg_id(int cpuid_apic, int index_msb)static int numaq_mps_oem_check (struct mpc_table *mpc,char *oem,char *productid) { -if (strncmp (oem,"IBM NUMA" ,8 )) +if (memcmp (oem,"IBM NUMA" ,8 ))printk (KERN_ERR "Warning! Not a NUMA-Q system!\n" );else found_numaq =1 ;
arch/x86/kernel/apic/summit_32.c +7 -7
@@ -80,10 +80,10 @@ static inline void setup_summit(void) {}static int summit_mps_oem_check (struct mpc_table *mpc,char *oem,char *productid) { -if (!strncmp (oem,"IBM ENSW" ,8 ) && - (!strncmp (productid,"VIGIL SMP" ,9 ) - || !strncmp (productid,"EXA" ,3 ) - || !strncmp (productid,"RUTHLESS SMP" ,12 ))){ +if (!memcmp (oem,"IBM ENSW" ,8 ) && + (!memcmp (productid,"VIGIL SMP" ,9 ) + || !memcmp (productid,"EXA" ,3 ) + || !memcmp (productid,"RUTHLESS SMP" ,12 ))){mark_tsc_unstable ("Summit based system" ); use_cyclone =1 ;/*enable cyclone-timer*/ setup_summit ();
@@ -95,9 +95,9 @@ static int summit_mps_oem_check(struct mpc_table *mpc, char *oem,/* Hook from generic ACPI tables.c */ static int summit_acpi_madt_oem_check (char *oem_id,char *oem_table_id) { -if (!strncmp (oem_id,"IBM" ,3 ) && - (!strncmp (oem_table_id,"SERVIGIL" ,8 ) - || !strncmp (oem_table_id,"EXA" ,3 ))){ +if (!memcmp (oem_id,"IBM" ,3 ) && + (!memcmp (oem_table_id,"SERVIGIL" ,8 ) + || !memcmp (oem_table_id,"EXA" ,3 ))){mark_tsc_unstable ("Summit based system" ); use_cyclone =1 ;/*enable cyclone-timer*/ setup_summit ();
arch/x86/kernel/apm_32.c +20 -20
@@ -1874,40 +1874,40 @@ static int __init apm_setup(char *str)int invert;while ((str !=NULL ) && (*str !='\0' )) { -if (strncmp (str,"off" ,3 ) ==0 ) +if (memcmp (str,"off" ,3 ) ==0 ) apm_disabled =1 ; -if (strncmp (str,"on" ,2 ) ==0 ) +if (memcmp (str,"on" ,2 ) ==0 ) apm_disabled =0 ; -if ((strncmp (str,"bounce-interval=" ,16 ) ==0 ) || - (strncmp (str,"bounce_interval=" ,16 ) ==0 )) +if ((memcmp (str,"bounce-interval=" ,16 ) ==0 ) || + (memcmp (str,"bounce_interval=" ,16 ) ==0 )) bounce_interval =simple_strtol (str +16 ,NULL ,0 ); -if ((strncmp (str,"idle-threshold=" ,15 ) ==0 ) || - (strncmp (str,"idle_threshold=" ,15 ) ==0 )) +if ((memcmp (str,"idle-threshold=" ,15 ) ==0 ) || + (memcmp (str,"idle_threshold=" ,15 ) ==0 )) idle_threshold =simple_strtol (str +15 ,NULL ,0 ); -if ((strncmp (str,"idle-period=" ,12 ) ==0 ) || - (strncmp (str,"idle_period=" ,12 ) ==0 )) +if ((memcmp (str,"idle-period=" ,12 ) ==0 ) || + (memcmp (str,"idle_period=" ,12 ) ==0 )) idle_period =simple_strtol (str +12 ,NULL ,0 ); - invert = (strncmp (str,"no-" ,3 ) ==0 ) || - (strncmp (str,"no_" ,3 ) ==0 ); + invert = (memcmp (str,"no-" ,3 ) ==0 ) || + (memcmp (str,"no_" ,3 ) ==0 );if (invert) str +=3 ; -if (strncmp (str,"debug" ,5 ) ==0 ) +if (memcmp (str,"debug" ,5 ) ==0 ) debug = !invert; -if ((strncmp (str,"power-off" ,9 ) ==0 ) || - (strncmp (str,"power_off" ,9 ) ==0 )) +if ((memcmp (str,"power-off" ,9 ) ==0 ) || + (memcmp (str,"power_off" ,9 ) ==0 )) power_off = !invert; -if (strncmp (str,"smp" ,3 ) ==0 ) { +if (memcmp (str,"smp" ,3 ) ==0 ) { smp = !invert; idle_threshold =100 ; } -if ((strncmp (str,"allow-ints" ,10 ) ==0 ) || - (strncmp (str,"allow_ints" ,10 ) ==0 )) +if ((memcmp (str,"allow-ints" ,10 ) ==0 ) || + (memcmp (str,"allow_ints" ,10 ) ==0 )) apm_info.allow_ints = !invert; -if ((strncmp (str,"broken-psr" ,10 ) ==0 ) || - (strncmp (str,"broken_psr" ,10 ) ==0 )) +if ((memcmp (str,"broken-psr" ,10 ) ==0 ) || + (memcmp (str,"broken_psr" ,10 ) ==0 )) apm_info.get_power_status_broken = !invert; -if ((strncmp (str,"realmode-power-off" ,18 ) ==0 ) || - (strncmp (str,"realmode_power_off" ,18 ) ==0 )) +if ((memcmp (str,"realmode-power-off" ,18 ) ==0 ) || + (memcmp (str,"realmode_power_off" ,18 ) ==0 )) apm_info.realmode_power_off = !invert; str =strchr (str,',' );if (str !=NULL )
arch/x86/kernel/cpu/mtrr/if.c +4 -4
@@ -123,7 +123,7 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)if (linelen && *ptr =='\n' ) *ptr ='\0' ; -if (!strncmp (line,"disable=" ,8 )) { +if (!memcmp (line,"disable=" ,8 )) { reg =simple_strtoul (line +8 , &ptr,0 ); err =mtrr_del_page (reg,0 ,0 );if (err <0 )
@@ -131,13 +131,13 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)return len; } -if (strncmp (line,"base=" ,5 )) +if (memcmp (line,"base=" ,5 ))return -EINVAL ; base =simple_strtoull (line +5 , &ptr,0 ); ptr =skip_spaces (ptr); -if (strncmp (ptr,"size=" ,5 )) +if (memcmp (ptr,"size=" ,5 ))return -EINVAL ; size =simple_strtoull (ptr +5 , &ptr,0 );
@@ -145,7 +145,7 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)return -EINVAL ; ptr =skip_spaces (ptr); -if (strncmp (ptr,"type=" ,5 )) +if (memcmp (ptr,"type=" ,5 ))return -EINVAL ; ptr =skip_spaces (ptr +5 );
arch/x86/kernel/e820.c +1 -1
@@ -869,7 +869,7 @@ static int __init parse_memmap_opt(char *p)if (!p)return -EINVAL ; -if (!strncmp (p,"exactmap" ,8 )) { +if (!memcmp (p,"exactmap" ,8 )) {#ifdef CONFIG_CRASH_DUMP /* * If we are doing a crash dump, we still need to know
arch/x86/kernel/early_printk.c +10 -10
@@ -126,12 +126,12 @@ static __init void early_serial_init(char *s)if (*s) {unsigned port; -if (!strncmp (s,"0x" ,2 )) { +if (!memcmp (s,"0x" ,2 )) { early_serial_base =simple_strtoul (s, &e,16 ); }else {static const int __initconst bases[] = {0x3f8 ,0x2f8 }; -if (!strncmp (s,"ttyS" ,4 )) +if (!memcmp (s,"ttyS" ,4 )) s +=4 ; port =simple_strtoul (s, &e,10 );if (port >1 || s == e)
@@ -214,18 +214,18 @@ static int __init setup_early_printk(char *buf) keep = (strstr (buf,"keep" ) !=NULL );while (*buf !='\0' ) { -if (!strncmp (buf,"serial" ,6 )) { +if (!memcmp (buf,"serial" ,6 )) { buf +=6 ;early_serial_init (buf);early_console_register (&early_serial_console, keep); -if (!strncmp (buf,",ttyS" ,5 )) +if (!memcmp (buf,",ttyS" ,5 )) buf +=5 ; } -if (!strncmp (buf,"ttyS" ,4 )) { +if (!memcmp (buf,"ttyS" ,4 )) {early_serial_init (buf +4 );early_console_register (&early_serial_console, keep); } -if (!strncmp (buf,"vga" ,3 ) && +if (!memcmp (buf,"vga" ,3 ) && boot_params.screen_info.orig_video_isVGA ==1 ) { max_xpos = boot_params.screen_info.orig_video_cols; max_ypos = boot_params.screen_info.orig_video_lines;
@@ -233,20 +233,20 @@ static int __init setup_early_printk(char *buf)early_console_register (&early_vga_console, keep); }#ifdef CONFIG_EARLY_PRINTK_DBGP -if (!strncmp (buf,"dbgp" ,4 ) && !early_dbgp_init (buf +4 )) +if (!memcmp (buf,"dbgp" ,4 ) && !early_dbgp_init (buf +4 ))early_console_register (&early_dbgp_console, keep);#endif #ifdef CONFIG_HVC_XEN -if (!strncmp (buf,"xen" ,3 )) +if (!memcmp (buf,"xen" ,3 ))early_console_register (&xenboot_console, keep);#endif #ifdef CONFIG_X86_MRST_EARLY_PRINTK -if (!strncmp (buf,"mrst" ,4 )) { +if (!memcmp (buf,"mrst" ,4 )) {mrst_early_console_init ();early_console_register (&early_mrst_console, keep); } -if (!strncmp (buf,"hsu" ,3 )) { +if (!memcmp (buf,"hsu" ,3 )) {hsu_early_console_init ();early_console_register (&early_hsu_console, keep); }
arch/x86/kernel/hpet.c +3 -3
@@ -88,11 +88,11 @@ static int hpet_verbose;static int __init hpet_setup (char *str) {if (str) { -if (!strncmp ("disable" , str,7 )) +if (!memcmp ("disable" , str,7 )) boot_hpet_disable =1 ; -if (!strncmp ("force" , str,5 )) +if (!memcmp ("force" , str,5 )) hpet_force_user =1 ; -if (!strncmp ("verbose" , str,7 )) +if (!memcmp ("verbose" , str,7 )) hpet_verbose =1 ; }return 1 ;
arch/x86/kernel/mpparse.c +4 -4
@@ -95,21 +95,21 @@ static void __init MP_bus_info(struct mpc_bus *m) }#endif -if (strncmp (str,BUSTYPE_ISA ,sizeof (BUSTYPE_ISA ) -1 ) ==0 ) { +if (memcmp (str,BUSTYPE_ISA ,sizeof (BUSTYPE_ISA ) -1 ) ==0 ) {set_bit (m->busid, mp_bus_not_pci);#if defined(CONFIG_EISA ) || defined(CONFIG_MCA ) mp_bus_id_to_type[m->busid] =MP_BUS_ISA ;#endif - }else if (strncmp (str,BUSTYPE_PCI ,sizeof (BUSTYPE_PCI ) -1 ) ==0 ) { + }else if (memcmp (str,BUSTYPE_PCI ,sizeof (BUSTYPE_PCI ) -1 ) ==0 ) {if (x86_init.mpparse.mpc_oem_pci_bus) x86_init.mpparse.mpc_oem_pci_bus (m);clear_bit (m->busid, mp_bus_not_pci);#if defined(CONFIG_EISA ) || defined(CONFIG_MCA ) mp_bus_id_to_type[m->busid] = MP_BUS_PCI; - }else if (strncmp (str,BUSTYPE_EISA ,sizeof (BUSTYPE_EISA ) -1 ) ==0 ) { + }else if (memcmp (str,BUSTYPE_EISA ,sizeof (BUSTYPE_EISA ) -1 ) ==0 ) { mp_bus_id_to_type[m->busid] =MP_BUS_EISA ; - }else if (strncmp (str,BUSTYPE_MCA ,sizeof (BUSTYPE_MCA ) -1 ) ==0 ) { + }else if (memcmp (str,BUSTYPE_MCA ,sizeof (BUSTYPE_MCA ) -1 ) ==0 ) { mp_bus_id_to_type[m->busid] =MP_BUS_MCA ;#endif }else
arch/x86/kernel/pci-calgary_64.c +10 -10
@@ -1484,29 +1484,29 @@ static int __init calgary_parse_options(char *p)char * endp;while (*p) { -if (!strncmp (p,"64k" ,3 )) +if (!memcmp (p,"64k" ,3 )) specified_table_size =TCE_TABLE_SIZE_64K ; -else if (!strncmp (p,"128k" ,4 )) +else if (!memcmp (p,"128k" ,4 )) specified_table_size =TCE_TABLE_SIZE_128K ; -else if (!strncmp (p,"256k" ,4 )) +else if (!memcmp (p,"256k" ,4 )) specified_table_size =TCE_TABLE_SIZE_256K ; -else if (!strncmp (p,"512k" ,4 )) +else if (!memcmp (p,"512k" ,4 )) specified_table_size =TCE_TABLE_SIZE_512K ; -else if (!strncmp (p,"1M" ,2 )) +else if (!memcmp (p,"1M" ,2 )) specified_table_size =TCE_TABLE_SIZE_1M ; -else if (!strncmp (p,"2M" ,2 )) +else if (!memcmp (p,"2M" ,2 )) specified_table_size =TCE_TABLE_SIZE_2M ; -else if (!strncmp (p,"4M" ,2 )) +else if (!memcmp (p,"4M" ,2 )) specified_table_size =TCE_TABLE_SIZE_4M ; -else if (!strncmp (p,"8M" ,2 )) +else if (!memcmp (p,"8M" ,2 )) specified_table_size =TCE_TABLE_SIZE_8M ; len =strlen ("translate_empty_slots" ); -if (!strncmp (p,"translate_empty_slots" , len)) +if (!memcmp (p,"translate_empty_slots" , len)) translate_empty_slots =1 ; len =strlen ("disable" ); -if (!strncmp (p,"disable" , len)) { +if (!memcmp (p,"disable" , len)) { p += len;if (*p =='=' ) ++p;
arch/x86/kernel/pci-dma.c +15 -15
@@ -192,51 +192,51 @@ static __init int iommu_setup(char *p)return -EINVAL ;while (*p) { -if (!strncmp (p,"off" ,3 )) +if (!memcmp (p,"off" ,3 )) no_iommu =1 ;/* gart_parse_options has more force support */ -if (!strncmp (p,"force" ,5 )) +if (!memcmp (p,"force" ,5 )) force_iommu =1 ; -if (!strncmp (p,"noforce" ,7 )) { +if (!memcmp (p,"noforce" ,7 )) { iommu_merge =0 ; force_iommu =0 ; } -if (!strncmp (p,"biomerge" ,8 )) { +if (!memcmp (p,"biomerge" ,8 )) { iommu_merge =1 ; force_iommu =1 ; } -if (!strncmp (p,"panic" ,5 )) +if (!memcmp (p,"panic" ,5 )) panic_on_overflow =1 ; -if (!strncmp (p,"nopanic" ,7 )) +if (!memcmp (p,"nopanic" ,7 )) panic_on_overflow =0 ; -if (!strncmp (p,"merge" ,5 )) { +if (!memcmp (p,"merge" ,5 )) { iommu_merge =1 ; force_iommu =1 ; } -if (!strncmp (p,"nomerge" ,7 )) +if (!memcmp (p,"nomerge" ,7 )) iommu_merge =0 ; -if (!strncmp (p,"forcesac" ,8 )) +if (!memcmp (p,"forcesac" ,8 )) iommu_sac_force =1 ; -if (!strncmp (p,"allowdac" ,8 )) +if (!memcmp (p,"allowdac" ,8 )) forbid_dac =0 ; -if (!strncmp (p,"nodac" ,5 )) +if (!memcmp (p,"nodac" ,5 )) forbid_dac =1 ; -if (!strncmp (p,"usedac" ,6 )) { +if (!memcmp (p,"usedac" ,6 )) { forbid_dac =-1 ;return 1 ; }#ifdef CONFIG_SWIOTLB -if (!strncmp (p,"soft" ,4 )) +if (!memcmp (p,"soft" ,4 )) swiotlb =1 ;#endif -if (!strncmp (p,"pt" ,2 )) +if (!memcmp (p,"pt" ,2 )) iommu_pass_through =1 ;gart_parse_options (p);#ifdef CONFIG_CALGARY_IOMMU -if (!strncmp (p,"calgary" ,7 )) +if (!memcmp (p,"calgary" ,7 )) use_calgary =1 ;#endif /* CONFIG_CALGARY_IOMMU */
arch/x86/kernel/pci-gart_64.c +8 -8
@@ -872,7 +872,7 @@ void __init gart_parse_options(char *p)int arg;#ifdef CONFIG_IOMMU_LEAK -if (!strncmp (p,"leak" ,4 )) { +if (!memcmp (p,"leak" ,4 )) { leak_trace =1 ; p +=4 ;if (*p =='=' )
@@ -883,20 +883,20 @@ void __init gart_parse_options(char *p)#endif if (isdigit (*p) &&get_option (&p, &arg)) iommu_size = arg; -if (!strncmp (p,"fullflush" ,9 )) +if (!memcmp (p,"fullflush" ,9 )) iommu_fullflush =1 ; -if (!strncmp (p,"nofullflush" ,11 )) +if (!memcmp (p,"nofullflush" ,11 )) iommu_fullflush =0 ; -if (!strncmp (p,"noagp" ,5 )) +if (!memcmp (p,"noagp" ,5 )) no_agp =1 ; -if (!strncmp (p,"noaperture" ,10 )) +if (!memcmp (p,"noaperture" ,10 )) fix_aperture =0 ;/* duplicated from pci-dma.c */ -if (!strncmp (p,"force" ,5 )) +if (!memcmp (p,"force" ,5 )) gart_iommu_aperture_allowed =1 ; -if (!strncmp (p,"allowed" ,7 )) +if (!memcmp (p,"allowed" ,7 )) gart_iommu_aperture_allowed =1 ; -if (!strncmp (p,"memaper" ,7 )) { +if (!memcmp (p,"memaper" ,7 )) { fallback_aper_force =1 ; p +=7 ;if (*p =='=' ) {
arch/x86/kernel/setup.c +1 -1
@@ -755,7 +755,7 @@ void __init setup_arch(char **cmdline_p) rd_doload = ((boot_params.hdr.ram_size &RAMDISK_LOAD_FLAG ) !=0 );#endif #ifdef CONFIG_EFI - if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature, + if (!memcmp((char *)&boot_params.efi_info.efi_loader_signature, #ifdef CONFIG_X86_32 "EL32",#else
arch/x86/kernel/tsc.c +1 -1
@@ -110,7 +110,7 @@ static int __init tsc_setup(char *str) {if (!strcmp (str,"reliable" )) tsc_clocksource_reliable =1 ; -if (!strncmp (str,"noirqtime" ,9 )) +if (!memcmp (str,"noirqtime" ,9 )) no_sched_irq_time =1 ;return 1 ; }
arch/x86/mm/numa_64.c +3 -3
@@ -665,14 +665,14 @@ static __init int numa_setup(char *opt) {if (!opt)return -EINVAL ; -if (!strncmp (opt,"off" ,3 )) +if (!memcmp (opt,"off" ,3 )) numa_off =1 ;#ifdef CONFIG_NUMA_EMU -if (!strncmp (opt,"fake=" ,5 )) +if (!memcmp (opt,"fake=" ,5 )) cmdline = opt +5 ;#endif #ifdef CONFIG_ACPI_NUMA -if (!strncmp (opt,"noacpi" ,6 )) +if (!memcmp (opt,"noacpi" ,6 )) acpi_numa =-1 ;#endif return 0 ;
arch/x86/mm/setup_nx.c +2 -2
@@ -19,9 +19,9 @@ static int __init noexec_setup(char *str) {if (!str)return -EINVAL ; -if (!strncmp (str,"on" ,2 )) { +if (!memcmp (str,"on" ,2 )) { disable_nx =0 ; - }else if (!strncmp (str,"off" ,3 )) { + }else if (!memcmp (str,"off" ,3 )) { disable_nx =1 ; }x86_configure_nx ();
arch/x86/pci/common.c +3 -3
@@ -478,7 +478,7 @@ char * __devinit pcibios_setup(char *str) }else if (!strcmp (str,"biosirq" )) { pci_probe |=PCI_BIOS_IRQ_SCAN ;return NULL ; - }else if (!strncmp (str,"pirqaddr=" ,9 )) { + }else if (!memcmp (str,"pirqaddr=" ,9 )) { pirq_table_addr =simple_strtoul (str+9 ,NULL ,0 );return NULL ; }
@@ -515,10 +515,10 @@ char * __devinit pcibios_setup(char *str)else if (!strcmp (str,"usepirqmask" )) { pci_probe |=PCI_USE_PIRQ_MASK ;return NULL ; - }else if (!strncmp (str,"irqmask=" ,8 )) { + }else if (!memcmp (str,"irqmask=" ,8 )) { pcibios_irq_mask =simple_strtol (str+8 ,NULL ,0 );return NULL ; - }else if (!strncmp (str,"lastbus=" ,8 )) { + }else if (!memcmp (str,"lastbus=" ,8 )) { pcibios_last_bus =simple_strtol (str+8 ,NULL ,0 );return NULL ; }
arch/x86/platform/olpc/olpc.c +1 -1
@@ -198,7 +198,7 @@ static bool __init check_ofw_architecture(void)printk (KERN_ERR "ofw: getprop call failed!\n" );return false; } -return propsize ==5 &&strncmp ("OLPC" , olpc_arch,5 ) ==0 ; +return propsize ==5 &&memcmp ("OLPC" , olpc_arch,5 ) ==0 ; }static u32 __init get_board_revision (void )
arch/x86/platform/uv/bios_uv.c +1 -1
@@ -197,7 +197,7 @@ void uv_bios_init(void) tab = (struct uv_systab *)ioremap (efi.uv_systab,sizeof (struct uv_systab )); -if (strncmp (tab->signature,"UVST" ,4 ) !=0 ) +if (memcmp (tab->signature,"UVST" ,4 ) !=0 )printk (KERN_ERR "bad signature in UV system table!" );/*
arch/x86/xen/platform-pci-unplug.c +6 -6
@@ -121,17 +121,17 @@ static int __init parse_xen_emul_unplug(char *arg) }else { l =strlen (p); } -if (!strncmp (p,"all" , l)) +if (!memcmp (p,"all" , l)) xen_emul_unplug |=XEN_UNPLUG_ALL ; -else if (!strncmp (p,"ide-disks" , l)) +else if (!memcmp (p,"ide-disks" , l)) xen_emul_unplug |=XEN_UNPLUG_ALL_IDE_DISKS ; -else if (!strncmp (p,"aux-ide-disks" , l)) +else if (!memcmp (p,"aux-ide-disks" , l)) xen_emul_unplug |=XEN_UNPLUG_AUX_IDE_DISKS ; -else if (!strncmp (p,"nics" , l)) +else if (!memcmp (p,"nics" , l)) xen_emul_unplug |=XEN_UNPLUG_ALL_NICS ; -else if (!strncmp (p,"unnecessary" , l)) +else if (!memcmp (p,"unnecessary" , l)) xen_emul_unplug |=XEN_UNPLUG_UNNECESSARY ; -else if (!strncmp (p,"never" , l)) +else if (!memcmp (p,"never" , l)) xen_emul_unplug |=XEN_UNPLUG_NEVER ;else printk(KERN_WARNING "unrecognised option '%s' "
arch/xtensa/platforms/iss/network.c +1 -1
@@ -313,7 +313,7 @@ static int tuntap_probe(struct iss_net_private *lp, int index, char *init)/* Transport should be 'tuntap': ethX=tuntap,mac,dev_name */ -if (strncmp (init,TRANSPORT_TUNTAP_NAME , len)) +if (memcmp (init,TRANSPORT_TUNTAP_NAME , len))return 0 ;if (*(init +=strlen (TRANSPORT_TUNTAP_NAME )) ==',' ) {
drivers/acpi/blacklist.c +2 -2
@@ -121,12 +121,12 @@ int __init acpi_blacklisted(void)continue ; } -if (strncmp (acpi_blacklist[i].oem_id, table_header.oem_id,6 )) { +if (memcmp (acpi_blacklist[i].oem_id, table_header.oem_id,6 )) { i++;continue ; } -if (strncmp +if (memcmp (acpi_blacklist[i].oem_table_id, table_header.oem_table_id,8 )) { i++;
drivers/acpi/osl.c +1 -1
@@ -481,7 +481,7 @@ acpi_os_table_override(struct acpi_table_header * existing_table, *new_table =NULL ;#ifdef CONFIG_ACPI_CUSTOM_DSDT -if (strncmp (existing_table->signature,"DSDT" ,4 ) ==0 ) +if (memcmp (existing_table->signature,"DSDT" ,4 ) ==0 ) *new_table = (struct acpi_table_header *)AmlCode;#endif if (*new_table !=NULL ) {
drivers/acpi/proc.c +1 -1
@@ -360,7 +360,7 @@ acpi_system_write_wakeup_device(struct file *file,if (!dev->wakeup.flags.valid)continue ; -if (!strncmp (dev->pnp.bus_id, str,4 )) { +if (!memcmp (dev->pnp.bus_id, str,4 )) { dev->wakeup.state.enabled = dev->wakeup.state.enabled ?0 :1 ; found_dev = dev;
drivers/acpi/sysfs.c +4 -4
@@ -173,7 +173,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp) {int result =0 ; -if (!strncmp (val,"enable" ,strlen ("enable" ) -1 )) { +if (!memcmp (val,"enable" ,strlen ("enable" ) -1 )) { result =acpi_debug_trace (trace_method_name, trace_debug_level, trace_debug_layer,0 );if (result)
@@ -181,7 +181,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp) goto exit; } -if (!strncmp (val,"disable" ,strlen ("disable" ) -1 )) { +if (!memcmp (val,"disable" ,strlen ("disable" ) -1 )) {int name =0 ; result =acpi_debug_trace ((char *)&name, trace_debug_level, trace_debug_layer,0 );
@@ -190,7 +190,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp) goto exit; } -if (!strncmp (val,"1" ,1 )) { +if (!memcmp (val,"1" ,1 )) { result =acpi_debug_trace (trace_method_name, trace_debug_level, trace_debug_layer,1 );if (result)
@@ -259,7 +259,7 @@ static ssize_t acpi_table_show(struct file *filp, struct kobject *kobj,acpi_status status;char name[ACPI_NAME_SIZE ]; -if (strncmp (table_attr->name,"NULL" ,4 )) +if (memcmp (table_attr->name,"NULL" ,4 ))memcpy (name, table_attr->name,ACPI_NAME_SIZE );else memcpy (name,"\0\0\0\0" ,4 );
drivers/acpi/tables.c +2 -2
@@ -219,7 +219,7 @@ acpi_table_parse_entries(char *id,if (!handler)return -EINVAL ; -if (strncmp (id,ACPI_SIG_MADT ,4 ) ==0 ) +if (memcmp (id,ACPI_SIG_MADT ,4 ) ==0 )acpi_get_table_with_size (id, acpi_apic_instance, &table_header, &tbl_size);else acpi_get_table_with_size (id,0 , &table_header, &tbl_size);
@@ -286,7 +286,7 @@ int __init acpi_table_parse(char *id, acpi_table_handler handler)if (!handler)return -EINVAL ; -if (strncmp (id,ACPI_SIG_MADT ,4 ) ==0 ) +if (memcmp (id,ACPI_SIG_MADT ,4 ) ==0 )acpi_get_table_with_size (id, acpi_apic_instance, &table, &tbl_size);else acpi_get_table_with_size (id,0 , &table, &tbl_size);
drivers/ata/libata-scsi.c +1 -1
@@ -124,7 +124,7 @@ static ssize_t ata_scsi_lpm_store(struct device *dev, policy < ARRAY_SIZE(ata_lpm_policy_names); policy++) {const char *name = ata_lpm_policy_names[policy]; -if (strncmp (name, buf,strlen (name)) ==0 ) +if (memcmp (name, buf,strlen (name)) ==0 )break ; }if (policy ==ARRAY_SIZE (ata_lpm_policy_names))
drivers/ata/pata_macio.c +2 -2
@@ -483,12 +483,12 @@ static int pata_macio_cable_detect(struct ata_port *ap)struct device_node *root =of_find_node_by_path ("/" );const char *model =of_get_property (root,"model" ,NULL ); -if (cable && !strncmp (cable,"80-" ,3 )) { +if (cable && !memcmp (cable,"80-" ,3 )) {/* Some drives fail to detect 80c cable in PowerBook * These machine use proprietary short IDE cable * anyway */ -if (!strncmp (model,"PowerBook" ,9 )) +if (!memcmp (model,"PowerBook" ,9 ))return ATA_CBL_PATA40_SHORT ;else return ATA_CBL_PATA80 ;
drivers/ata/sata_nv.c +1 -1
@@ -1956,7 +1956,7 @@ static int nv_swncq_slave_config(struct scsi_device *sdev)ata_id_c_string (dev->id, model_num,ATA_ID_PROD ,sizeof (model_num)); -if (strncmp (model_num,"Maxtor" ,6 ) ==0 ) { +if (memcmp (model_num,"Maxtor" ,6 ) ==0 ) {ata_scsi_change_queue_depth (sdev,1 ,SCSI_QDEPTH_DEFAULT );ata_dev_printk (dev,KERN_NOTICE ,"Disabling SWNCQ mode (depth %x)\n" , sdev->queue_depth);
drivers/atm/solos-pci.c +2 -2
@@ -292,9 +292,9 @@ static ssize_t solos_param_store(struct device *dev, struct device_attribute *atif (skb->data[buflen -1 ] =='\n' ) buflen--; -if (buflen ==2 && !strncmp (skb->data,"OK" ,2 )) +if (buflen ==2 && !memcmp (skb->data,"OK" ,2 )) ret = count; -else if (buflen ==5 && !strncmp (skb->data,"ERROR" ,5 )) +else if (buflen ==5 && !memcmp (skb->data,"ERROR" ,5 )) ret = -EIO ;else {/* We know we have enough space allocated for this; we allocated
drivers/base/memory.c +2 -2
@@ -271,9 +271,9 @@ store_mem_state(struct sys_device *dev,if (!present_section_nr (phys_section_nr)) goto out; -if (!strncmp (buf,"online" ,min ((int )count,6 ))) +if (!memcmp (buf,"online" ,min ((int )count,6 ))) ret =memory_block_change_state (mem,MEM_ONLINE ,MEM_OFFLINE ); -else if (!strncmp (buf,"offline" ,min ((int )count,7 ))) +else if (!memcmp (buf,"offline" ,min ((int )count,7 ))) ret =memory_block_change_state (mem,MEM_OFFLINE ,MEM_ONLINE ); out:if (ret)
drivers/base/platform.c +1 -1
@@ -1077,7 +1077,7 @@ int __init early_platform_driver_register(struct early_platform_driver *epdrv,* command line will be put first on the list. */ n =strlen (epdrv->pdrv->driver.name); -if (buf && !strncmp (buf, epdrv->pdrv->driver.name, n)) { +if (buf && !memcmp (buf, epdrv->pdrv->driver.name, n)) {list_move (&epdrv->list, &early_platform_driver_list);/* Allow passing parameters after device name */
drivers/base/power/sysfs.c +6 -6
@@ -116,9 +116,9 @@ static ssize_t control_store(struct device * dev, struct device_attribute *attr, cp =memchr (buf,'\n' , n);if (cp) len = cp - buf; -if (len ==sizeof ctrl_auto -1 &&strncmp (buf, ctrl_auto, len) ==0 ) +if (len ==sizeof ctrl_auto -1 &&memcmp (buf, ctrl_auto, len) ==0 )pm_runtime_allow (dev); -else if (len ==sizeof ctrl_on -1 &&strncmp (buf, ctrl_on, len) ==0 ) +else if (len ==sizeof ctrl_on -1 &&memcmp (buf, ctrl_on, len) ==0 )pm_runtime_forbid (dev);else return -EINVAL ;
@@ -236,10 +236,10 @@ wake_store(struct device * dev, struct device_attribute *attr,if (cp) len = cp - buf;if (len ==sizeof enabled -1 - &&strncmp (buf, enabled,sizeof enabled -1 ) ==0 ) + &&memcmp (buf, enabled,sizeof enabled -1 ) ==0 )device_set_wakeup_enable (dev,1 );else if (len ==sizeof disabled -1 - &&strncmp (buf, disabled,sizeof disabled -1 ) ==0 ) + &&memcmp (buf, disabled,sizeof disabled -1 ) ==0 )device_set_wakeup_enable (dev,0 );else return -EINVAL ;
@@ -419,9 +419,9 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr, cp =memchr (buf,'\n' , n);if (cp) len = cp - buf; -if (len ==sizeof enabled -1 &&strncmp (buf, enabled, len) ==0 ) +if (len ==sizeof enabled -1 &&memcmp (buf, enabled, len) ==0 )device_enable_async_suspend (dev); -else if (len ==sizeof disabled -1 &&strncmp (buf, disabled, len) ==0 ) +else if (len ==sizeof disabled -1 &&memcmp (buf, disabled, len) ==0 )device_disable_async_suspend (dev);else return -EINVAL ;
drivers/block/DAC960.c +12 -12
@@ -5979,7 +5979,7 @@ static bool DAC960_V1_ExecuteUserCommand(DAC960_Controller_T *Controller,DAC960_ExecuteCommand (Command);DAC960_UserCritical ("Cache Flush Completed\n" , Controller); } -else if (strncmp (UserCommand,"kill" ,4 ) ==0 && +else if (memcmp (UserCommand,"kill" ,4 ) ==0 &&DAC960_ParsePhysicalDevice (Controller, &UserCommand[4 ], &Channel, &TargetID)) {
@@ -5993,7 +5993,7 @@ static bool DAC960_V1_ExecuteUserCommand(DAC960_Controller_T *Controller,else DAC960_UserCritical ("Kill of Physical Device %d:%d Illegal\n" , Controller, Channel, TargetID); } -else if (strncmp (UserCommand,"make-online" ,11 ) ==0 && +else if (memcmp (UserCommand,"make-online" ,11 ) ==0 &&DAC960_ParsePhysicalDevice (Controller, &UserCommand[11 ], &Channel, &TargetID)) {
@@ -6008,7 +6008,7 @@ static bool DAC960_V1_ExecuteUserCommand(DAC960_Controller_T *Controller, Controller, Channel, TargetID); } -else if (strncmp (UserCommand,"make-standby" ,12 ) ==0 && +else if (memcmp (UserCommand,"make-standby" ,12 ) ==0 &&DAC960_ParsePhysicalDevice (Controller, &UserCommand[12 ], &Channel, &TargetID)) {
@@ -6023,7 +6023,7 @@ static bool DAC960_V1_ExecuteUserCommand(DAC960_Controller_T *Controller,"Device %d:%d Illegal\n" , Controller, Channel, TargetID); } -else if (strncmp (UserCommand,"rebuild" ,7 ) ==0 && +else if (memcmp (UserCommand,"rebuild" ,7 ) ==0 &&DAC960_ParsePhysicalDevice (Controller, &UserCommand[7 ], &Channel, &TargetID)) {
@@ -6065,7 +6065,7 @@ static bool DAC960_V1_ExecuteUserCommand(DAC960_Controller_T *Controller,break ; } } -else if (strncmp (UserCommand,"check-consistency" ,17 ) ==0 && +else if (memcmp (UserCommand,"check-consistency" ,17 ) ==0 &&DAC960_ParseLogicalDrive (Controller, &UserCommand[17 ], &LogicalDriveNumber)) {
@@ -6247,7 +6247,7 @@ static bool DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller,DAC960_ExecuteCommand (Command);DAC960_UserCritical ("Cache Flush Completed\n" , Controller); } - else if (strncmp(UserCommand, "kill", 4) == 0 && + else if (memcmp(UserCommand, "kill", 4) == 0 && DAC960_ParsePhysicalDevice(Controller, &UserCommand[4], &Channel, &TargetID) && DAC960_V2_TranslatePhysicalDevice(Command, Channel, TargetID,
@@ -6266,7 +6266,7 @@ static bool DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller, == DAC960_V2_NormalCompletion ? "Succeeded" : "Failed")); } - else if (strncmp(UserCommand, "make-online", 11) == 0 && + else if (memcmp(UserCommand, "make-online", 11) == 0 && DAC960_ParsePhysicalDevice(Controller, &UserCommand[11], &Channel, &TargetID) && DAC960_V2_TranslatePhysicalDevice(Command, Channel, TargetID,
@@ -6285,7 +6285,7 @@ static bool DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller, == DAC960_V2_NormalCompletion ? "Succeeded" : "Failed")); } - else if (strncmp(UserCommand, "make-standby", 12) == 0 && + else if (memcmp(UserCommand, "make-standby", 12) == 0 && DAC960_ParsePhysicalDevice(Controller, &UserCommand[12], &Channel, &TargetID) && DAC960_V2_TranslatePhysicalDevice(Command, Channel, TargetID,
@@ -6304,7 +6304,7 @@ static bool DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller, == DAC960_V2_NormalCompletion ? "Succeeded" : "Failed")); } - else if (strncmp(UserCommand, "rebuild", 7) == 0 && + else if (memcmp(UserCommand, "rebuild", 7) == 0 && DAC960_ParsePhysicalDevice(Controller, &UserCommand[7], &Channel, &TargetID) && DAC960_V2_TranslatePhysicalDevice(Command, Channel, TargetID,
@@ -6321,7 +6321,7 @@ static bool DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller, == DAC960_V2_NormalCompletion ? "Initiated" : "Not Initiated")); } - else if (strncmp(UserCommand, "cancel-rebuild", 14) == 0 && + else if (memcmp(UserCommand, "cancel-rebuild", 14) == 0 && DAC960_ParsePhysicalDevice(Controller, &UserCommand[14], &Channel, &TargetID) && DAC960_V2_TranslatePhysicalDevice(Command, Channel, TargetID,
@@ -6338,7 +6338,7 @@ static bool DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller, == DAC960_V2_NormalCompletion ? "Cancelled" : "Not Cancelled")); } -else if (strncmp (UserCommand,"check-consistency" ,17 ) ==0 && +else if (memcmp (UserCommand,"check-consistency" ,17 ) ==0 &&DAC960_ParseLogicalDrive (Controller, &UserCommand[17 ], &LogicalDriveNumber)) {
@@ -6358,7 +6358,7 @@ static bool DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller, == DAC960_V2_NormalCompletion ? "Initiated" : "Not Initiated")); } -else if (strncmp (UserCommand,"cancel-consistency-check" ,24 ) ==0 && +else if (memcmp (UserCommand,"cancel-consistency-check" ,24 ) ==0 &&DAC960_ParseLogicalDrive (Controller, &UserCommand[24 ], &LogicalDriveNumber)) {
drivers/block/aoe/aoedev.c +1 -1
@@ -133,7 +133,7 @@ aoedev_flush(const char __user *str, size_t cnt) cnt =sizeof buf;if (copy_from_user (buf, str, cnt))return -EFAULT ; - all = !strncmp (buf,"all" ,3 ); + all = !memcmp (buf,"all" ,3 ); }spin_lock_irqsave (&devlist_lock, flags);
drivers/block/aoe/aoenet.c +1 -1
@@ -61,7 +61,7 @@ is_aoe_netif(struct net_device *ifp)else len =strlen (p);/* last token in aoe_iflist */ -if (strlen (ifp->name) == len && !strncmp (ifp->name, p, len)) +if (strlen (ifp->name) == len && !memcmp (ifp->name, p, len))return 1 ;if (q == p)break ;
drivers/block/cciss.c +1 -1
@@ -510,7 +510,7 @@ cciss_proc_write(struct file *file, const char __user *buf, buffer[length] ='\0' ;#ifdef CONFIG_CISS_SCSI_TAPE -if (strncmp (ENGAGE_SCSI , buffer,sizeof ENGAGE_SCSI -1 ) ==0 ) { +if (memcmp (ENGAGE_SCSI , buffer,sizeof ENGAGE_SCSI -1 ) ==0 ) {struct seq_file *seq = file->private_data;ctlr_info_t *h = seq->private;
drivers/block/cciss_scsi.c +1 -1
@@ -1244,7 +1244,7 @@ cciss_update_non_disk_devices(ctlr_info_t *h, int hostno)strncpy (obdr_sig, &inq_buff[43 ],6 ); obdr_sig[6 ] ='\0' ; -if (strncmp (obdr_sig,OBDR_TAPE_SIG ,6 ) !=0 ) +if (memcmp (obdr_sig,OBDR_TAPE_SIG ,6 ) !=0 )/* Not OBDR device, ignore it. */ break ; }
drivers/block/xen-blkfront.c +1 -1
@@ -857,7 +857,7 @@ static int blkfront_probe(struct xenbus_device *dev, type =xenbus_read (XBT_NIL , dev->nodename,"device-type" , &len);if (IS_ERR (type))return -ENODEV ; -if (strncmp (type,"cdrom" ,5 ) ==0 ) { +if (memcmp (type,"cdrom" ,5 ) ==0 ) {kfree (type);return -ENODEV ; }
drivers/cdrom/viocd.c +1 -1
@@ -562,7 +562,7 @@ static int find_capability(const char *type)struct capability_entry *entry;for (entry = capability_table; entry->type; ++entry) -if (!strncmp (entry->type, type,4 )) +if (!memcmp (entry->type, type,4 ))break ;return entry->capability; }
drivers/char/apm-emulation.c +2 -2
@@ -712,9 +712,9 @@ MODULE_LICENSE("GPL");static int __init apm_setup (char *str) {while ((str !=NULL ) && (*str !='\0' )) { -if (strncmp (str,"off" ,3 ) ==0 ) +if (memcmp (str,"off" ,3 ) ==0 ) apm_disabled =1 ; -if (strncmp (str,"on" ,2 ) ==0 ) +if (memcmp (str,"on" ,2 ) ==0 ) apm_disabled =0 ; str =strchr (str,',' );if (str !=NULL )
drivers/char/briq_panel.c +1 -1
@@ -201,7 +201,7 @@ static int __init briq_panel_init(void)int i; machine =of_get_property (root,"model" ,NULL ); -if (!machine ||strncmp (machine,"TotalImpact,BRIQ-1" ,18 ) !=0 ) { +if (!machine ||memcmp (machine,"TotalImpact,BRIQ-1" ,18 ) !=0 ) {of_node_put (root);return -ENODEV ; }
drivers/char/cyclades.c +1 -1
@@ -3496,7 +3496,7 @@ static int __devinit __cyz_load_fw(const struct firmware *fw,return -EINVAL ; } -if (strncmp (name, h->name,sizeof (h->name))) { +if (memcmp (name, h->name,sizeof (h->name))) {printk (BAD_FW "bad name '%s' (expected '%s')\n" , h->name, name);return -EINVAL ; }
drivers/char/epca.c +4 -4
@@ -2524,9 +2524,9 @@ static void __init epca_setup(char *str, int *ints)switch (index) {case 1 : len =strlen (str); -if (strncmp ("Disable" , str, len) ==0 ) +if (memcmp ("Disable" , str, len) ==0 ) board.status =0 ; -else if (strncmp ("Enable" , str, len) ==0 ) +else if (memcmp ("Enable" , str, len) ==0 ) board.status =1 ;else {printk (KERN_ERR "epca_setup: Invalid status %s\n" , str);
@@ -2558,9 +2558,9 @@ static void __init epca_setup(char *str, int *ints)case 3 : len =strlen (str); -if (strncmp ("Disable" , str, len) ==0 ) +if (memcmp ("Disable" , str, len) ==0 ) board.altpin =0 ; -else if (strncmp ("Enable" , str, len) ==0 ) +else if (memcmp ("Enable" , str, len) ==0 ) board.altpin =1 ;else {printk (KERN_ERR "epca_setup: Invalid altpin %s\n" , str);
drivers/char/i8k.c +1 -1
@@ -569,7 +569,7 @@ static int __init i8k_probe(void)/* * Check if the two versions match. */ -if (strncmp (buff, bios_version,sizeof (bios_version)) !=0 ) +if (memcmp (buff, bios_version,sizeof (bios_version)) !=0 )printk (KERN_WARNING "i8k: BIOS version mismatch: %s != %s\n" , buff, bios_version); }
drivers/char/ip2/ip2main.c +1 -1
@@ -559,7 +559,7 @@ static int __init ip2_loadmain(void) }/* Check module parameter with 'ip2=' has been passed or not */ -if (!poll_only && (!strncmp (str,"ip2=" ,4 ))) +if (!poll_only && (!memcmp (str,"ip2=" ,4 )))ip2_setup (str);ip2trace (ITRC_NO_PORT ,ITRC_INIT ,ITRC_ENTER ,0 );
drivers/char/lp.c +3 -3
@@ -848,7 +848,7 @@ static int __init lp_setup (char *str)printk (KERN_WARNING "warning: 'lp=0x%x' is deprecated, ignored\n" , x);return 0 ; } - }else if (!strncmp (str,"parport" ,7 )) { + }else if (!memcmp (str,"parport" ,7 )) {int n =simple_strtoul (str+7 ,NULL ,10 );if (parport_ptr <LP_NO ) parport_nr[parport_ptr++] = n;
@@ -1010,12 +1010,12 @@ static int __init lp_init_module (void) {if (parport[0 ]) {/* The user gave some parameters. Let's see what they were. */ -if (!strncmp (parport[0 ],"auto" ,4 )) +if (!memcmp (parport[0 ],"auto" ,4 )) parport_nr[0 ] =LP_PARPORT_AUTO ;else {int n;for (n =0 ; n <LP_NO && parport[n]; n++) { -if (!strncmp (parport[n],"none" ,4 )) +if (!memcmp (parport[n],"none" ,4 )) parport_nr[n] =LP_PARPORT_NONE ;else {char *ep;
drivers/char/rio/rio_linux.c +1 -1
@@ -1095,7 +1095,7 @@ static int __init rio_init(void) vpdp =get_VPD_PROM (hp);rio_dprintk (RIO_DEBUG_PROBE ,"Got VPD ROM\n" ); okboard =0 ; -if ((strncmp (vpdp->identifier,RIO_ISA_IDENT ,16 ) ==0 ) || (strncmp (vpdp->identifier,RIO_ISA2_IDENT ,16 ) ==0 ) || (strncmp (vpdp->identifier,RIO_ISA3_IDENT ,16 ) ==0 )) { +if ((memcmp (vpdp->identifier,RIO_ISA_IDENT ,16 ) ==0 ) || (strncmp (vpdp->identifier,RIO_ISA2_IDENT ,16 ) ==0 ) || (strncmp (vpdp->identifier,RIO_ISA3_IDENT ,16 ) ==0 )) {/* Board is present... */ if (RIOBoardTest (hp->PaddrP, hp->Caddr,RIO_AT ,0 ) ==0 ) {/* ... and feeling fine!!!! */
drivers/char/sx.c +1 -1
@@ -2189,7 +2189,7 @@ static int __devinit probe_sx(struct sx_board *board)sx_dprintk (SX_DEBUG_PROBE ,"checking identifier...\n" ); -if (strncmp (vpdp.identifier,SX_VPD_IDENT_STRING ,16 ) !=0 ) { +if (memcmp (vpdp.identifier,SX_VPD_IDENT_STRING ,16 ) !=0 ) {sx_dprintk (SX_DEBUG_PROBE ,"Got non-SX identifier: " "'%s'\n" , vpdp.identifier);return 0 ;
drivers/crypto/hifn_795x.c +3 -3
@@ -977,7 +977,7 @@ static void hifn_init_pll(struct hifn_device *dev) pllcfg =HIFN_1_PLL |HIFN_PLL_RESERVED_1 ; -if (strncmp (hifn_pll_ref,"ext" ,3 ) ==0 ) +if (memcmp (hifn_pll_ref,"ext" ,3 ) ==0 ) pllcfg |=HIFN_PLL_REF_CLK_PLL ;else pllcfg |=HIFN_PLL_REF_CLK_HBI ;
@@ -2749,8 +2749,8 @@ static int __init hifn_init(void)return -EINVAL ; } -if (strncmp (hifn_pll_ref,"ext" ,3 ) && -strncmp (hifn_pll_ref,"pci" ,3 )) { +if (memcmp (hifn_pll_ref,"ext" ,3 ) && +memcmp (hifn_pll_ref,"pci" ,3 )) {printk (KERN_ERR "hifn795x: invalid hifn_pll_ref clock, " "must be pci or ext" );return -EINVAL ;
drivers/firmware/edd.c +17 -17
@@ -147,20 +147,20 @@ edd_show_host_bus(struct edd_device *edev, char *buf) } } -if (!strncmp (info->params.host_bus_type,"ISA" ,3 )) { +if (!memcmp (info->params.host_bus_type,"ISA" ,3 )) { p +=scnprintf (p, left,"\tbase_address: %x\n" , info->params.interface_path.isa.base_address); - }else if (!strncmp (info->params.host_bus_type,"PCIX" ,4 ) || - !strncmp (info->params.host_bus_type,"PCI" ,3 )) { + }else if (!memcmp (info->params.host_bus_type,"PCIX" ,4 ) || + !memcmp (info->params.host_bus_type,"PCI" ,3 )) { p +=scnprintf (p, left,"\t%02x:%02x.%d channel: %u\n" , info->params.interface_path.pci.bus, info->params.interface_path.pci.slot, info->params.interface_path.pci.function, info->params.interface_path.pci.channel); - }else if (!strncmp (info->params.host_bus_type,"IBND" ,4 ) || - !strncmp (info->params.host_bus_type,"XPRS" ,4 ) || - !strncmp (info->params.host_bus_type,"HTPT" ,4 )) { + }else if (!memcmp (info->params.host_bus_type,"IBND" ,4 ) || + !memcmp (info->params.host_bus_type,"XPRS" ,4 ) || + !memcmp (info->params.host_bus_type,"HTPT" ,4 )) { p +=scnprintf (p, left,"\tTBD: %llx\n" , info->params.interface_path.ibnd.reserved);
@@ -192,34 +192,34 @@ edd_show_interface(struct edd_device *edev, char *buf) p +=scnprintf (p, left," " ); } } -if (!strncmp (info->params.interface_type,"ATAPI" ,5 )) { +if (!memcmp (info->params.interface_type,"ATAPI" ,5 )) { p +=scnprintf (p, left,"\tdevice: %u lun: %u\n" , info->params.device_path.atapi.device, info->params.device_path.atapi.lun); - }else if (!strncmp (info->params.interface_type,"ATA" ,3 )) { + }else if (!memcmp (info->params.interface_type,"ATA" ,3 )) { p +=scnprintf (p, left,"\tdevice: %u\n" , info->params.device_path.ata.device); - }else if (!strncmp (info->params.interface_type,"SCSI" ,4 )) { + }else if (!memcmp (info->params.interface_type,"SCSI" ,4 )) { p +=scnprintf (p, left,"\tid: %u lun: %llu\n" , info->params.device_path.scsi.id, info->params.device_path.scsi.lun); - }else if (!strncmp (info->params.interface_type,"USB" ,3 )) { + }else if (!memcmp (info->params.interface_type,"USB" ,3 )) { p +=scnprintf (p, left,"\tserial_number: %llx\n" , info->params.device_path.usb.serial_number); - }else if (!strncmp (info->params.interface_type,"1394" ,4 )) { + }else if (!memcmp (info->params.interface_type,"1394" ,4 )) { p +=scnprintf (p, left,"\teui: %llx\n" , info->params.device_path.i1394.eui); - }else if (!strncmp (info->params.interface_type,"FIBRE" ,5 )) { + }else if (!memcmp (info->params.interface_type,"FIBRE" ,5 )) { p +=scnprintf (p, left,"\twwid: %llx lun: %llx\n" , info->params.device_path.fibre.wwid, info->params.device_path.fibre.lun); - }else if (!strncmp (info->params.interface_type,"I2O" ,3 )) { + }else if (!memcmp (info->params.interface_type,"I2O" ,3 )) { p +=scnprintf (p, left,"\tidentity_tag: %llx\n" , info->params.device_path.i2o.identity_tag); - }else if (!strncmp (info->params.interface_type,"RAID" ,4 )) { + }else if (!memcmp (info->params.interface_type,"RAID" ,4 )) { p +=scnprintf (p, left,"\tidentity_tag: %x\n" , info->params.device_path.raid.array_number); - }else if (!strncmp (info->params.interface_type,"SATA" ,4 )) { + }else if (!memcmp (info->params.interface_type,"SATA" ,4 )) { p +=scnprintf (p, left,"\tdevice: %u\n" , info->params.device_path.sata.device); }else {
@@ -650,8 +650,8 @@ edd_dev_is_type(struct edd_device *edev, const char *type) info =edd_dev_get_info (edev);if (type && info) { -if (!strncmp (info->params.host_bus_type, type,strlen (type)) || - !strncmp (info->params.interface_type, type,strlen (type))) +if (!memcmp (info->params.host_bus_type, type,strlen (type)) || + !memcmp (info->params.interface_type, type,strlen (type)))return 1 ; }return 0 ;
drivers/gpu/drm/drm_edid.c +1 -1
@@ -372,7 +372,7 @@ static bool edid_vendor(struct edid *edid, char *vendor) ((edid->mfg_id[1] & 0xe0) >> 5)) + '@'; edid_vendor[2 ] = (edid->mfg_id[1 ] &0x1f ) +'@' ; -return !strncmp (edid_vendor, vendor,3 ); +return !memcmp (edid_vendor, vendor,3 ); }/**
drivers/gpu/drm/nouveau/nouveau_pm.c +1 -1
@@ -91,7 +91,7 @@ nouveau_pm_profile_set(struct drm_device *dev, const char *profile)if (!pm->clock_set)return -EINVAL ; -if (!strncmp (profile,"boot" ,4 )) +if (!memcmp (profile,"boot" ,4 )) perflvl = &pm->boot;else {int pl =simple_strtol (profile,NULL ,10 );
drivers/gpu/drm/radeon/atom.c +2 -2
@@ -1248,7 +1248,7 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)kfree (ctx);return NULL ; } -if (strncmp +if (memcmp (CSTR (ATOM_ATI_MAGIC_PTR ),ATOM_ATI_MAGIC ,strlen (ATOM_ATI_MAGIC ))) {printk (KERN_INFO "Invalid ATI magic.\n" );
@@ -1257,7 +1257,7 @@ struct atom_context *atom_parse(struct card_info *card, void *bios) } base =CU16 (ATOM_ROM_TABLE_PTR ); -if (strncmp +if (memcmp (CSTR (base +ATOM_ROM_MAGIC_PTR ),ATOM_ROM_MAGIC ,strlen (ATOM_ROM_MAGIC ))) {printk (KERN_INFO "Invalid ATOM magic.\n" );
drivers/gpu/drm/radeon/radeon_pm.c +7 -7
@@ -354,15 +354,15 @@ static ssize_t radeon_set_pm_profile(struct device *dev,mutex_lock (&rdev->pm.mutex);if (rdev->pm.pm_method ==PM_METHOD_PROFILE ) { -if (strncmp ("default" , buf,strlen ("default" )) ==0 ) +if (memcmp ("default" , buf,strlen ("default" )) ==0 ) rdev->pm.profile =PM_PROFILE_DEFAULT ; -else if (strncmp ("auto" , buf,strlen ("auto" )) ==0 ) +else if (memcmp ("auto" , buf,strlen ("auto" )) ==0 ) rdev->pm.profile =PM_PROFILE_AUTO ; -else if (strncmp ("low" , buf,strlen ("low" )) ==0 ) +else if (memcmp ("low" , buf,strlen ("low" )) ==0 ) rdev->pm.profile =PM_PROFILE_LOW ; -else if (strncmp ("mid" , buf,strlen ("mid" )) ==0 ) +else if (memcmp ("mid" , buf,strlen ("mid" )) ==0 ) rdev->pm.profile =PM_PROFILE_MID ; -else if (strncmp ("high" , buf,strlen ("high" )) ==0 ) +else if (memcmp ("high" , buf,strlen ("high" )) ==0 ) rdev->pm.profile =PM_PROFILE_HIGH ;else {DRM_ERROR ("invalid power profile!\n" );
@@ -398,13 +398,13 @@ static ssize_t radeon_set_pm_method(struct device *dev,struct radeon_device *rdev = ddev->dev_private; -if (strncmp ("dynpm" , buf,strlen ("dynpm" )) ==0 ) { +if (memcmp ("dynpm" , buf,strlen ("dynpm" )) ==0 ) {mutex_lock (&rdev->pm.mutex); rdev->pm.pm_method =PM_METHOD_DYNPM ; rdev->pm.dynpm_state =DYNPM_STATE_PAUSED ; rdev->pm.dynpm_planned_action =DYNPM_ACTION_DEFAULT ;mutex_unlock (&rdev->pm.mutex); - }else if (strncmp ("profile" , buf,strlen ("profile" )) ==0 ) { + }else if (memcmp ("profile" , buf,strlen ("profile" )) ==0 ) {bool flush_wq = false;mutex_lock (&rdev->pm.mutex);
drivers/gpu/vga/vga_switcheroo.c +6 -6
@@ -282,7 +282,7 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf, }/* pwr off the device not in use */ -if (strncmp (usercmd,"OFF" ,3 ) ==0 ) { +if (memcmp (usercmd,"OFF" ,3 ) ==0 ) {for (i =0 ; i <VGA_SWITCHEROO_MAX_CLIENTS ; i++) {if (vgasr_priv.clients[i].active)continue ;
@@ -292,7 +292,7 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf, goto out; }/* pwr on the device not in use */ -if (strncmp (usercmd,"ON" ,2 ) ==0 ) { +if (memcmp (usercmd,"ON" ,2 ) ==0 ) {for (i =0 ; i <VGA_SWITCHEROO_MAX_CLIENTS ; i++) {if (vgasr_priv.clients[i].active)continue ;
@@ -303,20 +303,20 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf, }/* request a delayed switch - test can we switch now */ -if (strncmp (usercmd,"DIGD" ,4 ) ==0 ) { +if (memcmp (usercmd,"DIGD" ,4 ) ==0 ) { client_id =VGA_SWITCHEROO_IGD ; delay = true; } -if (strncmp (usercmd,"DDIS" ,4 ) ==0 ) { +if (memcmp (usercmd,"DDIS" ,4 ) ==0 ) { client_id =VGA_SWITCHEROO_DIS ; delay = true; } -if (strncmp (usercmd,"IGD" ,3 ) ==0 ) +if (memcmp (usercmd,"IGD" ,3 ) ==0 ) client_id =VGA_SWITCHEROO_IGD ; -if (strncmp (usercmd,"DIS" ,3 ) ==0 ) +if (memcmp (usercmd,"DIS" ,3 ) ==0 ) client_id =VGA_SWITCHEROO_DIS ;if (client_id ==-1 )
drivers/gpu/vga/vgaarb.c +11 -11
@@ -94,17 +94,17 @@ static int vga_str_to_iostate(char *buf, int str_size, int *io_state) {/* we could in theory hand out locks on IO and mem * separately to userspace but it can cause deadlocks */ -if (strncmp (buf,"none" ,4 ) ==0 ) { +if (memcmp (buf,"none" ,4 ) ==0 ) { *io_state =VGA_RSRC_NONE ;return 1 ; }/* XXX We're not chekcing the str_size! */ -if (strncmp (buf,"io+mem" ,6 ) ==0 ) +if (memcmp (buf,"io+mem" ,6 ) ==0 ) goto both; -else if (strncmp (buf,"io" ,2 ) ==0 ) +else if (memcmp (buf,"io" ,2 ) ==0 ) goto both; -else if (strncmp (buf,"mem" ,3 ) ==0 ) +else if (memcmp (buf,"mem" ,3 ) ==0 ) goto both;return 0 ; both:
@@ -848,7 +848,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, curr_pos = kbuf; kbuf[count] ='\0' ;/* Just to make sure... */ -if (strncmp (curr_pos,"lock " ,5 ) ==0 ) { +if (memcmp (curr_pos,"lock " ,5 ) ==0 ) { curr_pos +=5 ; remaining -=5 ;
@@ -884,13 +884,13 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, ret_val = count; goto done; - }else if (strncmp (curr_pos,"unlock " ,7 ) ==0 ) { + }else if (memcmp (curr_pos,"unlock " ,7 ) ==0 ) { curr_pos +=7 ; remaining -=7 ;pr_debug ("client 0x%p called 'unlock'\n" , priv); -if (strncmp (curr_pos,"all" ,3 ) ==0 ) +if (memcmp (curr_pos,"all" ,3 ) ==0 ) io_state =VGA_RSRC_LEGACY_IO |VGA_RSRC_LEGACY_MEM ;else { if (!vga_str_to_iostate
@@ -934,7 +934,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, ret_val = count; goto done; - }else if (strncmp (curr_pos,"trylock " ,8 ) ==0 ) { + }else if (memcmp (curr_pos,"trylock " ,8 ) ==0 ) { curr_pos +=8 ; remaining -=8 ;
@@ -975,7 +975,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, goto done; } - }else if (strncmp (curr_pos,"target " ,7 ) ==0 ) { + }else if (memcmp (curr_pos,"target " ,7 ) ==0 ) {struct pci_bus *pbus;unsigned int domain, bus, devfn;struct vga_device *vgadev;
@@ -984,7 +984,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, remaining -=7 ;pr_debug ("client 0x%p called 'target'\n" , priv);/* if target is default */ -if (!strncmp (curr_pos,"default" ,7 )) +if (!memcmp (curr_pos,"default" ,7 )) pdev =pci_dev_get (vga_default_device ()); else { if (!vga_pci_str_to_vars(curr_pos, remaining,
@@ -1047,7 +1047,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, goto done; - }else if (strncmp (curr_pos,"decodes " ,8 ) ==0 ) { + }else if (memcmp (curr_pos,"decodes " ,8 ) ==0 ) { curr_pos +=8 ; remaining -=8 ;pr_debug ("vgaarb: client 0x%p called 'decodes'\n" , priv);
drivers/hid/hid-core.c +1 -1
@@ -1496,7 +1496,7 @@ static int hid_bus_match(struct device *dev, struct device_driver *drv)return 0 ;/* generic wants all non-blacklisted */ -if (!strncmp (hdrv->name,"generic-" ,8 )) +if (!memcmp (hdrv->name,"generic-" ,8 ))return !hid_match_id (hdev, hid_blacklist);return 1 ;
drivers/hid/hid-picolcd.c +2 -2
@@ -1411,12 +1411,12 @@ static ssize_t picolcd_operation_mode_store(struct device *dev,int timeout = data->opmode_delay;unsigned long flags; -if (cnt >=3 &&strncmp ("lcd" , buf,3 ) ==0 ) { +if (cnt >=3 &&memcmp ("lcd" , buf,3 ) ==0 ) {if (data->status &PICOLCD_BOOTLOADER ) report =picolcd_out_report (REPORT_EXIT_FLASHER , data->hdev); buf +=3 ; cnt -=3 ; - }else if (cnt >=10 &&strncmp ("bootloader" , buf,10 ) ==0 ) { + }else if (cnt >=10 &&memcmp ("bootloader" , buf,10 ) ==0 ) {if (!(data->status &PICOLCD_BOOTLOADER )) report =picolcd_out_report (REPORT_EXIT_KEYBOARD , data->hdev); buf +=10 ;
drivers/i2c/busses/i2c-powermac.c +1 -1
@@ -281,7 +281,7 @@ static int __devinit i2c_powermac_probe(struct platform_device *dev)printk (KERN_INFO "PowerMac i2c bus %s registered\n" , adapter->name); -if (!strncmp (basename,"uni-n" ,5 )) { +if (!memcmp (basename,"uni-n" ,5 )) {struct device_node *np;const u32 *prop;struct i2c_board_info info;
drivers/i2c/busses/i2c-taos-evm.c +1 -1
@@ -58,7 +58,7 @@ static struct i2c_board_info tsl2550_info = {/* Instantiate i2c devices based on the adapter name */ static struct i2c_client *taos_instantiate_device (struct i2c_adapter *adapter) { -if (!strncmp (adapter->name,"TAOS TSL2550 EVM" ,16 )) { +if (!memcmp (adapter->name,"TAOS TSL2550 EVM" ,16 )) {dev_info (&adapter->dev,"Instantiating device %s at 0x%02x\n" , tsl2550_info.type, tsl2550_info.addr);return i2c_new_device (adapter, &tsl2550_info);
drivers/ide/ide-floppy.c +2 -2
@@ -488,7 +488,7 @@ static void ide_floppy_setup(ide_drive_t *drive)* it. It should be fixed as of version 1.9, but to be on the safe side * we'll leave the limitation below for the 2.2.x tree. */ -if (!strncmp ((char *)&id[ATA_ID_PROD ],"IOMEGA ZIP 100 ATAPI" ,20 )) { +if (!memcmp ((char *)&id[ATA_ID_PROD ],"IOMEGA ZIP 100 ATAPI" ,20 )) { drive->atapi_flags |=IDE_AFLAG_ZIP_DRIVE ;/* This value will be visible in the /proc/ide/hdx/settings */ drive->pc_delay =IDEFLOPPY_PC_DELAY ;
@@ -499,7 +499,7 @@ static void ide_floppy_setup(ide_drive_t *drive)* Guess what? The IOMEGA Clik! drive also needs the above fix. It makes * nasty clicking noises without it, so please don't remove this. */ -if (strncmp ((char *)&id[ATA_ID_PROD ],"IOMEGA Clik!" ,11 ) ==0 ) { +if (memcmp ((char *)&id[ATA_ID_PROD ],"IOMEGA Clik!" ,11 ) ==0 ) {blk_queue_max_hw_sectors (drive->queue,64 ); drive->atapi_flags |=IDE_AFLAG_CLIK_DRIVE ;/* IOMEGA Clik! drives do not support lock/unlock commands */
drivers/ide/ide-pio-blacklist.c +1 -1
@@ -87,7 +87,7 @@ int ide_scan_pio_blacklist(char *model)struct ide_pio_info *p;for (p = ide_pio_blacklist; p->name !=NULL ; p++) { -if (strncmp (p->name, model,strlen (p->name)) ==0 ) +if (memcmp (p->name, model,strlen (p->name)) ==0 )return p->pio; }return -1 ;
drivers/ide/ide-probe.c +1 -1
@@ -659,7 +659,7 @@ void ide_undecoded_slave(ide_drive_t *dev1)return ;/* Serial numbers do not match */ -if (strncmp ((char *)&dev0->id[ATA_ID_SERNO ], +if (memcmp ((char *)&dev0->id[ATA_ID_SERNO ], (char *)&dev1->id[ATA_ID_SERNO ],ATA_ID_SERNO_LEN ))return ;
drivers/ide/ide-sysfs.c +2 -2
@@ -78,7 +78,7 @@ static ssize_t store_delete_devices(struct device *portdev, {ide_hwif_t *hwif =dev_get_drvdata (portdev); -if (strncmp (buf,"1" , n)) +if (memcmp (buf,"1" , n))return -EINVAL ;ide_port_unregister_devices (hwif);
@@ -94,7 +94,7 @@ static ssize_t store_scan(struct device *portdev, {ide_hwif_t *hwif =dev_get_drvdata (portdev); -if (strncmp (buf,"1" , n)) +if (memcmp (buf,"1" , n))return -EINVAL ;ide_port_unregister_devices (hwif);
drivers/ide/pmac.c +2 -2
@@ -926,10 +926,10 @@ static u8 pmac_ide_cable_detect(ide_hwif_t *hwif)const char *model =of_get_property (root,"model" ,NULL );/* Get cable type from device-tree. */ -if (cable && !strncmp (cable,"80-" ,3 )) { +if (cable && !memcmp (cable,"80-" ,3 )) {/* Some drives fail to detect 80c cable in PowerBook */ /* These machine use proprietary short IDE cable anyway */ -if (!strncmp (model,"PowerBook" ,9 )) +if (!memcmp (model,"PowerBook" ,9 ))return ATA_CBL_PATA40_SHORT ;else return ATA_CBL_PATA80 ;
drivers/ide/qd65xx.c +1 -1
@@ -162,7 +162,7 @@ static int qd_find_disk_type (ide_drive_t *drive,ide_fixstring (model,ATA_ID_PROD_LEN ,1 );/* byte-swap */ for (p = qd65xx_timing ; p->offset !=-1 ; p++) { -if (!strncmp (p->model, model+p->offset,4 )) { +if (!memcmp (p->model, model+p->offset,4 )) {printk (KERN_DEBUG "%s: listed !\n" , drive->name); *active_time = p->active; *recovery_time = p->recovery;
drivers/infiniband/core/device.c +2 -2
@@ -109,7 +109,7 @@ static struct ib_device *__ib_device_get_by_name(const char *name)struct ib_device *device;list_for_each_entry (device, &device_list, core_list) -if (!strncmp (name, device->name,IB_DEVICE_NAME_MAX )) +if (!memcmp (name, device->name,IB_DEVICE_NAME_MAX ))return device;return NULL ;
@@ -133,7 +133,7 @@ static int alloc_name(char *name)if (i <0 || i >=PAGE_SIZE *8 )continue ;snprintf (buf,sizeof buf, name, i); -if (!strncmp (buf, device->name,IB_DEVICE_NAME_MAX )) +if (!memcmp (buf, device->name,IB_DEVICE_NAME_MAX ))set_bit (i, inuse); }
drivers/infiniband/hw/qib/qib_iba6120.c +3 -3
@@ -2507,7 +2507,7 @@ static void init_6120_cntrnames(struct qib_devdata *dd)for (i =0 , s = (char *)cntr6120names; s && j <= dd->cfgctxts; i++) {/* we always have at least one counter before the egrovfl */ -if (!j && !strncmp ("Ctxt0EgrOvfl" , s +1 ,12 )) +if (!j && !memcmp ("Ctxt0EgrOvfl" , s +1 ,12 )) j =1 ; s =strchr (s +1 ,'\n' );if (s && j)
@@ -2920,11 +2920,11 @@ bail:static int qib_6120_set_loopback (struct qib_pportdata *ppd,const char *what) {int ret =0 ; -if (!strncmp (what,"ibc" ,3 )) { +if (!memcmp (what,"ibc" ,3 )) { ppd->dd->cspec->ibcctrl |=SYM_MASK (IBCCtrl, Loopback);qib_devinfo (ppd->dd->pcidev,"Enabling IB%u:%u IBC loopback\n" , ppd->dd->unit, ppd->port); - }else if (!strncmp (what,"off" ,3 )) { + }else if (!memcmp (what,"off" ,3 )) { ppd->dd->cspec->ibcctrl &= ~SYM_MASK (IBCCtrl, Loopback);qib_devinfo (ppd->dd->pcidev,"Disabling IB%u:%u IBC loopback " "(normal)\n" , ppd->dd->unit, ppd->port);
drivers/infiniband/hw/qib/qib_iba7220.c +3 -3
@@ -2677,12 +2677,12 @@ static int qib_7220_set_loopback(struct qib_pportdata *ppd, const char *what)int ret =0 ;u64 val, ddr; -if (!strncmp (what,"ibc" ,3 )) { +if (!memcmp (what,"ibc" ,3 )) { ppd->cpspec->ibcctrl |=SYM_MASK (IBCCtrl, Loopback); val =0 ;/* disable heart beat, so link will come up */ qib_devinfo (ppd->dd->pcidev,"Enabling IB%u:%u IBC loopback\n" , ppd->dd->unit, ppd->port); - }else if (!strncmp (what,"off" ,3 )) { + }else if (!memcmp (what,"off" ,3 )) { ppd->cpspec->ibcctrl &= ~SYM_MASK (IBCCtrl, Loopback);/* enable heart beat again */ val =IBA7220_IBC_HRTBT_MASK <<IBA7220_IBC_HRTBT_SHIFT ;
@@ -3136,7 +3136,7 @@ static void init_7220_cntrnames(struct qib_devdata *dd)for (i =0 , s = (char *)cntr7220names; s && j <= dd->cfgctxts; i++) {/* we always have at least one counter before the egrovfl */ -if (!j && !strncmp ("Ctxt0EgrOvfl" , s +1 ,12 )) +if (!j && !memcmp ("Ctxt0EgrOvfl" , s +1 ,12 )) j =1 ; s =strchr (s +1 ,'\n' );if (s && j)
drivers/infiniband/hw/qib/qib_iba7322.c +3 -3
@@ -3898,13 +3898,13 @@ static int qib_7322_set_loopback(struct qib_pportdata *ppd, const char *what)u64 val, ctrlb;/* only IBC loopback, may add serdes and xgxs loopbacks later */ -if (!strncmp (what,"ibc" ,3 )) { +if (!memcmp (what,"ibc" ,3 )) { ppd->cpspec->ibcctrl_a |=SYM_MASK (IBCCtrlA_0, Loopback); val =0 ;/* disable heart beat, so link will come up */ qib_devinfo (ppd->dd->pcidev,"Enabling IB%u:%u IBC loopback\n" , ppd->dd->unit, ppd->port); - }else if (!strncmp (what,"off" ,3 )) { + }else if (!memcmp (what,"off" ,3 )) { ppd->cpspec->ibcctrl_a &= ~SYM_MASK (IBCCtrlA_0, Loopback);/* enable heart beat again */
@@ -4561,7 +4561,7 @@ static void init_7322_cntrnames(struct qib_devdata *dd)for (i =0 , s = (char *)cntr7322names; s && j <= dd->cfgctxts; i++) {/* we always have at least one counter before the egrovfl */ -if (!j && !strncmp ("Ctxt0EgrOvfl" , s +1 ,12 )) +if (!j && !memcmp ("Ctxt0EgrOvfl" , s +1 ,12 )) j =1 ; s =strchr (s +1 ,'\n' );if (s && j)
drivers/input/gameport/gameport.c +3 -3
@@ -453,11 +453,11 @@ static ssize_t gameport_rebind_driver(struct device *dev, struct device_attributif (error)return error; -if (!strncmp (buf,"none" , count)) { +if (!memcmp (buf,"none" , count)) {gameport_disconnect_port (gameport); - }else if (!strncmp (buf,"reconnect" , count)) { + }else if (!memcmp (buf,"reconnect" , count)) {gameport_reconnect_port (gameport); - }else if (!strncmp (buf,"rescan" , count)) { + }else if (!memcmp (buf,"rescan" , count)) {gameport_disconnect_port (gameport);gameport_find_driver (gameport); }else if ((drv =driver_find (buf, &gameport_bus)) !=NULL ) {
drivers/input/misc/yealink.c +1 -1
@@ -720,7 +720,7 @@ static ssize_t set_icon(struct device *dev, const char *buf, size_t count,for (i =0 ; i <ARRAY_SIZE (lcdMap); i++) {if (lcdMap[i].type !='.' )continue ; -if (strncmp (buf, lcdMap[i].u.p.name, count) ==0 ) { +if (memcmp (buf, lcdMap[i].u.p.name, count) ==0 ) {setChar (yld, i, chr);break ; }
drivers/input/mouse/psmouse-base.c +2 -2
@@ -905,8 +905,8 @@ static const struct psmouse_protocol *psmouse_protocol_by_name(const char *name,for (i =0 ; i <ARRAY_SIZE (psmouse_protocols); i++) { p = &psmouse_protocols[i]; -if ((strlen (p->name) == len && !strncmp (p->name, name, len)) || - (strlen (p->alias) == len && !strncmp (p->alias, name, len))) +if ((strlen (p->name) == len && !memcmp (p->name, name, len)) || + (strlen (p->alias) == len && !memcmp (p->alias, name, len)))return &psmouse_protocols[i]; }
drivers/input/serio/serio.c +7 -7
@@ -443,11 +443,11 @@ static ssize_t serio_rebind_driver(struct device *dev, struct device_attribute *if (error)return error; -if (!strncmp (buf,"none" , count)) { +if (!memcmp (buf,"none" , count)) {serio_disconnect_port (serio); - }else if (!strncmp (buf,"reconnect" , count)) { + }else if (!memcmp (buf,"reconnect" , count)) {serio_reconnect_subtree (serio); - }else if (!strncmp (buf,"rescan" , count)) { + }else if (!memcmp (buf,"rescan" , count)) {serio_disconnect_port (serio);serio_find_driver (serio); }else if ((drv =driver_find (buf, &serio_bus)) !=NULL ) {
@@ -475,9 +475,9 @@ static ssize_t serio_set_bind_mode(struct device *dev, struct device_attribute *int retval; retval = count; -if (!strncmp (buf,"manual" , count)) { +if (!memcmp (buf,"manual" , count)) { serio->manual_bind = true; - }else if (!strncmp (buf,"auto" , count)) { + }else if (!memcmp (buf,"auto" , count)) { serio->manual_bind = false; }else { retval = -EINVAL ;
@@ -762,9 +762,9 @@ static ssize_t serio_driver_set_bind_mode(struct device_driver *drv, const charint retval; retval = count; -if (!strncmp (buf,"manual" , count)) { +if (!memcmp (buf,"manual" , count)) { serio_drv->manual_bind = true; - }else if (!strncmp (buf,"auto" , count)) { + }else if (!memcmp (buf,"auto" , count)) { serio_drv->manual_bind = false; }else { retval = -EINVAL ;
drivers/input/tablet/aiptek.c +3 -3
@@ -380,7 +380,7 @@ static int map_str_to_val(const struct aiptek_map *map, const char *str, size_t count--;for (p = map; p->string; p++) -if (!strncmp (str, p->string, count)) +if (!memcmp (str, p->string, count))return p->value;return AIPTEK_INVALID_VALUE ;
@@ -1204,7 +1204,7 @@ store_tabletXtilt(struct device *dev, struct device_attribute *attr, const charif (strict_strtol (buf,10 , &x)) {size_t len = buf[count -1 ] =='\n' ? count -1 : count; -if (strncmp (buf,"disable" , len)) +if (memcmp (buf,"disable" , len))return -EINVAL ; aiptek->newSetting.xTilt =AIPTEK_TILT_DISABLE ;
@@ -1246,7 +1246,7 @@ store_tabletYtilt(struct device *dev, struct device_attribute *attr, const charif (strict_strtol (buf,10 , &y)) {size_t len = buf[count -1 ] =='\n' ? count -1 : count; -if (strncmp (buf,"disable" , len)) +if (memcmp (buf,"disable" , len))return -EINVAL ; aiptek->newSetting.yTilt =AIPTEK_TILT_DISABLE ;
drivers/isdn/act2000/capi.c +2 -2
@@ -915,8 +915,8 @@ actcapi_dispatch(struct work_struct *work)printk (KERN_WARNING "act2000: %s\n" , tmp); else {printk (KERN_DEBUG "act2000: %s\n" , tmp); -if ((!strncmp (tmp,"INFO: Trace buffer con" ,22 )) || - (!strncmp (tmp,"INFO: Compile Date/Tim" ,22 ))) { +if ((!memcmp (tmp,"INFO: Trace buffer con" ,22 )) || + (!memcmp (tmp,"INFO: Compile Date/Tim" ,22 ))) { card->flags |=ACT2000_FLAGS_RUNNING ; cmd.command =ISDN_STAT_RUN ; cmd.driver = card->myid;
drivers/isdn/capi/capidrv.c +1 -1
@@ -1499,7 +1499,7 @@ static int decodeFVteln(char *teln, unsigned long *bmaskp, int *activep)char *s;int i; -if (strncmp (teln,"FV:" ,3 ) !=0 ) +if (memcmp (teln,"FV:" ,3 ) !=0 )return 1 ; s = teln +3 ;while (*s && *s ==' ' ) s++;
drivers/isdn/hardware/eicon/maintidi.c +14 -14
@@ -858,7 +858,7 @@ static int process_idi_event (diva_strace_context_t* pLib,char name[64 ];int i; -if (!strncmp ("State\\B Event" , path, pVar->path_length)) { +if (!memcmp ("State\\B Event" , path, pVar->path_length)) {dword ch_id;if (!diva_trace_read_variable (pVar, &ch_id)) {if (!pLib->line_init_event && !pLib->pending_line_status) {
@@ -874,7 +874,7 @@ static int process_idi_event (diva_strace_context_t* pLib,return (-1 ); } -if (!strncmp ("State\\FAX Event" , path, pVar->path_length)) { +if (!memcmp ("State\\FAX Event" , path, pVar->path_length)) {dword ch_id;if (!diva_trace_read_variable (pVar, &ch_id)) {if (!pLib->pending_fax_status && !pLib->fax_init_event) {
@@ -890,7 +890,7 @@ static int process_idi_event (diva_strace_context_t* pLib,return (-1 ); } -if (!strncmp ("State\\Modem Event" , path, pVar->path_length)) { +if (!memcmp ("State\\Modem Event" , path, pVar->path_length)) {dword ch_id;if (!diva_trace_read_variable (pVar, &ch_id)) {if (!pLib->pending_modem_status && !pLib->modem_init_event) {
@@ -939,7 +939,7 @@ static int process_idi_event (diva_strace_context_t* pLib,/* Notification about loss of events */ -if (!strncmp ("Events Down" , path, pVar->path_length)) { +if (!memcmp ("Events Down" , path, pVar->path_length)) {if (pLib->trace_events_down ==1 ) { pLib->trace_events_down =2 ; }else {
@@ -948,7 +948,7 @@ static int process_idi_event (diva_strace_context_t* pLib,return (0 ); } -if (!strncmp ("State\\Layer1" , path, pVar->path_length)) { +if (!memcmp ("State\\Layer1" , path, pVar->path_length)) {diva_strace_read_asz (pVar, &pLib->lines[0 ].pInterface->Layer1[0 ]);if (pLib->l1_trace ==1 ) { pLib->l1_trace =2 ;
@@ -957,7 +957,7 @@ static int process_idi_event (diva_strace_context_t* pLib, }return (0 ); } -if (!strncmp ("State\\Layer2 No1" , path, pVar->path_length)) { +if (!memcmp ("State\\Layer2 No1" , path, pVar->path_length)) {char * tmp = &pLib->lines[0 ].pInterface->Layer2[0 ];dword l2_state;if (diva_strace_read_uint (pVar, &l2_state))
@@ -1017,13 +1017,13 @@ static int process_idi_event (diva_strace_context_t* pLib,return (0 ); } -if (!strncmp ("Statistics\\Incoming Calls\\Calls" , path, pVar->path_length) || - !strncmp ("Statistics\\Incoming Calls\\Connected" , path, pVar->path_length)) { +if (!memcmp ("Statistics\\Incoming Calls\\Calls" , path, pVar->path_length) || + !memcmp ("Statistics\\Incoming Calls\\Connected" , path, pVar->path_length)) {return (SuperTraceGetIncomingCallStatistics (pLib)); } -if (!strncmp ("Statistics\\Outgoing Calls\\Calls" , path, pVar->path_length) || - !strncmp ("Statistics\\Outgoing Calls\\Connected" , path, pVar->path_length)) { +if (!memcmp ("Statistics\\Outgoing Calls\\Calls" , path, pVar->path_length) || + !memcmp ("Statistics\\Outgoing Calls\\Connected" , path, pVar->path_length)) {return (SuperTraceGetOutgoingCallStatistics (pLib)); }
@@ -1061,7 +1061,7 @@ static int process_idi_info (diva_strace_context_t* pLib,*/ for (i = pLib->Channels; i >0 ; i--) { len =sprintf (name,"State\\B%d\\Modem" , i); -if (!strncmp (name, path, len)) { +if (!memcmp (name, path, len)) {return (diva_modem_info (pLib, i, pVar)); } }
@@ -1071,7 +1071,7 @@ static int process_idi_info (diva_strace_context_t* pLib,*/ for (i = pLib->Channels; i >0 ; i--) {
Lines of this file are not shown. View the raw message.
drivers/isdn/i4l/isdn_ttyfax.c +26 -26
52 lines not on this page · raw message
drivers/media/dvb/dvb-core/dvb_ca_en50221.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/media/dvb/firewire/firedtv-dvb.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/media/video/zoran/zoran_procfs.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/airo.c +21 -21
42 lines not on this page · raw message
drivers/net/wireless/ath/ath5k/debug.c +24 -24
48 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/htc_drv_init.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/platform/x86/asus_acpi.c +40 -40
80 lines not on this page · raw message
drivers/scsi/device_handler/scsi_dh_emc.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/staging/batman-adv/bat_sysfs.c +11 -11
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmfmac/dhd_common.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmfmac/dhd_linux.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/brcm80211/util/bcmsrom.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/drivers/quatech_daqp_cs.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/comedi/kcomedilib/kcomedilib_main.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/crystalhd/crystalhd_lnx.c +5 -5
Lines of this file are not shown. View the raw message.
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/iio/Documentation/iio_utils.h +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/iio/accel/sca3000_ring.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/iio/industrialio-trigger.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/iio/magnetometer/hmc5843.c +8 -8
Lines of this file are not shown. View the raw message.
drivers/staging/intel_sst/intel_sst_drv_interface.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/intel_sst/intel_sst_dsp.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/rt2860/common/rt_channel.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/staging/rt2860/common/spectrum.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/staging/tidspbridge/rmgr/dbdcd.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/staging/tidspbridge/rmgr/nldr.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/staging/xgifb/XGI_main_26.c +22 -22
44 lines not on this page · raw message
drivers/video/matrox/matroxfb_base.c +24 -24
48 lines not on this page · raw message
drivers/video/omap2/displays/panel-acx565akm.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/video/pxafb.c +22 -22
44 lines not on this page · raw message
drivers/video/via/viafbdev.c +24 -24
48 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
2010/11/29 Pavel Vasilyev <[email protected]>:
Quoted 23 lines
This patch replace all
strncmp(a, b, c)by memcmp(a, b, c).I test on
x86_64(AMD Opteron 285).#include <
string.h>
char *A = "0000";
voidtest_memcmp(void){
memcmp(A, "TEST", 4);
}
voidtest_strn(void){
strncmp(A, "TEST", 4);
}# gcc -c -O2 test.c # objdump -d test.o ...0000000000000020 <
test_strncmp>:
20: f3 c3 repz retq
22: 66 66 66 66 66 2e 0f data32 data32 data32 data32 nopw %cs:0x0(%rax,%rax,1)
29: 1f 84 00 00 00 00 00
Quoted 5 lines
0000000000000030 <
test_memcmp>:
30: f3 c3 repz retqWow, minus one commad :)
Wow, good, I test that patch ... can't see any performance improvements. but... works fine. and mem* generally better than str* one, right?
Hi,
2010/11/29 Pavel Vasilyev <[email protected]>:
Quoted 4 lines
This patch replace all
strncmp(a, b, c)by memcmp(a, b, c).I test on
x86_64(AMD Opteron 285).
In fact, memcmp doesn't handle case of tail of string, so it is not safe to replace strncmp with memcmp
thanks,
Signature · 1 line
Lei Ming
Quoted 9 lines · Ming Lei
Hi,
2010/11/29 Pavel Vasilyev <[email protected]>:
Quoted 3 lines
This patch replace all
strncmp(a, b, c)bymemcmp(a, b, c).I test on
x86_64(AMD Opteron 285).In fact, memcmp doesn't handle case of tail of string, so it is not safe to replace strncmp with memcmp
#include <stdio.h>
#include <errno.h>
int main() {
char *STR = "XXXX\0"; char *XXX = "XXXX"; int a, b;
errno = 0; a = memcmp(STR, XXX, 5); a += errno;
errno = 0; b = strncmp(STR, XXX, 5); b += errno;
printf("5 chars: %d %d \n", a, b);
errno = 0; a = memcmp(STR, XXX, 4); a += errno;
errno = 0; b = strncmp(STR, XXX, 4); b += errno;
printf("4 chars: %d %d \n", a, b);
printf("SWAP STRINGS\n");
errno = 0; a = memcmp(XXX, STR, 5); a += errno;
errno = 0; b = strncmp(XXX, STR, 5); b += errno;
printf("5 chars: %d %d \n", a, b);
errno = 0; a = memcmp(XXX, STR, 4); a += errno;
errno = 0; b = strncmp(XXX, STR, 4); b += errno;
printf("4 chars: %d %d \n", a, b);return 0;
}
----
# ./a.out 5 chars: 0 0 4 chars: 0 0 SWAP STRINGS 5 chars: 0 0 4 chars: 0 0
But I think the same thing ;)
Signature · 1 line
Pavel.
Dmitry Torokhov
maintainerQuoted 10 lines · Pavel Vasilyev
Quoted 9 lines · Ming Lei
Hi,
2010/11/29 Pavel Vasilyev <[email protected]>:
Quoted 3 lines
This patch replace all
strncmp(a, b, c)bymemcmp(a, b, c).I test on
x86_64(AMD Opteron 285).In fact, memcmp doesn't handle case of tail of string, so it is not safe to replace strncmp with memcmp
Quoted 7 lines
#include <
stdio.h>
#include <errno.h>int
main(){char *STR = "XXXX\0"; char *XXX = "XXXX";
Try comparing:
"XXXX\0YYYY" and
"XXXX\0ZZZZ"
and observe the difference.
Signature · 1 line
Dmitry
Quoted 19 lines · Dmitry Torokhov
Quoted 10 lines · Pavel Vasilyev
Quoted 9 lines · Ming Lei
Hi,
2010/11/29 Pavel Vasilyev <[email protected]>:
Quoted 3 lines
This patch replace all
strncmp(a, b, c)bymemcmp(a, b, c).I test on
x86_64(AMD Opteron 285).In fact, memcmp doesn't handle case of tail of string, so it is not safe to replace strncmp with memcmp
Quoted 7 lines
#include <
stdio.h>
#include <errno.h>int
main(){char *STR = "XXXX\0"; char *XXX = "XXXX";
Quoted 7 lines
Try comparing:
"XXXX\0YYYY" and
"XXXX\0ZZZZ"and observe the difference.
Yes, if both of the strings are NOT known to have enough length.
It is safe to replace strncmp(a,b,n) with memcmp(a,b,n) if a or b is/are known to have enough length; strlen(a) >= n || strlen(b) >= n.
I think some of the replacements in the original patch are valid, but for even those valid replacement, I think it is worth doing that in hot code paths only.
--yoshfuji
Quoted 20 lines · YOSHIFUJI Hideaki
Quoted 12 lines · Dmitry Torokhov
Quoted 11 lines · Pavel Vasilyev
Quoted 5 lines · Ming Lei
2010/11/29 Pavel Vasilyev <[email protected]>:
Quoted 2 lines
This patch replace all
strncmp(a, b, c)bymemcmp(a, b, c).
I test onx86_64(AMD Opteron 285).In fact, memcmp doesn't handle case of tail of string, so it is not safe to replace strncmp with memcmp
#include <
stdio.h>
#include <errno.h>int main() { char *STR = "XXXX\0"; char *XXX = "XXXX";Quoted 5 lines
Try comparing:
"XXXX\0YYYY" and
"XXXX\0ZZZZ"and observe the difference.
Yes, if both of the strings are NOT known to have enough length.
Quoted 7 lines
It is safe to replace
strncmp(a,b,n)withmemcmp(a,b,n)if a or b is/are known to have enough length; strlen(a) >= n || strlen(b) >= n.I think some of the replacements in the original patch are valid, but for even those valid replacement, I think it is worth doing that in hot code paths only.
In my fact, the system has been running for two days, with this configuration (in attach)
Signature · 1 line
Pavel.
#
# Automatically generated make config: don't edit
# Linux/x86_64 2.6.37-rc3 Kernel Configuration
# Mon Nov 29 05:22:39 2010
#CONFIG_64BIT=y
# CONFIG_X86_32 is not setCONFIG_X86_64=yCONFIG_X86=yCONFIG_INSTRUCTION_DECODER=yCONFIG_OUTPUT_FORMAT="elf64-x86-64"CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"CONFIG_GENERIC_CMOS_UPDATE=yCONFIG_CLOCKSOURCE_WATCHDOG=yCONFIG_GENERIC_CLOCKEVENTS=yCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=yCONFIG_LOCKDEP_SUPPORT=yCONFIG_STACKTRACE_SUPPORT=yCONFIG_HAVE_LATENCYTOP_SUPPORT=yCONFIG_MMU=yCONFIG_ZONE_DMA=yCONFIG_NEED_DMA_MAP_STATE=yCONFIG_NEED_SG_DMA_LENGTH=yCONFIG_GENERIC_ISA_DMA=yCONFIG_GENERIC_IOMAP=yCONFIG_GENERIC_BUG=yCONFIG_GENERIC_BUG_RELATIVE_POINTERS=yCONFIG_GENERIC_HWEIGHT=yCONFIG_ARCH_MAY_HAVE_PC_FDC=y
# CONFIG_RWSEM_GENERIC_SPINLOCK is not setCONFIG_RWSEM_XCHGADD_ALGORITHM=yCONFIG_ARCH_HAS_CPU_IDLE_WAIT=yCONFIG_GENERIC_CALIBRATE_DELAY=yCONFIG_GENERIC_TIME_VSYSCALL=yCONFIG_ARCH_HAS_CPU_RELAX=yCONFIG_ARCH_HAS_DEFAULT_IDLE=yCONFIG_ARCH_HAS_CACHE_LINE_SIZE=yCONFIG_HAVE_SETUP_PER_CPU_AREA=yCONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=yCONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=yCONFIG_HAVE_CPUMASK_OF_CPU_MAP=yCONFIG_ARCH_HIBERNATION_POSSIBLE=yCONFIG_ARCH_SUSPEND_POSSIBLE=yCONFIG_ZONE_DMA32=yCONFIG_ARCH_POPULATES_NODE_MAP=yCONFIG_AUDIT_ARCH=yCONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=yCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=yCONFIG_HAVE_INTEL_TXT=yCONFIG_USE_GENERIC_SMP_HELPERS=yCONFIG_X86_64_SMP=yCONFIG_X86_HT=yCONFIG_X86_TRAMPOLINE=yCONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11" # CONFIG_KTIME_SCALAR is not setCONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"CONFIG_CONSTRUCTORS=yCONFIG_HAVE_IRQ_WORK=yCONFIG_IRQ_WORK=y
#
# General setup
#CONFIG_EXPERIMENTAL=yCONFIG_INIT_ENV_ARG_LIMIT=32CONFIG_CROSS_COMPILE=""CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not setCONFIG_HAVE_KERNEL_GZIP=yCONFIG_HAVE_KERNEL_BZIP2=yCONFIG_HAVE_KERNEL_LZMA=yCONFIG_HAVE_KERNEL_LZO=yCONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_LZO is not setCONFIG_SWAP=yCONFIG_SYSVIPC=yCONFIG_SYSVIPC_SYSCTL=yCONFIG_POSIX_MQUEUE=yCONFIG_POSIX_MQUEUE_SYSCTL=yCONFIG_BSD_PROCESS_ACCT=yCONFIG_BSD_PROCESS_ACCT_V3=y
# CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not setCONFIG_HAVE_GENERIC_HARDIRQS=y
#
# IRQ subsystem
#CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
# CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED is not set CONFIG_HAVE_SPARSE_IRQ=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y
# CONFIG_AUTO_IRQ_AFFINITY is not set
# CONFIG_IRQ_PER_CPU is not set
# CONFIG_HARDIRQS_SW_RESEND is not set CONFIG_SPARSE_IRQ=y
#
# RCU Subsystem
#CONFIG_TREE_PREEMPT_RCU=yCONFIG_PREEMPT_RCU=y
# CONFIG_RCU_TRACE is not setCONFIG_RCU_FANOUT=64
# CONFIG_RCU_FANOUT_EXACT is not set
# CONFIG_TREE_RCU_TRACE is not setCONFIG_IKCONFIG=yCONFIG_IKCONFIG_PROC=yCONFIG_LOG_BUF_SHIFT=14CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=yCONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not setCONFIG_CGROUP_NS=y
# CONFIG_CGROUP_FREEZER is not setCONFIG_CGROUP_DEVICE=yCONFIG_CPUSETS=yCONFIG_PROC_PID_CPUSET=yCONFIG_CGROUP_CPUACCT=yCONFIG_RESOURCE_COUNTERS=yCONFIG_CGROUP_MEM_RES_CTLR=y
# CONFIG_CGROUP_MEM_RES_CTLR_SWAP is not setCONFIG_CGROUP_SCHED=yCONFIG_FAIR_GROUP_SCHED=yCONFIG_RT_GROUP_SCHED=yCONFIG_BLK_CGROUP=y
# CONFIG_DEBUG_BLK_CGROUP is not setCONFIG_NAMESPACES=yCONFIG_UTS_NS=yCONFIG_IPC_NS=y
# CONFIG_USER_NS is not setCONFIG_PID_NS=yCONFIG_NET_NS=yCONFIG_SCHED_AUTOGROUP=yCONFIG_MM_OWNER=y
# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_RELAY is not set
# CONFIG_BLK_DEV_INITRD is not set
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not setCONFIG_SYSCTL=yCONFIG_ANON_INODES=y
# CONFIG_EMBEDDED is not setCONFIG_SYSCTL_SYSCALL=yCONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_EXTRA_PASS is not setCONFIG_HOTPLUG=yCONFIG_PRINTK=yCONFIG_BUG=yCONFIG_ELF_CORE=yCONFIG_PCSPKR_PLATFORM=yCONFIG_BASE_FULL=yCONFIG_FUTEX=yCONFIG_EPOLL=yCONFIG_SIGNALFD=yCONFIG_TIMERFD=yCONFIG_EVENTFD=yCONFIG_SHMEM=yCONFIG_AIO=yCONFIG_HAVE_PERF_EVENTS=y
#
# Kernel Performance Events And Counters
#CONFIG_PERF_EVENTS=y
# CONFIG_PERF_COUNTERS is not setCONFIG_VM_EVENT_COUNTERS=yCONFIG_PCI_QUIRKS=yCONFIG_SLUB_DEBUG=y
# CONFIG_COMPAT_BRK is not set
# CONFIG_SLAB is not setCONFIG_SLUB=y
# CONFIG_PROFILING is not setCONFIG_HAVE_OPROFILE=y
# CONFIG_KPROBES is not setCONFIG_JUMP_LABEL=yCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=yCONFIG_HAVE_IOREMAP_PROT=yCONFIG_HAVE_KPROBES=yCONFIG_HAVE_KRETPROBES=yCONFIG_HAVE_OPTPROBES=yCONFIG_HAVE_ARCH_TRACEHOOK=yCONFIG_HAVE_DMA_ATTRS=yCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=yCONFIG_HAVE_DMA_API_DEBUG=yCONFIG_HAVE_HW_BREAKPOINT=yCONFIG_HAVE_MIXED_BREAKPOINTS_REGS=yCONFIG_HAVE_USER_RETURN_NOTIFIER=yCONFIG_HAVE_PERF_EVENTS_NMI=yCONFIG_HAVE_ARCH_JUMP_LABEL=y
#
# GCOV-based kernel profiling
#
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not setCONFIG_SLABINFO=yCONFIG_RT_MUTEXES=yCONFIG_BASE_SMALL=0CONFIG_MODULES=yCONFIG_MODULE_FORCE_LOAD=yCONFIG_MODULE_UNLOAD=yCONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not setCONFIG_STOP_MACHINE=yCONFIG_BLOCK=yCONFIG_BLK_DEV_BSG=y
# CONFIG_BLK_DEV_INTEGRITY is not setCONFIG_BLK_DEV_THROTTLING=y
#
# IO Schedulers
#CONFIG_IOSCHED_NOOP=y
# CONFIG_IOSCHED_DEADLINE is not set CONFIG_IOSCHED_CFQ=y CONFIG_CFQ_GROUP_IOSCHED=y
# CONFIG_DEFAULT_CFQ is not set CONFIG_DEFAULT_NOOP=y CONFIG_DEFAULT_IOSCHED="noop"
# CONFIG_INLINE_SPIN_TRYLOCK is not set
# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set # CONFIG_INLINE_SPIN_LOCK is not set
# CONFIG_INLINE_SPIN_LOCK_BH is not set
# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set # CONFIG_INLINE_SPIN_UNLOCK is not set
# CONFIG_INLINE_SPIN_UNLOCK_BH is not set # CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set # CONFIG_INLINE_READ_TRYLOCK is not set
# CONFIG_INLINE_READ_LOCK is not set
# CONFIG_INLINE_READ_LOCK_BH is not set
# CONFIG_INLINE_READ_LOCK_IRQ is not set
# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set # CONFIG_INLINE_READ_UNLOCK is not set
# CONFIG_INLINE_READ_UNLOCK_BH is not set # CONFIG_INLINE_READ_UNLOCK_IRQ is not set # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set # CONFIG_INLINE_WRITE_TRYLOCK is not set
# CONFIG_INLINE_WRITE_LOCK is not set
# CONFIG_INLINE_WRITE_LOCK_BH is not set
# CONFIG_INLINE_WRITE_LOCK_IRQ is not set # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set # CONFIG_INLINE_WRITE_UNLOCK is not set
# CONFIG_INLINE_WRITE_UNLOCK_BH is not set # CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set CONFIG_MUTEX_SPIN_ON_OWNER=y
# CONFIG_FREEZER is not set
#
# Processor type and features
#CONFIG_TICK_ONESHOT=yCONFIG_NO_HZ=yCONFIG_HIGH_RES_TIMERS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y CONFIG_SMP=y
# CONFIG_X86_MPPARSE is not set
# CONFIG_X86_EXTENDED_PLATFORM is not set CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y CONFIG_SCHED_OMIT_FRAME_POINTER=y
# CONFIG_PARAVIRT_GUEST is not set CONFIG_NO_BOOTMEM=y
# CONFIG_MEMTEST is not setCONFIG_MK8=y
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_MATOM is not set
# CONFIG_GENERIC_CPU is not set CONFIG_X86_CPU=y CONFIG_X86_INTERNODE_CACHE_SHIFT=7 CONFIG_X86_CMPXCHG=y CONFIG_X86_L1_CACHE_SHIFT=6 CONFIG_X86_XADD=yCONFIG_X86_WP_WORKS_OK=y CONFIG_X86_INTEL_USERCOPY=y CONFIG_X86_USE_PPRO_CHECKSUM=y CONFIG_X86_TSC=yCONFIG_X86_CMPXCHG64=yCONFIG_X86_CMOV=y CONFIG_X86_MINIMUM_CPU_FAMILY=64 CONFIG_X86_DEBUGCTLMSR=y CONFIG_CPU_SUP_INTEL=yCONFIG_CPU_SUP_AMD=y CONFIG_CPU_SUP_CENTAUR=y CONFIG_HPET_TIMER=y CONFIG_HPET_EMULATE_RTC=yCONFIG_DMI=yCONFIG_GART_IOMMU=y
# CONFIG_CALGARY_IOMMU is not set CONFIG_AMD_IOMMU=y
# CONFIG_AMD_IOMMU_STATS is not set CONFIG_SWIOTLB=yCONFIG_IOMMU_HELPER=yCONFIG_IOMMU_API=yCONFIG_NR_CPUS=4
# CONFIG_SCHED_SMT is not set CONFIG_SCHED_MC=y
# CONFIG_IRQ_TIME_ACCOUNTING is not set
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREEMPT=yCONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y CONFIG_X86_MCE=y
# CONFIG_X86_MCE_INTEL is not set CONFIG_X86_MCE_AMD=y CONFIG_X86_MCE_THRESHOLD=y
# CONFIG_X86_MCE_INJECT is not set
# CONFIG_I8K is not set
# CONFIG_MICROCODE is not set CONFIG_X86_MSR=yCONFIG_X86_CPUID=y CONFIG_ARCH_PHYS_ADDR_T_64BIT=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y CONFIG_DIRECT_GBPAGES=yCONFIG_NUMA=y
# CONFIG_K8_NUMA is not set CONFIG_X86_64_ACPI_NUMA=y CONFIG_NODES_SPAN_OTHER_NODES=y
# CONFIG_NUMA_EMU is not set CONFIG_NODES_SHIFT=2 CONFIG_ARCH_SPARSEMEM_DEFAULT=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 CONFIG_SELECT_MEMORY_MODEL=y CONFIG_SPARSEMEM_MANUAL=y CONFIG_SPARSEMEM=y CONFIG_NEED_MULTIPLE_NODES=y CONFIG_HAVE_MEMORY_PRESENT=y CONFIG_SPARSEMEM_EXTREME=y CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER=y CONFIG_SPARSEMEM_VMEMMAP=y CONFIG_HAVE_MEMBLOCK=y
# CONFIG_MEMORY_HOTPLUG is not set CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_MIGRATION=y CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_ZONE_DMA_FLAG=1CONFIG_BOUNCE=yCONFIG_VIRT_TO_BUS=yCONFIG_KSM=y CONFIG_DEFAULT_MMAP_MIN_ADDR=65536 CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y CONFIG_MEMORY_FAILURE=y
# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set CONFIG_X86_RESERVE_LOW=64CONFIG_MTRR=yCONFIG_MTRR_SANITIZER=y CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=1 CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1 CONFIG_X86_PAT=y CONFIG_ARCH_USES_PG_UNCACHED=y
# CONFIG_EFI is not setCONFIG_SECCOMP=y
# CONFIG_CC_STACKPROTECTOR is not set
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not setCONFIG_HZ_1000=yCONFIG_HZ=1000CONFIG_SCHED_HRTICK=y
# CONFIG_KEXEC is not set
# CONFIG_CRASH_DUMP is not set CONFIG_PHYSICAL_START=0x1000000
# CONFIG_RELOCATABLE is not set CONFIG_PHYSICAL_ALIGN=0x1000000
# CONFIG_HOTPLUG_CPU is not set CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="agp=off reset_devices tsc=reliable" # CONFIG_CMDLINE_OVERRIDE is not set CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y CONFIG_USE_PERCPU_NUMA_NODE_ID=y
#
# Power management and ACPI options
#CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
# CONFIG_SUSPEND is not set
# CONFIG_HIBERNATION is not setCONFIG_PM_RUNTIME=yCONFIG_PM_OPS=yCONFIG_ACPI=yCONFIG_ACPI_PROCFS=yCONFIG_ACPI_PROCFS_POWER=y
# CONFIG_ACPI_POWER_METER is not set
# CONFIG_ACPI_EC_DEBUGFS is not setCONFIG_ACPI_PROC_EVENT=y
# CONFIG_ACPI_AC is not set
# CONFIG_ACPI_BATTERY is not setCONFIG_ACPI_BUTTON=yCONFIG_ACPI_FAN=y
# CONFIG_ACPI_DOCK is not setCONFIG_ACPI_PROCESSOR=y
# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not setCONFIG_ACPI_THERMAL=yCONFIG_ACPI_NUMA=y
# CONFIG_ACPI_CUSTOM_DSDT is not setCONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
# CONFIG_ACPI_PCI_SLOT is not setCONFIG_X86_PM_TIMER=y
# CONFIG_ACPI_CONTAINER is not set
# CONFIG_ACPI_SBS is not set
# CONFIG_ACPI_HED is not set
# CONFIG_ACPI_APEI is not set
# CONFIG_SFI is not set
#
# CPU Frequency scaling
#CONFIG_CPU_FREQ=yCONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
# CONFIG_CPU_FREQ_STAT is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=m CONFIG_CPU_FREQ_GOV_USERSPACE=m CONFIG_CPU_FREQ_GOV_ONDEMAND=m CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
#
# CPUFreq processor drivers
#
# CONFIG_X86_PCC_CPUFREQ is not set
# CONFIG_X86_ACPI_CPUFREQ is not setCONFIG_X86_POWERNOW_K8=y
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
# CONFIG_X86_P4_CLOCKMOD is not set
#
# shared options # # CONFIG_X86_SPEEDSTEP_LIB is not set CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y # CONFIG_INTEL_IDLE is not set
#
# Memory power savings
#
# CONFIG_I7300_IDLE is not set
#
# Bus options (PCI etc.)
#CONFIG_PCI=yCONFIG_PCI_DIRECT=y
# CONFIG_PCI_MMCONFIG is not setCONFIG_PCI_DOMAINS=y
# CONFIG_PCI_CNB20LE_QUIRK is not setCONFIG_DMAR=yCONFIG_DMAR_DEFAULT_ON=yCONFIG_DMAR_FLOPPY_WA=y
# CONFIG_INTR_REMAP is not setCONFIG_PCIEPORTBUS=y
# CONFIG_PCIEAER is not setCONFIG_PCIEASPM=y
# CONFIG_PCIEASPM_DEBUG is not setCONFIG_PCIE_PME=yCONFIG_ARCH_SUPPORTS_MSI=yCONFIG_PCI_MSI=y
# CONFIG_PCI_STUB is not setCONFIG_HT_IRQ=y
# CONFIG_PCI_IOV is not setCONFIG_PCI_IOAPIC=yCONFIG_ISA_DMA_API=yCONFIG_AMD_NB=y
# CONFIG_PCCARD is not set
# CONFIG_HOTPLUG_PCI is not set
#
# Executable file formats / Emulations
#CONFIG_BINFMT_ELF=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
# CONFIG_HAVE_AOUT is not set
# CONFIG_BINFMT_MISC is not set
# CONFIG_IA32_EMULATION is not set
# CONFIG_COMPAT_FOR_U64_ALIGNMENT is not setCONFIG_HAVE_TEXT_POKE_SMP=yCONFIG_NET=y
#
# Networking options
#CONFIG_PACKET=yCONFIG_UNIX=y
# CONFIG_NET_KEY is not setCONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not setCONFIG_IP_FIB_HASH=y
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE_DEMUX is not set
# CONFIG_ARPD is not setCONFIG_SYN_COOKIES=y
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
# CONFIG_INET_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not setCONFIG_INET_LRO=yCONFIG_INET_DIAG=yCONFIG_INET_TCP_DIAG=yCONFIG_TCP_CONG_ADVANCED=yCONFIG_TCP_CONG_BIC=yCONFIG_TCP_CONG_CUBIC=mCONFIG_TCP_CONG_WESTWOOD=mCONFIG_TCP_CONG_HTCP=mCONFIG_TCP_CONG_HSTCP=mCONFIG_TCP_CONG_HYBLA=mCONFIG_TCP_CONG_VEGAS=mCONFIG_TCP_CONG_SCALABLE=mCONFIG_TCP_CONG_LP=mCONFIG_TCP_CONG_VENO=mCONFIG_TCP_CONG_YEAH=mCONFIG_TCP_CONG_ILLINOIS=mCONFIG_DEFAULT_BIC=y
# CONFIG_DEFAULT_RENO is not setCONFIG_DEFAULT_TCP_CONG="bic"
# CONFIG_TCP_MD5SIG is not set
# CONFIG_IPV6 is not set
# CONFIG_NETWORK_SECMARK is not set
# CONFIG_NETWORK_PHY_TIMESTAMPING is not setCONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not setCONFIG_NETFILTER_ADVANCED=yCONFIG_BRIDGE_NETFILTER=y
#
# Core Netfilter Configuration
#CONFIG_NETFILTER_NETLINK=mCONFIG_NETFILTER_NETLINK_QUEUE=mCONFIG_NETFILTER_NETLINK_LOG=mCONFIG_NF_CONNTRACK=mCONFIG_NF_CONNTRACK_MARK=y
# CONFIG_NF_CONNTRACK_ZONES is not set
# CONFIG_NF_CONNTRACK_EVENTS is not set
# CONFIG_NF_CT_PROTO_DCCP is not setCONFIG_NF_CT_PROTO_GRE=m
# CONFIG_NF_CT_PROTO_SCTP is not setCONFIG_NF_CT_PROTO_UDPLITE=m
# CONFIG_NF_CONNTRACK_AMANDA is not setCONFIG_NF_CONNTRACK_FTP=mCONFIG_NF_CONNTRACK_H323=mCONFIG_NF_CONNTRACK_IRC=mCONFIG_NF_CONNTRACK_NETBIOS_NS=mCONFIG_NF_CONNTRACK_PPTP=mCONFIG_NF_CONNTRACK_SANE=mCONFIG_NF_CONNTRACK_SIP=mCONFIG_NF_CONNTRACK_TFTP=mCONFIG_NF_CT_NETLINK=mCONFIG_NETFILTER_TPROXY=mCONFIG_NETFILTER_XTABLES=y
#
# Xtables combined modules
#CONFIG_NETFILTER_XT_MARK=mCONFIG_NETFILTER_XT_CONNMARK=m
#
# Xtables targets
#CONFIG_NETFILTER_XT_TARGET_CHECKSUM=mCONFIG_NETFILTER_XT_TARGET_CLASSIFY=mCONFIG_NETFILTER_XT_TARGET_CONNMARK=mCONFIG_NETFILTER_XT_TARGET_CT=mCONFIG_NETFILTER_XT_TARGET_DSCP=mCONFIG_NETFILTER_XT_TARGET_HL=mCONFIG_NETFILTER_XT_TARGET_IDLETIMER=mCONFIG_NETFILTER_XT_TARGET_MARK=mCONFIG_NETFILTER_XT_TARGET_NFLOG=mCONFIG_NETFILTER_XT_TARGET_NFQUEUE=mCONFIG_NETFILTER_XT_TARGET_NOTRACK=mCONFIG_NETFILTER_XT_TARGET_RATEEST=mCONFIG_NETFILTER_XT_TARGET_TEE=mCONFIG_NETFILTER_XT_TARGET_TPROXY=mCONFIG_NETFILTER_XT_TARGET_TRACE=mCONFIG_NETFILTER_XT_TARGET_TCPMSS=mCONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
#
# Xtables matches
#CONFIG_NETFILTER_XT_MATCH_CLUSTER=mCONFIG_NETFILTER_XT_MATCH_COMMENT=mCONFIG_NETFILTER_XT_MATCH_CONNBYTES=mCONFIG_NETFILTER_XT_MATCH_CONNLIMIT=mCONFIG_NETFILTER_XT_MATCH_CONNMARK=mCONFIG_NETFILTER_XT_MATCH_CONNTRACK=mCONFIG_NETFILTER_XT_MATCH_CPU=mCONFIG_NETFILTER_XT_MATCH_DCCP=mCONFIG_NETFILTER_XT_MATCH_DSCP=mCONFIG_NETFILTER_XT_MATCH_ESP=mCONFIG_NETFILTER_XT_MATCH_HASHLIMIT=mCONFIG_NETFILTER_XT_MATCH_HELPER=mCONFIG_NETFILTER_XT_MATCH_HL=mCONFIG_NETFILTER_XT_MATCH_IPRANGE=mCONFIG_NETFILTER_XT_MATCH_LENGTH=mCONFIG_NETFILTER_XT_MATCH_LIMIT=mCONFIG_NETFILTER_XT_MATCH_MAC=mCONFIG_NETFILTER_XT_MATCH_MARK=mCONFIG_NETFILTER_XT_MATCH_MULTIPORT=mCONFIG_NETFILTER_XT_MATCH_OSF=mCONFIG_NETFILTER_XT_MATCH_OWNER=m
# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not setCONFIG_NETFILTER_XT_MATCH_PKTTYPE=mCONFIG_NETFILTER_XT_MATCH_QUOTA=mCONFIG_NETFILTER_XT_MATCH_RATEEST=mCONFIG_NETFILTER_XT_MATCH_REALM=mCONFIG_NETFILTER_XT_MATCH_RECENT=mCONFIG_NETFILTER_XT_MATCH_SCTP=mCONFIG_NETFILTER_XT_MATCH_SOCKET=mCONFIG_NETFILTER_XT_MATCH_STATE=mCONFIG_NETFILTER_XT_MATCH_STATISTIC=mCONFIG_NETFILTER_XT_MATCH_STRING=mCONFIG_NETFILTER_XT_MATCH_TCPMSS=mCONFIG_NETFILTER_XT_MATCH_TIME=mCONFIG_NETFILTER_XT_MATCH_U32=m
# CONFIG_IP_VS is not set
#
# IP: Netfilter Configuration
#CONFIG_NF_DEFRAG_IPV4=mCONFIG_NF_CONNTRACK_IPV4=mCONFIG_NF_CONNTRACK_PROC_COMPAT=y
# CONFIG_IP_NF_QUEUE is not setCONFIG_IP_NF_IPTABLES=mCONFIG_IP_NF_MATCH_ADDRTYPE=mCONFIG_IP_NF_MATCH_AH=mCONFIG_IP_NF_MATCH_ECN=mCONFIG_IP_NF_MATCH_TTL=mCONFIG_IP_NF_FILTER=mCONFIG_IP_NF_TARGET_REJECT=mCONFIG_IP_NF_TARGET_LOG=mCONFIG_IP_NF_TARGET_ULOG=mCONFIG_NF_NAT=mCONFIG_NF_NAT_NEEDED=yCONFIG_IP_NF_TARGET_MASQUERADE=mCONFIG_IP_NF_TARGET_NETMAP=mCONFIG_IP_NF_TARGET_REDIRECT=mCONFIG_NF_NAT_SNMP_BASIC=mCONFIG_NF_NAT_PROTO_GRE=mCONFIG_NF_NAT_PROTO_UDPLITE=mCONFIG_NF_NAT_FTP=mCONFIG_NF_NAT_IRC=mCONFIG_NF_NAT_TFTP=m
# CONFIG_NF_NAT_AMANDA is not setCONFIG_NF_NAT_PPTP=mCONFIG_NF_NAT_H323=mCONFIG_NF_NAT_SIP=mCONFIG_IP_NF_MANGLE=mCONFIG_IP_NF_TARGET_CLUSTERIP=mCONFIG_IP_NF_TARGET_ECN=mCONFIG_IP_NF_TARGET_TTL=mCONFIG_IP_NF_RAW=mCONFIG_IP_NF_ARPTABLES=mCONFIG_IP_NF_ARPFILTER=mCONFIG_IP_NF_ARP_MANGLE=m
# CONFIG_BRIDGE_NF_EBTABLES is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_RDS is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_L2TP is not setCONFIG_STP=mCONFIG_BRIDGE=mCONFIG_BRIDGE_IGMP_SNOOPING=y
# CONFIG_NET_DSA is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not setCONFIG_LLC=mCONFIG_LLC2=m
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_PHONET is not set
# CONFIG_IEEE802154 is not setCONFIG_NET_SCHED=y
#
# Queueing/Scheduling
#CONFIG_NET_SCH_CBQ=mCONFIG_NET_SCH_HTB=mCONFIG_NET_SCH_HFSC=mCONFIG_NET_SCH_PRIO=mCONFIG_NET_SCH_MULTIQ=mCONFIG_NET_SCH_RED=mCONFIG_NET_SCH_SFQ=mCONFIG_NET_SCH_TEQL=mCONFIG_NET_SCH_TBF=mCONFIG_NET_SCH_GRED=mCONFIG_NET_SCH_DSMARK=mCONFIG_NET_SCH_NETEM=mCONFIG_NET_SCH_DRR=mCONFIG_NET_SCH_INGRESS=m
#
# Classification
#CONFIG_NET_CLS=yCONFIG_NET_CLS_BASIC=mCONFIG_NET_CLS_TCINDEX=mCONFIG_NET_CLS_ROUTE4=mCONFIG_NET_CLS_ROUTE=yCONFIG_NET_CLS_FW=mCONFIG_NET_CLS_U32=mCONFIG_CLS_U32_PERF=yCONFIG_CLS_U32_MARK=y
# CONFIG_NET_CLS_RSVP is not set
# CONFIG_NET_CLS_RSVP6 is not setCONFIG_NET_CLS_FLOW=mCONFIG_NET_CLS_CGROUP=mCONFIG_NET_EMATCH=yCONFIG_NET_EMATCH_STACK=32CONFIG_NET_EMATCH_CMP=mCONFIG_NET_EMATCH_NBYTE=mCONFIG_NET_EMATCH_U32=mCONFIG_NET_EMATCH_META=mCONFIG_NET_EMATCH_TEXT=mCONFIG_NET_CLS_ACT=yCONFIG_NET_ACT_POLICE=mCONFIG_NET_ACT_GACT=mCONFIG_GACT_PROB=yCONFIG_NET_ACT_MIRRED=mCONFIG_NET_ACT_IPT=mCONFIG_NET_ACT_NAT=mCONFIG_NET_ACT_PEDIT=m
# CONFIG_NET_ACT_SIMP is not setCONFIG_NET_ACT_SKBEDIT=mCONFIG_NET_ACT_CSUM=mCONFIG_NET_CLS_IND=yCONFIG_NET_SCH_FIFO=y
# CONFIG_DCB is not setCONFIG_RPS=y
#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
# CONFIG_WIRELESS is not set
# CONFIG_WIMAX is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set
# CONFIG_CAIF is not set
# CONFIG_CEPH_LIB is not set
#
# Device Drivers
#
#
# Generic Driver Options
#CONFIG_UEVENT_HELPER_PATH=""
# CONFIG_DEVTMPFS is not setCONFIG_STANDALONE=yCONFIG_PREVENT_FIRMWARE_BUILD=yCONFIG_FW_LOADER=y
# CONFIG_FIRMWARE_IN_KERNEL is not setCONFIG_EXTRA_FIRMWARE=""
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_CONNECTOR is not set
# CONFIG_MTD is not set
# CONFIG_PARPORT is not setCONFIG_PNP=y
# CONFIG_PNP_DEBUG_MESSAGES is not set
#
# Protocols
#CONFIG_PNPACPI=yCONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not setCONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
#
# DRBD disabled because PROC_FS, INET or CONNECTOR not selected #CONFIG_BLK_DEV_NBD=mCONFIG_BLK_DEV_SX8=m
# CONFIG_BLK_DEV_UB is not set
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_CDROM_PKTCDVD is not set
# CONFIG_ATA_OVER_ETH is not set
# CONFIG_BLK_DEV_HD is not set
# CONFIG_BLK_DEV_RBD is not set
# CONFIG_MISC_DEVICES is not setCONFIG_HAVE_IDE=y
# CONFIG_IDE is not set
#
# SCSI device support
#CONFIG_SCSI_MOD=y
# CONFIG_RAID_ATTRS is not setCONFIG_SCSI=yCONFIG_SCSI_DMA=y
# CONFIG_SCSI_TGT is not set
# CONFIG_SCSI_NETLINK is not setCONFIG_SCSI_PROC_FS=y
#
# SCSI support type (disk, tape, CD-ROM)
#CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not setCONFIG_BLK_DEV_SR=yCONFIG_BLK_DEV_SR_VENDOR=yCONFIG_CHR_DEV_SG=y
# CONFIG_CHR_DEV_SCH is not setCONFIG_SCSI_MULTI_LUN=y
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not setCONFIG_SCSI_SCAN_ASYNC=yCONFIG_SCSI_WAIT_SCAN=m
#
# SCSI Transports
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
# CONFIG_SCSI_LOWLEVEL is not set
# CONFIG_SCSI_DH is not set
# CONFIG_SCSI_OSD_INITIATOR is not setCONFIG_ATA=y
# CONFIG_ATA_NONSTANDARD is not set
# CONFIG_ATA_VERBOSE_ERROR is not set
# CONFIG_ATA_ACPI is not set
# CONFIG_SATA_PMP is not set
#
# Controllers with non-SFF native interface
#
# CONFIG_SATA_AHCI is not set
# CONFIG_SATA_AHCI_PLATFORM is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_SATA_SIL24 is not setCONFIG_ATA_SFF=y
#
# SFF controllers with custom DMA interface
#
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not setCONFIG_SATA_SX4=mCONFIG_ATA_BMDMA=y
#
# SATA SFF controllers with BMDMA
#
# CONFIG_ATA_PIIX is not setCONFIG_SATA_MV=mCONFIG_SATA_NV=yCONFIG_SATA_PROMISE=mCONFIG_SATA_SIL=m
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_SVW is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
#
# PATA SFF controllers with BMDMA
#
# CONFIG_PATA_ALI is not set
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_ATP867X is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_MARVELL is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87415 is not set
# CONFIG_PATA_OLDPIIX is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RDC is not set
# CONFIG_PATA_SC1200 is not set
# CONFIG_PATA_SCH is not set
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_TOSHIBA is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set
#
# PIO-only SFF controllers
#
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_RZ1000 is not set
#
# Generic fallback / legacy drivers
#
# CONFIG_ATA_GENERIC is not set
# CONFIG_PATA_LEGACY is not set
# CONFIG_MD is not set
# CONFIG_FUSION is not set
#
# IEEE 1394 (FireWire) support
#
# CONFIG_FIREWIRE is not set
# CONFIG_FIREWIRE_NOSY is not set
# CONFIG_I2O is not set
# CONFIG_MACINTOSH_DRIVERS is not set CONFIG_NETDEVICES=y
# CONFIG_IFB is not set
# CONFIG_DUMMY is not setCONFIG_BONDING=m
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not setCONFIG_TUN=m
# CONFIG_VETH is not set
# CONFIG_NET_SB1000 is not set
# CONFIG_ARCNET is not setCONFIG_MII=m
# CONFIG_PHYLIB is not set CONFIG_NET_ETHERNET=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
# CONFIG_NET_VENDOR_3COM 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_IBM_NEW_EMAC_ZMII is not set
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_KSZ884X_PCI is not set
# CONFIG_B44 is not setCONFIG_FORCEDETH=y
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
# CONFIG_R6040 is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SMSC9420 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_KS8851_MLL is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_SC92031 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
#
# Enable WiMAX (Networking options) to see the WiMAX drivers #
#
# USB Network Adapters
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET is not set
# CONFIG_USB_IPHETH is not set
# CONFIG_WAN is not set
#
# CAIF transport drivers
#
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_NET_FC is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_VMXNET3 is not set
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set
#
# Input device support
#CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
# CONFIG_INPUT_POLLDEV is not set
# CONFIG_INPUT_SPARSEKMAP is not set
#
# Userland interfaces
#CONFIG_INPUT_MOUSEDEV=yCONFIG_INPUT_MOUSEDEV_PSAUX=yCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not setCONFIG_INPUT_EVDEV=m
# CONFIG_INPUT_EVBUG is not set
#
# Input Device Drivers
#CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_ADP5588 is not setCONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_QT2160 is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_TCA6416 is not set
# CONFIG_KEYBOARD_MAX7359 is not set
# CONFIG_KEYBOARD_MCS is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_OPENCORES is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_XTKBD is not setCONFIG_INPUT_MOUSE=yCONFIG_MOUSE_PS2=yCONFIG_MOUSE_PS2_ALPS=yCONFIG_MOUSE_PS2_LOGIPS2PP=yCONFIG_MOUSE_PS2_SYNAPTICS=yCONFIG_MOUSE_PS2_LIFEBOOK=yCONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_PS2_ELANTECH is not set
# CONFIG_MOUSE_PS2_SENTELIC is not set
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_BCM5974 is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_MOUSE_SYNAPTICS_I2C is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set
#
# Hardware I/O ports
#CONFIG_SERIO=yCONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PCIPS2 is not setCONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
# CONFIG_SERIO_ALTERA_PS2 is not set
# CONFIG_SERIO_PS2MULT is not set
# CONFIG_GAMEPORT is not set
#
# Character devices
#CONFIG_VT=yCONFIG_CONSOLE_TRANSLATIONS=yCONFIG_VT_CONSOLE=yCONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
# CONFIG_DEVKMEM is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_N_GSM is not set
# CONFIG_NOZOMI is not set
#
# Serial drivers
#
# CONFIG_SERIAL_8250 is not setCONFIG_FIX_EARLYCON_MEM=y
#
# Non-8250 serial port support
#
# CONFIG_SERIAL_MFD_HSU is not set
# CONFIG_SERIAL_JSM is not set
# CONFIG_SERIAL_TIMBERDALE is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not setCONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
# CONFIG_LEGACY_PTYS is not set
# CONFIG_IPMI_HANDLER is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_NVRAM is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_MWAVE is not set
# CONFIG_RAW_DRIVER is not setCONFIG_HPET=yCONFIG_HPET_MMAP=yCONFIG_HANGCHECK_TIMER=y
# CONFIG_TCG_TPM is not set
# CONFIG_TELCLOCK is not setCONFIG_DEVPORT=y
# CONFIG_RAMOOPS is not setCONFIG_I2C=yCONFIG_I2C_BOARDINFO=yCONFIG_I2C_COMPAT=yCONFIG_I2C_CHARDEV=y
# CONFIG_I2C_MUX is not setCONFIG_I2C_HELPER_AUTO=y
#
# I2C Hardware Bus support
#
#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_PIIX4 is not setCONFIG_I2C_NFORCE2=y
# CONFIG_I2C_NFORCE2_S4985 is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
#
# ACPI drivers
#CONFIG_I2C_SCMI=y
#
# I2C system bus drivers (mostly embedded / system-on-chip) #
# CONFIG_I2C_INTEL_MID is not set
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PCA_PLATFORM is not set
# CONFIG_I2C_SIMTEC is not set
# CONFIG_I2C_XILINX is not set
#
# External I2C/SMBus adapter drivers
#
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_TAOS_EVM is not set
# CONFIG_I2C_TINY_USB is not set
#
# Other I2C/SMBus bus drivers
#
# CONFIG_I2C_STUB is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_SPI is not set
#
# PPS support
#
# CONFIG_PPS is not setCONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
# CONFIG_GPIOLIB is not set
# CONFIG_W1 is not setCONFIG_POWER_SUPPLY=m
# CONFIG_POWER_SUPPLY_DEBUG is not setCONFIG_PDA_POWER=m
# CONFIG_TEST_POWER is not set
# CONFIG_BATTERY_DS2782 is not set
# CONFIG_BATTERY_BQ20Z75 is not set
# CONFIG_BATTERY_BQ27x00 is not set
# CONFIG_BATTERY_MAX17040 is not setCONFIG_HWMON=y
# CONFIG_HWMON_VID is not set
# CONFIG_HWMON_DEBUG_CHIP is not set
#
# Native drivers
#
# CONFIG_SENSORS_ABITUGURU is not set
# CONFIG_SENSORS_ABITUGURU3 is not set
# CONFIG_SENSORS_AD7414 is not set
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
# CONFIG_SENSORS_ADM1026 is not set
# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM9240 is not set
# CONFIG_SENSORS_ADT7411 is not set
# CONFIG_SENSORS_ADT7462 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ADT7475 is not set
# CONFIG_SENSORS_ASC7621 is not setCONFIG_SENSORS_K8TEMP=y
# CONFIG_SENSORS_K10TEMP is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_F75375S is not set
# CONFIG_SENSORS_FSCHMD is not set
# CONFIG_SENSORS_G760A is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_CORETEMP is not set
# CONFIG_SENSORS_PKGTEMP is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_JC42 is not set
# CONFIG_SENSORS_LM63 is not set
# CONFIG_SENSORS_LM73 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM87 is not set
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
# CONFIG_SENSORS_LTC4215 is not set
# CONFIG_SENSORS_LTC4245 is not set
# CONFIG_SENSORS_LTC4261 is not set
# CONFIG_SENSORS_LM95241 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX6650 is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_SMM665 is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_EMC1403 is not set
# CONFIG_SENSORS_EMC2103 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_SMSC47M192 is not setCONFIG_SENSORS_SMSC47B397=m
# CONFIG_SENSORS_ADS7828 is not set
# CONFIG_SENSORS_AMC6821 is not set
# CONFIG_SENSORS_THMC50 is not set
# CONFIG_SENSORS_TMP102 is not set
# CONFIG_SENSORS_TMP401 is not set
# CONFIG_SENSORS_TMP421 is not set
# CONFIG_SENSORS_VIA_CPUTEMP is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83791D is not set
# CONFIG_SENSORS_W83792D is not set
# CONFIG_SENSORS_W83793 is not set
# CONFIG_SENSORS_W83795 is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83L786NG is not set
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_SENSORS_LIS3_I2C is not set
# CONFIG_SENSORS_APPLESMC is not set
#
# ACPI drivers
#
# CONFIG_SENSORS_ATK0110 is not set
# CONFIG_SENSORS_LIS3LV02D is not setCONFIG_THERMAL=yCONFIG_THERMAL_HWMON=y
# CONFIG_WATCHDOG is not setCONFIG_SSB_POSSIBLE=y
#
# Sonics Silicon Backplane
#
# CONFIG_SSB is not set
# CONFIG_MFD_SUPPORT is not set
# CONFIG_REGULATOR is not set
# CONFIG_MEDIA_SUPPORT is not set
#
# Graphics support
#
# CONFIG_AGP is not setCONFIG_VGA_ARB=yCONFIG_VGA_ARB_MAX_GPUS=1
# CONFIG_VGA_SWITCHEROO is not set
# CONFIG_DRM is not set
# CONFIG_STUB_POULSBO is not set
# CONFIG_VGASTATE is not set
# CONFIG_VIDEO_OUTPUT_CONTROL is not setCONFIG_FB=y
# CONFIG_FIRMWARE_EDID is not set
# CONFIG_FB_DDC is not setCONFIG_FB_BOOT_VESA_SUPPORT=yCONFIG_FB_CFB_FILLRECT=yCONFIG_FB_CFB_COPYAREA=yCONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
# CONFIG_FB_SYS_FILLRECT is not set
# CONFIG_FB_SYS_COPYAREA is not set
# CONFIG_FB_SYS_IMAGEBLIT is not setCONFIG_FB_FOREIGN_ENDIAN=y
# CONFIG_FB_BOTH_ENDIAN is not set
# CONFIG_FB_BIG_ENDIAN is not setCONFIG_FB_LITTLE_ENDIAN=y
# CONFIG_FB_SYS_FOPS is not set
# CONFIG_FB_SVGALIB is not set
# CONFIG_FB_MACMODES is not set
# CONFIG_FB_BACKLIGHT is not set
# CONFIG_FB_MODE_HELPERS is not set
# CONFIG_FB_TILEBLITTING is not set
#
# Frame buffer hardware drivers
#
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ARC is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not setCONFIG_FB_VESA=y
# CONFIG_FB_N411 is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_NVIDIA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_LE80578 is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_S3 is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_VIA is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_VT8623 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_ARK is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_GEODE is not set
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
# CONFIG_FB_BROADSHEET is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set
#
# Console display driver support
#CONFIG_VGA_CONSOLE=yCONFIG_VGACON_SOFT_SCROLLBACK=yCONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64CONFIG_DUMMY_CONSOLE=yCONFIG_FRAMEBUFFER_CONSOLE=yCONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not setCONFIG_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_7x14 is not set
# CONFIG_FONT_PEARL_8x8 is not set
CONFIG_FONT_ACORN_8x8=y
# CONFIG_FONT_MINI_4x6 is not set
CONFIG_FONT_SUN8x16=y
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_10x18 is not set
# CONFIG_LOGO is not setCONFIG_SOUND=yCONFIG_SOUND_OSS_CORE=y
# CONFIG_SOUND_OSS_CORE_PRECLAIM is not setCONFIG_SND=yCONFIG_SND_TIMER=yCONFIG_SND_PCM=y
# CONFIG_SND_SEQUENCER is not setCONFIG_SND_OSSEMUL=yCONFIG_SND_MIXER_OSS=yCONFIG_SND_PCM_OSS=yCONFIG_SND_PCM_OSS_PLUGINS=yCONFIG_SND_HRTIMER=yCONFIG_SND_DYNAMIC_MINORS=y
# 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 setCONFIG_SND_VMASTER=yCONFIG_SND_DMA_SGBUF=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 setCONFIG_SND_AC97_CODEC=mCONFIG_SND_DRIVERS=y
# CONFIG_SND_PCSP is not set
# CONFIG_SND_DUMMY is not set
# CONFIG_SND_ALOOP is not set
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not setCONFIG_SND_AC97_POWER_SAVE=yCONFIG_SND_AC97_POWER_SAVE_DEFAULT=60CONFIG_SND_PCI=y
# CONFIG_SND_AD1889 is not set
# CONFIG_SND_ALS300 is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ASIHPI is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AW2 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_OXYGEN is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS5530 is not set
# CONFIG_SND_CS5535AUDIO is not set
# CONFIG_SND_CTXFI is not set
# CONFIG_SND_DARLA20 is not set
# CONFIG_SND_GINA20 is not set
# CONFIG_SND_LAYLA20 is not set
# CONFIG_SND_DARLA24 is not set
# CONFIG_SND_GINA24 is not set
# CONFIG_SND_LAYLA24 is not set
# CONFIG_SND_MONA is not set
# CONFIG_SND_MIA is not set
# CONFIG_SND_ECHO3G is not set
# CONFIG_SND_INDIGO is not set
# CONFIG_SND_INDIGOIO is not set
# CONFIG_SND_INDIGODJ is not set
# CONFIG_SND_INDIGOIOX is not set
# CONFIG_SND_INDIGODJX is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_HDA_INTEL is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not set
# CONFIG_SND_HIFIER is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not setCONFIG_SND_INTEL8X0=m
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_LX6464ES is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_PCXHR is not set
# CONFIG_SND_RIPTIDE is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VIRTUOSO is not set
# CONFIG_SND_VX222 is not set
# CONFIG_SND_YMFPCI is not set
# CONFIG_SND_USB is not set
# CONFIG_SND_SOC is not set
# CONFIG_SOUND_PRIME is not setCONFIG_AC97_BUS=mCONFIG_HID_SUPPORT=yCONFIG_HID=y
# CONFIG_HIDRAW is not set
#
# USB Input Devices
#CONFIG_USB_HID=y
# CONFIG_HID_PID is not set
# CONFIG_USB_HIDDEV is not set
#
# Special HID drivers
#
# CONFIG_HID_3M_PCT is not setCONFIG_HID_A4TECH=y
# CONFIG_HID_ACRUX_FF is not setCONFIG_HID_APPLE=yCONFIG_HID_BELKIN=y
# CONFIG_HID_CANDO is not setCONFIG_HID_CHERRY=yCONFIG_HID_CHICONY=y
# CONFIG_HID_PRODIKEYS is not setCONFIG_HID_CYPRESS=y
# CONFIG_HID_DRAGONRISE is not set
# CONFIG_HID_EGALAX is not setCONFIG_HID_EZKEY=yCONFIG_HID_KYE=y
# CONFIG_HID_UCLOGIC is not set
# CONFIG_HID_WALTOP is not set
# CONFIG_HID_GYRATION is not set
# CONFIG_HID_TWINHAN is not setCONFIG_HID_KENSINGTON=yCONFIG_HID_LOGITECH=y
# CONFIG_LOGITECH_FF is not set
# CONFIG_LOGIRUMBLEPAD2_FF is not set
# CONFIG_LOGIG940_FF is not set
# CONFIG_LOGIWII_FF is not setCONFIG_HID_MICROSOFT=y
# CONFIG_HID_MOSART is not setCONFIG_HID_MONTEREY=y
# CONFIG_HID_NTRIG is not set
# CONFIG_HID_ORTEK is not set
# CONFIG_HID_PANTHERLORD is not set
# CONFIG_HID_PETALYNX is not set
# CONFIG_HID_PICOLCD is not set
# CONFIG_HID_QUANTA is not set
# CONFIG_HID_ROCCAT is not set
# CONFIG_HID_ROCCAT_KONE is not set
# CONFIG_HID_ROCCAT_PYRA is not set
# CONFIG_HID_SAMSUNG is not set
# CONFIG_HID_SONY is not set
# CONFIG_HID_STANTUM is not set
# CONFIG_HID_SUNPLUS is not set
# CONFIG_HID_GREENASIA is not set
# CONFIG_HID_SMARTJOYPLUS is not set
# CONFIG_HID_TOPSEED is not set
# CONFIG_HID_THRUSTMASTER is not set
# CONFIG_HID_ZEROPLUS is not set
# CONFIG_HID_ZYDACRON is not setCONFIG_USB_SUPPORT=yCONFIG_USB_ARCH_HAS_HCD=yCONFIG_USB_ARCH_HAS_OHCI=yCONFIG_USB_ARCH_HAS_EHCI=yCONFIG_USB=y
# CONFIG_USB_DEBUG is not setCONFIG_USB_ANNOUNCE_NEW_DEVICES=y
#
# Miscellaneous USB options
#CONFIG_USB_DEVICEFS=yCONFIG_USB_DEVICE_CLASS=yCONFIG_USB_DYNAMIC_MINORS=yCONFIG_USB_SUSPEND=y
# CONFIG_USB_OTG is not set
# CONFIG_USB_MON is not set
# CONFIG_USB_WUSB is not set
# CONFIG_USB_WUSB_CBAF is not set
#
# USB Host Controller Drivers
#
# CONFIG_USB_C67X00_HCD is not set
# CONFIG_USB_XHCI_HCD is not setCONFIG_USB_EHCI_HCD=yCONFIG_USB_EHCI_ROOT_HUB_TT=y
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
# CONFIG_USB_OXU210HP_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_ISP1760_HCD is not set
# CONFIG_USB_ISP1362_HCD is not setCONFIG_USB_OHCI_HCD=y
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not setCONFIG_USB_OHCI_LITTLE_ENDIAN=yCONFIG_USB_UHCI_HCD=m
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set
# CONFIG_USB_WHCI_HCD is not set
# CONFIG_USB_HWA_HCD is not set
#
# USB Device Class drivers
#
# CONFIG_USB_ACM is not setCONFIG_USB_PRINTER=m
# CONFIG_USB_WDM is not set
# CONFIG_USB_TMC is not set
#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may #
#
# also be needed; see USB_STORAGE Help for more info # CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_DEBUG is not set # CONFIG_USB_STORAGE_DATAFAB is not set # CONFIG_USB_STORAGE_FREECOM is not set # CONFIG_USB_STORAGE_ISD200 is not set # CONFIG_USB_STORAGE_USBAT is not set # CONFIG_USB_STORAGE_SDDR09 is not set # CONFIG_USB_STORAGE_SDDR55 is not set # CONFIG_USB_STORAGE_JUMPSHOT is not set # CONFIG_USB_STORAGE_ALAUDA is not set # CONFIG_USB_STORAGE_ONETOUCH is not set # CONFIG_USB_STORAGE_KARMA is not set # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set # CONFIG_USB_UAS is not set # CONFIG_USB_LIBUSUAL is not set
#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
#
# USB port drivers
#CONFIG_USB_SERIAL=m
# CONFIG_USB_EZUSB is not set
# CONFIG_USB_SERIAL_GENERIC is not set
# CONFIG_USB_SERIAL_AIRCABLE is not set
# CONFIG_USB_SERIAL_ARK3116 is not set
# CONFIG_USB_SERIAL_BELKIN is not set
# CONFIG_USB_SERIAL_CH341 is not set
# CONFIG_USB_SERIAL_WHITEHEAT is not set
# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
# CONFIG_USB_SERIAL_CP210X is not set
# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
# CONFIG_USB_SERIAL_EMPEG is not set
# CONFIG_USB_SERIAL_FTDI_SIO is not set
# CONFIG_USB_SERIAL_FUNSOFT is not set
# CONFIG_USB_SERIAL_VISOR is not set
# CONFIG_USB_SERIAL_IPAQ is not set
# CONFIG_USB_SERIAL_IR is not set
# CONFIG_USB_SERIAL_EDGEPORT is not set
# CONFIG_USB_SERIAL_EDGEPORT_TI is not setCONFIG_USB_SERIAL_GARMIN=m
# CONFIG_USB_SERIAL_IPW is not set
# CONFIG_USB_SERIAL_IUU is not set
# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
# CONFIG_USB_SERIAL_KEYSPAN is not set
# CONFIG_USB_SERIAL_KLSI is not set
# CONFIG_USB_SERIAL_KOBIL_SCT is not set
# CONFIG_USB_SERIAL_MCT_U232 is not set
# CONFIG_USB_SERIAL_MOS7720 is not set
# CONFIG_USB_SERIAL_MOS7840 is not set
# CONFIG_USB_SERIAL_MOTOROLA is not set
# CONFIG_USB_SERIAL_NAVMAN is not set
# CONFIG_USB_SERIAL_PL2303 is not set
# CONFIG_USB_SERIAL_OTI6858 is not set
# CONFIG_USB_SERIAL_QCAUX is not set
# CONFIG_USB_SERIAL_QUALCOMM is not set
# CONFIG_USB_SERIAL_SPCP8X5 is not set
# CONFIG_USB_SERIAL_HP4X is not set
# CONFIG_USB_SERIAL_SAFE is not set
# CONFIG_USB_SERIAL_SAMBA is not set
# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
# CONFIG_USB_SERIAL_SYMBOL is not set
# CONFIG_USB_SERIAL_TI is not set
# CONFIG_USB_SERIAL_CYBERJACK is not set
# CONFIG_USB_SERIAL_XIRCOM is not set
# CONFIG_USB_SERIAL_OPTION is not set
# CONFIG_USB_SERIAL_OMNINET is not set
# CONFIG_USB_SERIAL_OPTICON is not set
# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set
# CONFIG_USB_SERIAL_ZIO is not set
# CONFIG_USB_SERIAL_SSU100 is not set
# CONFIG_USB_SERIAL_DEBUG is not set
#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_SEVSEG is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_USB_SISUSBVGA is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set
# CONFIG_USB_ISIGHTFW is not set
# CONFIG_USB_YUREX is not set
# CONFIG_USB_GADGET is not set
#
# OTG and related infrastructure
#
# CONFIG_NOP_USB_XCEIV is not set
# CONFIG_UWB is not set
# CONFIG_MMC is not set
# CONFIG_MEMSTICK is not set
# CONFIG_NEW_LEDS is not set
# CONFIG_ACCESSIBILITY is not set
# CONFIG_INFINIBAND is not set
# CONFIG_EDAC is not setCONFIG_RTC_LIB=yCONFIG_RTC_CLASS=y
# CONFIG_RTC_HCTOSYS is not set
# CONFIG_RTC_DEBUG is not set
#
# RTC interfaces
#CONFIG_RTC_INTF_SYSFS=yCONFIG_RTC_INTF_PROC=yCONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set
#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_DS3232 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_ISL12022 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
# CONFIG_RTC_DRV_BQ32K is not set
# CONFIG_RTC_DRV_S35390A is not set
# CONFIG_RTC_DRV_FM3130 is not set
# CONFIG_RTC_DRV_RX8581 is not set
# CONFIG_RTC_DRV_RX8025 is not set
#
# SPI RTC drivers
#
#
# Platform RTC drivers
#CONFIG_RTC_DRV_CMOS=y
# CONFIG_RTC_DRV_DS1286 is not set
# CONFIG_RTC_DRV_DS1511 is not set
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
# CONFIG_RTC_DRV_M48T35 is not set
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_MSM6242 is not set
# CONFIG_RTC_DRV_BQ4802 is not set
# CONFIG_RTC_DRV_RP5C01 is not set
# CONFIG_RTC_DRV_V3020 is not set
#
# on-CPU RTC drivers
#CONFIG_DMADEVICES=y
# CONFIG_DMADEVICES_DEBUG is not set
#
# DMA Devices
#
# CONFIG_INTEL_MID_DMAC is not set
# CONFIG_INTEL_IOATDMA is not set
# CONFIG_TIMB_DMA is not set
# CONFIG_PCH_DMA is not set
# CONFIG_AUXDISPLAY is not set
# CONFIG_UIO is not setCONFIG_STAGING=y
# CONFIG_STAGING_EXCLUDE_BUILD is not set
# CONFIG_ECHO is not set
# CONFIG_COMEDI is not set
# CONFIG_ASUS_OLED is not set
# CONFIG_TRANZPORT is not set
# CONFIG_POHMELFS is not set
# CONFIG_IDE_PHISON is not set
# CONFIG_LINE6_USB is not set
# CONFIG_USB_SERIAL_QUATECH2 is not set
# CONFIG_USB_SERIAL_QUATECH_USB2 is not set
# CONFIG_FB_UDL is not set
# CONFIG_HYPERV is not set
# CONFIG_VME_BUS is not set
# CONFIG_IIO is not setCONFIG_ZRAM=m
# CONFIG_BATMAN_ADV is not set
# CONFIG_FB_SM7XX is not set
# CONFIG_CRYSTALHD is not set
#
# Texas Instruments shared transport line discipline #
# CONFIG_FB_XGI is not set
# CONFIG_ACPI_QUICKSTART is not set CONFIG_MACH_NO_WESTBRIDGE=y
# CONFIG_USB_ENESTORAGE is not set
# CONFIG_BCM_WIMAX is not set
# CONFIG_FT1000 is not set
#
# Speakup console speech
#
# CONFIG_SPEAKUP is not set
# CONFIG_X86_PLATFORM_DEVICES is not set
#
# Firmware Drivers
#
# CONFIG_EDD is not setCONFIG_FIRMWARE_MEMMAP=y
# CONFIG_DELL_RBU is not set
# CONFIG_DCDBAS is not set
# CONFIG_DMIID is not set
# CONFIG_ISCSI_IBFT_FIND is not set
#
# File systems
#
# CONFIG_EXT2_FS is not set
# CONFIG_EXT3_FS is not set
# CONFIG_EXT4_FS is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not setCONFIG_FS_POSIX_ACL=yCONFIG_XFS_FS=y
# CONFIG_XFS_QUOTA is not setCONFIG_XFS_POSIX_ACL=yCONFIG_XFS_RT=y
# CONFIG_XFS_DEBUG is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not setCONFIG_BTRFS_FS=yCONFIG_BTRFS_FS_POSIX_ACL=y
# CONFIG_NILFS2_FS is not setCONFIG_EXPORTFS=yCONFIG_FILE_LOCKING=yCONFIG_FSNOTIFY=yCONFIG_DNOTIFY=yCONFIG_INOTIFY_USER=yCONFIG_FANOTIFY=y
# CONFIG_QUOTA is not set
# CONFIG_QUOTACTL is not setCONFIG_AUTOFS4_FS=mCONFIG_FUSE_FS=m
# CONFIG_CUSE is not setCONFIG_GENERIC_ACL=y
#
# Caches
#
# CONFIG_FSCACHE is not set
#
# CD-ROM/DVD Filesystems
#CONFIG_ISO9660_FS=mCONFIG_JOLIET=yCONFIG_ZISOFS=y
#
# DOS/FAT/NT Filesystems
#CONFIG_FAT_FS=mCONFIG_MSDOS_FS=mCONFIG_VFAT_FS=mCONFIG_FAT_DEFAULT_CODEPAGE=866CONFIG_FAT_DEFAULT_IOCHARSET="utf8"CONFIG_NTFS_FS=m
# CONFIG_NTFS_DEBUG is not setCONFIG_NTFS_RW=y
#
# Pseudo filesystems
#CONFIG_PROC_FS=y
# CONFIG_PROC_KCORE is not setCONFIG_PROC_SYSCTL=yCONFIG_PROC_PAGE_MONITOR=yCONFIG_SYSFS=yCONFIG_TMPFS=yCONFIG_TMPFS_POSIX_ACL=y
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
# CONFIG_CONFIGFS_FS is not set
# CONFIG_MISC_FILESYSTEMS is not setCONFIG_NETWORK_FILESYSTEMS=y
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
# CONFIG_CEPH_FS is not setCONFIG_CIFS=m
# CONFIG_CIFS_STATS is not setCONFIG_CIFS_WEAK_PW_HASH=yCONFIG_CIFS_XATTR=yCONFIG_CIFS_POSIX=y
# CONFIG_CIFS_DEBUG2 is not setCONFIG_CIFS_EXPERIMENTAL=y
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
#
# Partition Types
#CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
# CONFIG_OSF_PARTITION is not set
# CONFIG_AMIGA_PARTITION is not set
# CONFIG_ATARI_PARTITION is not set
# CONFIG_MAC_PARTITION is not setCONFIG_MSDOS_PARTITION=y
# CONFIG_BSD_DISKLABEL is not set
# CONFIG_MINIX_SUBPARTITION is not set
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_UNIXWARE_DISKLABEL is not set
# CONFIG_LDM_PARTITION is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_KARMA_PARTITION is not set
# CONFIG_EFI_PARTITION is not set
# CONFIG_SYSV68_PARTITION is not setCONFIG_NLS=yCONFIG_NLS_DEFAULT="utf-8"CONFIG_NLS_CODEPAGE_437=m
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not setCONFIG_NLS_CODEPAGE_866=m
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not setCONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not setCONFIG_NLS_KOI8_R=m
# CONFIG_NLS_KOI8_U is not setCONFIG_NLS_UTF8=y
# CONFIG_DLM is not set
#
# Kernel hacking
#CONFIG_TRACE_IRQFLAGS_SUPPORT=y
# CONFIG_PRINTK_TIME is not setCONFIG_ENABLE_WARN_DEPRECATED=yCONFIG_ENABLE_MUST_CHECK=yCONFIG_FRAME_WARN=512CONFIG_MAGIC_SYSRQ=yCONFIG_STRIP_ASM_SYMS=y
# CONFIG_UNUSED_SYMBOLS is not set
# CONFIG_DEBUG_FS is not setCONFIG_HEADERS_CHECK=y
# CONFIG_DEBUG_KERNEL is not set
# CONFIG_HARDLOCKUP_DETECTOR is not set
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_SLUB_STATS is not set
# CONFIG_BKL is not set
# CONFIG_SPARSE_RCU_POINTER is not setCONFIG_DEBUG_BUGVERBOSE=yCONFIG_DEBUG_MEMORY_INIT=yCONFIG_ARCH_WANT_FRAME_POINTERS=y
# CONFIG_FRAME_POINTER is not set
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_SYSCTL_SYSCALL_CHECK is not setCONFIG_USER_STACKTRACE_SUPPORT=yCONFIG_HAVE_FUNCTION_TRACER=yCONFIG_HAVE_FUNCTION_GRAPH_TRACER=yCONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=yCONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=yCONFIG_HAVE_DYNAMIC_FTRACE=yCONFIG_HAVE_FTRACE_MCOUNT_RECORD=yCONFIG_HAVE_SYSCALL_TRACEPOINTS=yCONFIG_HAVE_C_RECORDMCOUNT=yCONFIG_TRACING_SUPPORT=y
# CONFIG_FTRACE is not set
# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
# CONFIG_BUILD_DOCSRC is not set
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_ATOMIC64_SELFTEST is not set
# CONFIG_SAMPLES is not setCONFIG_HAVE_ARCH_KGDB=yCONFIG_HAVE_ARCH_KMEMCHECK=yCONFIG_STRICT_DEVMEM=y
# CONFIG_X86_VERBOSE_BOOTUP is not setCONFIG_EARLY_PRINTK=y
# CONFIG_EARLY_PRINTK_DBGP is not set
# CONFIG_IOMMU_STRESS is not setCONFIG_HAVE_MMIOTRACE_SUPPORT=yCONFIG_IO_DELAY_TYPE_0X80=0CONFIG_IO_DELAY_TYPE_0XED=1CONFIG_IO_DELAY_TYPE_UDELAY=2CONFIG_IO_DELAY_TYPE_NONE=3
# CONFIG_IO_DELAY_0X80 is not set
# CONFIG_IO_DELAY_0XED is not set
# CONFIG_IO_DELAY_UDELAY is not setCONFIG_IO_DELAY_NONE=yCONFIG_DEFAULT_IO_DELAY_TYPE=3CONFIG_OPTIMIZE_INLINING=y
#
# Security options
#
# CONFIG_KEYS is not setCONFIG_SECURITY_DMESG_RESTRICT=y
# CONFIG_SECURITY is not set
# CONFIG_SECURITYFS is not set
# CONFIG_INTEL_TXT is not setCONFIG_DEFAULT_SECURITY_DAC=yCONFIG_DEFAULT_SECURITY=""CONFIG_CRYPTO=y
#
# Crypto core or helper
#
# CONFIG_CRYPTO_FIPS is not setCONFIG_CRYPTO_ALGAPI=yCONFIG_CRYPTO_ALGAPI2=yCONFIG_CRYPTO_HASH=yCONFIG_CRYPTO_HASH2=yCONFIG_CRYPTO_RNG=mCONFIG_CRYPTO_RNG2=mCONFIG_CRYPTO_PCOMP=mCONFIG_CRYPTO_PCOMP2=m
# CONFIG_CRYPTO_MANAGER is not set
# CONFIG_CRYPTO_MANAGER2 is not set
# CONFIG_CRYPTO_GF128MUL is not set
# CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_PCRYPT is not set
# CONFIG_CRYPTO_CRYPTD is not set
# CONFIG_CRYPTO_AUTHENC is not set
# CONFIG_CRYPTO_TEST is not set
#
# Authenticated Encryption with Associated Data
#
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_SEQIV is not set
#
# Block modes
#
# CONFIG_CRYPTO_CBC is not set
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_CTS is not set
# CONFIG_CRYPTO_ECB is not set
# CONFIG_CRYPTO_LRW is not set
# CONFIG_CRYPTO_PCBC is not set
# CONFIG_CRYPTO_XTS is not set
#
# Hash modes
#
# CONFIG_CRYPTO_HMAC is not set
# CONFIG_CRYPTO_XCBC is not set
# CONFIG_CRYPTO_VMAC is not set
#
# Digest
#CONFIG_CRYPTO_CRC32C=y
# CONFIG_CRYPTO_CRC32C_INTEL is not set
# CONFIG_CRYPTO_GHASH is not set
# CONFIG_CRYPTO_MD4 is not setCONFIG_CRYPTO_MD5=m
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_RMD128 is not set
# CONFIG_CRYPTO_RMD160 is not set
# CONFIG_CRYPTO_RMD256 is not set
# CONFIG_CRYPTO_RMD320 is not set
# CONFIG_CRYPTO_SHA1 is not setCONFIG_CRYPTO_SHA256=mCONFIG_CRYPTO_SHA512=m
# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_WP512 is not set
# CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL is not set
#
# Ciphers
#CONFIG_CRYPTO_AES=mCONFIG_CRYPTO_AES_X86_64=m
# CONFIG_CRYPTO_AES_NI_INTEL is not set
# CONFIG_CRYPTO_ANUBIS is not setCONFIG_CRYPTO_ARC4=mCONFIG_CRYPTO_BLOWFISH=mCONFIG_CRYPTO_CAMELLIA=mCONFIG_CRYPTO_CAST5=mCONFIG_CRYPTO_CAST6=m
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_FCRYPT is not set
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_SALSA20 is not set
# CONFIG_CRYPTO_SALSA20_X86_64 is not set
# CONFIG_CRYPTO_SEED is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_TEA is not setCONFIG_CRYPTO_TWOFISH=mCONFIG_CRYPTO_TWOFISH_COMMON=mCONFIG_CRYPTO_TWOFISH_X86_64=m
#
# Compression
#CONFIG_CRYPTO_DEFLATE=mCONFIG_CRYPTO_ZLIB=mCONFIG_CRYPTO_LZO=y
#
# Random Number Generation
#CONFIG_CRYPTO_ANSI_CPRNG=m
# CONFIG_CRYPTO_HW is not setCONFIG_HAVE_KVM=y
# CONFIG_VIRTUALIZATION is not set
# CONFIG_BINARY_PRINTF is not set
#
# Library routines
#CONFIG_BITREVERSE=yCONFIG_GENERIC_FIND_FIRST_BIT=yCONFIG_GENERIC_FIND_NEXT_BIT=yCONFIG_GENERIC_FIND_LAST_BIT=y
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
# CONFIG_CRC_T10DIF is not set
# CONFIG_CRC_ITU_T is not setCONFIG_CRC32=y
# CONFIG_CRC7 is not setCONFIG_LIBCRC32C=yCONFIG_ZLIB_INFLATE=yCONFIG_ZLIB_DEFLATE=yCONFIG_LZO_COMPRESS=yCONFIG_LZO_DECOMPRESS=yCONFIG_TEXTSEARCH=yCONFIG_TEXTSEARCH_KMP=mCONFIG_TEXTSEARCH_BM=mCONFIG_TEXTSEARCH_FSM=mCONFIG_HAS_IOMEM=yCONFIG_HAS_IOPORT=yCONFIG_HAS_DMA=yCONFIG_NLATTR=y
Quoted 5 lines · Pavel Vasilyev
This patch replace all
strncmp(a, b, c)bymemcmp(a, b, c).I test on
x86_64(AMD Opteron 285).
Quoted 8 lines
#include <
string.h>
char *A = "0000";void test_memcmp(void) { memcmp(A, "TEST", 4); } void test_strn(void) { strncmp(A, "TEST", 4); }
This is plain wrong, memcmp() doesn't handle the case that 'a' is shorter than 'b', it may access beyond '\0'.
Quoted 1 line · Pavel Vasilyev
This patch replace all
strncmp(a, b, c)bymemcmp(a, b, c).
Those two calls are not equivalent. Think what happens when a or b are shorter than n and one of them is at the end of a page before a memory hole.
-Andi
Signature · 1 line
[email protected] -- Speaking for myself only.
Steven Rostedt
maintainerQuoted 1 line · Pavel Vasilyev
This patch replace all
strncmp(a, b, c)bymemcmp(a, b, c).
But these are not the same. strncmp() will stop when a or b hit a null. I'm not sure if memcmp() must do so, It may for some reason check anything within the memory of a+c-1 or b+c-1. What happens if a or b are right at the end of a vmalloc page, and is just a single character and null?
x = vmalloc(32); strcpy(x, "some 31 byte string + null"); call_func(x + 31);
in call_func we have:
call_func(char *a) {
strncmp(a, "this is some big string", 23);With strncmp() when we hit a+1, it will stop comparing because a+1 is null. With memcmp there's no such guarantee. We can then take a kernel oops.
That will be a nice thing to try to debug.
Yes the above is contrived, but it demonstrates a possible problem with this conversion.
-- Steve
Quoted 26 lines
I test on
x86_64(AMD Opteron 285).#include <
string.h>
char *A = "0000";void test_memcmp(void) { memcmp(A, "TEST", 4); } void test_strn(void) { strncmp(A, "TEST", 4); } # gcc -c -O2 test.c # objdump -d test.o ...0000000000000020 <
test_strncmp>:20: f3 c3 repz retq 22: 66 66 66 66 66 2e 0f data32 data32 data32 data32 nopw%cs:0x0(%rax,%rax,1)
29: 1f 84 00 00 00 00 000000000000000030 <
test_memcmp>:
30: f3 c3 repz retqWow, minus one commad :)
Quoted 19 lines · Steven Rostedt
Quoted 1 line · Pavel Vasilyev
This patch replace all
strncmp(a, b, c)bymemcmp(a, b, c).But these are not the same.
strncmp()will stop when a or b hit a null. I'm not sure ifmemcmp()must do so, It may for some reason check anything within the memory of a+c-1 or b+c-1. What happens if a or b are right at the end of a vmalloc page, and is just a single character and null?x = vmalloc(32); strcpy(x, "some 31 byte string + null"); call_func(x + 31);in
call_funcwe have:call_func(char *a) { strncmp(a, "this is some big string", 23);
Quoted 8 lines
With
strncmp()when we hit a+1, it will stop comparing because a+1 is null. With memcmp there's no such guarantee. We can then take a kernel oops.That will be a nice thing to try to debug.
Yes the above is contrived, but it demonstrates a possible problem with this conversion.
#include <stdio.h>
#include <errno.h>
char STR[5] = {'X','X','\0','X','X'};
char *XXX = "XX\0XX";
int main ()
{
int a, b;
a = memcmp (XXX, STR, 5);
b = strcmp (XXX, STR); printf (": %d %d \n", a, b);
return 0;
}
./a.out
0 0
:)
#gdb ./a.out
(gdb) b main
Breakpoint 1 at 0x4005dc: file test.c, line 10.
(gdb) run
Starting program: /tmp/a.out
Breakpoint 1, main () at test.c:10
10 a = memcmp (STR, XXX, 5);
(gdb) print XXX
$1 = 0x400731 "XX"
(gdb) print STR
$2 = "XX\000XX"
....
Oops, variable XXX set to XX, var. STR not changed.
Seems to me, that they into strsmp() and memcmp() already gets without the null character.
P.S.
pavel@suse64:/tmp> gcc -v
Using built-in specs.
COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.5/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.5 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.5 --enable-linux-futex --without-system-libunwind --enable-gold --with-plugin-ld=/usr/bin/gold --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.5.1 20101116 [gcc-4_5-branch revision 166793] (SUSE Linux
Signature · 1 line
Pavel.
Steven Rostedt
maintainerQuoted 39 lines · Pavel Vasilyev
Quoted 19 lines · Steven Rostedt
Quoted 1 line · Pavel Vasilyev
This patch replace all
strncmp(a, b, c)bymemcmp(a, b, c).But these are not the same.
strncmp()will stop when a or b hit a null. I'm not sure ifmemcmp()must do so, It may for some reason check anything within the memory of a+c-1 or b+c-1. What happens if a or b are right at the end of a vmalloc page, and is just a single character and null?x = vmalloc(32); strcpy(x, "some 31 byte string + null"); call_func(x + 31);in
call_funcwe have:call_func(char *a) { strncmp(a, "this is some big string", 23);Quoted 8 lines
With
strncmp()when we hit a+1, it will stop comparing because a+1 is null. With memcmp there's no such guarantee. We can then take a kernel oops.That will be a nice thing to try to debug.
Yes the above is contrived, but it demonstrates a possible problem with this conversion.
#include <
stdio.h>
#include <errno.h>char STR[5] = {'X','X','\0','X','X'};
char *XXX = "XX\0XX";int main ()
{int a, b; a = memcmp (XXX, STR, 5); b = strcmp (XXX, STR);
Quoted 7 lines
printf (": %d %d \n", a, b);
return 0;
}
./a.out
0 0:)
Um, do you realize that the kernel does not always use the same memcmp as gcc.
Quoted 18 lines
#gdb ./a.out
(gdb) b main
Breakpoint 1 at0x4005dc: filetest.c, line 10.
(gdb) run
Starting program:/tmp/a.outBreakpoint 1, main () at test.c:10
10 a = memcmp (STR, XXX, 5);
(gdb) print XXX
$1 =0x400731"XX"
(gdb) print STR
$2 = "XX\000XX"
....
Oops, variable XXX set to XX, var. STR not changed.
Seems to me, that they intostrsmp()andmemcmp()already gets without the null character.
Quoted 2 lines
P.S.
pavel@suse64:/tmp> gcc -v
This is meaningless, because the kernel may have its own memcmp and strncmp.
And you seem to be missing my point. I'm not saying that it will give you an incorrect result, I'm saying that if memcmp simply reads the memory that is not mapped in, then you might cause the kernel to crash.
This is fine if all implementations of memcmp() reads the data sequentially and stops when not equal. If for some reason there's an implementation that compares, not from the beginning of the data, but say from the end, then this can cause a fault.
Note, that strncmp and memcmp act differently for:
(a, b, c) where c is larger than strlen(a)+1 and strlen(b)+1,
and the two match. Try it:
char *a = "abc\0 123";
char *b = "abc\0 456";
printf("%d %d\n", strncmp(a, b, 10), memcmp(a, b, 10));-- Steve
Quoted 20 lines
Using built-in specs.
COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.5/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.5 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.5 --enable-linux-futex --without-system-libunwind --enable-gold --with-plugin-ld=/usr/bin/gold --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.5.1 20101116 [gcc-4_5-branch revision 166793] (SUSE Linux
Steven Rostedt
maintainerQuoted 3 lines · Steven Rostedt
Um, do you realize that the kernel does not always use the same memcmp as gcc.
Note, I'm not against the change, because in 99% of the cases, memcmp() can and will be faster, and we don't need to worry about these strange cases.
What I'm against is a blind s/strncmp/memcmp/ of the kernel, because it may have side effects that you may not have thought of.
-- Steve
Quoted 5 lines · Steven Rostedt
Quoted 3 lines · Steven Rostedt
Um, do you realize that the kernel does not always use the same memcmp as gcc.
Quoted 7 lines
Note, I'm not against the change, because in 99% of the cases,
memcmp()can and will be faster, and we don't need to worry about these strange cases.What I'm against is a blind s/strncmp/memcmp/ of the kernel, because it may have side effects that you may not have thought of.
Then we have to hang a large banner that is visible to all developers. "Change wherever possible strncmp to memcmp," :)
Signature · 1 line
Pavel.
Quoted 10 lines · Pavel Vasilyev
Quoted 9 lines · Steven Rostedt
Quoted 3 lines · Steven Rostedt
Um, do you realize that the kernel does not always use the same memcmp as gcc.
Note, I'm not against the change, because in 99% of the cases,
memcmp()can and will be faster, and we don't need to worry about these strange cases.
Quoted 6 lines
Quoted 3 lines
What I'm against is a blind s/strncmp/memcmp/ of the kernel, because it may have side effects that you may not have thought of.
Then we have to hang a large banner that is visible to all developers. "Change wherever possible strncmp to memcmp," :)
Why? Strings are strings, they are ended by '\0', well-deserved to use str*() functions rather than mem*().
Quoted 9 lines · Steven Rostedt
Quoted 3 lines · Steven Rostedt
Um, do you realize that the kernel does not always use the same memcmp as gcc.
Note, I'm not against the change, because in 99% of the cases,
memcmp()can and will be faster, and we don't need to worry about these strange cases.
It can still break things in subtle ways. Lots of the replacements are of the form:
if (strncmp(string, "foo", 3) == 0)
Which can only be replaced with memcmp if the minimum length of string is _always_ 3. This may be true for some callsites (with careful audit), but in general I doubt it is and it will lead to subtle bugs.
I hardly think it is worth auditing a bunch of strncmp calls to ensure that the minimum length of the checked string is always n in order to remove a single instruction. Making such a change will also introduce subtle bugs if the rules for the string ever change, eg. a change is made to allow string = "".
~Ryan
Signature · 7 lines
Bluewater Systems Ltd - ARM Technology Solution Centre Ryan Mallon 5 Amuri Park, 404 Barbadoes St [email protected] PO Box 13 889, Christchurch 8013 http://www.bluewatersys.com New Zealand Phone: +64 3 3779127 Freecall: Australia 1800 148 751 Fax: +64 3 3779135 USA 1800 261 2934
On Die, 2010-11-30 at 11:51 +1300, Ryan Mallon wrote:
[...]
Quoted 9 lines
It can still break things in subtle ways. Lots of the replacements are of the form:
if (
strncmp(string, "foo", 3)== 0)Which can only be replaced with memcmp if the minimum length of string is _always_ 3. This may be true for some callsites (with careful audit), but in general I doubt it is and it will lead to subtle bugs.
Quoted 5 lines
I hardly think it is worth auditing a bunch of strncmp calls to ensure that the minimum length of the checked string is always n in order to remove a single instruction. Making such a change will also introduce subtle bugs if the rules for the string ever change, eg. a change is made to allow string = "".
On the conceptual level:
And it will confuse people if strings (read: '\0' terminated char arrays specified by a pointer to the start) with raw memory (read: memory with arbitrary content - including '\0' not at the end - specified by a pointer to the start and the valid size).
Even more confusing is that raw memory *may* hold a string ...
Don't get me wrong: every seasoned C programmer should know that. But not everyone is one ...
Bernd
Signature · 2 lines
Bernd Petrovitsch Email : [email protected] LUGA : http://www.luga.at
Hi,
Quoted 7 lines · Pavel Vasilyev
This patch replace all
strncmp(a, b, c)by memcmp(a, b, c).I test on
x86_64(AMD Opteron 285).#include <
string.h>
Could you at least do your "performance/code analysis" [NDLR: ahem...] in a kernel environment ? <string.h> only belongs to userland and the "K" of lkml stands for "kernel".
Thanks,
- Arnaud
ps: please don't send a +500k on the list, that's rude to many people.
Quoted 4 lines · Pavel Vasilyev
This patch replace all
strncmp(a, b, c)bymemcmp(a, b, c).I test on
x86_64(AMD Opteron 285).
Quoted 8 lines
#include <
string.h>
char *A = "0000";void test_memcmp(void) { memcmp(A, "TEST", 4); } void test_strn(void) { strncmp(A, "TEST", 4); }
[...]
You use constant parameters with user-space functions defined by the C-standard on one architecture (and CPU?) - and even worse the width is 4 so - for the memcmp() case - it boilsdown to a comparison of unsigned ints.
So that example is (also) completely worthless.
Bernd
Signature · 2 lines
Bernd Petrovitsch Email : [email protected] LUGA : http://www.luga.at