Re: [uClinux-dev] [PATCH] m68k{nommu} : Remove unused DEFINE's from asm-offsets.c

From: Geert Uytterhoeven
Date: Fri Aug 27 2010 - 03:42:16 EST


On Fri, Aug 27, 2010 at 08:08, Greg Ungerer <gerg@xxxxxxxxxxxx> wrote:
> Philippe De Muyter wrote:
>>
>> m68k{nommu}/asm-offsets.c define many constants which are not used
>> anymore anywhere; remove IRQ_DEVID, IRQ_HANDLER, IRQ_NEXT, STAT_IRQ,
>> TASK_ACTIVE_MM, TASK_BLOCKED, TASK_FLAGS, TASK_PTRACE, TASK_STATE,
>> TASK_THREAD_INFO, TI_CPU, TI_EXECDOMAIN and TI_TASK.
>>
>> Signed-off-by: Philippe De Muyter <phdm@xxxxxxxxx>
>
> I have no problem with the m68knommu part. I can push that into
> the m68knommu git tree. Or if the m68k guys are happy I can put
> the whole thing there?

The m68k part is fine, too.

Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

>> ---
>> Âarch/m68k/kernel/asm-offsets.c   Â|  12 ------------
>> Âarch/m68knommu/kernel/asm-offsets.c | Â Â9 ---------
>> Â2 files changed, 0 insertions(+), 21 deletions(-)
>>
>> diff --git a/arch/m68k/kernel/asm-offsets.c
>> b/arch/m68k/kernel/asm-offsets.c
>> index 73e5e58..78e59b8 100644
>> --- a/arch/m68k/kernel/asm-offsets.c
>> +++ b/arch/m68k/kernel/asm-offsets.c
>> @@ -22,13 +22,9 @@
>> Âint main(void)
>> Â{
>> Â Â Â Â/* offsets into the task struct */
>> - Â Â Â DEFINE(TASK_STATE, offsetof(struct task_struct, state));
>> - Â Â Â DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
>> - Â Â Â DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
>> Â Â Â ÂDEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
>> Â Â Â ÂDEFINE(TASK_INFO, offsetof(struct task_struct, thread.info));
>> Â Â Â ÂDEFINE(TASK_MM, offsetof(struct task_struct, mm));
>> - Â Â Â DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
>> Â#ifdef CONFIG_MMU
>> Â Â Â ÂDEFINE(TASK_TINFO, offsetof(struct task_struct, thread.info));
>> Â#endif
>> @@ -64,14 +60,6 @@ int main(void)
>> Â Â Â Â/* bitfields are a bit difficult */
>> Â Â Â ÂDEFINE(PT_OFF_FORMATVEC, offsetof(struct pt_regs, pc) + 4);
>> Â- Â Â Â/* offsets into the irq_handler struct */
>> - Â Â Â DEFINE(IRQ_HANDLER, offsetof(struct irq_node, handler));
>> - Â Â Â DEFINE(IRQ_DEVID, offsetof(struct irq_node, dev_id));
>> - Â Â Â DEFINE(IRQ_NEXT, offsetof(struct irq_node, next));
>> -
>> - Â Â Â /* offsets into the kernel_stat struct */
>> - Â Â Â DEFINE(STAT_IRQ, offsetof(struct kernel_stat, irqs));
>> -
>> Â Â Â Â/* offsets into the irq_cpustat_t struct */
>> Â Â Â ÂDEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t,
>> __softirq_pending));
>> Âdiff --git a/arch/m68knommu/kernel/asm-offsets.c
>> b/arch/m68knommu/kernel/asm-offsets.c
>> index 9a8876f..eca508c 100644
>> --- a/arch/m68knommu/kernel/asm-offsets.c
>> +++ b/arch/m68knommu/kernel/asm-offsets.c
>> @@ -21,14 +21,8 @@
>> Âint main(void)
>> Â{
>> Â Â Â Â/* offsets into the task struct */
>> - Â Â Â DEFINE(TASK_STATE, offsetof(struct task_struct, state));
>> - Â Â Â DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
>> - Â Â Â DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
>> - Â Â Â DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked));
>> Â Â Â ÂDEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
>> - Â Â Â DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack));
>> Â Â Â ÂDEFINE(TASK_MM, offsetof(struct task_struct, mm));
>> - Â Â Â DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
>> Â Â Â Â/* offsets into the irq_cpustat_t struct */
>> Â Â Â ÂDEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t,
>> __softirq_pending));
>> @@ -77,11 +71,8 @@ int main(void)
>> Â Â Â ÂDEFINE(THREAD_SIZE, THREAD_SIZE);
>> Â Â Â Â/* Offsets in thread_info structure */
>> - Â Â Â DEFINE(TI_TASK, offsetof(struct thread_info, task));
>> - Â Â Â DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain));
>> Â Â Â ÂDEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
>> Â Â Â ÂDEFINE(TI_PREEMPTCOUNT, offsetof(struct thread_info,
>> preempt_count));
>> - Â Â Â DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
>> Â Â Â Âreturn 0;
>> Â}

Gr{oetje,eeting}s,

            Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
             Â Â -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/