if (!hdr)
                return -EMSGSIZE;
 
-       genl_dump_check_consistent(cb, hdr, &macsec_fam);
+       genl_dump_check_consistent(cb, hdr);
 
        if (nla_put_u32(skb, MACSEC_ATTR_IFINDEX, dev->ifindex))
                goto nla_put_failure;
 
                return -EMSGSIZE;
 
        if (cb)
-               genl_dump_check_consistent(cb, hdr, &hwsim_genl_family);
+               genl_dump_check_consistent(cb, hdr);
 
        if (data->alpha2[0] && data->alpha2[1])
                param.reg_alpha2 = data->alpha2;
 
 /**
  * genlmsg_nlhdr - Obtain netlink header from user specified header
  * @user_hdr: user header as returned from genlmsg_put()
- * @family: generic netlink family
  *
  * Returns pointer to netlink header.
  */
-static inline struct nlmsghdr *
-genlmsg_nlhdr(void *user_hdr, const struct genl_family *family)
+static inline struct nlmsghdr *genlmsg_nlhdr(void *user_hdr)
 {
        return (struct nlmsghdr *)((char *)user_hdr -
-                                  family->hdrsize -
                                   GENL_HDRLEN -
                                   NLMSG_HDRLEN);
 }
  * genl_dump_check_consistent - check if sequence is consistent and advertise if not
  * @cb: netlink callback structure that stores the sequence number
  * @user_hdr: user header as returned from genlmsg_put()
- * @family: generic netlink family
  *
  * Cf. nl_dump_check_consistent(), this just provides a wrapper to make it
  * simpler to use with generic netlink.
  */
 static inline void genl_dump_check_consistent(struct netlink_callback *cb,
-                                             void *user_hdr,
-                                             const struct genl_family *family)
+                                             void *user_hdr)
 {
-       nl_dump_check_consistent(cb, genlmsg_nlhdr(user_hdr, family));
+       nl_dump_check_consistent(cb, genlmsg_nlhdr(user_hdr));
 }
 
 /**
 
        if (!hdr)
                return -EMSGSIZE;
 
-       genl_dump_check_consistent(cb, hdr, &nfc_genl_family);
+       genl_dump_check_consistent(cb, hdr);
 
        if (nla_put_u32(msg, NFC_ATTR_TARGET_INDEX, target->idx) ||
            nla_put_u32(msg, NFC_ATTR_PROTOCOLS, target->supported_protocols) ||
                return -EMSGSIZE;
 
        if (cb)
-               genl_dump_check_consistent(cb, hdr, &nfc_genl_family);
+               genl_dump_check_consistent(cb, hdr);
 
        if (nfc_genl_setup_device_added(dev, msg))
                goto nla_put_failure;
                        goto nla_put_failure;
 
                if (cb)
-                       genl_dump_check_consistent(cb, hdr, &nfc_genl_family);
+                       genl_dump_check_consistent(cb, hdr);
 
                if (nla_put_u32(msg, NFC_ATTR_DEVICE_INDEX, dev->idx) ||
                    nla_put_u32(msg, NFC_ATTR_SE_INDEX, se->idx) ||
 
        if (!hdr)
                return -1;
 
-       genl_dump_check_consistent(cb, hdr, &nl80211_fam);
+       genl_dump_check_consistent(cb, hdr);
 
        if (nl80211_put_regdom(regdom, msg))
                goto nla_put_failure;
        if (!hdr)
                return -1;
 
-       genl_dump_check_consistent(cb, hdr, &nl80211_fam);
+       genl_dump_check_consistent(cb, hdr);
 
        if (nla_put_u32(msg, NL80211_ATTR_GENERATION, rdev->bss_generation))
                goto nla_put_failure;