Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29130754 authored by Lorenzo Colitti's avatar Lorenzo Colitti Committed by Jeevan Shriram
Browse files

net: ipv4: tcp: Get tcpi_count via file_count() not direct access



Commit 0a1544a1d, which implements a Qualcomm feature called
Smart Wireless Interface Manager, added a tcpi_count member to
struct tcp_info, and populates it using:

    atomic_read(&filep->f_count);

This causes compiler warnings on 64-bit architectures (e.g.,
64-bit ARCH_UM, used by net_test) because f_count is actually an
atomic_long_t, and on 64-bit architectures atomic_long_t is a
64-bit number. The difference doesn't matter in practice because
the value is cast to a __u8 anyway, but it causes build breaks
because we build with -Werror.

Instead of using atomic_long_t directly, use the the file_count
macro which exists for this purpose.

Bug: 21631098
Change-Id: Ie09a0b4e7a5cf128b21eff10c1b34faf5c995356
Signed-off-by: default avatarLorenzo Colitti <lorenzo@google.com>
Git-Commit: fce6de568696434a22ec8f018b6a99bfec60ab1b
Git-repo: https://android.googlesource.com/kernel/msm


[jshriram@codeaurora.org: resolve minor merge conflicts]
Signed-off-by: default avatarJeevan Shriram <jshriram@codeaurora.org>
parent be0c2905
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment