Ignore:
Timestamp:
Jan 17, 2014, 1:57:08 AM (6 years ago)
Author:
Nick Withers <nick.withers@…>
Branches:
4.11, master
Children:
c26a945
Parents:
a7775cb
git-author:
Nick Withers <nick.withers@…> (01/17/14 01:57:08)
git-committer:
Gedare Bloom <gedare@…> (01/23/14 16:30:15)
Message:

powerpc/flash: give string variables const attribute

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/shared/flash/flash.c

    ra7775cb rf334847b  
    105105
    106106static struct bankdesc *
    107 argcheck(int bank, uint32_t offset, char *src, uint32_t size);
     107argcheck(int bank, uint32_t offset, const char *src, uint32_t size);
    108108
    109109/* Type definitions */
     
    224224
    225225STATIC uint32_t
    226 BSP_flashWriteDataRaw(struct bankdesc *b, uint32_t addr, char *src, uint32_t n_words, int quiet)
    227 {
    228 uint32_t sta;
    229 uint32_t N;
    230 uint32_t nxt, a, i, bufsz;
    231 uint32_t then, now;
    232 unsigned f;
    233 char    *s;
     226BSP_flashWriteDataRaw(struct bankdesc *b, uint32_t addr, const char *src, uint32_t n_words, int quiet)
     227{
     228uint32_t   sta;
     229uint32_t   N;
     230uint32_t   nxt, a, i, bufsz;
     231uint32_t   then, now;
     232unsigned   f;
     233const char *s;
    234234
    235235#ifdef DEBUG
     
    478478
    479479static struct bankdesc *
    480 argcheck(int bank, uint32_t offset, char *src, uint32_t size)
     480argcheck(int bank, uint32_t offset, const char *src, uint32_t size)
    481481{
    482482struct bankdesc *b;
     
    515515 */
    516516STATIC int
    517 regionCheckAndErase(int bank, uint32_t offset, char *src, uint32_t n_bytes, int quiet)
     517regionCheckAndErase(int bank, uint32_t offset, const char *src, uint32_t n_bytes, int quiet)
    518518{
    519519struct bankdesc *b;
     
    595595
    596596STATIC int
    597 BSP_flashWriteRegion(int bank, uint32_t offset, char *src, uint32_t n_bytes, int quiet)
     597BSP_flashWriteRegion(int bank, uint32_t offset, const char *src, uint32_t n_bytes, int quiet)
    598598{
    599599struct bankdesc *b = BSP_flashBspOps.bankcheck(bank, 0);        /* caller did bankValidate() */
     
    602602uint32_t     o,i,a,e;
    603603int          err;
    604 char        *p;
     604const char   *p;
    605605union bconv  buf;
    606606
     
    731731
    732732int
    733 BSP_flashWrite(int bank, uint32_t offset, char *src, uint32_t n_bytes, int quiet)
     733BSP_flashWrite(int bank, uint32_t offset, const char *src, uint32_t n_bytes, int quiet)
    734734{
    735735int      rval;
     
    768768
    769769int
    770 BSP_flashWriteFile(int bank, uint32_t offset, char *fname, int quiet)
     770BSP_flashWriteFile(int bank, uint32_t offset, const char *fname, int quiet)
    771771{
    772772int             fd   = -1;
Note: See TracChangeset for help on using the changeset viewer.