apache-mynewt-bot commented on pull request #2319:
URL: https://github.com/apache/mynewt-core/pull/2319#issuecomment-647060644


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### hw/mcu/stm/stm32_common/src/hal_os_tick.c
   <details>
   
   ```diff
   @@ -82,8 +82,7 @@
    
    #else
    
   -struct hal_os_tick
   -{
   +struct hal_os_tick {
        uint32_t rtc_cnt;
    };
    
   @@ -99,8 +98,7 @@
        RTC->CRL = 0;
        /* Read current value of counter. */
        rtc_cnt = (RTC->CNTH << 16u) | RTC->CNTL;
   -    if (RTC->CRL & RTC_CRL_SECF_Msk)
   -    {
   +    if (RTC->CRL & RTC_CRL_SECF_Msk) {
            /* Read again in case it was just incremented. */
            rtc_cnt = (RTC->CNTH << 16u) | RTC->CNTL;
        }
   @@ -124,13 +122,11 @@
        uint32_t rtc_cnt;
        OS_ASSERT_CRITICAL();
    
   -    if (ticks > 1)
   -    {
   +    if (ticks > 1) {
            while ((RTC->CRL & RTC_CRL_RTOFF_Msk) == 0);
            RTC->CRL = RTC_CRL_CNF_Msk;
            rtc_cnt = (RTC->CNTH << 16u) + RTC->CNTL + ticks;
   -        if (RTC->CRL & RTC_CRL_SECF_Msk)
   -        {
   +        if (RTC->CRL & RTC_CRL_SECF_Msk) {
                /* Just ticked reduce ticks by one. */
                rtc_cnt = (RTC->CNTH << 16u) + RTC->CNTL + ticks - 1;
            }
   @@ -141,9 +137,7 @@
            RTC->CRH = RTC_CRH_ALRIE_Msk;
            /* Finish configuration. */
            RTC->CRL &= ~RTC_CRL_CNF_Msk;
   -    }
   -    else
   -    {
   +    } else   {
            /* Disable alarm, enable tick interrupt. */
            RTC->CRH = RTC_CRH_SECIE_Msk;
        }
   @@ -151,8 +145,7 @@
        __DSB();
        __WFI();
    
   -    if (ticks > 0)
   -    {
   +    if (ticks > 0) {
            /*
             * Update OS time before anything else when coming out of
             * the tickless regime.
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to