On 09.02.23 12:27, Simon Horman wrote: > On Thu, Feb 09, 2023 at 12:04:23PM +0100, Alexandra Winter wrote: >> From: Thorsten Winkler <twinkler@xxxxxxxxxxxxx> ... >> >> - entry_len = qeth_l3_ipaddr_to_string(proto, ipatoe->addr, >> - addr_str); >> - if (entry_len < 0) >> - continue; > > Here the return code of qeth_l3_ipaddr_to_string() is checked for an error. > >> - >> - /* Append /%mask to the entry: */ >> - entry_len += 1 + ((proto == QETH_PROT_IPV4) ? 2 : 3); >> - /* Enough room to format %entry\n into null terminated page? */ >> - if (entry_len + 1 > PAGE_SIZE - str_len - 1) >> - break; >> - >> - entry_len = scnprintf(buf, PAGE_SIZE - str_len, >> - "%s/%i\n", addr_str, ipatoe->mask_bits); >> - str_len += entry_len; >> - buf += entry_len; >> + qeth_l3_ipaddr_to_string(proto, ipatoe->addr, addr_str); > > But here it is not. Is that ok? > > Likewise in qeth_l3_dev_ip_add_show(). As you pointed out in your comments to patch 4/4 v1, qeth_l3_ipaddr_to_string() will never return a negative value, as it only returns the result of s*printf() which at least in this usecase here will never return < 0.