Skip to content

Commit

Permalink
mtd: rawnand: omap_elm: reduce verbosity
Browse files Browse the repository at this point in the history
In case of "uncorrectable ECC errors" the message is repeated several
times, slowing down the boot.
These changes reduce the verbosity showinf the message just once.

Signed-off-by: Pierluigi Passaro <pierluigi.p@variscite.com>
  • Loading branch information
varigigi committed Sep 22, 2023
1 parent 5ddb389 commit c213f71
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/mtd/nand/raw/omap_elm.c
Expand Up @@ -114,7 +114,11 @@ int elm_check_error(u8 *syndrome, enum bch_level bch_type, u32 *error_count,
/* check if correctable */
location_status = readl(&elm_cfg->error_location[poly].location_status);
if (!(location_status & ELM_LOCATION_STATUS_ECC_CORRECTABLE_MASK)) {
printf("%s: uncorrectable ECC errors\n", DRIVER_NAME);
static int ecc_message_already_printed = 0;
if (!ecc_message_already_printed) {
printf("%s: uncorrectable ECC errors\n", DRIVER_NAME);
ecc_message_already_printed ++;
}
return -EBADMSG;
}

Expand Down

0 comments on commit c213f71

Please sign in to comment.