On Sun, Jul 12, 2026 at 5:39 AM Samuel Moelius <[email protected]> wrote: > > + if (str) { > + blocknr = str; > + > + r = kstrtouint(blocknr, 10, &e); > + if (r) > + goto bad; > > - if (r == 1) { > - result->begin = to_cblock(b); > - result->end = to_cblock(from_cblock(result->begin) + 1u); > + result->end = to_cblock(e); > return 0; > } > > - DMERR("%s: invalid cblock range '%s'", cache_device_name(cache), str); > + result->end = cblock_succ(result->begin); > + return 0;
A minor nit: the range vs. single-value cases are peer alternatives. Rather than multiple "returns 0", using if-else makes the parallel structure more explicit: both paths share the same prologue (parse result->begin) and epilogue (return 0), differ only in how result->end is computed.

