You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/12/03 04:12:24 UTC

[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2425: log_fcb: optimize finding records towards the end of circular buffer

apache-mynewt-bot removed a comment on pull request #2425:
URL: https://github.com/apache/mynewt-core/pull/2425#issuecomment-737476391


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### sys/log/full/src/log_fcb.c
   <details>
   
   ```diff
   @@ -33,17 +33,18 @@
    static int log_fcb_rtr_erase(struct log *log);
    
    struct log_walk_gte_arg {
   -    struct log          *log;
   -    struct log_offset   *log_offset;
   +    struct log *log;
   +    struct log_offset *log_offset;
        /* output */
   -    struct fcb_entry    *fcb_entry;
   +    struct fcb_entry *fcb_entry;
    };
    
   -int fcb_walk_gte(struct fcb_entry *loc, void *arg)
   +int
   +fcb_walk_gte(struct fcb_entry *loc, void *arg)
    {
        struct log_entry_hdr hdr;
        struct log_walk_gte_arg *lwga = (struct log_walk_gte_arg *)arg;
   -    struct log *log               = lwga->log;
   +    struct log *log = lwga->log;
        struct log_offset *log_offset = lwga->log_offset;
        int rc;
    
   @@ -139,14 +140,14 @@
            fap = (fcb->f_active.fe_area - sizeof(struct flash_area));
        }
    
   -    lwga.log            = log;
   -    lwga.log_offset     = log_offset;
   -    lwga.fcb_entry      = out_entry;
   +    lwga.log = log;
   +    lwga.log_offset = log_offset;
   +    lwga.fcb_entry = out_entry;
        rc = fcb_walk(fcb, fap, fcb_walk_gte, (void *)&lwga);
        /* Not found, try the active area */
        if (rc == 0) {
            fap = fcb->f_active.fe_area;
   -        rc  = fcb_walk(fcb, fap, fcb_walk_gte, (void *)&lwga);
   +        rc = fcb_walk(fcb, fap, fcb_walk_gte, (void *)&lwga);
        }
    
        assert(rc == FCB_FOUND);
   ```
   
   </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:
users@infra.apache.org