]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mac80211: use offsetofend()
authorJohannes Berg <johannes.berg@intel.com>
Fri, 8 Sep 2017 09:54:46 +0000 (11:54 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 21 Sep 2017 09:42:01 +0000 (11:42 +0200)
commit4c121fd690d9c465e4cb09b7859adfdd6a0aee1d
treea5a2bf2efa32f279f3792212d6ebe70b7158c00e
parent1281103770e909e064edbb22a1115a0c14eca081
mac80211: use offsetofend()

This was created using the following spatch:
    @find@
    type S;
    expression M, M2;
    position p;
    @@
    offsetof(S, M) + sizeof(M2)@p

    @script:python@
    m << find.M;
    m2 << find.M2;
    @@
    if not m2.endswith('-> ' + m):
            cocci.include_match(False)

    @change@
    type find.S;
    expression find.M, find.M2;
    position find.p;
    @@
    -offsetof(S, M) + sizeof(M2)@p
    +offsetofend(S, M)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mesh.c
net/mac80211/mesh_hwmp.c
net/mac80211/mesh_plink.c
net/mac80211/util.c