removing redundant ifdefs
Subsystems (18)
PATCH 1/1 removing redundant ifdefs
removing redundant ifdefs.
the pattern is
#ifdef DEF1 ... #ifdef DEF1 ... #endif ... #endif
and removing the inner ifdef.
I found them using script all over the kernel so
I haven't even compile-tested some of them.
I CCed all the related maintainers, sorry if I put any wrong one.
wbr,
jirka
--- arch/arm/include/asm/processor.h | 2 -- arch/arm/mach-ixp23xx/include/mach/platform.h | 3 --- arch/arm/plat-omap/include/plat/clock.h | 5 ----- arch/h8300/include/asm/tlb.h | 13 ------------- arch/ia64/include/asm/mmzone.h | 4 ---- arch/mn10300/include/asm/pgtable.h | 4 ---- arch/parisc/kernel/unaligned.c | 2 -- arch/powerpc/include/asm/vdso_datapage.h | 2 -- arch/powerpc/kernel/traps.c | 2 -- arch/s390/include/asm/processor.h | 5 ----- arch/s390/kernel/vdso.c | 4 ---- arch/x86/kernel/early-quirks.c | 2 -- drivers/ata/ahci.c | 2 -- drivers/scsi/aic7xxx_old.c | 2 -- drivers/usb/musb/musb_core.h | 9 --------- drivers/video/atafb.c | 2 -- drivers/video/matrox/matroxfb_DAC1064.c | 5 +---- fs/ext4/super.c | 2 -- include/linux/socket.h | 4 ---- kernel/sched.c | 6 ------ kernel/srcu.c | 2 -- security/capability.c | 2 -- sound/pci/au88x0/au88x0_core.c | 4 ---- 23 files changed, 1 insertions(+), 87 deletions(-)
PATCH 1/13 kernel/fs/security: removing redundant ifdefs
wbr,
jirka
--- fs/ext4/super.c | 2 -- include/linux/socket.h | 4 ---- kernel/sched.c | 6 ------ kernel/srcu.c | 2 -- security/capability.c | 2 -- sound/pci/au88x0/au88x0_core.c | 4 ---- 6 files changed, 0 insertions(+), 20 deletions(-)
fs/ext4/super.c +0 -2
@@ -1067,9 +1067,7 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type, const char *data, size_t len, loff_t off);static const struct dquot_operations ext4_quota_operations = { -#ifdef CONFIG_QUOTA .get_reserved_space = ext4_get_reserved_space, -#endif .write_dquot = ext4_write_dquot, .acquire_dquot = ext4_acquire_dquot, .release_dquot = ext4_release_dquot,
include/linux/socket.h +0 -4
@@ -27,12 +27,10 @@ struct __kernel_sockaddr_storage {#define __sockaddr_check_size (size) \ BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage))) -#ifdef __KERNEL__# ifdef CONFIG_PROC_FS struct seq_file ;extern void socket_seq_show (struct seq_file *seq);# endif -#endif /* __KERNEL__ */ typedef unsigned short sa_family_t ;
@@ -305,7 +303,6 @@ struct ucred {/* IPX options */ #define IPX_TYPE 1 -#ifdef __KERNEL__extern int memcpy_fromiovec (unsigned char *kdata,struct iovec *iov,int len);extern int memcpy_fromiovecend (unsigned char *kdata,const struct iovec *iov,int offset,int len);
@@ -326,6 +323,5 @@ struct timespec;extern int __sys_recvmmsg (int fd,struct mmsghdr __user *mmsg,unsigned int vlen,unsigned int flags,struct timespec *timeout); -#endif #endif /* not kernel and not glibc */ #endif /* _LINUX_SOCKET_H */
kernel/sched.c +0 -6
@@ -311,12 +311,8 @@ static inline struct task_group *task_group(struct task_struct *p) {struct task_group *tg; -#ifdef CONFIG_CGROUP_SCHED tg =container_of (task_subsys_state (p, cpu_cgroup_subsys_id), struct task_group, css); -#else - tg = &init_task_group; -#endif return tg; }
@@ -471,9 +467,7 @@ struct root_domain {*/ cpumask_var_t rto_mask;atomic_t rto_count; -#ifdef CONFIG_SMP struct cpupri cpupri; -#endif };/*
kernel/srcu.c +0 -2
@@ -46,11 +46,9 @@ static int init_srcu_struct_fields(struct srcu_struct *sp)int __init_srcu_struct (struct srcu_struct *sp,const char *name,struct lock_class_key *key) { -#ifdef CONFIG_DEBUG_LOCK_ALLOC /* Don't re-initialize a lock while it is held. */ debug_check_no_locks_freed ((void *)sp,sizeof (*sp));lockdep_init_map (&sp->dep_map, name, key,0 ); -#endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ return init_srcu_struct_fields (sp); }EXPORT_SYMBOL_GPL (__init_srcu_struct);
security/capability.c +0 -2
@@ -698,9 +698,7 @@ static int cap_socket_getpeersec_dgram(struct socket *sock,static int cap_sk_alloc_security (struct sock *sk,int family,gfp_t priority) { -#ifdef CONFIG_SECURITY_NETWORK sk->sk_security =NULL ; -#endif return 0 ; }
sound/pci/au88x0/au88x0_core.c +0 -4
@@ -941,10 +941,8 @@ vortex_fifo_setwtctrl(vortex_t * vortex, int fifo, int ctrl, int priority, temp = (temp &0xf7ffffff ) | ((f &1 ) <<0x1b ); temp = (temp &0xefffffff ) | ((f &1 ) <<0x1c );#endif -#ifdef CHIP_AU8810 temp = (temp &0xfeffffff ) | ((f &1 ) <<0x18 ); temp = (temp &0xfdffffff ) | ((f &1 ) <<0x19 ); -#endif } }else {if (temp &FIFO_VALID ) {
@@ -955,10 +953,8 @@ vortex_fifo_setwtctrl(vortex_t * vortex, int fifo, int ctrl, int priority,temp ((f &1 ) <<0x1b ) | (temp &0xe7ffffef ) |FIFO_BITS ;#endif -#ifdef CHIP_AU8810 temp ((f &1 ) <<0x18 ) | (temp &0xfcffffef ) |FIFO_BITS ; -#endif }else /*if (this_8[fifo]) */ vortex_fifo_clearwtdata (vortex, fifo,FIFO_SIZE );
Signature · 1 line
1.6.6.1
PATCH 2/13 ia64: removing redundant ifdef
In reply to Jiri Olsawbr,
jirka
--- arch/ia64/include/asm/mmzone.h | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
arch/ia64/include/asm/mmzone.h +0 -4
@@ -19,16 +19,12 @@static inline int pfn_to_nid (unsigned long pfn) { -#ifdef CONFIG_NUMA extern int paddr_to_nid (unsigned long );int nid =paddr_to_nid (pfn <<PAGE_SHIFT );if (nid <0 )return 0 ;else return nid; -#else -return 0 ; -#endif }#ifdef CONFIG_IA64_DIG /* DIG systems are small */
Signature · 1 line
1.6.6.1
PATCH 3/13 arm: removing redundant ifdefs
In reply to Jiri Olsawbr,
jirka
--- arch/arm/include/asm/processor.h | 2 -- arch/arm/mach-ixp23xx/include/mach/platform.h | 3 --- arch/arm/plat-omap/include/plat/clock.h | 5 ----- 3 files changed, 0 insertions(+), 10 deletions(-)
arch/arm/include/asm/processor.h +0 -2
@@ -22,11 +22,9 @@#include <asm/ptrace.h> #include <asm/types.h> -#ifdef __KERNEL__#define STACK_TOP ((current->personality & ADDR_LIMIT_32BIT) ? \ TASK_SIZE : TASK_SIZE_26)#define STACK_TOP_MAX TASK_SIZE -#endif union debug_insn {u32 arm;
arch/arm/mach-ixp23xx/include/mach/platform.h +0 -3
@@ -43,7 +43,6 @@ extern struct sys_timer ixp23xx_timer;#define IXP23XX_UART_XTAL 14745600 -#ifndef __ASSEMBLY__/* * Is system memory on the XSI or CPP bus? */
@@ -51,7 +50,5 @@ static inline unsigned ixp23xx_cpp_boot(void) {return (*IXP23XX_EXP_CFG0 &IXP23XX_EXP_CFG0_XSI_NOT_PRES ); } -#endif -#endif
arch/arm/plat-omap/include/plat/clock.h +0 -5
@@ -133,17 +133,12 @@ struct clk {__s8 usecount;u8 fixed_div;u8 flags; -#ifdef CONFIG_ARCH_OMAP2PLUS void __iomem *clksel_reg;u32 clksel_mask;const struct clksel *clksel;struct dpll_data *dpll_data;const char *clkdm_name;struct clockdomain *clkdm; -#else -__u8 rate_offset; -__u8 src_offset; -#endif #if defined(CONFIG_PM_DEBUG ) && defined(CONFIG_DEBUG_FS )struct dentry *dent;/* For visible tree hierarchy */ #endif
Signature · 1 line
1.6.6.1
Re: [PATCH 03/13] arm: removing redundant ifdefs
Ah, it's finally come through.
arch/arm/include/asm/processor.h line 29
Quoted 11 lines · Jiri Olsa
arch/arm/include/asm/processor.h +0
-2@@ -22,11 +22,9 @@#include <asm/ptrace.h> #include <asm/types.h> -#ifdef __KERNEL__#define STACK_TOP ((current->personality & ADDR_LIMIT_32BIT) ? \ TASK_SIZE : TASK_SIZE_26)#define STACK_TOP_MAX TASK_SIZE -#endif
This one is correct.
Quoted 11 lines
arch/arm/mach-ixp23xx/include/mach/platform.h +0
-1@@ -43,7 +43,6 @@ extern struct sys_timer ixp23xx_timer;#define IXP23XX_UART_XTAL 14745600 -#ifndef __ASSEMBLY__/* * Is system memory on the XSI or CPP bus? */
arch/arm/mach-ixp23xx/include/mach/platform.h static inline unsigned ixp23xx_cpp_boot(void) · line 54
Quoted 4 lines
arch/arm/mach-ixp23xx/include/mach/platform.h +0
-1@@ -51,7 +50,5 @@ static inline unsigned ixp23xx_cpp_boot(void) {return (*IXP23XX_EXP_CFG0 &IXP23XX_EXP_CFG0_XSI_NOT_PRES ); } -#endif
Ok too.
Quoted 7 lines
arch/arm/plat-omap/include/plat/clock.h +0
-1@@ -133,17 +133,12 @@ struct clk {__s8 usecount;u8 fixed_div;u8 flags; -#ifdef CONFIG_ARCH_OMAP2PLUS
arch/arm/plat-omap/include/plat/clock.h struct clk { · line 146
Quoted 10 lines
arch/arm/plat-omap/include/plat/clock.h +0
-4void __iomem *clksel_reg;u32 clksel_mask;const struct clksel *clksel;struct dpll_data *dpll_data;const char *clkdm_name;struct clockdomain *clkdm; -#else -__u8 rate_offset; -__u8 src_offset; -#endif
This is wrong. There is a preceding #ifdef CONFIG_ARCH_OMAP2PLUS, but there's also a preceding #endif terminating that conditional section.
PATCH 4/13 x86: removing redundant ifdef
In reply to Jiri Olsawbr,
jirka
--- arch/x86/kernel/early-quirks.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
arch/x86/kernel/early-quirks.c +0 -2
@@ -97,7 +97,6 @@ static void __init nvidia_bugs(int num, int slot, int func) }#if defined(CONFIG_ACPI ) && defined(CONFIG_X86_IO_APIC ) -#if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)static u32 __init ati_ixp4x0_rev (int num,int slot,int func) {u32 d;
@@ -115,7 +114,6 @@ static u32 __init ati_ixp4x0_rev(int num, int slot, int func) d &=0xff ;return d; } -#endif static void __init ati_bugs (int num,int slot,int func) {
Signature · 1 line
1.6.6.1
PATCH 5/13 s390: removing redundant ifdefs
In reply to Jiri Olsawbr,
jirka
--- arch/s390/include/asm/processor.h | 5 ----- arch/s390/kernel/vdso.c | 4 ---- 2 files changed, 0 insertions(+), 9 deletions(-)
arch/s390/include/asm/processor.h +0 -5
@@ -52,8 +52,6 @@ extern int get_cpu_capability(unsigned int *);#endif /* __s390x__ */ -#ifdef __KERNEL__ -#ifndef __s390x__#define STACK_TOP (1UL << 31)#define STACK_TOP_MAX (1UL << 31)
@@ -62,9 +60,6 @@ extern int get_cpu_capability(unsigned int *);#define STACK_TOP_MAX (1UL << 42)#endif /* __s390x__ */ - -#endif -#define HAVE_ARCH_PICK_MMAP_LAYOUT typedef struct {
arch/s390/kernel/vdso.c +0 -4
@@ -102,11 +102,7 @@ static void vdso_init_per_cpu_data(int cpu, struct vdso_per_cpu_data *vpcd)/* * Allocate/free per cpu vdso data. */ -#ifdef CONFIG_64BIT #define SEGMENT_ORDER 2 -#else -#define SEGMENT_ORDER 1 -#endif int vdso_alloc_per_cpu (int cpu,struct _lowcore *lowcore) {
Signature · 1 line
1.6.6.1
Re: [PATCH 05/13] s390: removing redundant ifdefs
Quoted 24 lines · Jiri Olsa
wbr,
jirkaSigned-off-by Jiri Olsa <[email protected]>--- arch/s390/include/asm/processor.h | 5 ----- arch/s390/kernel/vdso.c | 4 ---- 2 files changed, 0 insertions(+), 9 deletions(-)arch/s390/include/asm/processor.h +0
-2@@ -52,8 +52,6 @@ extern int get_cpu_capability(unsigned int *);#endif /* __s390x__ */ -#ifdef __KERNEL__ -#ifndef __s390x__#define STACK_TOP (1UL << 31)#define STACK_TOP_MAX (1UL << 31)
arch/s390/include/asm/processor.h extern int get_cpu_capability(unsigned int *); · line 67
Quoted 6 lines
arch/s390/include/asm/processor.h +0
-3@@ -62,9 +60,6 @@ extern int get_cpu_capability(unsigned int *);#define STACK_TOP_MAX (1UL << 42)#endif /* __s390x__ */ - -#endif -
Dunno. This looks a bit pointless. After all any ifdef __KERNEL__ is not needed for this header file since its not exported.
So removing this ifdef and keep the other one doesn't make too much sense.
arch/s390/kernel/vdso.c static void vdso_init_per_cpu_data(int cpu, struct vdso_per_cpu_data *vpcd) · line 109
Quoted 13 lines
arch/s390/kernel/vdso.c +0
-4@@ -102,11 +102,7 @@ static void vdso_init_per_cpu_data(int cpu, struct vdso_per_cpu_data *vpcd)/* * Allocate/free per cpu vdso data. */ -#ifdef CONFIG_64BIT #define SEGMENT_ORDER 2 -#else -#define SEGMENT_ORDER 1 -#endif
An identical patch for this hunk is alread pending in the git s390 tree.
PATCH 6/13 mn10300: removing redundant ifdef
In reply to Jiri Olsawbr,
jirka
--- arch/mn10300/include/asm/pgtable.h | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
arch/mn10300/include/asm/pgtable.h +0 -4
@@ -213,8 +213,6 @@ do { \#define pages_to_mb (x) ((x) >> (20 - PAGE_SHIFT)) -#ifndef __ASSEMBLY__ -/* * The following only work if pte_present() is true. * Undefined behaviour if not..
@@ -468,8 +466,6 @@ static inline int set_kernel_exec(unsigned long vaddr, int enable)extern void update_mmu_cache (struct vm_area_struct *vma,unsigned long address,pte_t *ptep); -#endif /* !__ASSEMBLY__ */ -#define kern_addr_valid (addr) (1)#define io_remap_pfn_range (vma, vaddr, pfn, size, prot) \
Signature · 1 line
1.6.6.1
Re: [PATCH 06/13] mn10300: removing redundant ifdef
Quoted 1 line · Jiri Olsa
Signed-off-by Jiri Olsa <[email protected]>
PATCH 7/13 h8300: removing redundant ifdef
In reply to Jiri Olsawbr,
jirka
--- arch/h8300/include/asm/tlb.h | 13 ------------- 1 files changed, 0 insertions(+), 13 deletions(-)
arch/h8300/include/asm/tlb.h +0 -13
@@ -7,17 +7,4 @@#define tlb_flush (tlb) do { } while(0) -/* -include/asm-h8300/tlb.h -*/ - -#ifndef __H8300_TLB_H__ -#define __H8300_TLB_H__ - -#define tlb_flush (tlb) do { } while(0) - -#include <asm-generic/tlb.h> - -#endif -#endif
Signature · 1 line
1.6.6.1
PATCH 8/13 powerpc: removing redundant ifdefs
In reply to Jiri Olsawbr,
jirka
--- arch/powerpc/include/asm/vdso_datapage.h | 2 -- arch/powerpc/kernel/traps.c | 2 -- 2 files changed, 0 insertions(+), 4 deletions(-)
arch/powerpc/include/asm/vdso_datapage.h +0 -2
@@ -114,9 +114,7 @@ struct vdso_data {#endif /* CONFIG_PPC64 */ -#ifdef __KERNEL__extern struct vdso_data *vdso_data; -#endif #endif /* __ASSEMBLY__ */
arch/powerpc/kernel/traps.c +0 -2
@@ -1140,14 +1140,12 @@ void __kprobes DebugException(struct pt_regs *regs, unsigned long debug_status)if (user_mode (regs)) { current->thread.dbcr0 &= ~DBCR0_IC ; -#ifdef CONFIG_PPC_ADV_DEBUG_REGS if (DBCR_ACTIVE_EVENTS (current->thread.dbcr0, current->thread.dbcr1)) regs->msr |=MSR_DE ;else /* Make sure the IDM bit is off */ current->thread.dbcr0 &= ~DBCR0_IDM ; -#endif }_exception (SIGTRAP , regs,TRAP_TRACE , regs->nip);
Signature · 1 line
1.6.6.1
PATCH 9/13 parisc: removing redundant ifdef
In reply to Jiri Olsawbr,
jirka
--- arch/parisc/kernel/unaligned.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
arch/parisc/kernel/unaligned.c +0 -2
@@ -620,14 +620,12 @@ void handle_unaligned(struct pt_regs *regs) ret =emulate_std (regs,R2 (regs->iir),1 );break ; -#ifdef CONFIG_PA20 case OPCODE_LDD_L : ret =emulate_ldd (regs,R2 (regs->iir),0 );break ;case OPCODE_STD_L : ret =emulate_std (regs,R2 (regs->iir),0 );break ; -#endif }#endif switch (regs->iir & OPCODE3_MASK)
Signature · 1 line
1.6.6.1
Re: [PATCH 09/13] parisc: removing redundant ifdef
Quoted 5 lines · Jiri Olsa
wbr,
jirkaSigned-off-by Jiri Olsa <[email protected]>
Thanks, looks good. Applied.
--Kyle
PATCH 10/13 drivers/scsi: removing redundant ifdef
In reply to Jiri Olsawbr,
jirka
--- drivers/scsi/aic7xxx_old.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/scsi/aic7xxx_old.c +0 -2
@@ -9655,9 +9655,7 @@ aic7xxx_detect(struct scsi_host_template *template) found++;continue ; skip_pci_controller: -#ifdef CONFIG_PCI pci_release_regions (temp_p->pdev); -#endif kfree (temp_p); }/* Found an Adaptec PCI device. */ else /* Well, we found one, but we couldn't get any memory */
Signature · 1 line
1.6.6.1
PATCH 11/13 drivers/video: removing redundant ifdefs
In reply to Jiri Olsawbr,
jirka
--- drivers/video/atafb.c | 2 -- drivers/video/matrox/matroxfb_DAC1064.c | 5 +---- 2 files changed, 1 insertions(+), 6 deletions(-)
drivers/video/atafb.c +0 -2
@@ -1718,11 +1718,9 @@ static int falcon_setcolreg(unsigned int regno, unsigned int red, (((red &0xe000 ) >>13 ) | ((red &0x1000 ) >>12 ) <<8 ) | (((green &0xe000 ) >>13 ) | ((green &0x1000 ) >>12 ) <<4 ) | ((blue &0xe000 ) >>13 ) | ((blue &0x1000 ) >>12 ); -#ifdef ATAFB_FALCON ((u32 *)info->pseudo_palette)[regno] = ((red &0xf800 ) | ((green &0xfc00 ) >>5 ) | ((blue &0xf800 ) >>11 )); -#endif }return 0 ; }
drivers/video/matrox/matroxfb_DAC1064.c +1 -4
@@ -869,12 +869,9 @@ static int MGAG100_preinit(struct matrox_fb_info *minfo) minfo->capable.plnwt = minfo->devflags.accelerator =FB_ACCEL_MATROX_MGAG100 ? minfo->devflags.sgram :1 ; -#ifdef CONFIG_FB_MATROX_G if (minfo->devflags.g450dac) { minfo->outputs[0 ].output = &g450out; - } else -#endif - { + }else { minfo->outputs[0 ].output = &m1064; } minfo->outputs[0 ].src = minfo->outputs[0 ].default_src;
Signature · 1 line
1.6.6.1
PATCH 12/13 drivers/usb/musb: removing redundant ifdefs
In reply to Jiri Olsawbr,
jirka
--- drivers/usb/musb/musb_core.h | 9 --------- 1 files changed, 0 insertions(+), 9 deletions(-)
drivers/usb/musb/musb_core.h +0 -9
@@ -468,10 +468,7 @@ struct musb_csr_regs { };struct musb_context_registers { - -#ifdef CONFIG_PM u32 otg_sysconfig, otg_forcestandby; -#endif u8 power;u16 intrtxe, intrrxe;u8 intrusbe;
@@ -483,16 +480,10 @@ struct musb_context_registers { struct musb_csr_regs index_regs[MUSB_C_NUM_EPS]; }; -#ifdef CONFIG_PM extern void musb_platform_save_context (struct musb *musb,struct musb_context_registers *musb_context);extern void musb_platform_restore_context (struct musb *musb,struct musb_context_registers *musb_context); -#else -#define musb_platform_save_context (m, x) do {} while (0) -#define musb_platform_restore_context (m, x) do {} while (0) -#endif -#endif static inline void musb_set_vbus (struct musb *musb,int is_on)
Signature · 1 line
1.6.6.1
Re: [PATCH 12/13] drivers/usb/musb: removing redundant ifdefs
Hi,
Quoted 4 lines · ext Jiri Olsa
wbr,
jirka
good catch but please add a body here. This problem appeared because those used to be CONFIG_ARCH_OMAP34XX.
Quoted 1 line
Signed-off-by Jiri Olsa <[email protected]>
after adding a body, you can have my:
Signature · 3 lines
balbi DefectiveByDesign.org
PATCH 13/13 drivers/ata: removing redundant ifdef
In reply to Jiri Olsawbr,
jirka
--- drivers/ata/ahci.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/ata/ahci.c +0 -2
@@ -3179,7 +3179,6 @@ static bool ahci_broken_online(struct pci_dev *pdev) #ifdef CONFIG_ATA_ACPI static void ahci_gtf_filter_workaround(struct ata_host *host) { -#ifdef CONFIG_ATA_ACPI static const struct dmi_system_id sysids[] = { /* * Aspire 3810T issues a bunch of SATA enable commands
@@ -3220,7 +3219,6 @@ static void ahci_gtf_filter_workaround(struct ata_host *host)ata_for_each_dev (dev, link,ALL ) dev->gtf_filter |= filter; } -#endif }#else static inline void ahci_gtf_filter_workaround (struct ata_host *host)
Signature · 1 line
1.6.6.1
Re: [PATCH 13/13] drivers/ata: removing redundant ifdef
Quoted 22 lines · Jiri Olsa
wbr,
jirkaSigned-off-by Jiri Olsa<[email protected]>--- drivers/ata/ahci.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)drivers/ata/ahci.c +0
-1@@ -3179,7 +3179,6 @@ static bool ahci_broken_online(struct pci_dev *pdev) #ifdef CONFIG_ATA_ACPI static void ahci_gtf_filter_workaround(struct ata_host *host) { -#ifdef CONFIG_ATA_ACPI static const struct dmi_system_id sysids[] = { /* * Aspire 3810T issues a bunch of SATA enable commands
drivers/ata/ahci.c static void ahci_gtf_filter_workaround(struct ata_host *host) · line 3222
Quoted 5 lines
drivers/ata/ahci.c +0
-1@@ -3220,7 +3219,6 @@ static void ahci_gtf_filter_workaround(struct ata_host *host)ata_for_each_dev (dev, link,ALL ) dev->gtf_filter |= filter; } -#endif }
I don't see this in the linux-next version of ahci.c, so I'm dropping this patch.
Quoted 12 lines · On Thu, 6 May 2010 19:36:04 +0200 Jiri Olsa wrote:
removing redundant ifdefs.
the pattern is
#ifdef DEF1 ... #ifdef DEF1 ... #endif ... #endif
Quoted 4 lines
and removing the inner ifdef.
I found them using script all over the kernel so
I haven't even compile-tested some of them.
what script, please?
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Quoted 16 lines · Randy Dunlap
Quoted 14 lines · On Thu, 6 May 2010 19:36:04 +0200 Jiri Olsa wrote:
removing redundant ifdefs.
the pattern is
#ifdef DEF1 ... #ifdef DEF1 ... #endif ... #endifand removing the inner ifdef.
Quoted 8 lines
Quoted 2 lines
I found them using script all over the kernel so
I haven't even compile-tested some of them.what script, please?
---
~Randy
*** Remember to useDocumentation/SubmitChecklistwhen testing your code ***
I made one after I spot one place like that.. it's simple perl script, which spits many false warnings (attached). I took what I thought was right. I did not want to spend much time with that. ;)
wbr,
jirka
---
#!/usr/bin/perl
my @ifdefs;
my $lnb = 0;
my $file = $ARGV[0];
open FILE, $file or die $!;
while($line = <FILE>) {
chop $line;
$lnb++;
if ($line =~ /^#[ ]*ifdef|^#[ ]*if/) {
my @ifdef = split(/\s/, $line);
my $def = $ifdef[1];
foreach $d(@ifdefs) {
next if ($d ne $def);
print "$file: [$line]\n";
print "$file: got duplicate $def, line $lnb\n";
}
push(@ifdefs, $def);
}
if ($line =~ /^#[ ]*endif/) {
pop(@ifdefs);
}
}Quoted 3 lines · Jiri Olsa
arch/arm/include/asm/processor.h | 2 -- arch/arm/mach-ixp23xx/include/mach/platform.h | 3 --- arch/arm/plat-omap/include/plat/clock.h | 5 -----
I've not received any patches relating to the above, but I seem to have received everything else, including stuff for PPC and x86.
Maybe you've negated the list of people to send patches to?
Quoted 9 lines · Russell King - ARM Linux
Quoted 3 lines · Jiri Olsa
arch/arm/include/asm/processor.h | 2 -- arch/arm/mach-ixp23xx/include/mach/platform.h | 3 --- arch/arm/plat-omap/include/plat/clock.h | 5 -----I've not received any patches relating to the above, but I seem to have received everything else, including stuff for PPC and x86.
Maybe you've negated the list of people to send patches to?
thats strange, I also did not received copy of this part, and I got everything else..
but I checked the lkml and it's there:
http://lkml.org/lkml/2010/5/6/255
not sure whats wrong..
wbr,
jirka