On Wed, 14 Jun 2017 11:37:39 -0700
Dave Watson <davejwat...@fb.com> wrote:

> +
> +static inline struct tls_context *tls_get_ctx(const struct sock *sk)
> +{
> +     struct inet_connection_sock *icsk = inet_csk(sk);
> +
> +     return icsk->icsk_ulp_data;
> +}
> +
> +static inline struct tls_sw_context *tls_sw_ctx(
> +             const struct tls_context *tls_ctx)
> +{
> +     return (struct tls_sw_context *)tls_ctx->priv_ctx;
> +}
> +
> +static inline struct tls_offload_context *tls_offload_ctx(
> +             const struct tls_context *tls_ctx)
> +{
> +     return (struct tls_offload_context *)tls_ctx->priv_ctx;
> +}
> +

Since priv_ctx is void *, casts here are unnecessary.

Reply via email to