[rtems commit] libchip/ata: Fix pre-processor symbol evaluation
Joel Sherrill
joel.sherrill at OARcorp.com
Tue Jun 12 13:58:38 UTC 2012
Thanks Sebastian.
I was in the middle of committing this and you beat me to it.
Feature macros in ports should always be defined.
I grep'ed the tree and didn't see any other cases of this
macro being used.
--joel
On 06/12/2012 08:28 AM, Sebastian Huber wrote:
> Module: rtems
> Branch: master
> Commit: 51c85da2ce4f2134271ee16b5427c95a020c282b
> Changeset: http://git.rtems.org/rtems/commit/?id=51c85da2ce4f2134271ee16b5427c95a020c282b
>
> Author: Sebastian Huber<sebastian.huber at embedded-brains.de>
> Date: Tue Jun 12 12:26:35 2012 +0200
>
> libchip/ata: Fix pre-processor symbol evaluation
>
> ---
>
> c/src/libchip/ide/ata.c | 14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/c/src/libchip/ide/ata.c b/c/src/libchip/ide/ata.c
> index 245d6d6..18d8d14 100644
> --- a/c/src/libchip/ide/ata.c
> +++ b/c/src/libchip/ide/ata.c
> @@ -33,7 +33,7 @@ bool ata_trace;
> #define ata_printf if (ata_trace) printf
> #endif
>
> -#if !defined(CPU_SIMPLE_VECTORED_INTERRUPTS)
> +#if CPU_SIMPLE_VECTORED_INTERRUPTS != TRUE
> #include<rtems/irq.h>
> #define ATA_IRQ_CHAIN_MAX_CNT 4 /* support up to 4 ATA devices */
> typedef struct {
> @@ -134,7 +134,7 @@ static bool ata_initialized = false;
> static rtems_id ata_task_id;
> static rtems_id ata_queue_id;
>
> -#if defined(CPU_SIMPLE_VECTORED_INTERRUPTS)
> +#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
> /* Mapping of interrupt vectors to devices */
> static rtems_chain_control ata_int_vec[ATA_MAX_RTEMS_INT_VEC_NUMBER + 1];
> #endif
> @@ -632,7 +632,7 @@ ata_add_to_controller_queue(rtems_device_minor_number ctrl_minor,
> * RETURNS:
> * NONE
> */
> -#if defined(CPU_SIMPLE_VECTORED_INTERRUPTS)
> +#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
> static rtems_isr ata_interrupt_handler(rtems_vector_number vec)
> {
> rtems_chain_node *the_node = rtems_chain_first(&ata_int_vec[vec]);
> @@ -1153,7 +1153,7 @@ rtems_ata_initialize(rtems_device_major_number major,
> dev_t device;
> ata_int_st_t *int_st;
>
> -#if defined(CPU_SIMPLE_VECTORED_INTERRUPTS)
> +#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
> rtems_isr_entry old_isr;
> #else
> int ata_irq_chain_use;
> @@ -1238,7 +1238,7 @@ rtems_ata_initialize(rtems_device_major_number major,
> for (i = 0; i< (2 * IDE_CTRL_MAX_MINOR_NUMBER); i++)
> ata_devs[i].device = ATA_UNDEFINED_VALUE;
>
> -#if defined(CPU_SIMPLE_VECTORED_INTERRUPTS)
> +#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
> /* prepare ATA driver for handling interrupt driven devices */
> for (i = 0; i< ATA_MAX_RTEMS_INT_VEC_NUMBER; i++)
> rtems_chain_initialize_empty(&ata_int_vec[i]);
> @@ -1278,7 +1278,7 @@ rtems_ata_initialize(rtems_device_major_number major,
> }
>
> int_st->ctrl_minor = ctrl_minor;
> -#if defined(CPU_SIMPLE_VECTORED_INTERRUPTS)
> +#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
> status = rtems_interrupt_catch(
> ata_interrupt_handler,
> IDE_Controller_Table[ctrl_minor].int_vec,
> @@ -1330,7 +1330,7 @@ rtems_ata_initialize(rtems_device_major_number major,
> rtems_disk_io_done();
> return status;
> }
> -#if defined(CPU_SIMPLE_VECTORED_INTERRUPTS)
> +#if CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE
> rtems_chain_append(
> &ata_int_vec[IDE_Controller_Table[ctrl_minor].int_vec],
> &int_st->link);
>
> _______________________________________________
> rtems-vc mailing list
> rtems-vc at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-vc
--
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the devel
mailing list