mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
smc: preserve const qualifier in smc_sk()
We can change smc_sk() to propagate its argument const qualifier, thanks to container_of_const(). Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Karsten Graul <kgraul@linux.ibm.com> Cc: Wenjia Zhang <wenjia@linux.ibm.com> Cc: Jan Karcher <jaka@linux.ibm.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
b064ba9c3c
commit
407db475d5
@@ -283,10 +283,7 @@ struct smc_sock { /* smc sock container */
|
|||||||
* */
|
* */
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline struct smc_sock *smc_sk(const struct sock *sk)
|
#define smc_sk(ptr) container_of_const(ptr, struct smc_sock, sk)
|
||||||
{
|
|
||||||
return (struct smc_sock *)sk;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void smc_init_saved_callbacks(struct smc_sock *smc)
|
static inline void smc_init_saved_callbacks(struct smc_sock *smc)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user