Thank you for your contribution! Sashiko AI review found 2 potential issue(s) 
to consider:
- [Low] The patch open-codes the endianness conversion of the log sequence 
numbers instead of utilizing the existing helper function `log_seq()`.
- [Low] There are multiple spelling errors in the commit message.
--

commit 41767fa21db59b2ed77d8052ff41a18c93ebf763
Author: Ben Dooks <[email protected]>

nvdimm/btt: fix sequence endian in btt_log_read error print

This commit fixes endianness warnings in btt_log_read() by converting the
log sequence numbers to CPU endianness before printing them. It ensures the
correct sequence number is displayed and resolves sparse warnings.

>     The error reporting in btt_log_read() prints sequence numbers out
>     from the log which are stored in little endian without any endian
>     conversion. Make sure these are passed throuhg endian convesion

[Severity: Low]
This isn't a bug, but there are typos ("throuhg" and "convesion") in the
commit message.

> diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
> --- a/drivers/nvdimm/btt.c
> +++ b/drivers/nvdimm/btt.c
> @@ -341,8 +341,9 @@ static int btt_log_read(struct arena_info *arena, u32 
> lane,
>       if (old_ent < 0 || old_ent > 1) {
>               dev_err(to_dev(arena),
>                               "log corruption (%d): lane %d seq [%d, %d]\n",
> -                             old_ent, lane, log.ent[arena->log_index[0]].seq,
> -                             log.ent[arena->log_index[1]].seq);
> +                             old_ent, lane,
> +                             le32_to_cpu(log.ent[arena->log_index[0]].seq),
> +                             le32_to_cpu(log.ent[arena->log_index[1]].seq));

[Severity: Low]
Would it be better to use the existing log_seq() helper function here
instead of open-coding the le32_to_cpu() conversion?

For example:
    log_seq(&log, arena->log_index[0]),
    log_seq(&log, arena->log_index[1]));

>               /* TODO set error state? */
>               return -EIO;
>       }

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to