Ignore:
Timestamp:
Aug 22, 2018, 11:55:48 PM (6 years ago)
Author:
viala@…
Message:

Refactoring assert calling to conform with new assert macro.

Made with this command for the general case.
find ./kernel/ hal/ -name "*.c" | xargs sed -i -e '/assert(/ s/,[ ]*FUNCTION[ ]*,/,/'

And some done by hand.

Location:
trunk/hal/tsar_mips32/drivers
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/drivers/soclib_bdv.c

    r451 r492  
    219219    else
    220220    {
    221         assert( false , __FUNCTION__ , "IOC_SYNC_READ should not use IRQ" );
     221        assert( false , "IOC_SYNC_READ should not use IRQ" );
    222222    }
    223223
  • trunk/hal/tsar_mips32/drivers/soclib_nic.c

    r451 r492  
    5353
    5454    // allocate memory for chbuf descriptor (one page)
    55     assert( (sizeof(nic_chbuf_t) <= CONFIG_PPM_PAGE_SIZE ) , __FUNCTION__ ,
     55    assert( (sizeof(nic_chbuf_t) <= CONFIG_PPM_PAGE_SIZE ) ,
    5656            "chbuf descriptor exceeds one page" );
    5757
     
    6262    nic_chbuf_t * chbuf = (nic_chbuf_t *)kmem_alloc( &req );
    6363
    64     assert( (chbuf != NULL) , __FUNCTION__ ,
     64    assert( (chbuf != NULL) ,
    6565             "cannot allocate chbuf descriptor" );
    6666
     
    7272    // allocate containers (one page per container)
    7373    // and complete chbuf descriptor initialization
    74     assert( (CONFIG_PPM_PAGE_SIZE == 4096) , __FUNCTION__ ,
     74    assert( (CONFIG_PPM_PAGE_SIZE == 4096) ,
    7575            "chbuf container must be 4 Kbytes" );
    7676
     
    7979        uint32_t * container = (uint32_t *)kmem_alloc( &req );   
    8080
    81         assert( (container != NULL) , __FUNCTION__ ,
     81        assert( (container != NULL) ,
    8282                "cannot allocate container" );
    8383       
  • trunk/hal/tsar_mips32/drivers/soclib_pic.c

    r481 r492  
    5757    soclib_pic_cluster_t * ext_ptr = LOCAL_CLUSTER->pic_extend;
    5858
    59     assert( (ext_ptr->first_free_wti < ext_ptr->wti_nr) , __FUNCTION__ ,
     59    assert( (ext_ptr->first_free_wti < ext_ptr->wti_nr) ,
    6060            "no free WTI found : too much external IRQs\n");
    6161
     
    146146        if( index < LOCAL_CLUSTER->cores_nr )   // it is an IPI
    147147        {
    148             assert( (index == core->lid) , __FUNCTION__ , "illegal IPI index" );
     148            assert( (index == core->lid) , "illegal IPI index" );
    149149
    150150#if DEBUG_HAL_IRQS
     
    229229        index = pti_status - 1;
    230230
    231         assert( (index == core->lid) , __FUNCTION__ , "unconsistent PTI index\n");
     231        assert( (index == core->lid) , "unconsistent PTI index\n");
    232232
    233233#if DEBUG_HAL_IRQS
     
    292292        core_ext_ptr = kmem_alloc( &req );
    293293
    294         assert( (core_ext_ptr != NULL) , __FUNCTION__ ,
     294        assert( (core_ext_ptr != NULL) ,
    295295                "cannot allocate memory for core extension\n");
    296296   
     
    309309    cluster_ext_ptr = kmem_alloc( &req );
    310310
    311     assert( (cluster_ext_ptr != NULL) , __FUNCTION__ ,
     311    assert( (cluster_ext_ptr != NULL) ,
    312312            "cannot allocate memory for cluster extension\n");
    313313
     
    381381        else if( (func == DEV_FUNC_NIC) && !is_rx ) hwi_id = iopic_input.nic_tx[channel];
    382382        else if(  func == DEV_FUNC_IOB            ) hwi_id = iopic_input.iob;
    383         else      assert( false , __FUNCTION__ , "illegal device functionnal type\n");
     383        else      assert( false , "illegal device functionnal type\n");
    384384
    385385        // get a WTI mailbox from local XCU descriptor 
     
    439439    else
    440440    {
    441         assert( false , __FUNCTION__ , "illegal device functionnal type\n" );
     441        assert( false , "illegal device functionnal type\n" );
    442442    }
    443443}  // end soclib_pic_bind_irq();
     
    474474    else
    475475    {
    476         assert( false , __FUNCTION__ , "illegal IRQ type\n" );
     476        assert( false , "illegal IRQ type\n" );
    477477    }
    478478} // end soclib_pic_enable_irq()
     
    509509    else
    510510    {
    511         assert( false , __FUNCTION__ , "illegal IRQ type\n" );
     511        assert( false , "illegal IRQ type\n" );
    512512    }
    513513} // end soclib_pic_enable_irq()
  • trunk/hal/tsar_mips32/drivers/soclib_tty.c

    r457 r492  
    233233    else
    234234    {
    235         assert( false , __FUNCTION__ , "illegal TXT command\n" );
     235        assert( false , "illegal TXT command\n" );
    236236    }
    237237
     
    329329               
    330330                // check process exist
    331                 assert( (owner_xp != XPTR_NULL) , __FUNCTION__,
     331                assert( (owner_xp != XPTR_NULL) ,
    332332                "TXT owner process not found\n" );
    333333
     
    387387
    388388                // check process exist
    389                 assert( (owner_xp != XPTR_NULL) , __FUNCTION__,
     389                assert( (owner_xp != XPTR_NULL) ,
    390390                "TXT owner process not found\n" );
    391391
Note: See TracChangeset for help on using the changeset viewer.