nuttx: fix multiple 'FAR', 'CODE' and style issues

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2024-08-24 19:21:12 -04:00 committed by Xiang Xiao
parent 5d17e4795a
commit d499ac9d58
275 changed files with 2130 additions and 1986 deletions

View file

@ -277,7 +277,7 @@ static void elf_emit_tcb_note(FAR struct elf_dumpinfo_s *cinfo,
}
else
{
regs = (uintptr_t *)tcb->xcp.regs;
regs = (FAR uintptr_t *)tcb->xcp.regs;
}
if (regs != NULL)
@ -290,8 +290,8 @@ static void elf_emit_tcb_note(FAR struct elf_dumpinfo_s *cinfo,
}
else
{
status.pr_regs[i] =
*(uintptr_t *)((uint8_t *)regs + g_tcbinfo.reg_off.p[i]);
status.pr_regs[i] = *(FAR uintptr_t *)
((FAR uint8_t *)regs + g_tcbinfo.reg_off.p[i]);
}
}
}

View file

@ -164,7 +164,7 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo)
for (i = 0; i < loadinfo->nctors; i++)
{
FAR uintptr_t *ptr = (uintptr_t *)
FAR uintptr_t *ptr = (FAR uintptr_t *)
((FAR void *)(&loadinfo->ctors)[i]);
binfo("ctor %d: "

View file

@ -165,7 +165,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo)
for (i = 0; i < loadinfo->ndtors; i++)
{
FAR uintptr_t *ptr = (uintptr_t *)
FAR uintptr_t *ptr = (FAR uintptr_t *)
((FAR void *)(&loadinfo->dtors)[i]);
binfo("dtor %d: "

View file

@ -204,7 +204,7 @@ int elf_loadphdrs(FAR struct elf_loadinfo_s *loadinfo)
/* Allocate memory to hold a working copy of the program header table */
loadinfo->phdr = (FAR FAR Elf_Phdr *)kmm_malloc(phdrsize);
loadinfo->phdr = (FAR Elf_Phdr *)kmm_malloc(phdrsize);
if (!loadinfo->phdr)
{
berr("Failed to allocate the program header table. Size: %ld\n",

View file

@ -93,14 +93,14 @@ static inline void nxflat_dumpreaddata(FAR char *buffer, int buflen)
*
****************************************************************************/
int nxflat_read(struct nxflat_loadinfo_s *loadinfo, char *buffer,
int nxflat_read(FAR struct nxflat_loadinfo_s *loadinfo, FAR char *buffer,
int readsize, int offset)
{
ssize_t nbytes; /* Number of bytes read */
off_t rpos; /* Position returned by lseek */
char *bufptr; /* Next buffer location to read into */
int bytesleft; /* Number of bytes of .data left to read */
int bytesread; /* Total number of bytes read */
ssize_t nbytes; /* Number of bytes read */
off_t rpos; /* Position returned by lseek */
FAR char *bufptr; /* Next buffer location to read into */
int bytesleft; /* Number of bytes of .data left to read */
int bytesread; /* Total number of bytes read */
binfo("Read %d bytes from offset %d\n", readsize, offset);