On Fri, 13 Jun 2025 16:41:43 +0800
Jiawen Wu <jiawe...@trustnetic.com> wrote:

> +bool txgbe_is_pf(struct txgbe_hw *hw)
> +{
> +     switch (hw->mac.type) {
> +     case txgbe_mac_raptor:
> +             return true;
> +     default:
> +             return false;
> +     }
> +}
> +

This is ok as is, but you could make it much simpler as:

bool txgbe_is_pf(const struct txgbe_hw *hw)
{
        return hw->mac.type == txgbe_mac_raptor;
}

Or are you planning for future hardware?

Reply via email to