Please provide cover letter for the patch set.

On Thu, 25 Jul 2019 17:55:31 +0800, we...@ucloud.cn wrote:
> +static bool rhash_table_init;
> +int flow_indr_rhashtable_init(void)
> +{
> +     int err = 0;
> +
> +     if (!rhash_table_init) {
> +             err = rhashtable_init(&indr_setup_block_ht,
> +                                   &flow_indr_setup_block_ht_params);
> +
> +             if (!err)
> +                     rhash_table_init = true;
> +     }
> +
> +     return err;
> +}
> +EXPORT_SYMBOL_GPL(flow_indr_rhashtable_init);

This should be written like this:

int flow_indr_rhashtable_init(void)
{
        static bool rhash_table_init;
        int err;

        if (rhash_table_init)
                return 0;

        err = rhashtable_init(&indr_setup_block_ht,
                              &flow_indr_setup_block_ht_params);
        if (err)
                return err;

        rhash_table_init = true;
        return 0;
}
EXPORT_SYMBOL_GPL(flow_indr_rhashtable_init);

Reply via email to