Subject: Re: [PATCH v1 net-next 2/6] net: Don't register pernet_operations if only one of id or size is specified.

From: Jakub Kicinski <[email-masked]>
Date: Tue, 30 Jul 2024 18:54:12 -0700

On Mon, 29 Jul 2024 14:07:57 -0700 Kuniyuki Iwashima wrote:
> +	if (WARN_ON((ops->id && !ops->size) || (!ops->id && ops->size)))

I'd write as:

	if (WARN_ON(!!ops->id != !!ops->size))

or

	if (WARN_ON(!!ops->id ^ !!ops->size))

but not 100% sure if it's idiomatic or just my preference..