yshigeru / linux-devel

Linux kernel source tree
Other
0 stars 0 forks source link

Redundant TLV_SPACE() in tipc_get_err_tlv() #19

Closed yshigeru closed 1 year ago

yshigeru commented 1 year ago

Perhaps, the following TLV_SPACE() is redundant:

static struct sk_buff *tipc_get_err_tlv(char *str)
{
    int str_len = strlen(str) + 1;
    struct sk_buff *buf;

    buf = tipc_tlv_alloc(TLV_SPACE(str_len));
    if (buf)
        tipc_add_tlv(buf, TIPC_TLV_ERROR_STRING, str, str_len);

    return buf;
}
yshigeru commented 1 year ago

Sent v1 patch: https://lore.kernel.org/all/20231114144336.1714364-1-syoshida@redhat.com/

yshigeru commented 1 year ago

Sent v2 patch: https://lore.kernel.org/all/20231117003704.1738094-1-syoshida@redhat.com/

yshigeru commented 1 year ago

Merged on net-next tree: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=d580d265e9ab