drivers/: Change some nerr() ERRORS to nwarn() WARNINGS. Anomolous network evernts are not errors.

This commit is contained in:
Gregory Nutt 2016-06-12 08:31:22 -06:00
parent b1eb4fdd8e
commit efb02f2ef1
55 changed files with 457 additions and 431 deletions

View file

@ -48,6 +48,22 @@
#if defined(CONFIG_I2C) && defined(CONFIG_PCA9635PW)
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#ifdef CONFIG_DEBUG_LEDS
# define derr llerr
# ifdef CONFIG_DEBUG_INFO
# define dinfo llinfo
# else
# define dinfo(x...)
# endif
#else
# define derr(x...)
# define dinfo(x...)
#endif
/****************************************************************************
* Private Type Definitions
****************************************************************************/
@ -105,7 +121,7 @@ static int pca9635pw_i2c_write_byte(FAR struct pca9635pw_dev_s *priv,
{
struct i2c_config_s config;
err("pca9635pw_i2c_write_byte\n");
dinfo("pca9635pw_i2c_write_byte\n");
/* assemble the 2 byte message comprised of reg_addr and reg_val */
@ -123,14 +139,14 @@ static int pca9635pw_i2c_write_byte(FAR struct pca9635pw_dev_s *priv,
/* Write the register address followed by the data (no RESTART) */
err("i2c addr: 0x%02X reg addr: 0x%02X value: 0x%02X\n", priv->i2c_addr,
buffer[0], buffer[1]);
dinfo("i2c addr: 0x%02X reg addr: 0x%02X value: 0x%02X\n", priv->i2c_addr,
buffer[0], buffer[1]);
ret = i2c_write(priv->i2c, &config, buffer, BUFFER_SIZE);
if (ret != OK)
{
err("i2c_write returned error code %d\n", ret);
derr("ERROR: i2c_write returned error code %d\n", ret);
return ret;
}
@ -173,7 +189,7 @@ static int pca9635pw_set_led_mode(FAR struct pca9635pw_dev_s *priv,
static int pca9635pw_open(FAR struct file *filep)
{
err("pca9635pw_open\n");
dinfo("pca9635pw_open\n");
FAR struct inode *inode = filep->f_inode;
FAR struct pca9635pw_dev_s *priv = inode->i_private;
@ -192,7 +208,7 @@ static int pca9635pw_open(FAR struct file *filep)
PCA9635PW_MODE_1_INITIAL_VALUE);
if (ret != OK)
{
err("Could not set initial config for PCA9635PW_MODE_1\n");
derr("ERROR: Could not set initial config for PCA9635PW_MODE_1\n");
return ret;
}
@ -209,7 +225,7 @@ static int pca9635pw_open(FAR struct file *filep)
PCA9635PW_MODE_2_INITIAL_VALUE);
if (ret != OK)
{
err("Could not set initial config for PCA9635PW_MODE_2\n");
derr("ERROR: Could not set initial config for PCA9635PW_MODE_2\n");
return ret;
}
@ -227,7 +243,7 @@ static int pca9635pw_open(FAR struct file *filep)
ret = pca9635pw_set_led_mode(priv, PCA9635PW_LED_OUT_x_MODE_2);
if (ret != OK)
{
err("Could not set led driver outputs to MODE2 (LED's brightness are "
derr("ERROR: Could not set led driver outputs to MODE2 (LED's brightness are "
"controlled by pwm registers)\n");
return ret;
}
@ -245,7 +261,7 @@ static int pca9635pw_open(FAR struct file *filep)
static int pca9635pw_close(FAR struct file *filep)
{
err("pca9635pw_close\n");
dinfo("pca9635pw_close\n");
FAR struct inode *inode = filep->f_inode;
FAR struct pca9635pw_dev_s *priv = inode->i_private;
@ -257,7 +273,7 @@ static int pca9635pw_close(FAR struct file *filep)
ret = pca9635pw_set_led_mode(priv, PCA9635PW_LED_OUT_x_MODE_0);
if (ret != OK)
{
err("Could not set led driver outputs to MODE0 (LED's are off)\n");
derr("ERROR: Could not set led driver outputs to MODE0 (LED's are off)\n");
return ret;
}
@ -285,14 +301,14 @@ static int pca9635pw_close(FAR struct file *filep)
static int pca9635pw_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
{
err("pca9635pw_ioctl\n");
dinfo("pca9635pw_ioctl\n");
FAR struct inode *inode = filep->f_inode;
FAR struct pca9635pw_dev_s *priv = inode->i_private;
int ret = OK;
err("cmd: %d arg: %ld\n", cmd, arg);
dinfo("cmd: %d arg: %ld\n", cmd, arg);
switch (cmd)
{
@ -319,7 +335,7 @@ static int pca9635pw_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
default:
{
err("Unrecognized cmd: %d\n", cmd);
derr("ERROR: Unrecognized cmd: %d\n", cmd);
ret = -ENOTTY;
}
break;
@ -364,7 +380,7 @@ int pca9635pw_register(FAR const char *devpath, FAR struct i2c_master_s *i2c,
if (priv == NULL)
{
err("Failed to allocate instance of pca9635pw_dev_s\n");
derr("ERROR: Failed to allocate instance of pca9635pw_dev_s\n");
return -ENOMEM;
}
@ -376,7 +392,7 @@ int pca9635pw_register(FAR const char *devpath, FAR struct i2c_master_s *i2c,
int const ret = register_driver(devpath, &g_pca9635pw_fileops, 666, priv);
if (ret != OK)
{
err("Failed to register driver: %d\n", ret);
derr("ERROR: Failed to register driver: %d\n", ret);
kmm_free(priv);
return ret;
}

View file

@ -72,16 +72,16 @@
/* Debug ********************************************************************/
/* Non-standard debug that may be enabled just for testing PWM */
#ifdef CONFIG_DEBUG_RGBLED
# define pwmerr err
# define pwminfo info
# define pwmllerr llerr
# define pwmllinfo llinfo
#ifdef CONFIG_DEBUG_LEDS
# define derr err
# define dinfo info
# define dllerr llerr
# define dllinfo llinfo
#else
# define pwmerr(x...)
# define pwminfo(x...)
# define pwmllerr(x...)
# define pwmllinfo(x...)
# define derr(x...)
# define dinfo(x...)
# define dllerr(x...)
# define dllinfo(x...)
#endif
/****************************************************************************
@ -150,7 +150,7 @@ static int rgbled_open(FAR struct file *filep)
uint8_t tmp;
int ret;
pwminfo("crefs: %d\n", upper->crefs);
dinfo("crefs: %d\n", upper->crefs);
/* Get exclusive access to the device structures */
@ -201,7 +201,7 @@ static int rgbled_close(FAR struct file *filep)
FAR struct rgbled_upperhalf_s *upper = inode->i_private;
int ret;
pwminfo("crefs: %d\n", upper->crefs);
dinfo("crefs: %d\n", upper->crefs);
/* Get exclusive access to the device structures */
@ -395,7 +395,7 @@ int rgbled_register(FAR const char *path, FAR struct pwm_lowerhalf_s *ledr,
if (!upper)
{
pwmerr("Allocation failed\n");
derr("ERROR: Allocation failed\n");
return -ENOMEM;
}
@ -410,7 +410,7 @@ int rgbled_register(FAR const char *path, FAR struct pwm_lowerhalf_s *ledr,
/* Register the PWM device */
pwminfo("Registering %s\n", path);
dinfo("Registering %s\n", path);
return register_driver(path, &g_rgbledops, 0666, upper);
}

View file

@ -69,7 +69,7 @@
#ifdef CONFIG_DEBUG_LEDS
# define derr llerr
# ifdef CONFIG_DEBUG_INFO
# define dinfo llerr
# define dinfo llinfo
# else
# define dinfo(x...)
# endif

View file

@ -246,7 +246,7 @@ static ssize_t loop_read(FAR struct inode *inode, FAR unsigned char *buffer,
if (start_sector + nsectors > dev->nsectors)
{
err("Read past end of file\n");
err("ERROR: Read past end of file\n");
return -EIO;
}
@ -256,7 +256,7 @@ static ssize_t loop_read(FAR struct inode *inode, FAR unsigned char *buffer,
ret = lseek(dev->fd, offset, SEEK_SET);
if (ret == (off_t)-1)
{
err("Seek failed for offset=%d: %d\n", (int)offset, get_errno());
err("ERROR: Seek failed for offset=%d: %d\n", (int)offset, get_errno());
return -EIO;
}
@ -267,7 +267,7 @@ static ssize_t loop_read(FAR struct inode *inode, FAR unsigned char *buffer,
nbytesread = read(dev->fd, buffer, nsectors * dev->sectsize);
if (nbytesread < 0 && get_errno() != EINTR)
{
err("Read failed: %d\n", get_errno());
err("ERROR: Read failed: %d\n", get_errno());
return -get_errno();
}
}
@ -304,7 +304,7 @@ static ssize_t loop_write(FAR struct inode *inode,
ret = lseek(dev->fd, offset, SEEK_SET);
if (ret == (off_t)-1)
{
err("Seek failed for offset=%d: %d\n", (int)offset, get_errno());
err("ERROR: Seek failed for offset=%d: %d\n", (int)offset, get_errno());
}
/* Then write the requested number of sectors to that position */
@ -314,7 +314,7 @@ static ssize_t loop_write(FAR struct inode *inode,
nbyteswritten = write(dev->fd, buffer, nsectors * dev->sectsize);
if (nbyteswritten < 0 && get_errno() != EINTR)
{
err("Write failed: %d\n", get_errno());
err("ERROR: Write failed: %d\n", get_errno());
return -get_errno();
}
}
@ -391,7 +391,7 @@ int losetup(FAR const char *devname, FAR const char *filename,
ret = stat(filename, &sb);
if (ret < 0)
{
err("Failed to stat %s: %d\n", filename, get_errno());
err("ERROR: Failed to stat %s: %d\n", filename, get_errno());
return -get_errno();
}
@ -399,7 +399,7 @@ int losetup(FAR const char *devname, FAR const char *filename,
if (sb.st_size - offset < sectsize)
{
err("File is too small for blocksize\n");
err("ERROR: File is too small for blocksize\n");
return -ERANGE;
}
@ -445,7 +445,7 @@ int losetup(FAR const char *devname, FAR const char *filename,
dev->fd = open(filename, O_RDWR);
if (dev->fd < 0)
{
err("Failed to open %s: %d\n", filename, get_errno());
err("ERROR: Failed to open %s: %d\n", filename, get_errno());
ret = -get_errno();
goto errout_with_dev;
}
@ -456,7 +456,7 @@ int losetup(FAR const char *devname, FAR const char *filename,
ret = register_blockdriver(devname, &g_bops, 0, dev);
if (ret < 0)
{
ferr("register_blockdriver failed: %d\n", -ret);
ferr("ERROR: register_blockdriver failed: %d\n", -ret);
goto errout_with_fd;
}
@ -499,7 +499,7 @@ int loteardown(FAR const char *devname)
ret = open_blockdriver(devname, MS_RDONLY, &inode);
if (ret < 0)
{
err("Failed to open %s: %d\n", devname, -ret);
err("ERROR: Failed to open %s: %d\n", devname, -ret);
return ret;
}

View file

@ -2411,7 +2411,7 @@ static int mmcsd_widebus(FAR struct mmcsd_state_s *priv)
ret = mmcsd_recvR1(priv, SD_ACMD42);
if (ret != OK)
{
finfo("WARNING: SD card does not support ACMD42: %d\n", ret);
fwarn("WARNING: SD card does not support ACMD42: %d\n", ret);
return ret;
}
@ -2449,7 +2449,7 @@ static int mmcsd_widebus(FAR struct mmcsd_state_s *priv)
/* Wide bus operation not supported */
ferr("WARNING: Card does not support wide-bus operation\n");
fwarn("WARNING: Card does not support wide-bus operation\n");
return -ENOSYS;
#else /* CONFIG_SDIO_WIDTH_D1_ONLY */
@ -2691,7 +2691,7 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv)
ret = mmcsd_widebus(priv);
if (ret != OK)
{
ferr("WARN: Failed to set wide bus operation: %d\n", ret);
ferr("ERROR: Failed to set wide bus operation: %d\n", ret);
}
/* TODO: If wide-bus selected, then send CMD6 to see if the card supports
@ -2918,7 +2918,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv)
{
/* CMD1 succeeded... this must be an MMC card */
ferr("CMD1 succeeded, assuming MMC card\n");
finfo("CMD1 succeeded, assuming MMC card\n");
priv->type = MMCSD_CARDTYPE_MMC;
/* Check if the card is busy. Very confusing, BUSY is set LOW

View file

@ -431,7 +431,7 @@ static int mmcsd_waitready(FAR struct mmcsd_slot_s *slot)
}
while (elapsed < MMCSD_DELAY_500MS);
ferr("Card still busy, last response: %02x\n", response);
finfo("Card still busy, last response: %02x\n", response);
return -EBUSY;
}
@ -504,7 +504,7 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot,
if ((response & 0x80) != 0)
{
ferr("Failed: i=%d response=%02x\n", i, response);
ferr("ERROR: Failed: i=%d response=%02x\n", i, response);
return (uint32_t)-1;
}
@ -531,7 +531,7 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot,
if (busy != 0xff)
{
ferr("Failed: card still busy (%02x)\n", busy);
ferr("ERROR: Failed: card still busy (%02x)\n", busy);
return (uint32_t)-1;
}
@ -613,7 +613,7 @@ static void mmcsd_setblklen(FAR struct mmcsd_slot_s *slot, uint32_t length)
response = mmcsd_sendcmd(slot, &g_cmd16, length);
if (response != MMCSD_SPIR1_OK)
{
ferr("Failed to set block length: %02x\n", response);
ferr("ERROR: Failed to set block length: %02x\n", response);
}
}
@ -813,7 +813,7 @@ static void mmcsd_decodecsd(FAR struct mmcsd_slot_s *slot, uint8_t *csd)
{
if (readbllen > 9)
{
ferr("Forcing 512 byte sector size\n");
fwarn("WARNING: Forcing 512 byte sector size\n");
csizemult += (readbllen - 9);
readbllen = 9;
}
@ -880,7 +880,7 @@ static int mmcsd_getcardinfo(FAR struct mmcsd_slot_s *slot, uint8_t *buffer,
result = mmcsd_sendcmd(slot, cmd, 0);
if (result != MMCSD_SPIR1_OK)
{
ferr("CMD9/10 failed: R1=%02x\n", result);
ferr("ERROR: CMD9/10 failed: R1=%02x\n", result);
return -EIO;
}
@ -898,7 +898,7 @@ static int mmcsd_getcardinfo(FAR struct mmcsd_slot_s *slot, uint8_t *buffer,
if (response != 0 && (response & MMCSD_SPIDET_UPPER) == 0)
{
ferr("%d. Data transfer error: %02x\n", i, response);
ferr("ERROR: %d. Data transfer error: %02x\n", i, response);
return -EIO;
}
else if (response == MMCSD_SPIDT_STARTBLKSNGL)
@ -916,7 +916,7 @@ static int mmcsd_getcardinfo(FAR struct mmcsd_slot_s *slot, uint8_t *buffer,
}
}
ferr("%d. Did not find start of block\n");
ferr("ERROR: %d. Did not find start of block\n");
return -EIO;
}
@ -960,7 +960,7 @@ static int mmcsd_recvblock(FAR struct mmcsd_slot_s *slot, uint8_t *buffer,
return OK;
}
ferr("Did not receive data token (%02x)\n", token);
ferr("ERROR: Did not receive data token (%02x)\n", token);
return ERROR;
}
@ -1004,7 +1004,7 @@ static int mmcsd_xmitblock(FAR struct mmcsd_slot_s *slot,
response = SPI_SEND(spi, 0xff);
if ((response & MMCSD_SPIDR_MASK) != MMCSD_SPIDR_ACCEPTED)
{
ferr("Bad data response: %02x\n", response);
ferr("ERROR: Bad data response: %02x\n", response);
return -EIO;
}
@ -1034,7 +1034,7 @@ static int mmcsd_open(FAR struct inode *inode)
#ifdef CONFIG_DEBUG_FEATURES
if (!inode || !inode->i_private)
{
ferr("Internal confusion\n");
ferr("ERROR: Internal confusion\n");
return -EIO;
}
#endif
@ -1047,7 +1047,7 @@ static int mmcsd_open(FAR struct inode *inode)
#ifdef CONFIG_DEBUG_FEATURES
if (!spi)
{
ferr("Internal confusion\n");
ferr("ERROR: Internal confusion\n");
return -EIO;
}
#endif
@ -1119,13 +1119,13 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
#ifdef CONFIG_DEBUG_FEATURES
if (!buffer)
{
ferr("Invalid parameters\n");
ferr("ERROR: Invalid parameters\n");
return -EINVAL;
}
if (!inode || !inode->i_private)
{
ferr("Internal confusion\n");
ferr("ERROR: Internal confusion\n");
return -EIO;
}
#endif
@ -1138,7 +1138,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
#ifdef CONFIG_DEBUG_FEATURES
if (!spi)
{
ferr("Internal confusion\n");
ferr("ERROR: Internal confusion\n");
return -EIO;
}
#endif
@ -1147,7 +1147,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
if (slot->state & MMCSD_SLOTSTATUS_NOTREADY)
{
ferr("Slot not ready\n");
ferr("ERROR: Slot not ready\n");
return -ENODEV;
}
@ -1190,7 +1190,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
response = mmcsd_sendcmd(slot, &g_cmd17, offset);
if (response != MMCSD_SPIR1_OK)
{
ferr("CMD17 failed: R1=%02x\n", response);
ferr("ERROR: CMD17 failed: R1=%02x\n", response);
goto errout_with_eio;
}
@ -1198,7 +1198,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
if (mmcsd_recvblock(slot, buffer, SECTORSIZE(slot)) != 0)
{
ferr("Failed: to receive the block\n");
ferr("ERROR: Failed: to receive the block\n");
goto errout_with_eio;
}
}
@ -1211,7 +1211,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
response = mmcsd_sendcmd(slot, &g_cmd18, offset);
if (response != MMCSD_SPIR1_OK)
{
ferr("CMD18 failed: R1=%02x\n", response);
ferr("ERROR: CMD18 failed: R1=%02x\n", response);
goto errout_with_eio;
}
@ -1221,7 +1221,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
{
if (mmcsd_recvblock(slot, buffer, SECTORSIZE(slot)) != 0)
{
ferr("Failed: to receive the block\n");
ferr("ERROR: Failed: to receive the block\n");
goto errout_with_eio;
}
@ -1273,13 +1273,13 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer,
#ifdef CONFIG_DEBUG_FEATURES
if (!buffer)
{
ferr("Invalid parameters\n");
ferr("ERROR: Invalid parameters\n");
return -EINVAL;
}
if (!inode || !inode->i_private)
{
ferr("Internal confusion\n");
ferr("ERROR: Internal confusion\n");
return -EIO;
}
#endif
@ -1292,7 +1292,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer,
#ifdef CONFIG_DEBUG_FEATURES
if (!spi)
{
ferr("Internal confusion\n");
ferr("ERROR: Internal confusion\n");
return -EIO;
}
#endif
@ -1301,7 +1301,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer,
if (slot->state & MMCSD_SLOTSTATUS_NOTREADY)
{
ferr("Slot not ready\n");
ferr("ERROR: Slot not ready\n");
return -ENODEV;
}
@ -1309,7 +1309,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer,
if (slot->state & MMCSD_SLOTSTATUS_WRPROTECT)
{
ferr("Not write enabled\n");
ferr("ERROR: Not write enabled\n");
return -EACCES;
}
@ -1352,7 +1352,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer,
response = mmcsd_sendcmd(slot, &g_cmd24, offset);
if (response != MMCSD_SPIR1_OK)
{
ferr("CMD24 failed: R1=%02x\n", response);
ferr("ERROR: CMD24 failed: R1=%02x\n", response);
goto errout_with_sem;
}
@ -1360,7 +1360,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer,
if (mmcsd_xmitblock(slot, buffer, SECTORSIZE(slot), 0xfe) != 0)
{
ferr("Block transfer failed\n");
ferr("ERROR: Block transfer failed\n");
goto errout_with_sem;
}
}
@ -1373,14 +1373,14 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer,
response = mmcsd_sendcmd(slot, &g_cmd55, 0);
if (response != MMCSD_SPIR1_OK)
{
ferr("CMD55 failed: R1=%02x\n", response);
ferr("ERROR: CMD55 failed: R1=%02x\n", response);
goto errout_with_sem;
}
response = mmcsd_sendcmd(slot, &g_acmd23, nsectors);
if (response != MMCSD_SPIR1_OK)
{
ferr("ACMD23 failed: R1=%02x\n", response);
ferr("ERROR: ACMD23 failed: R1=%02x\n", response);
goto errout_with_sem;
}
}
@ -1392,7 +1392,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer,
response = mmcsd_sendcmd(slot, &g_cmd25, offset);
if (response != MMCSD_SPIR1_OK)
{
ferr("CMD25 failed: R1=%02x\n", response);
ferr("ERROR: CMD25 failed: R1=%02x\n", response);
goto errout_with_sem;
}
@ -1402,14 +1402,14 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer,
{
if (mmcsd_xmitblock(slot, buffer, SECTORSIZE(slot), 0xfc) != 0)
{
ferr("Failed: to receive the block\n");
ferr("ERROR: Failed: to receive the block\n");
goto errout_with_sem;
}
buffer += SECTORSIZE(slot);
if (mmcsd_waitready(slot) != OK)
{
ferr("Failed: card is busy\n");
ferr("ERROR: Failed: card is busy\n");
goto errout_with_sem;
}
}
@ -1455,13 +1455,13 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry)
#ifdef CONFIG_DEBUG_FEATURES
if (!geometry)
{
ferr("Invalid parameters\n");
ferr("ERROR: Invalid parameters\n");
return -EINVAL;
}
if (!inode || !inode->i_private)
{
ferr("Internal confusion\n");
ferr("ERROR: Internal confusion\n");
return -EIO;
}
#endif
@ -1474,7 +1474,7 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry)
#ifdef CONFIG_DEBUG_FEATURES
if (!spi)
{
ferr("Internal confusion\n");
ferr("ERROR: Internal confusion\n");
return -EIO;
}
#endif
@ -1489,7 +1489,7 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry)
if (ret < 0)
{
mmcsd_semgive(slot);
ferr("mmcsd_getcsd returned %d\n", ret);
ferr("ERROR: mmcsd_getcsd returned %d\n", ret);
return ret;
}
@ -1566,7 +1566,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
if ((SPI_STATUS(spi, SPIDEV_MMCSD) & SPI_STATUS_PRESENT) == 0)
{
ferr("No card present\n");
fwarn("WARNING: No card present\n");
slot->state |= MMCSD_SLOTSTATUS_NODISK;
return -ENODEV;
}
@ -1621,7 +1621,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
if (result != MMCSD_SPIR1_IDLESTATE)
{
ferr("Send CMD0 failed: R1=%02x\n", result);
ferr("ERROR: Send CMD0 failed: R1=%02x\n", result);
SPI_SELECT(spi, SPIDEV_MMCSD, false);
mmcsd_semgive(slot);
return -EIO;
@ -1678,12 +1678,12 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
finfo("OCR: %08x\n", slot->ocr);
if ((slot->ocr & MMCSD_OCR_CCS) != 0)
{
ferr("Identified SD ver2 card/with block access\n");
finfo("Identified SD ver2 card/with block access\n");
slot->type = MMCSD_CARDTYPE_SDV2 | MMCSD_CARDTYPE_BLOCK;
}
else
{
ferr("Identified SD ver2 card\n");
finfo("Identified SD ver2 card\n");
slot->type = MMCSD_CARDTYPE_SDV2;
}
}
@ -1706,7 +1706,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
result = mmcsd_sendcmd(slot, &g_acmd41, 0);
if (result == MMCSD_SPIR1_IDLESTATE || result == MMCSD_SPIR1_OK)
{
ferr("Identified SD ver1 card\n");
finfo("Identified SD ver1 card\n");
slot->type = MMCSD_CARDTYPE_SDV1;
}
}
@ -1736,7 +1736,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
result = mmcsd_sendcmd(slot, &g_cmd1, 0);
if (result == MMCSD_SPIR1_OK)
{
ferr("%d. Identified MMC card\n", i);
finfo("%d. Identified MMC card\n", i);
slot->type = MMCSD_CARDTYPE_MMC;
break;
}
@ -1748,7 +1748,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
if (elapsed >= MMCSD_DELAY_1SEC)
{
ferr("Failed to exit IDLE state\n");
ferr("ERROR: Failed to exit IDLE state\n");
SPI_SELECT(spi, SPIDEV_MMCSD, false);
mmcsd_semgive(slot);
return -EIO;
@ -1757,7 +1757,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
if (slot->type == MMCSD_CARDTYPE_UNKNOWN)
{
ferr("Failed to identify card\n");
ferr("ERROR: Failed to identify card\n");
SPI_SELECT(spi, SPIDEV_MMCSD, false);
mmcsd_semgive(slot);
return -EIO;
@ -1769,7 +1769,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
result = mmcsd_getcsd(slot, csd);
if (result != OK)
{
ferr("mmcsd_getcsd(CMD9) failed: %d\n", result);
ferr("ERROR: mmcsd_getcsd(CMD9) failed: %d\n", result);
SPI_SELECT(spi, SPIDEV_MMCSD, false);
mmcsd_semgive(slot);
return -EIO;
@ -1836,7 +1836,7 @@ static void mmcsd_mediachanged(void *arg)
#ifdef CONFIG_DEBUG_FEATURES
if (!slot || !slot->spi)
{
ferr("Internal confusion\n");
ferr("ERROR: Internal confusion\n");
return;
}
#endif
@ -1857,7 +1857,7 @@ static void mmcsd_mediachanged(void *arg)
{
/* Media is not present */
ferr("No card present\n");
fwarn("WARNING: No card present\n");
slot->state |= (MMCSD_SLOTSTATUS_NODISK | MMCSD_SLOTSTATUS_NOTREADY);
/* Was media removed? */
@ -1918,7 +1918,7 @@ int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi)
#ifdef CONFIG_DEBUG_FEATURES
if ((unsigned)slotno >= CONFIG_MMCSD_NSLOTS || (unsigned)minor > 255 || !spi)
{
ferr("Invalid arguments\n");
ferr("ERROR: Invalid arguments\n");
return -EINVAL;
}
#endif
@ -1932,7 +1932,7 @@ int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi)
#ifdef CONFIG_DEBUG_FEATURES
if (slot->spi)
{
ferr("Already registered\n");
ferr("ERROR: Already registered\n");
return -EBUSY;
}
#endif
@ -1969,7 +1969,7 @@ int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi)
ret = register_blockdriver(devname, &g_bops, MMCSD_MODE, slot);
if (ret < 0)
{
ferr("register_blockdriver failed: %d\n", -ret);
ferr("ERROR: register_blockdriver failed: %d\n", -ret);
slot->spi = NULL;
return ret;
}

View file

@ -58,8 +58,8 @@
/* Non-standard debug that may be enabled just for testing the modem driver */
#ifdef CONFIG_MODEM_U_BLOX_DEBUG
# define m_err err
# define m_info info
# define m_err err
# define m_info info
# define m_vllerr llerr
# define m_vllinfo llinfo
#else
@ -286,7 +286,7 @@ FAR void* ubxmdm_register(FAR const char *path,
kmm_zalloc(sizeof(struct ubxmdm_upper));
if (!upper)
{
m_err("Upper half allocation failed\n");
m_err("ERROR: Upper half allocation failed\n");
goto errout;
}
@ -294,14 +294,14 @@ FAR void* ubxmdm_register(FAR const char *path,
upper->path = strdup(path);
if (!upper->path)
{
m_err("Path allocation failed\n");
m_err("ERROR: Path allocation failed\n");
goto errout_with_upper;
}
ret = register_driver(path, &ubxmdm_fops, 0666, upper);
if (ret < 0)
{
m_err("register_driver failed: %d\n", ret);
m_err("ERROR: register_driver failed: %d\n", ret);
goto errout_with_path;
}

View file

@ -869,7 +869,7 @@ FAR struct mtd_dev_s *at45db_initialize(FAR struct spi_dev_s *spi)
{
/* Unrecognized! Discard all of that work we just did and return NULL */
ferr("Unrecognized\n");
ferr("ERROR: Unrecognized\n");
goto errout;
}
@ -887,7 +887,8 @@ FAR struct mtd_dev_s *at45db_initialize(FAR struct spi_dev_s *spi)
* is required after the device has be re-programmed.
*/
ferr("Reprogramming page size\n");
fwarn("WARNING: Reprogramming page size\n");
SPI_SELECT(priv->spi, SPIDEV_FLASH, true);
SPI_SNDBLOCK(priv->spi, g_binpgsize, BINPGSIZE_SIZE);
SPI_SELECT(priv->spi, SPIDEV_FLASH, false);

View file

@ -498,7 +498,7 @@ FAR struct mtd_dev_s *filemtd_initialize(FAR const char *path, size_t offset,
priv = (FAR struct file_dev_s *)kmm_zalloc(sizeof(struct file_dev_s));
if (!priv)
{
ferr("Failed to allocate the FILE MTD state structure\n");
ferr("ERROR: Failed to allocate the FILE MTD state structure\n");
return NULL;
}
@ -514,7 +514,7 @@ FAR struct mtd_dev_s *filemtd_initialize(FAR const char *path, size_t offset,
ret = stat(path, &sb);
if (ret < 0)
{
err("Failed to stat %s: %d\n", path, get_errno());
err("ERROR: Failed to stat %s: %d\n", path, get_errno());
return NULL;
}
@ -525,7 +525,7 @@ FAR struct mtd_dev_s *filemtd_initialize(FAR const char *path, size_t offset,
priv->fd = open(path, mode);
if (priv->fd == -1)
{
ferr("Failed to open the FILE MTD file %s\n", path);
ferr("ERROR: Failed to open the FILE MTD file %s\n", path);
kmm_free(priv);
return NULL;
}
@ -557,7 +557,7 @@ FAR struct mtd_dev_s *filemtd_initialize(FAR const char *path, size_t offset,
nblocks = (filelen - offset) / priv->erasesize;
if (nblocks < 3)
{
ferr("Need to provide at least three full erase block\n");
ferr("ERROR: Need to provide at least three full erase block\n");
kmm_free(priv);
return NULL;
}

View file

@ -168,7 +168,7 @@ static ssize_t ftl_reload(FAR void *priv, FAR uint8_t *buffer,
nread = MTD_BREAD(dev->mtd, startblock, nblocks, buffer);
if (nread != nblocks)
{
ferr("Read %d blocks starting at block %d failed: %d\n",
ferr("ERROR: Read %d blocks starting at block %d failed: %d\n",
nblocks, startblock, nread);
}
@ -244,7 +244,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer,
nxfrd = MTD_BREAD(dev->mtd, rwblock, dev->blkper, dev->eblock);
if (nxfrd != dev->blkper)
{
ferr("Read erase block %d failed: %d\n", rwblock, nxfrd);
ferr("ERROR: Read erase block %d failed: %d\n", rwblock, nxfrd);
return -EIO;
}
@ -254,7 +254,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer,
ret = MTD_ERASE(dev->mtd, eraseblock, 1);
if (ret < 0)
{
ferr("Erase block=%d failed: %d\n", eraseblock, ret);
ferr("ERROR: Erase block=%d failed: %d\n", eraseblock, ret);
return ret;
}
@ -281,7 +281,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer,
nxfrd = MTD_BWRITE(dev->mtd, rwblock, dev->blkper, dev->eblock);
if (nxfrd != dev->blkper)
{
ferr("Write erase block %d failed: %d\n", rwblock, nxfrd);
ferr("ERROR: Write erase block %d failed: %d\n", rwblock, nxfrd);
return -EIO;
}
@ -309,7 +309,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer,
ret = MTD_ERASE(dev->mtd, eraseblock, 1);
if (ret < 0)
{
ferr("Erase block=%d failed: %d\n", eraseblock, ret);
ferr("ERROR: Erase block=%d failed: %d\n", eraseblock, ret);
return ret;
}
@ -321,7 +321,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer,
nxfrd = MTD_BWRITE(dev->mtd, alignedblock, dev->blkper, buffer);
if (nxfrd != dev->blkper)
{
ferr("Write erase block %d failed: %d\n", alignedblock, nxfrd);
ferr("ERROR: Write erase block %d failed: %d\n", alignedblock, nxfrd);
return -EIO;
}
@ -341,7 +341,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer,
nxfrd = MTD_BREAD(dev->mtd, alignedblock, dev->blkper, dev->eblock);
if (nxfrd != dev->blkper)
{
ferr("Read erase block %d failed: %d\n", alignedblock, nxfrd);
ferr("ERROR: Read erase block %d failed: %d\n", alignedblock, nxfrd);
return -EIO;
}
@ -351,7 +351,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer,
ret = MTD_ERASE(dev->mtd, eraseblock, 1);
if (ret < 0)
{
ferr("Erase block=%d failed: %d\n", eraseblock, ret);
ferr("ERROR: Erase block=%d failed: %d\n", eraseblock, ret);
return ret;
}
@ -367,7 +367,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer,
nxfrd = MTD_BWRITE(dev->mtd, alignedblock, dev->blkper, dev->eblock);
if (nxfrd != dev->blkper)
{
ferr("Write erase block %d failed: %d\n", alignedblock, nxfrd);
ferr("ERROR: Write erase block %d failed: %d\n", alignedblock, nxfrd);
return -EIO;
}
}
@ -543,7 +543,7 @@ int ftl_initialize(int minor, FAR struct mtd_dev_s *mtd)
ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&dev->geo));
if (ret < 0)
{
ferr("MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", ret);
ferr("ERROR: MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", ret);
kmm_free(dev);
return ret;
}
@ -554,7 +554,7 @@ int ftl_initialize(int minor, FAR struct mtd_dev_s *mtd)
dev->eblock = (FAR uint8_t *)kmm_malloc(dev->geo.erasesize);
if (!dev->eblock)
{
ferr("Failed to allocate an erase block buffer\n");
ferr("ERROR: Failed to allocate an erase block buffer\n");
kmm_free(dev);
return -ENOMEM;
}
@ -585,7 +585,7 @@ int ftl_initialize(int minor, FAR struct mtd_dev_s *mtd)
ret = rwb_initialize(&dev->rwb);
if (ret < 0)
{
ferr("rwb_initialize failed: %d\n", ret);
ferr("ERROR: rwb_initialize failed: %d\n", ret);
kmm_free(dev);
return ret;
}
@ -600,7 +600,7 @@ int ftl_initialize(int minor, FAR struct mtd_dev_s *mtd)
ret = register_blockdriver(devname, &g_bops, 0, dev);
if (ret < 0)
{
ferr("register_blockdriver failed: %d\n", -ret);
ferr("ERROR: register_blockdriver failed: %d\n", -ret);
kmm_free(dev);
}
}

View file

@ -333,7 +333,7 @@ static int hamming_verify256(FAR uint8_t *data, FAR const uint8_t *original)
/* Correct bit */
ferr("Correcting byte %d at bit %d\n", byte, bit);
finfo("Correcting byte %d at bit %d\n", byte, bit);
data[byte] ^= (1 << bit);
return HAMMING_ERROR_SINGLEBIT;

View file

@ -976,7 +976,7 @@ FAR struct mtd_dev_s *is25xp_initialize(FAR struct spi_dev_s *dev)
{
/* Unrecognized! Discard all of that work we just did and return NULL */
ferr("Unrecognized\n");
ferr("ERROR: Unrecognized\n");
kmm_free(priv);
priv = NULL;
}

View file

@ -1031,7 +1031,7 @@ FAR struct mtd_dev_s *m25p_initialize(FAR struct spi_dev_s *dev)
{
/* Unrecognized! Discard all of that work we just did and return NULL */
ferr("Unrecognized\n");
ferr("ERROR: Unrecognized\n");
kmm_free(priv);
priv = NULL;
}

View file

@ -1353,7 +1353,7 @@ int mtdconfig_register(FAR struct mtd_dev_s *mtd)
ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&geo));
if (ret < 0)
{
ferr("MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", ret);
ferr("ERROR: MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", ret);
kmm_free(dev);
goto errout;
}

View file

@ -153,7 +153,7 @@ static int nand_lock(FAR struct nand_dev_s *nand)
errcode = errno;
DEBUGASSERT(errcode != OK);
ferr("sem_wait failed: %d\n", errcode);
ferr("ERROR: sem_wait failed: %d\n", errcode);
return -errcode;
}
@ -574,7 +574,7 @@ static int nand_erase(struct mtd_dev_s *dev, off_t startblock,
ret = nand_eraseblock(nand, startblock, false);
if (ret < 0)
{
ferr("nand_eraseblock failed on block %ld: %d\n",
ferr("ERROR: nand_eraseblock failed on block %ld: %d\n",
(long)startblock, ret);
nand_unlock(nand);
return ret;

View file

@ -446,7 +446,7 @@ FAR struct mtd_dev_s *rammtd_initialize(FAR uint8_t *start, size_t size)
priv = (FAR struct ram_dev_s *)kmm_zalloc(sizeof(struct ram_dev_s));
if (!priv)
{
ferr("Failed to allocate the RAM MTD state structure\n");
ferr("ERROR: Failed to allocate the RAM MTD state structure\n");
return NULL;
}
@ -455,7 +455,7 @@ FAR struct mtd_dev_s *rammtd_initialize(FAR uint8_t *start, size_t size)
nblocks = size / CONFIG_RAMMTD_ERASESIZE;
if (nblocks < 1)
{
ferr("Need to provide at least one full erase block\n");
ferr("ERROR: Need to provide at least one full erase block\n");
return NULL;
}

View file

@ -476,7 +476,7 @@ static int ramtron_waitwritecomplete(struct ramtron_dev_s *priv)
}
else
{
ferr("timeout waiting for write completion\n");
ferr("ERROR: timeout waiting for write completion\n");
retries = -EAGAIN;
}
@ -694,7 +694,7 @@ static ssize_t ramtron_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyt
status = SPI_SEND(priv->dev, RAMTRON_DUMMY);
if ((status & ~RAMTRON_SR_SRWD) == 0)
{
ferr("read status failed - got 0x%02x\n", (unsigned)status);
ferr("ERROR: read status failed - got 0x%02x\n", (unsigned)status);
nbytes = -EIO;
}
#endif

View file

@ -629,7 +629,7 @@ FAR struct mtd_dev_s *s512_initialize(FAR struct mtd_dev_s *mtd)
{
/* Allocation failed! Discard all of that work we just did and return NULL */
ferr("Allocation failed\n");
ferr("ERROR: Allocation failed\n");
kmm_free(priv);
priv = NULL;
}

View file

@ -493,7 +493,7 @@ FAR static void *smart_malloc(FAR struct smart_struct_s *dev,
}
}
ferr("SMART alloc: %ld\n", dev->bytesalloc);
finfo("SMART alloc: %ld\n", dev->bytesalloc);
return ret;
}
#endif
@ -672,12 +672,12 @@ int smart_checkfree(FAR struct smart_struct_s *dev, int lineno)
#ifdef CONFIG_DEBUG_FS
if (freecount != dev->freesectors)
{
ferr("Free count incorrect in line %d! Calculated=%d, dev->freesectors=%d\n",
fwarn("WARNING: Free count incorrect in line %d! Calculated=%d, dev->freesectors=%d\n",
lineno, freecount, dev->freesectors);
/* Determine what changed from the last time which caused this error */
ferr(" ... Prev freesectors=%d, prev releasesectors=%d\n",
fwarn(" ... Prev freesectors=%d, prev releasesectors=%d\n",
prev_freesectors, prev_releasesectors);
if (prev_freecount)
@ -695,7 +695,7 @@ int smart_checkfree(FAR struct smart_struct_s *dev, int lineno)
{
/* This block's values are different from the last time ... report it */
ferr(" ... Block %d: Old Free=%d, old release=%d, New free=%d, new release = %d\n",
fwarn(" ... Block %d: Old Free=%d, old release=%d, New free=%d, new release = %d\n",
x, prev_freecount[x], prev_releasecount[x], blockfree, blockrelease);
}
}
@ -771,7 +771,7 @@ static ssize_t smart_reload(struct smart_struct_s *dev, FAR uint8_t *buffer,
nread = MTD_BREAD(dev->mtd, mtdStartBlock, mtdBlocks, buffer);
if (nread != mtdBlocks)
{
ferr("Read %d blocks starting at block %d failed: %d\n",
ferr("ERROR: Read %d blocks starting at block %d failed: %d\n",
nblocks, startblock, nread);
}
@ -873,7 +873,7 @@ static ssize_t smart_write(FAR struct inode *inode,
ret = MTD_ERASE(dev->mtd, eraseblock, 1);
if (ret < 0)
{
ferr("Erase block=%d failed: %d\n", eraseblock, ret);
ferr("ERROR: Erase block=%d failed: %d\n", eraseblock, ret);
/* Unlock the mutex if we add one */
@ -896,13 +896,13 @@ static ssize_t smart_write(FAR struct inode *inode,
/* Try to write to the sector. */
ferr("Write MTD block %d from offset %d\n", nextblock, offset);
finfo("Write MTD block %d from offset %d\n", nextblock, offset);
nxfrd = MTD_BWRITE(dev->mtd, nextblock, blkstowrite, &buffer[offset]);
if (nxfrd != blkstowrite)
{
/* The block is not empty!! What to do? */
ferr("Write block %d failed: %d.\n", nextblock, nxfrd);
ferr("ERROR: Write block %d failed: %d.\n", nextblock, nxfrd);
/* Unlock the mutex if we add one */
@ -1001,7 +1001,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size)
if (erasesize / dev->sectorsize > 256)
{
/* We can't throw a err message here becasue it is too early.
/* We can't throw a error message here becasue it is too early.
* set the erasesize to zero and exit, then we will detect
* it during mksmartfs or mount.
*/
@ -1079,7 +1079,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size)
if (totalsectors > 65536)
{
err("Invalid SMART sector count %ld\n", totalsectors);
ferr("ERROR: Invalid SMART sector count %ld\n", totalsectors);
return -EINVAL;
}
else if (totalsectors == 65536)
@ -1099,7 +1099,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size)
allocsize, "Sector map");
if (!dev->sMap)
{
ferr("Error allocating SMART virtual map buffer\n");
ferr("ERROR: Error allocating SMART virtual map buffer\n");
goto errexit;
}
@ -1109,7 +1109,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size)
dev->sBitMap = (FAR uint8_t *) smart_malloc(dev, (totalsectors+7) >> 3, "Sector Bitmap");
if (dev->sBitMap == NULL)
{
ferr("Error allocating SMART sector cache\n");
ferr("ERROR: Error allocating SMART sector cache\n");
goto errexit;
}
@ -1144,7 +1144,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size)
if (!dev->sCache)
{
ferr("Error allocating SMART sector cache\n");
ferr("ERROR: Error allocating SMART sector cache\n");
goto errexit;
}
@ -1181,7 +1181,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size)
if (!dev->erasecounts)
{
ferr("Error allocating erase count array\n");
ferr("ERROR: Error allocating erase count array\n");
goto errexit;
}
@ -1195,7 +1195,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size)
SMART_WEAR_BIT_DIVIDE, "Wear status");
if (!dev->wearstatus)
{
ferr("Error allocating wear level status array\n");
ferr("ERROR: Error allocating wear level status array\n");
goto errexit;
}
@ -1210,7 +1210,7 @@ static int smart_setsectorsize(FAR struct smart_struct_s *dev, uint16_t size)
dev->rwbuffer = (FAR char *) smart_malloc(dev, size, "RW Buffer");
if (!dev->rwbuffer)
{
ferr("Error allocating SMART read/write buffer\n");
ferr("ERROR: Error allocating SMART read/write buffer\n");
goto errexit;
}
@ -1304,7 +1304,7 @@ static ssize_t smart_bytewrite(FAR struct smart_struct_s *dev, size_t offset,
ret = MTD_BREAD(dev->mtd, startblock, nblocks, (FAR uint8_t *) dev->rwbuffer);
if (ret < 0)
{
ferr("Error %d reading from device\n", -ret);
ferr("ERROR: Error %d reading from device\n", -ret);
goto errout;
}
@ -1317,7 +1317,7 @@ static ssize_t smart_bytewrite(FAR struct smart_struct_s *dev, size_t offset,
ret = MTD_BWRITE(dev->mtd, startblock, nblocks, (FAR uint8_t *) dev->rwbuffer);
if (ret < 0)
{
ferr("Error %d writing to device\n", -ret);
ferr("ERROR: Error %d writing to device\n", -ret);
goto errout;
}
}
@ -1712,7 +1712,7 @@ static int smart_set_wear_level(FAR struct smart_struct_s *dev, uint16_t block,
if (level > 15)
{
err("Fatal Design Error! Wear level > 15, block=%d\n", block);
err("ERROR: Fatal Design Error! Wear level > 15, block=%d\n", block);
/* This is a design flaw, but we still allow processing, otherwise we
* will corrupt the volume. It's better to have a few blocks that are
@ -1984,7 +1984,7 @@ static int smart_scan(FAR struct smart_struct_s *dev)
{
/* Error in logical sector read from the MTD device */
ferr("Invalid logical sector %d at physical %d.\n",
ferr("ERROR: Invalid logical sector %d at physical %d.\n",
logicalsector, sector);
continue;
}
@ -2001,7 +2001,7 @@ static int smart_scan(FAR struct smart_struct_s *dev)
(FAR uint8_t *)dev->rwbuffer);
if (ret != 32)
{
ferr("Error reading physical sector %d.\n", sector);
ferr("ERROR: Error reading physical sector %d.\n", sector);
goto err_out;
}
@ -2053,7 +2053,7 @@ static int smart_scan(FAR struct smart_struct_s *dev)
smart_malloc(dev, sizeof(*rootdirdev), "Root Dir");
if (rootdirdev == NULL)
{
ferr("Memory alloc failed\n");
ferr("ERROR: Memory alloc failed\n");
ret = -ENOMEM;
goto err_out;
}
@ -2221,7 +2221,7 @@ static int smart_scan(FAR struct smart_struct_s *dev)
ret = smart_bytewrite(dev, offset, 1, &header.status);
if (ret < 0)
{
ferr("Error %d releasing duplicate sector\n", -ret);
ferr("ERROR: Error %d releasing duplicate sector\n", -ret);
goto err_out;
}
}
@ -2267,7 +2267,7 @@ static int smart_scan(FAR struct smart_struct_s *dev)
dev->mtdBlksPerSector, (uint8_t *) dev->rwbuffer);
if (ret != dev->mtdBlksPerSector)
{
ferr("Error reading physical sector %d.\n", sector);
ferr("ERROR: Error reading physical sector %d.\n", sector);
goto err_out;
}
@ -2284,7 +2284,7 @@ static int smart_scan(FAR struct smart_struct_s *dev)
{
/* Unable to find a free sector!!! */
ferr("Can't find a free sector for relocation\n");
ferr("ERROR: Can't find a free sector for relocation\n");
ret = -ENOSPC;
goto err_out;
}
@ -2321,29 +2321,29 @@ static int smart_scan(FAR struct smart_struct_s *dev)
smart_read_wearstatus(dev);
#endif
ferr("SMART Scan\n");
ferr(" Erase size: %10d\n", dev->sectorsPerBlk * dev->sectorsize);
ferr(" Erase count: %10d\n", dev->neraseblocks);
ferr(" Sect/block: %10d\n", dev->sectorsPerBlk);
ferr(" MTD Blk/Sect: %10d\n", dev->mtdBlksPerSector);
finfo("SMART Scan\n");
finfo(" Erase size: %10d\n", dev->sectorsPerBlk * dev->sectorsize);
finfo(" Erase count: %10d\n", dev->neraseblocks);
finfo(" Sect/block: %10d\n", dev->sectorsPerBlk);
finfo(" MTD Blk/Sect: %10d\n", dev->mtdBlksPerSector);
/* Validate the geometry */
if (dev->mtdBlksPerSector == 0 || dev->sectorsPerBlk == 0 ||
dev->sectorsPerBlk == 0 || dev->sectorsize == 0)
{
ferr("Invalid Geometry!\n");
ferr("ERROR: Invalid Geometry!\n");
ret = -EINVAL;
goto err_out;
}
#ifdef CONFIG_MTD_SMART_ALLOC_DEBUG
ferr(" Allocations:\n");
finfo(" Allocations:\n");
for (sector = 0; sector < SMART_MAX_ALLOCS; sector++)
{
if (dev->alloc[sector].ptr != NULL)
{
ferr(" %s: %d\n", dev->alloc[sector].name, dev->alloc[sector].size);
finfo(" %s: %d\n", dev->alloc[sector].name, dev->alloc[sector].size);
}
}
#endif
@ -2515,7 +2515,7 @@ static void smart_erase_block_if_empty(FAR struct smart_struct_s *dev,
#ifdef CONFIG_SMART_LOCAL_CHECKFREE
if (smart_checkfree(dev, __LINE__) != OK)
{
ferr(" ...while eraseing block %d\n", block);
fwarn(" ...while eraseing block %d\n", block);
}
#endif
}
@ -2554,7 +2554,7 @@ static int smart_relocate_static_data(FAR struct smart_struct_s *dev, uint16_t b
#ifdef CONFIG_SMART_LOCAL_CHECKFREE
if (smart_checkfree(dev, __LINE__) != OK)
{
ferr(" ...about to relocate static data %d\n", block);
fwarn(" ...about to relocate static data %d\n", block);
}
#endif
@ -2645,7 +2645,7 @@ static int smart_relocate_static_data(FAR struct smart_struct_s *dev, uint16_t b
dev->mtdBlksPerSector, (FAR uint8_t *) dev->rwbuffer);
if (ret != dev->mtdBlksPerSector)
{
ferr("Error reading sector %d\n", sector);
ferr("ERROR: Error reading sector %d\n", sector);
ret = -EIO;
goto errout;
}
@ -2681,7 +2681,7 @@ static int smart_relocate_static_data(FAR struct smart_struct_s *dev, uint16_t b
{
/* Unable to find a free sector!!! */
ferr("Can't find a free sector for relocation\n");
ferr("ERROR: Can't find a free sector for relocation\n");
ret = -ENOSPC;
goto errout;
}
@ -2736,7 +2736,7 @@ static int smart_relocate_static_data(FAR struct smart_struct_s *dev, uint16_t b
#ifdef CONFIG_SMART_LOCAL_CHECKFREE
if (smart_checkfree(dev, __LINE__) != OK)
{
ferr(" ...about to erase static block %d\n", block);
fwarn(" ...about to erase static block %d\n", block);
}
#endif
@ -2748,7 +2748,7 @@ static int smart_relocate_static_data(FAR struct smart_struct_s *dev, uint16_t b
#ifdef CONFIG_SMART_LOCAL_CHECKFREE
if (smart_checkfree(dev, __LINE__) != OK)
{
ferr(" ...done erasing static block %d\n", block);
fwarn(" ...done erasing static block %d\n", block);
}
#endif
@ -2862,10 +2862,10 @@ static inline int smart_llformat(FAR struct smart_struct_s *dev, unsigned long a
{
dev->erasesize = dev->geo.erasesize;
err("ERROR: Invalid geometery ... Sectors per erase block must be 1-256\n");
err(" Erase block size = %d\n", dev->erasesize);
err(" Sector size = %d\n", dev->sectorsize);
err(" Sectors/erase block = %d\n", dev->erasesize / dev->sectorsize);
ferr("ERROR: Invalid geometery ... Sectors per erase block must be 1-256\n");
ferr(" Erase block size = %d\n", dev->erasesize);
ferr(" Sector size = %d\n", dev->sectorsize);
ferr(" Sectors/erase block = %d\n", dev->erasesize / dev->sectorsize);
return -EINVAL;
}
@ -2951,7 +2951,7 @@ static inline int smart_llformat(FAR struct smart_struct_s *dev, unsigned long a
{
/* The block is not empty!! What to do? */
ferr("Write block 0 failed: %d.\n", wrcount);
ferr("ERROR: Write block 0 failed: %d.\n", wrcount);
/* Unlock the mutex if we add one */
@ -3132,7 +3132,7 @@ static int smart_relocate_sector(FAR struct smart_struct_s *dev,
ret = smart_bytewrite(dev, offset, 1, &newstatus);
if (ret < 0)
{
ferr("Error %d committing new sector %d\n" -ret, newsector);
ferr("ERROR: Error %d committing new sector %d\n" -ret, newsector);
goto errout;
}
#endif /* CONFIG_MTD_SMART_ENABLE_CRC */
@ -3149,7 +3149,7 @@ static int smart_relocate_sector(FAR struct smart_struct_s *dev,
ret = smart_bytewrite(dev, offset, 1, &newstatus);
if (ret < 0)
{
ferr("Error %d releasing old sector %d\n" -ret, oldsector);
ferr("ERROR: Error %d releasing old sector %d\n" -ret, oldsector);
}
#ifndef CONFIG_MTD_SMART_ENABLE_CRC
@ -3193,7 +3193,7 @@ static int smart_relocate_block(FAR struct smart_struct_s *dev, uint16_t block)
#ifdef CONFIG_SMART_LOCAL_CHECKFREE
if (smart_checkfree(dev, __LINE__) != OK)
{
ferr(" ...while relocating block %d, free=%d\n", block, dev->freesectors);
fwarn(" ...while relocating block %d, free=%d\n", block, dev->freesectors);
}
#endif
@ -3210,7 +3210,7 @@ static int smart_relocate_block(FAR struct smart_struct_s *dev, uint16_t block)
if (freecount >= dev->freesectors)
{
ferr("Program bug! Relocating the only block (%d) with free sectors!\n",
ferr("ERROR: Program bug! Relocating the only block (%d) with free sectors!\n",
block);
ret = -EIO;
goto errout;
@ -3240,7 +3240,7 @@ static int smart_relocate_block(FAR struct smart_struct_s *dev, uint16_t block)
dev->mtdBlksPerSector, (FAR uint8_t *) dev->rwbuffer);
if (ret != dev->mtdBlksPerSector)
{
ferr("Error reading sector %d\n", x);
ferr("ERROR: Error reading sector %d\n", x);
ret = -EIO;
goto errout;
}
@ -3271,7 +3271,7 @@ static int smart_relocate_block(FAR struct smart_struct_s *dev, uint16_t block)
{
/* Unable to find a free sector!!! */
ferr("Can't find a free sector for relocation\n");
ferr("ERROR: Can't find a free sector for relocation\n");
ret = -ENOSPC;
goto errout;
}
@ -3303,7 +3303,7 @@ static int smart_relocate_block(FAR struct smart_struct_s *dev, uint16_t block)
{
/* Unable to find a free sector!!! */
ferr("Can't find a free sector for relocation\n");
ferr("ERROR: Can't find a free sector for relocation\n");
ret = -ENOSPC;
goto errout;
}
@ -3383,8 +3383,8 @@ static int smart_relocate_block(FAR struct smart_struct_s *dev, uint16_t block)
#ifdef CONFIG_SMART_LOCAL_CHECKFREE
if (smart_checkfree(dev, __LINE__) != OK)
{
ferr(" ...while relocating block %d, free=%d, release=%d, oldrelease=%d\n",
block, freecount, releasecount, oldrelease);
fwarn(" ...while relocating block %d, free=%d, release=%d, oldrelease=%d\n",
block, freecount, releasecount, oldrelease);
}
#endif
@ -3533,7 +3533,7 @@ retry:
{
if (smart_relocate_block(dev, block) < 0)
{
ferr("Error relocating block while finding free phys sector\n");
ferr("ERROR: Error relocating block while finding free phys sector\n");
return -1;
}
@ -3566,7 +3566,7 @@ retry:
#endif
{
err("Program bug! Expected a free sector, free=%d\n", dev->freesectors);
ferr("ERROR: Program bug! Expected a free sector, free=%d\n", dev->freesectors);
for (x = 0; x < dev->neraseblocks; x++)
{
printf("%d ", dev->freecount[x]);
@ -3620,7 +3620,7 @@ retry:
(FAR uint8_t *) &header);
if (ret != sizeof(struct smart_sect_header_s))
{
ferr("Error reading phys sector %d\n", physicalsector);
ferr("ERROR: Error reading phys sector %d\n", physicalsector);
return -1;
}
@ -3641,12 +3641,12 @@ retry:
if (physicalsector == 0xFFFF)
{
err("Program bug! Expected a free sector\n");
ferr("ERROR: Program bug! Expected a free sector\n");
}
if (physicalsector >= dev->totalsectors)
{
err("Program bug! Selected sector too big!!!\n");
ferr("ERROR: Program bug! Selected sector too big!!!\n");
}
return physicalsector;
@ -3742,7 +3742,7 @@ static int smart_garbagecollect(FAR struct smart_struct_s *dev)
#ifdef CONFIG_SMART_LOCAL_CHECKFREE
if (smart_checkfree(dev, __LINE__) != OK)
{
ferr(" ...before collecting block %d\n", collectblock);
fwarn(" ...before collecting block %d\n", collectblock);
}
#endif
@ -3763,7 +3763,7 @@ static int smart_garbagecollect(FAR struct smart_struct_s *dev)
#ifdef CONFIG_SMART_LOCAL_CHECKFREE
if (smart_checkfree(dev, __LINE__) != OK)
{
ferr(" ...while collecting block %d\n", collectblock);
fwarn(" ...while collecting block %d\n", collectblock);
}
#endif
@ -3876,7 +3876,8 @@ static int smart_write_wearstatus(struct smart_struct_s *dev)
if (sector >= SMART_FIRST_DIR_SECTOR)
{
/* Error, wear status bit too large! */
ferr("Invalid geometry - wear level status too large\n");
ferr("ERROR: Invalid geometry - wear level status too large\n");
ret = -EINVAL;
goto errout;
}
@ -3987,7 +3988,7 @@ static inline int smart_read_wearstatus(FAR struct smart_struct_s *dev)
ret = smart_allocsector(dev, sector);
if (ret != sector)
{
ferr("Unable to allocate wear level status sector %d\n", sector);
ferr("ERROR: Unable to allocate wear level status sector %d\n", sector);
ret = -EINVAL;
goto errout;
}
@ -4014,7 +4015,7 @@ static inline int smart_read_wearstatus(FAR struct smart_struct_s *dev)
{
/* Error, wear status bit too large! */
ferr("Invalid geometry - wear level status too large\n");
ferr("ERROR: Invalid geometry - wear level status too large\n");
ret = -EINVAL;
goto errout;
}
@ -4095,7 +4096,7 @@ static int smart_write_alloc_sector(FAR struct smart_struct_s *dev,
{
/* The block is not empty!! What to do? */
ferr("Write block %d failed: %d.\n", physical *
ferr("ERROR: Write block %d failed: %d.\n", physical *
dev->mtdBlksPerSector, ret);
/* Unlock the mutex if we add one */
@ -4200,7 +4201,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev,
if (req->logsector >= dev->totalsectors)
{
ferr("Logical sector %d too large\n", req->logsector);
ferr("ERROR: Logical sector %d too large\n", req->logsector);
ret = -EINVAL;
goto errout;
@ -4239,7 +4240,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev,
#endif
if (physsector == 0xFFFF)
{
ferr("Logical sector %d not allocated\n", req->logsector);
ferr("ERROR: Logical sector %d not allocated\n", req->logsector);
ret = -EINVAL;
goto errout;
}
@ -4251,7 +4252,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev,
dev->rwbuffer);
if (ret != dev->mtdBlksPerSector)
{
ferr("Error reading phys sector %d\n", physsector);
ferr("ERROR: Error reading phys sector %d\n", physsector);
ret = -EIO;
goto errout;
}
@ -4323,7 +4324,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev,
physsector = smart_findfreephyssector(dev, FALSE);
if (physsector == 0xFFFF)
{
ferr("Error relocating sector %d\n", req->logsector);
ferr("ERROR: Error relocating sector %d\n", req->logsector);
ret = -EIO;
goto errout;
}
@ -4443,7 +4444,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev,
dev->mtdBlksPerSector, (FAR uint8_t *) dev->rwbuffer);
if (ret != dev->mtdBlksPerSector)
{
ferr("Error writing to physical sector %d\n", physsector);
ferr("ERROR: Error writing to physical sector %d\n", physsector);
ret = -EIO;
goto errout;
}
@ -4527,7 +4528,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev,
dev->mtdBlksPerSector, (FAR uint8_t *) dev->rwbuffer);
if (ret != dev->mtdBlksPerSector)
{
ferr("Error writing to physical sector %d\n", physsector);
ferr("ERROR: Error writing to physical sector %d\n", physsector);
ret = -EIO;
goto errout;
}
@ -4547,7 +4548,7 @@ static int smart_writesector(FAR struct smart_struct_s *dev,
{
/* TODO: Mark this as a bad block! */
ferr("Error validating physical sector %d\n", physsector);
ferr("ERROR: Error validating physical sector %d\n", physsector);
ret = -EIO;
goto errout;
}
@ -4602,7 +4603,7 @@ static int smart_readsector(FAR struct smart_struct_s *dev,
if (req->logsector >= dev->totalsectors)
{
ferr("Logical sector %d too large\n", req->logsector);
ferr("ERROR: Logical sector %d too large\n", req->logsector);
ret = -EINVAL;
goto errout;
@ -4615,7 +4616,7 @@ static int smart_readsector(FAR struct smart_struct_s *dev,
#endif
if (physsector == 0xFFFF)
{
ferr("Logical sector %d not allocated\n", req->logsector);
ferr("ERROR: Logical sector %d not allocated\n", req->logsector);
ret = -EINVAL;
goto errout;
}
@ -4632,7 +4633,7 @@ static int smart_readsector(FAR struct smart_struct_s *dev,
{
/* TODO: Mark the block bad */
ferr("Error reading phys sector %d\n", physsector);
ferr("ERROR: Error reading phys sector %d\n", physsector);
ret = -EIO;
goto errout;
}
@ -4657,7 +4658,7 @@ static int smart_readsector(FAR struct smart_struct_s *dev,
{
/* TODO: Mark the block bad */
ferr("Error validating sector %d CRC during read\n", physsector);
ferr("ERROR: Error validating sector %d CRC during read\n", physsector);
ret = -EIO;
goto errout;
}
@ -4677,7 +4678,7 @@ static int smart_readsector(FAR struct smart_struct_s *dev,
sizeof(struct smart_sect_header_s), (FAR uint8_t *) &header);
if (ret != sizeof(struct smart_sect_header_s))
{
finfo("Error reading sector %d header\n", physsector);
finfo("ERROR: Error reading sector %d header\n", physsector);
ret = -EIO;
goto errout;
}
@ -4690,7 +4691,7 @@ static int smart_readsector(FAR struct smart_struct_s *dev,
{
/* Error in sector header! How do we handle this? */
ferr("Error in logical sector %d header, phys=%d\n",
ferr("ERROR: Error in logical sector %d header, phys=%d\n",
req->logsector, physsector);
ret = -EIO;
goto errout;
@ -4705,7 +4706,7 @@ static int smart_readsector(FAR struct smart_struct_s *dev,
req->buffer);
if (ret != req->count)
{
ferr("Error reading phys sector %d\n", physsector);
ferr("ERROR: Error reading phys sector %d\n", physsector);
ret = -EIO;
goto errout;
}
@ -4873,7 +4874,7 @@ static inline int smart_allocsector(FAR struct smart_struct_s *dev,
* bug in our code?
*/
ferr("No free logical sector numbers! Free sectors = %d\n",
ferr("ERROR: No free logical sector numbers! Free sectors = %d\n",
dev->freesectors);
return -EIO;
@ -4907,7 +4908,7 @@ static inline int smart_allocsector(FAR struct smart_struct_s *dev,
kmm_malloc(sizeof(struct smart_allocsector_s));
if (allocsect == NULL)
{
ferr("Out of memory allocting sector\n");
ferr("ERROR: Out of memory allocting sector\n");
return -ENOMEM;
}
@ -4988,7 +4989,7 @@ static inline int smart_freesector(FAR struct smart_struct_s *dev,
if (!(dev->sBitMap[logicalsector >> 3] & (1 << (logicalsector & 0x07))))
#endif
{
ferr("Invalid release - sector %d not allocated\n", logicalsector);
ferr("ERROR: Invalid release - sector %d not allocated\n", logicalsector);
ret = -EINVAL;
goto errout;
}
@ -5015,7 +5016,7 @@ static inline int smart_freesector(FAR struct smart_struct_s *dev,
{
/* Hmmm... something is wrong. This should always match! Bug in our code? */
ferr("Sector %d logical sector in header doesn't match\n", logicalsector);
ferr("ERROR: Sector %d logical sector in header doesn't match\n", logicalsector);
ret = -EINVAL;
goto errout;
}
@ -5034,7 +5035,7 @@ static inline int smart_freesector(FAR struct smart_struct_s *dev,
ret = smart_bytewrite(dev, offset, 1, &header.status);
if (ret != 1)
{
ferr("Error updating physical sector %d status\n", physsector);
ferr("ERROR: Error updating physical sector %d status\n", physsector);
goto errout;
}
@ -5228,7 +5229,7 @@ static int smart_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
{
case SMART_DEBUG_CMD_SET_DEBUG_LEVEL:
dev->debuglevel = debug_data->debugdata;
err("Debug level set to %d\n", dev->debuglevel);
finfo("Debug level set to %d\n", dev->debuglevel);
ret = OK;
goto ok_out;
@ -5314,7 +5315,7 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd, FAR const char *partn
ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&dev->geo));
if (ret < 0)
{
ferr("MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", ret);
ferr("ERROR: MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", ret);
goto errout;
}
@ -5348,7 +5349,7 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd, FAR const char *partn
totalsectors = dev->neraseblocks * dev->sectorsPerBlk;
if (totalsectors > 65536)
{
ferr("SMART Sector size too small for device\n");
ferr("ERROR: SMART Sector size too small for device\n");
ret = -EINVAL;
goto errout;
}
@ -5399,7 +5400,7 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd, FAR const char *partn
smart_malloc(dev, sizeof(*rootdirdev), "Root Dir");
if (rootdirdev == NULL)
{
ferr("register_blockdriver failed: %d\n", -ret);
ferr("ERROR: register_blockdriver failed: %d\n", -ret);
ret = -ENOMEM;
goto errout;
}
@ -5427,7 +5428,7 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd, FAR const char *partn
if (ret < 0)
{
ferr("register_blockdriver failed: %d\n", -ret);
ferr("ERROR: register_blockdriver failed: %d\n", -ret);
goto errout;
}
@ -5436,7 +5437,7 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd, FAR const char *partn
ret = smart_scan(dev);
if (ret < 0)
{
ferr("smart_scan failed: %d\n", -ret);
ferr("ERROR: smart_scan failed: %d\n", -ret);
goto errout;
}
}
@ -5564,7 +5565,7 @@ static int smart_loteardown(FAR const char *devname)
ret = open_blockdriver(devname, MS_RDONLY, &inode);
if (ret < 0)
{
err("Failed to open %s: %d\n", devname, -ret);
ferr("ERROR: Failed to open %s: %d\n", devname, -ret);
return ret;
}
@ -5576,7 +5577,7 @@ static int smart_loteardown(FAR const char *devname)
if (!filemtd_isfilemtd(dev->mtd))
{
ferr("Device is not a SMART loop: %s\n", devname);
ferr("ERROR: Device is not a SMART loop: %s\n", devname);
return -EINVAL;
}

View file

@ -1206,7 +1206,7 @@ FAR struct mtd_dev_s *sst25_initialize(FAR struct spi_dev_s *dev)
{
/* Unrecognized! Discard all of that work we just did and return NULL */
ferr("Unrecognized\n");
ferr("ERROR: Unrecognized\n");
kmm_free(priv);
priv = NULL;
}
@ -1226,7 +1226,7 @@ FAR struct mtd_dev_s *sst25_initialize(FAR struct spi_dev_s *dev)
{
/* Allocation failed! Discard all of that work we just did and return NULL */
ferr("Allocation failed\n");
ferr("ERROR: Allocation failed\n");
kmm_free(priv);
priv = NULL;
}

View file

@ -954,7 +954,7 @@ FAR struct mtd_dev_s *sst25xx_initialize(FAR struct spi_dev_s *dev)
{
/* Unrecognized! Discard all of that work we just did and return NULL */
ferr("Unrecognized\n");
ferr("ERROR: Unrecognized\n");
kmm_free(priv);
priv = NULL;
}

View file

@ -340,8 +340,8 @@ static inline int sst26_readid(struct sst26_dev_s *priv)
SPI_SELECT(priv->dev, SPIDEV_FLASH, false);
sst26_unlock(priv->dev);
llerr("manufacturer: %02x memory: %02x capacity: %02x\n",
manufacturer, memory, capacity);
llinfo("manufacturer: %02x memory: %02x capacity: %02x\n",
manufacturer, memory, capacity);
/* Check for a valid manufacturer and memory type */
@ -936,7 +936,7 @@ FAR struct mtd_dev_s *sst26_initialize_spi(FAR struct spi_dev_s *dev)
{
/* Unrecognized! Discard all of that work we just did and return NULL */
ssterr("Unrecognized\n");
ssterr("ERROR: Unrecognized\n");
kmm_free(priv);
priv = NULL;
}

View file

@ -819,7 +819,7 @@ FAR struct mtd_dev_s *sst39vf_initialize(void)
if (manufacturer != SST_MANUFACTURER_ID)
{
ferr("Unrecognized manufacturer: %02x\n", manufacturer);
ferr("ERROR: Unrecognized manufacturer: %02x\n", manufacturer);
return NULL;
}
else if (chipid == g_sst39vf1601.chipid)
@ -840,7 +840,7 @@ FAR struct mtd_dev_s *sst39vf_initialize(void)
}
else
{
ferr("Unrecognized chip ID: %04x\n", chipid);
ferr("ERROR: Unrecognized chip ID: %04x\n", chipid);
return NULL;
}

View file

@ -1256,7 +1256,7 @@ FAR struct mtd_dev_s *w25_initialize(FAR struct spi_dev_s *spi)
{
/* Unrecognized! Discard all of that work we just did and return NULL */
ferr("Unrecognized\n");
ferr("ERROR: Unrecognized\n");
kmm_free(priv);
priv = NULL;
}
@ -1276,7 +1276,7 @@ FAR struct mtd_dev_s *w25_initialize(FAR struct spi_dev_s *spi)
{
/* Allocation failed! Discard all of that work we just did and return NULL */
ferr("Allocation failed\n");
ferr("ERROR: Allocation failed\n");
kmm_free(priv);
priv = NULL;
}

View file

@ -704,7 +704,7 @@ static int cs89x0_interrupt(int irq, FAR void *context)
case ISQ_BUFEVENT:
if ((isq & ISQ_BUFEVENT_TXUNDERRUN) != 0)
{
nerr("Transmit underrun\n");
nerr("ERROR: Transmit underrun\n");
#ifdef CONFIG_CS89x0_XMITEARLY
cd89x0->cs_txunderrun++;
if (cd89x0->cs_txunderrun == 3)
@ -819,9 +819,9 @@ static int cs89x0_ifup(struct net_driver_s *dev)
{
struct cs89x0_driver_s *cs89x0 = (struct cs89x0_driver_s *)dev->d_private;
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Initialize the Ethernet interface */
#warning "Missing logic"

View file

@ -865,7 +865,7 @@ static void dm9x_receive(FAR struct dm9x_driver_s *dm9x)
{
/* Bad RX packet... update statistics */
nerr("Received packet with errors: %02x\n", rx.desc.rx_status);
nerr("ERROR: Received packet with errors: %02x\n", rx.desc.rx_status);
NETDEV_RXERRORS(&dm9x->dm_dev);
/* Drop this packet and continue to check the next packet */
@ -877,7 +877,7 @@ static void dm9x_receive(FAR struct dm9x_driver_s *dm9x)
else if (rx.desc.rx_len < ETH_HDRLEN || rx.desc.rx_len > (CONFIG_NET_ETH_MTU + 2))
{
nerr("RX length error\n");
nerr("ERROR: RX length error\n");
NETDEV_RXERRORS(&dm9x->dm_dev);
/* Drop this packet and continue to check the next packet */
@ -1042,7 +1042,7 @@ static void dm9x_txdone(struct dm9x_driver_s *dm9x)
}
else
{
nerr("Bad TX count (TX1END)\n");
nerr("ERROR: Bad TX count (TX1END)\n");
}
}
@ -1054,7 +1054,7 @@ static void dm9x_txdone(struct dm9x_driver_s *dm9x)
}
else
{
nerr("Bad TX count (TX2END)\n");
nerr("ERROR: Bad TX count (TX2END)\n");
}
}
@ -1144,7 +1144,8 @@ static int dm9x_interrupt(int irq, FAR void *context)
}
up_mdelay(1);
}
nerr("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M");
nerr("ERROR: delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M");
}
/* Check if we received an incoming packet */
@ -1206,17 +1207,17 @@ static void dm9x_txtimeout(int argc, uint32_t arg, ...)
{
struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)arg;
nerr("TX timeout\n");
nerr("ERROR: TX timeout\n");
/* Increment statistics and dump debug info */
NETDEV_TXTIMEOUTS(dm9x->dm_dev);
nerr(" TX packet count: %d\n", dm9x->dm_ntxpending);
nerr(" TX read pointer address: 0x%02x:%02x\n",
getreg(DM9X_TRPAH), getreg(DM9X_TRPAL));
nerr(" Memory data write address: 0x%02x:%02x (DM9010)\n",
getreg(DM9X_MDWAH), getreg(DM9X_MDWAL));
ninfo(" TX packet count: %d\n", dm9x->dm_ntxpending);
ninfo(" TX read pointer address: 0x%02x:%02x\n",
getreg(DM9X_TRPAH), getreg(DM9X_TRPAL));
ninfo(" Memory data write address: 0x%02x:%02x (DM9010)\n",
getreg(DM9X_MDWAH), getreg(DM9X_MDWAL));
/* Then reset the DM90x0 */
@ -1342,9 +1343,9 @@ static int dm9x_ifup(struct net_driver_s *dev)
uint8_t netstatus;
int i;
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Initilize DM90x0 chip */
@ -1372,7 +1373,7 @@ static int dm9x_ifup(struct net_driver_s *dev)
up_mdelay(1);
}
nerr("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M");
ninfo("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M");
/* Set and activate a timer process */
@ -1407,7 +1408,7 @@ static int dm9x_ifdown(struct net_driver_s *dev)
struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private;
irqstate_t flags;
nerr("Stopping\n");
ninfo("Stopping\n");
/* Disable the DM9X interrupt */
@ -1456,7 +1457,7 @@ static int dm9x_txavail(struct net_driver_s *dev)
struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private;
irqstate_t flags;
nerr("Polling\n");
ninfo("Polling\n");
flags = enter_critical_section();
/* Ignore the notification if the interface is not yet up */
@ -1557,7 +1558,7 @@ static int dm9x_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac)
static void dm9x_bringup(struct dm9x_driver_s *dm9x)
{
nerr("Initializing\n");
ninfo("Initializing\n");
/* Set the internal PHY power-on, GPIOs normal, and wait 2ms */
@ -1722,13 +1723,13 @@ int dm9x_initialize(void)
vid = (((uint16_t)getreg(DM9X_VIDH)) << 8) | (uint16_t)getreg(DM9X_VIDL);
pid = (((uint16_t)getreg(DM9X_PIDH)) << 8) | (uint16_t)getreg(DM9X_PIDL);
nllerr("I/O base: %08x VID: %04x PID: %04x\n", CONFIG_DM9X_BASE, vid, pid);
nllinfo("I/O base: %08x VID: %04x PID: %04x\n", CONFIG_DM9X_BASE, vid, pid);
/* Check if a DM90x0 chip is recognized at this I/O base */
if (vid != DM9X_DAVICOMVID || (pid != DM9X_DM9000PID && pid != DM9X_DM9010PID))
{
nllerr("DM90x0 vendor/product ID not found at this base address\n");
nllerr("ERROR: DM90x0 vendor/product ID not found at this base address\n");
return -ENODEV;
}
@ -1738,7 +1739,7 @@ int dm9x_initialize(void)
{
/* We could not attach the ISR to the ISR */
nllerr("irq_attach() failed\n");
nllerr("ERROR: irq_attach() failed\n");
return -EAGAIN;
}
@ -1767,7 +1768,7 @@ int dm9x_initialize(void)
mptr[i] = getreg(j);
}
nllerr("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n",
nllinfo("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n",
mptr[0], mptr[1], mptr[2], mptr[3], mptr[4], mptr[5]);
/* Register the device with the OS so that socket IOCTLs can be performed */

View file

@ -799,9 +799,9 @@ static int e1000_ifup(struct net_driver_s *dev)
{
struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private;
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */

View file

@ -1484,7 +1484,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
else
#endif
{
nllerr("Unsupported packet type dropped (%02x)\n", htons(BUF->type));
nllerr("ERROR: Unsupported packet type dropped (%02x)\n", htons(BUF->type));
NETDEV_RXDROPPED(&priv->dev);
}
}
@ -1558,7 +1558,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv)
else if (pktlen > (CONFIG_NET_ETH_MTU + 4) || pktlen <= (ETH_HDRLEN + 4))
{
nllerr("Bad packet size dropped (%d)\n", pktlen);
nllerr("ERROR: Bad packet size dropped (%d)\n", pktlen);
NETDEV_RXERRORS(&priv->dev);
}
@ -1878,7 +1878,7 @@ static void enc_toworker(FAR void *arg)
net_lock_t lock;
int ret;
nllerr("Tx timeout\n");
nllerr("ERROR: Tx timeout\n");
DEBUGASSERT(priv);
/* Get exclusive access to the network */
@ -2067,9 +2067,9 @@ static int enc_ifup(struct net_driver_s *dev)
FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private;
int ret;
nllerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
nllinfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Lock the SPI bus so that we have exclusive access */
@ -2139,9 +2139,9 @@ static int enc_ifdown(struct net_driver_s *dev)
irqstate_t flags;
int ret;
nllerr("Taking down: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
nllinfo("Taking down: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Lock the SPI bus so that we have exclusive access */
@ -2473,7 +2473,7 @@ static int enc_reset(FAR struct enc_driver_s *priv)
{
uint8_t regval;
nllerr("Reset\n");
nllwarn("WARNING: Reset\n");
/* Configure SPI for the ENC28J60 */
@ -2524,7 +2524,7 @@ static int enc_reset(FAR struct enc_driver_s *priv)
regval = enc_rdbreg(priv, ENC_EREVID);
if (regval == 0x00 || regval == 0xff)
{
nllerr("Bad Rev ID: %02x\n", regval);
nllerr("ERROR: Bad Rev ID: %02x\n", regval);
return -ENODEV;
}

View file

@ -1127,7 +1127,7 @@ static int enc_txenqueue(FAR struct enc_driver_s *priv)
}
else
{
nllerr("no free descriptors\n");
nllerr("ERROR: no free descriptors\n");
ret = -ENOMEM;
}
@ -1612,7 +1612,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
enc_rxrmpkt(priv, descr);
nllerr("Unsupported packet type dropped (%02x)\n", htons(BUF->type));
nllerr("ERROR: Unsupported packet type dropped (%02x)\n", htons(BUF->type));
NETDEV_RXDROPPED(&priv->dev);
}
@ -1719,7 +1719,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv)
else if (pktlen > (CONFIG_NET_ETH_MTU + 4) || pktlen <= (ETH_HDRLEN + 4))
{
nllerr("Bad packet size dropped (%d)\n", pktlen);
nllerr("ERROR: Bad packet size dropped (%d)\n", pktlen);
/* Discard packet */
@ -1774,17 +1774,17 @@ static void enc_rxabtif(FAR struct enc_driver_s *priv)
#if 0
/* Free the last received packet from the RX queue */
nllerr("rx abort\n");
nllerr("ESTAT: %04x\n", enc_rdreg(priv, ENC_ESTAT));
nllerr("EIR: %04x\n", enc_rdreg(priv, ENC_EIR));
nllerr("ERXTAIL: %04x\n", enc_rdreg(priv, ENC_ERXTAIL));
nllerr("ERXHAED: %04x\n", enc_rdreg(priv, ENC_ERXHEAD));
nllinfo("rx abort\n");
nllinfo("ESTAT: %04x\n", enc_rdreg(priv, ENC_ESTAT));
nllinfo("EIR: %04x\n", enc_rdreg(priv, ENC_EIR));
nllinfo("ERXTAIL: %04x\n", enc_rdreg(priv, ENC_ERXTAIL));
nllinfo("ERXHAED: %04x\n", enc_rdreg(priv, ENC_ERXHEAD));
descr = (FAR struct enc_descr_s *)sq_peek(&priv->rxqueue);
while (descr != NULL)
{
nllerr("addr: %04x len: %d\n", descr->addr, descr->len);
nllinfo("addr: %04x len: %d\n", descr->addr, descr->len);
descr = (FAR struct enc_descr_s *)sq_next(descr);
}
@ -1797,7 +1797,7 @@ static void enc_rxabtif(FAR struct enc_driver_s *priv)
{
enc_rxrmpkt(priv, descr);
nllerr("pending packet freed\n");
nllinfo("pending packet freed\n");
}
else
{
@ -2043,7 +2043,7 @@ static void enc_toworker(FAR void *arg)
net_lock_t lock;
int ret;
nllerr("Tx timeout\n");
nllerr("ERROR: Tx timeout\n");
DEBUGASSERT(priv);
/* Get exclusive access to the network. */
@ -2231,9 +2231,9 @@ static int enc_ifup(struct net_driver_s *dev)
FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private;
int ret;
nllerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
nllinfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Lock the SPI bus so that we have exclusive access */
@ -2307,9 +2307,9 @@ static int enc_ifdown(struct net_driver_s *dev)
irqstate_t flags;
int ret;
nllerr("Taking down: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
nllinfo("Taking down: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Lock the SPI bus so that we have exclusive access */

View file

@ -1311,15 +1311,15 @@ static int ftmac100_ifup(struct net_driver_s *dev)
FAR struct ftmac100_driver_s *priv = (FAR struct ftmac100_driver_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
#endif
#ifdef CONFIG_NET_IPv6
nerr("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
#endif
/* Initialize PHYs, the Ethernet interface, and setup up Ethernet

View file

@ -203,7 +203,7 @@ static int lo_txpoll(FAR struct net_driver_s *dev)
else
#endif
{
nerr("WARNING: Unrecognized packet type dropped: %02x\n", IPv4BUF->vhl);
nwarn("WARNING: Unrecognized packet type dropped: %02x\n", IPv4BUF->vhl);
NETDEV_RXDROPPED(&priv->lo_dev);
priv->lo_dev.d_len = 0;
}
@ -323,15 +323,15 @@ static int lo_ifup(FAR struct net_driver_s *dev)
FAR struct lo_driver_s *priv = (FAR struct lo_driver_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
#endif
#ifdef CONFIG_NET_IPv6
nerr("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
#endif
/* Set and activate a timer process */

View file

@ -82,9 +82,13 @@
*/
#ifdef CONFIG_NETDEV_PHY_DEBUG
# define phyinfo info
# define phyllinfo llinfo
# define phyerr err
# define phyllerr llerr
#else
# define phyinfo(x...)
# define phyllinfo(x...)
# define phyerr(x...)
# define phyllerr(x...)
#endif
@ -208,7 +212,7 @@ static FAR struct phy_notify_s *phy_find_unassigned(void)
/* Return the client entry assigned to the caller */
phy_semgive();
phyerr("Returning client %d\n", i);
phyinfo("Returning client %d\n", i);
return client;
}
}
@ -243,7 +247,7 @@ static FAR struct phy_notify_s *phy_find_assigned(FAR const char *intf,
/* Return the matching client entry to the caller */
phy_semgive();
phyerr("Returning client %d\n", i);
phyinfo("Returning client %d\n", i);
return client;
}
}
@ -266,8 +270,8 @@ static int phy_handler(FAR struct phy_notify_s *client)
int ret;
DEBUGASSERT(client && client->assigned && client->enable);
phyllerr("Entry client %d, signalling PID=%d with signal %d\n",
client->index, client->pid, client->signo);
phyllinfo("Entry client %d, signalling PID=%d with signal %d\n",
client->index, client->pid, client->signo);
/* Disable further interrupts */
@ -287,7 +291,7 @@ static int phy_handler(FAR struct phy_notify_s *client)
int errcode = errno;
DEBUGASSERT(errcode > 0);
nllerr("ERROR: sigqueue failed: %d\n", errcode);
nllinfo("ERROR: sigqueue failed: %d\n", errcode);
UNUSED(errcode);
}
@ -367,7 +371,7 @@ int phy_notify_subscribe(FAR const char *intf, pid_t pid, int signo,
if (pid == 0)
{
pid = getpid();
phyerr("Actual PID=%d\n", pid);
phyinfo("Actual PID=%d\n", pid);
}
/* Check if this client already exists */

View file

@ -855,15 +855,15 @@ static int skel_ifup(FAR struct net_driver_s *dev)
FAR struct skel_driver_s *priv = (FAR struct skel_driver_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
#endif
#ifdef CONFIG_NET_IPv6
nerr("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
#endif
/* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */

View file

@ -447,7 +447,7 @@ static void telnet_sendopt(FAR struct telnet_dev_s *priv, uint8_t option,
telnet_dumpbuffer("Send optbuf", optbuf, 4);
if (psock_send(&priv->td_psock, optbuf, 4, 0) < 0)
{
nllerr("Failed to send TELNET_IAC\n");
nllerr("ERROR: Failed to send TELNET_IAC\n");
}
}
@ -566,7 +566,7 @@ static int telnet_close(FAR struct file *filep)
if (ret != -EBUSY)
{
nllerr("Failed to unregister the driver %s: %d\n",
nllerr("ERROR: Failed to unregister the driver %s: %d\n",
devpath, ret);
}
}
@ -706,7 +706,7 @@ static ssize_t telnet_write(FAR struct file *filep, FAR const char *buffer, size
ret = psock_send(&priv->td_psock, priv->td_txbuffer, ncopied, 0);
if (ret < 0)
{
nllerr("psock_send failed '%s': %d\n", priv->td_txbuffer, ret);
nllerr("ERROR: psock_send failed '%s': %d\n", priv->td_txbuffer, ret);
return ret;
}
@ -723,7 +723,7 @@ static ssize_t telnet_write(FAR struct file *filep, FAR const char *buffer, size
ret = psock_send(&priv->td_psock, priv->td_txbuffer, ncopied, 0);
if (ret < 0)
{
nllerr("psock_send failed '%s': %d\n", priv->td_txbuffer, ret);
nllerr("ERROR: psock_send failed '%s': %d\n", priv->td_txbuffer, ret);
return ret;
}
}
@ -767,7 +767,7 @@ static int telnet_session(FAR struct telnet_session_s *session)
priv = (FAR struct telnet_dev_s*)malloc(sizeof(struct telnet_dev_s));
if (!priv)
{
nllerr("Failed to allocate the driver data structure\n");
nllerr("ERROR: Failed to allocate the driver data structure\n");
return -ENOMEM;
}
@ -788,7 +788,7 @@ static int telnet_session(FAR struct telnet_session_s *session)
psock = sockfd_socket(session->ts_sd);
if (!psock)
{
nllerr("Failed to convert sd=%d to a socket structure\n", session->ts_sd);
nllerr("ERROR: Failed to convert sd=%d to a socket structure\n", session->ts_sd);
ret = -EINVAL;
goto errout_with_dev;
}
@ -796,7 +796,7 @@ static int telnet_session(FAR struct telnet_session_s *session)
ret = net_clone(psock, &priv->td_psock);
if (ret < 0)
{
nllerr("net_clone failed: %d\n", ret);
nllerr("ERROR: net_clone failed: %d\n", ret);
goto errout_with_dev;
}

View file

@ -646,15 +646,15 @@ static int tun_ifup(struct net_driver_s *dev)
FAR struct tun_device_s *priv = (FAR struct tun_device_s *)dev->d_private;
#ifdef CONFIG_NET_IPv4
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
#endif
#ifdef CONFIG_NET_IPv6
nerr("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
#endif
/* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */

View file

@ -546,9 +546,9 @@ static int vnet_ifup(struct net_driver_s *dev)
{
FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private;
nerr("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
ninfo("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
/* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */

View file

@ -205,7 +205,7 @@ int pipecommon_open(FAR struct file *filep)
ret = sem_wait(&dev->d_bfsem);
if (ret != OK)
{
ferr("sem_wait failed: %d\n", get_errno());
ferr("ERROR: sem_wait failed: %d\n", get_errno());
DEBUGASSERT(get_errno() > 0);
return -get_errno();
}
@ -283,7 +283,7 @@ int pipecommon_open(FAR struct file *filep)
* a signal.
*/
ferr("sem_wait failed: %d\n", get_errno());
ferr("ERROR: sem_wait failed: %d\n", get_errno());
DEBUGASSERT(get_errno() > 0);
ret = -get_errno();

View file

@ -228,7 +228,7 @@ static int bat_charger_ioctl(FAR struct file *filep, int cmd,
break;
default:
err("Unrecognized cmd: %d\n", cmd);
err("ERROR: Unrecognized cmd: %d\n", cmd);
ret = -ENOTTY;
break;
}
@ -268,7 +268,7 @@ int battery_charger_register(FAR const char *devpath,
ret = register_driver(devpath, &g_batteryops, 0555, dev);
if (ret < 0)
{
err("Failed to register driver: %d\n", ret);
err("ERROR: Failed to register driver: %d\n", ret);
}
return ret;

View file

@ -213,7 +213,7 @@ static int bat_gauge_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
break;
default:
err("Unrecognized cmd: %d\n", cmd);
err("ERROR: Unrecognized cmd: %d\n", cmd);
ret = -ENOTTY;
break;
}
@ -253,7 +253,7 @@ int battery_gauge_register(FAR const char *devpath,
ret = register_driver(devpath, &g_batteryops, 0555, dev);
if (ret < 0)
{
err("Failed to register driver: %d\n", ret);
err("ERROR: Failed to register driver: %d\n", ret);
}
return ret;

View file

@ -79,11 +79,14 @@
#ifdef CONFIG_DEBUG_BQ2425X
# define baterr err
# define batreg err
#else
# ifdef CONFIG_CPP_HAVE_VARARGS
# define baterr(x...)
# define batreg(x...)
# else
# define baterr (void)
# define batreg (void)
# endif
#endif
@ -176,7 +179,7 @@ static int bq2425x_getreg8(FAR struct bq2425x_dev_s *priv, uint8_t regaddr,
ret = i2c_write(priv->i2c, &config, &regaddr, 1);
if (ret < 0)
{
baterr("i2c_write failed: %d\n", ret);
baterr("ERROR: i2c_write failed: %d\n", ret);
return ret;
}
@ -185,7 +188,7 @@ static int bq2425x_getreg8(FAR struct bq2425x_dev_s *priv, uint8_t regaddr,
ret = i2c_read(priv->i2c, &config, &val, 1);
if (ret < 0)
{
baterr("i2c_read failed: %d\n", ret);
baterr("ERROR: i2c_read failed: %d\n", ret);
return ret;
}
@ -217,7 +220,7 @@ static int bq2425x_putreg8(FAR struct bq2425x_dev_s *priv, uint8_t regaddr,
config.address = priv->addr;
config.addrlen = 7;
baterr("addr: %02x regval: %08x\n", regaddr, regval);
batreg("addr: %02x regval: %08x\n", regaddr, regval);
/* Set up a 3 byte message to send */
@ -270,7 +273,7 @@ static inline int bq2425x_reset(FAR struct bq2425x_dev_s *priv)
ret = bq2425x_getreg8(priv, BQ2425X_REG_2, &regval);
if (ret < 0)
{
baterr("Error reading from BQ2425X! Error = %d\n", ret);
baterr("ERROR: Error reading from BQ2425X! Error = %d\n", ret);
return ret;
}
@ -280,7 +283,7 @@ static inline int bq2425x_reset(FAR struct bq2425x_dev_s *priv)
ret = bq2425x_putreg8(priv, BQ2425X_REG_2, regval);
if (ret < 0)
{
baterr("Error writing to BQ2425X! Error = %d\n", ret);
baterr("ERROR: Error writing to BQ2425X! Error = %d\n", ret);
return ret;
}
@ -294,7 +297,7 @@ static inline int bq2425x_reset(FAR struct bq2425x_dev_s *priv)
ret = bq2425x_putreg8(priv, BQ2425X_REG_2, regval);
if (ret < 0)
{
baterr("Error writing to BQ2425X! Error = %d\n", ret);
baterr("ERROR: Error writing to BQ2425X! Error = %d\n", ret);
return ret;
}
@ -317,7 +320,7 @@ static inline int bq2425x_watchdog(FAR struct bq2425x_dev_s *priv, bool enable)
ret = bq2425x_getreg8(priv, BQ2425X_REG_1, &regval);
if (ret < 0)
{
baterr("Error reading from BQ2425X! Error = %d\n", ret);
baterr("ERROR: Error reading from BQ2425X! Error = %d\n", ret);
return ret;
}
@ -333,7 +336,7 @@ static inline int bq2425x_watchdog(FAR struct bq2425x_dev_s *priv, bool enable)
ret = bq2425x_putreg8(priv, BQ2425X_REG_1, regval);
if (ret < 0)
{
baterr("Error writing to BQ2425X! Error = %d\n", ret);
baterr("ERROR: Error writing to BQ2425X! Error = %d\n", ret);
return ret;
}
@ -515,7 +518,7 @@ static inline int bq2425x_powersupply(FAR struct bq2425x_dev_s *priv, int curren
break;
default:
baterr("Current not supported, setting default to 100mA.!\n");
baterr("ERROR: Current not supported, setting default to 100mA.!\n");
idx = BQ2425X_INP_CURR_LIM_100MA;
break;
}
@ -525,7 +528,7 @@ static inline int bq2425x_powersupply(FAR struct bq2425x_dev_s *priv, int curren
ret = bq2425x_getreg8(priv, BQ2425X_REG_2, &regval);
if (ret < 0)
{
baterr("Error reading from BQ2425X! Error = %d\n", ret);
baterr("ERROR: Error reading from BQ2425X! Error = %d\n", ret);
return ret;
}
@ -541,7 +544,7 @@ static inline int bq2425x_powersupply(FAR struct bq2425x_dev_s *priv, int curren
ret = bq2425x_putreg8(priv, BQ2425X_REG_2, regval);
if (ret < 0)
{
baterr("Error writing to BQ2425X! Error = %d\n", ret);
baterr("ERROR: Error writing to BQ2425X! Error = %d\n", ret);
return ret;
}
@ -565,14 +568,14 @@ static inline int bq2425x_setvolt(FAR struct bq2425x_dev_s *priv, int volts)
if (volts < BQ2425X_VOLT_MIN || volts > BQ2425X_VOLT_MAX)
{
baterr("Voltage %d mV is out of range.\n", volts);
baterr("ERROR: Voltage %d mV is out of range.\n", volts);
return -EINVAL;
}
ret = bq2425x_getreg8(priv, BQ2425X_REG_3, &regval);
if (ret < 0)
{
baterr("Error reading from BQ2425X! Error = %d\n", ret);
baterr("ERROR: Error reading from BQ2425X! Error = %d\n", ret);
return ret;
}
@ -589,7 +592,7 @@ static inline int bq2425x_setvolt(FAR struct bq2425x_dev_s *priv, int volts)
ret = bq2425x_putreg8(priv, BQ2425X_REG_3, regval);
if (ret < 0)
{
baterr("Error writing to BQ2425X! Error = %d\n", ret);
baterr("ERROR: Error writing to BQ2425X! Error = %d\n", ret);
return ret;
}
@ -613,14 +616,14 @@ static inline int bq2425x_setcurr(FAR struct bq2425x_dev_s *priv, int current)
if (current < BQ2425X_CURR_MIN || current > BQ2425X_CURR_MAX)
{
baterr("Current %d mA is out of range.\n", volts);
baterr("ERROR: Current %d mA is out of range.\n", volts);
return -EINVAL;
}
ret = bq2425x_getreg8(priv, BQ2425X_REG_4, &regval);
if (ret < 0)
{
baterr("Error reading from BQ2425X! Error = %d\n", ret);
baterr("ERROR: Error reading from BQ2425X! Error = %d\n", ret);
return ret;
}
@ -637,7 +640,7 @@ static inline int bq2425x_setcurr(FAR struct bq2425x_dev_s *priv, int current)
ret = bq2425x_putreg8(priv, BQ2425X_REG_4, regval);
if (ret < 0)
{
baterr("Error writing to BQ2425X! Error = %d\n", ret);
baterr("ERROR: Error writing to BQ2425X! Error = %d\n", ret);
return ret;
}
@ -663,7 +666,7 @@ static int bq2425x_voltage(struct battery_charger_dev_s *dev, int value)
ret = bq2425x_setvolt(priv, value);
if (ret < 0)
{
baterr("Error setting voltage to BQ2425X! Error = %d\n", ret);
baterr("ERROR: Error setting voltage to BQ2425X! Error = %d\n", ret);
return ret;
}
@ -688,7 +691,7 @@ static int bq2425x_current(struct battery_charger_dev_s *dev, int value)
ret = bq2425x_setcurr(priv, value);
if (ret < 0)
{
baterr("Error setting current to BQ2425X! Error = %d\n", ret);
baterr("ERROR: Error setting current to BQ2425X! Error = %d\n", ret);
return ret;
}
@ -749,7 +752,7 @@ FAR struct battery_charger_dev_s *
ret = bq2425x_reset(priv);
if (ret < 0)
{
baterr("Failed to reset the BQ2425x: %d\n", ret);
baterr("ERROR: Failed to reset the BQ2425x: %d\n", ret);
kmm_free(priv);
return NULL;
}
@ -759,7 +762,7 @@ FAR struct battery_charger_dev_s *
ret = bq2425x_watchdog(priv, false);
if (ret < 0)
{
baterr("Failed to disable BQ2425x watchdog: %d\n", ret);
baterr("ERROR: Failed to disable BQ2425x watchdog: %d\n", ret);
kmm_free(priv);
return NULL;
}
@ -769,7 +772,7 @@ FAR struct battery_charger_dev_s *
ret = bq2425x_powersupply(priv, 2000);
if (ret < 0)
{
baterr("Failed to set BQ2425x power supply current: %d\n", ret);
baterr("ERROR: Failed to set BQ2425x power supply current: %d\n", ret);
kmm_free(priv);
return NULL;
}

View file

@ -187,7 +187,7 @@ int sercomm_register(FAR const char *path, FAR uart_dev_t *dev)
sem_init(&dev->pollsem, 0, 1);
#endif
err("Registering %s\n", path);
info("Registering %s\n", path);
return register_driver(path, &g_sercom_console_ops, 0666, NULL);
}

View file

@ -1369,7 +1369,7 @@ int uart_register(FAR const char *path, FAR uart_dev_t *dev)
sem_init(&dev->pollsem, 0, 1);
#endif
err("Registering %s\n", path);
info("Registering %s\n", path);
return register_driver(path, &g_serialops, 0666, dev);
}

View file

@ -848,7 +848,7 @@ static int u16550_interrupt(int irq, void *context)
default:
{
err("Unexpected IIR: %02x\n", status);
err("ERROR: Unexpected IIR: %02x\n", status);
break;
}
}

View file

@ -91,7 +91,7 @@
#ifdef CONFIG_DEBUG_SPI
# define spierr llerr
# ifdef CONFIG_DEBUG_INFO
# define spiinfo llerr
# define spiinfo llinfo
# else
# define spiinfo(x...)
# endif
@ -564,7 +564,7 @@ FAR struct spi_dev_s *spi_create_bitbang(FAR const struct spi_bitbang_ops_s *low
priv = (FAR struct spi_bitbang_s *)zalloc(sizeof(struct spi_bitbang_s));
if (!priv)
{
spierr("Failed to allocate the device structure\n");
spierr("ERROR: Failed to allocate the device structure\n");
return NULL;
}

View file

@ -81,18 +81,18 @@
# endif
#endif
#undef regerr
#undef reginfo
#ifdef CONFIG_CS2100CP_REGDEBUG
# ifdef CONFIG_CPP_HAVE_VARARGS
# define regerr(format, ...) err(format, ##__VA_ARGS__)
# define reginfo(format, ...) err(format, ##__VA_ARGS__)
# else
# define regerr err
# define reginfo err
# endif
#else
# ifdef CONFIG_CPP_HAVE_VARARGS
# define regerr(x...)
# define reginfo(x...)
# else
# define regerr (void)
# define reginfo (void)
# endif
#endif
@ -129,7 +129,7 @@ static int cs2100_write_reg(FAR const struct cs2100_config_s *config,
{
struct i2c_msg_s msgs[2];
regerr("%02x<-%02x\n", regaddr, regval);
reginfo("%02x<-%02x\n", regaddr, regval);
DEBUGASSERT(config->i2c->ops && config->i2c->ops->transfer);
/* Construct the I2C message (write N+1 bytes with no restart) */
@ -200,7 +200,7 @@ static int cs2100_read_reg(FAR const struct cs2100_config_s *config,
ret = I2C_TRANSFER(config->i2c, &msg, 1);
if (ret == OK)
{
regerr("%02x->%02x\n", regaddr, *regval);
reginfo("%02x->%02x\n", regaddr, *regval);
}
}
@ -229,7 +229,7 @@ static int cs2100_write_ratio(FAR const struct cs2100_config_s *config,
struct i2c_msg_s msg;
uint8_t buffer[5];
regerr("%02x<-%04l\n", CS2100_RATIO0, (unsigned long)ratio);
reginfo("%02x<-%04l\n", CS2100_RATIO0, (unsigned long)ratio);
DEBUGASSERT(config->i2c->ops && config->i2c->ops->transfer);
/* Construct the I2C message (write N+1 bytes with no restart) */
@ -310,7 +310,7 @@ static int cs2100_read_ratio(FAR const struct cs2100_config_s *config,
((uint32_t)buffer[2] << 8) |
(uint32_t)buffer[0];
regerr("%02x->%04l\n", CS2100_RATIO0, (unsigned long)*ratio);
reginfo("%02x->%04l\n", CS2100_RATIO0, (unsigned long)*ratio);
}
}
@ -764,7 +764,7 @@ int cs2100_dump(FAR const struct cs2100_config_s *config)
uint8_t regval;
int ret;
err("CS200-CP Registers:\n");
csinfo("CS200-CP Registers:\n");
ret = cs2100_read_reg(config, CS2100_DEVID, &regval);
if (ret < 0)
@ -773,7 +773,7 @@ int cs2100_dump(FAR const struct cs2100_config_s *config)
return ret;
}
err(" Devid: %02x\n", regval);
csinfo(" Devid: %02x\n", regval);
ret = cs2100_read_reg(config, CS2100_DEVCTL, &regval);
if (ret < 0)
@ -782,7 +782,7 @@ int cs2100_dump(FAR const struct cs2100_config_s *config)
return ret;
}
err(" DevCtl: %02x\n", regval);
csinfo(" DevCtl: %02x\n", regval);
ret = cs2100_read_reg(config, CS2100_DEVCFG1, &regval);
if (ret < 0)
@ -791,7 +791,7 @@ int cs2100_dump(FAR const struct cs2100_config_s *config)
return ret;
}
err(" DevCfg1: %02x\n", regval);
csinfo(" DevCfg1: %02x\n", regval);
ret = cs2100_read_reg(config, CS2100_GBLCFG, &regval);
if (ret < 0)
@ -800,7 +800,7 @@ int cs2100_dump(FAR const struct cs2100_config_s *config)
return ret;
}
err(" GblCfg: %02x\n", regval);
csinfo(" GblCfg: %02x\n", regval);
ret = cs2100_read_ratio(config, &ratio);
if (ret < 0)
@ -809,7 +809,7 @@ int cs2100_dump(FAR const struct cs2100_config_s *config)
return ret;
}
err(" Ratio: %04lx\n", (unsigned long)ratio);
csinfo(" Ratio: %04lx\n", (unsigned long)ratio);
ret = cs2100_read_reg(config, CS2100_FNCCFG1, &regval);
if (ret < 0)
@ -818,7 +818,7 @@ int cs2100_dump(FAR const struct cs2100_config_s *config)
return ret;
}
err(" FuncCfg1: %02x\n", regval);
csinfo(" FuncCfg1: %02x\n", regval);
ret = cs2100_read_reg(config, CS2100_FNCCFG2, &regval);
if (ret < 0)
@ -827,7 +827,7 @@ int cs2100_dump(FAR const struct cs2100_config_s *config)
return ret;
}
err(" FuncCfg2: %02x\n", regval);
csinfo(" FuncCfg2: %02x\n", regval);
ret = cs2100_read_reg(config, CS2100_FNCCFG3, &regval);
if (ret < 0)
@ -836,7 +836,7 @@ int cs2100_dump(FAR const struct cs2100_config_s *config)
return ret;
}
err(" FuncCfg3: %02x\n", regval);
csinfo(" FuncCfg3: %02x\n", regval);
return OK;
}

View file

@ -140,20 +140,20 @@ static struct ds3231_dev_s g_ds3231;
*
************************************************************************************/
#ifdef CONFIG_DEBUG_RTC
#if defined(CONFIG_DEBUG_RTC) && defined(CONFIG_DEBUG_INFO)
static void rtc_dumptime(FAR struct tm *tp, FAR const char *msg)
{
rtcllerr("%s:\n", msg);
rtcllerr(" tm_sec: %08x\n", tp->tm_sec);
rtcllerr(" tm_min: %08x\n", tp->tm_min);
rtcllerr(" tm_hour: %08x\n", tp->tm_hour);
rtcllerr(" tm_mday: %08x\n", tp->tm_mday);
rtcllerr(" tm_mon: %08x\n", tp->tm_mon);
rtcllerr(" tm_year: %08x\n", tp->tm_year);
rtcllinfo("%s:\n", msg);
rtcllinfo(" tm_sec: %08x\n", tp->tm_sec);
rtcllinfo(" tm_min: %08x\n", tp->tm_min);
rtcllinfo(" tm_hour: %08x\n", tp->tm_hour);
rtcllinfo(" tm_mday: %08x\n", tp->tm_mday);
rtcllinfo(" tm_mon: %08x\n", tp->tm_mon);
rtcllinfo(" tm_year: %08x\n", tp->tm_year);
#if defined(CONFIG_LIBC_LOCALTIME) || defined(CONFIG_TIME_EXTENDED)
rtcllerr(" tm_wday: %08x\n", tp->tm_wday);
rtcllerr(" tm_yday: %08x\n", tp->tm_yday);
rtcllerr(" tm_isdst: %08x\n", tp->tm_isdst);
rtcllinfo(" tm_wday: %08x\n", tp->tm_wday);
rtcllinfo(" tm_yday: %08x\n", tp->tm_yday);
rtcllinfo(" tm_isdst: %08x\n", tp->tm_isdst);
#endif
}
#else

View file

@ -140,20 +140,20 @@ static struct pcf85263_dev_s g_pcf85263;
*
************************************************************************************/
#ifdef CONFIG_DEBUG_RTC
#if defined(CONFIG_DEBUG_RTC) && defined(CONFIG_DEBUG_INFO)
static void rtc_dumptime(FAR struct tm *tp, FAR const char *msg)
{
rtcllerr("%s:\n", msg);
rtcllerr(" tm_sec: %08x\n", tp->tm_sec);
rtcllerr(" tm_min: %08x\n", tp->tm_min);
rtcllerr(" tm_hour: %08x\n", tp->tm_hour);
rtcllerr(" tm_mday: %08x\n", tp->tm_mday);
rtcllerr(" tm_mon: %08x\n", tp->tm_mon);
rtcllerr(" tm_year: %08x\n", tp->tm_year);
rtcllinfo("%s:\n", msg);
rtcllinfo(" tm_sec: %08x\n", tp->tm_sec);
rtcllinfo(" tm_min: %08x\n", tp->tm_min);
rtcllinfo(" tm_hour: %08x\n", tp->tm_hour);
rtcllinfo(" tm_mday: %08x\n", tp->tm_mday);
rtcllinfo(" tm_mon: %08x\n", tp->tm_mon);
rtcllinfo(" tm_year: %08x\n", tp->tm_year);
#if defined(CONFIG_LIBC_LOCALTIME) || defined(CONFIG_TIME_EXTENDED)
rtcllerr(" tm_wday: %08x\n", tp->tm_wday);
rtcllerr(" tm_yday: %08x\n", tp->tm_yday);
rtcllerr(" tm_isdst: %08x\n", tp->tm_isdst);
rtcllinfo(" tm_wday: %08x\n", tp->tm_wday);
rtcllinfo(" tm_yday: %08x\n", tp->tm_yday);
rtcllinfo(" tm_isdst: %08x\n", tp->tm_isdst);
#endif
}
#else

View file

@ -451,7 +451,7 @@ FAR void *timer_register(FAR const char *path,
kmm_zalloc(sizeof(struct timer_upperhalf_s));
if (!upper)
{
tmrerr("Upper half allocation failed\n");
tmrerr("ERROR: Upper half allocation failed\n");
goto errout;
}
@ -466,7 +466,7 @@ FAR void *timer_register(FAR const char *path,
upper->path = strdup(path);
if (!upper->path)
{
tmrerr("Path allocation failed\n");
tmrerr("ERROR: Path allocation failed\n");
goto errout_with_upper;
}
@ -475,7 +475,7 @@ FAR void *timer_register(FAR const char *path,
ret = register_driver(path, &g_timerops, 0666, upper);
if (ret < 0)
{
tmrerr("register_driver failed: %d\n", ret);
tmrerr("ERROR: register_driver failed: %d\n", ret);
goto errout_with_path;
}

View file

@ -2002,7 +2002,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass,
ret = usbhost_cfgdesc(priv, configdesc, desclen);
if (ret < 0)
{
uerr("usbhost_cfgdesc() failed: %d\n", ret);
uerr("ERROR: usbhost_cfgdesc() failed: %d\n", ret);
goto errout;
}
@ -2021,7 +2021,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass,
ret = usbhost_linecoding_send(priv);
if (ret < 0)
{
uerr("usbhost_linecoding_send() failed: %d\n", ret);
uerr("ERROR: usbhost_linecoding_send() failed: %d\n", ret);
}
#endif
@ -2034,7 +2034,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass,
ret = uart_register(devname, &priv->uartdev);
if (ret < 0)
{
uerr("uart_register() failed: %d\n", ret);
uerr("ERROR: uart_register() failed: %d\n", ret);
goto errout;
}

View file

@ -256,7 +256,7 @@ static inline int usbhost_classbind(FAR struct usbhost_hubport_s *hport,
* should then free the allocated devclass instance.
*/
uerr("CLASS_CONNECT failed: %d\n", ret);
uerr("ERROR: CLASS_CONNECT failed: %d\n", ret);
CLASS_DISCONNECTED(devclass);
}
else
@ -326,14 +326,14 @@ int usbhost_enumerate(FAR struct usbhost_hubport_s *hport,
ret = DRVR_ALLOC(hport->drvr, (FAR uint8_t **)&ctrlreq, &maxlen);
if (ret < 0)
{
uerr("DRVR_ALLOC failed: %d\n", ret);
uerr("ERROR: DRVR_ALLOC failed: %d\n", ret);
return ret;
}
ret = DRVR_ALLOC(hport->drvr, &buffer, &maxlen);
if (ret < 0)
{
uerr("DRVR_ALLOC failed: %d\n", ret);
uerr("ERROR: DRVR_ALLOC failed: %d\n", ret);
goto errout;
}

View file

@ -1087,7 +1087,7 @@ static int usbhost_kbdpoll(int argc, char *argv[])
if (nerrors > 200)
{
uerr("Too many errors... aborting: %d\n", nerrors);
uerr(" Too many errors... aborting: %d\n", nerrors);
break;
}
}
@ -1227,7 +1227,7 @@ static int usbhost_kbdpoll(int argc, char *argv[])
npolls++;
if ((npolls & 31) == 0)
{
uerr("Still polling: %d\n", npolls);
uinfo("Still polling: %d\n", npolls);
}
#endif
/* Wait for the required amount (or until a signal is received). We
@ -1267,7 +1267,7 @@ static int usbhost_kbdpoll(int argc, char *argv[])
* of the file descriptors are closed.
*/
uerr("Keyboard removed, polling halted\n");
uinfo("Keyboard removed, polling halted\n");
flags = enter_critical_section();
priv->polling = false;
@ -1932,7 +1932,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass,
ret = usbhost_cfgdesc(priv, configdesc, desclen);
if (ret < 0)
{
uerr("usbhost_cfgdesc() failed: %d\n", ret);
uerr("ERROR: usbhost_cfgdesc() failed: %d\n", ret);
}
else
{
@ -1941,7 +1941,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass,
ret = usbhost_devinit(priv);
if (ret < 0)
{
uerr("usbhost_devinit() failed: %d\n", ret);
uerr("ERROR: usbhost_devinit() failed: %d\n", ret);
}
}

View file

@ -1108,7 +1108,7 @@ static int usbhost_mouse_poll(int argc, char *argv[])
{
if (++nerrors > 200)
{
uerr("Too many errors... aborting: %d\n", nerrors);
uerr(" Too many errors... aborting: %d\n", nerrors);
ret = (int)nbytes;
break;
}
@ -1212,7 +1212,7 @@ static int usbhost_mouse_poll(int argc, char *argv[])
npolls++;
if ((npolls & 31) == 0)
{
uerr("Still polling: %d\n", npolls);
uinfo("Still polling: %d\n", npolls);
}
#endif
}
@ -1233,7 +1233,7 @@ static int usbhost_mouse_poll(int argc, char *argv[])
* of the file descriptors are closed.
*/
uerr("Mouse removed, polling halted\n");
uinfo("Mouse removed, polling halted\n");
flags = enter_critical_section();
priv->polling = false;
@ -1389,7 +1389,7 @@ static int usbhost_waitsample(FAR struct usbhost_state_s *priv,
* the failure now.
*/
ierr("sem_wait: %d\n", errno);
ierr("ERROR: sem_wait: %d\n", errno);
DEBUGASSERT(errno == EINTR);
ret = -EINTR;
goto errout;
@ -2002,7 +2002,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass,
ret = usbhost_cfgdesc(priv, configdesc, desclen);
if (ret < 0)
{
uerr("usbhost_cfgdesc() failed: %d\n", ret);
uerr("ERROR: usbhost_cfgdesc() failed: %d\n", ret);
}
else
{
@ -2011,7 +2011,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass,
ret = usbhost_devinit(priv);
if (ret < 0)
{
uerr("usbhost_devinit() failed: %d\n", ret);
uerr("ERROR: usbhost_devinit() failed: %d\n", ret);
}
}
@ -2345,7 +2345,7 @@ static ssize_t usbhost_read(FAR struct file *filep, FAR char *buffer, size_t len
{
/* We might have been awakened by a signal */
ierr("usbhost_waitsample: %d\n", ret);
ierr("ERROR: usbhost_waitsample: %d\n", ret);
goto errout;
}
}

View file

@ -961,7 +961,7 @@ static void usbhost_hub_event(FAR void *arg)
}
else if (change)
{
uerr("WARNING: status %04x change %04x not handled\n", status, change);
uwarn("WARNING: status %04x change %04x not handled\n", status, change);
}
}
@ -971,7 +971,7 @@ static void usbhost_hub_event(FAR void *arg)
{
/* Hub status changed */
uerr("WARNING: Hub status changed, not handled\n");
uwarn("WARNING: Hub status changed, not handled\n");
}
/* The preceding sequence of events may take a significant amount of

View file

@ -955,7 +955,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass,
ret = usbhost_cfgdesc(priv, configdesc, desclen);
if (ret < 0)
{
uerr("usbhost_cfgdesc() failed: %d\n", ret);
uerr("ERROR: usbhost_cfgdesc() failed: %d\n", ret);
}
else
{
@ -964,7 +964,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass,
ret = usbhost_devinit(priv);
if (ret < 0)
{
uerr("usbhost_devinit() failed: %d\n", ret);
uerr("ERROR: usbhost_devinit() failed: %d\n", ret);
}
}

View file

@ -1772,7 +1772,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass,
ret = usbhost_cfgdesc(priv, configdesc, desclen);
if (ret < 0)
{
uerr("usbhost_cfgdesc() failed: %d\n", ret);
uerr("ERROR: usbhost_cfgdesc() failed: %d\n", ret);
}
else
{
@ -1781,7 +1781,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass,
ret = usbhost_initvolume(priv);
if (ret < 0)
{
uerr("usbhost_initvolume() failed: %d\n", ret);
uerr("ERROR: usbhost_initvolume() failed: %d\n", ret);
}
}