)]}'
{
  "commit": "053c095a82cf773075e83d7233b5cc19a1f73ece",
  "tree": "c787028efa9a73a182a0f338f87b6294cef4b8b9",
  "parents": [
    "ede58ef28e105de94475b2b69fa069c9a2ce6933"
  ],
  "author": {
    "name": "Johannes Berg",
    "email": "johannes.berg@intel.com",
    "time": "Fri Jan 16 22:09:00 2015 +0100"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Sun Jan 18 01:03:45 2015 -0500"
  },
  "message": "netlink: make nlmsg_end() and genlmsg_end() void\n\nContrary to common expectations for an \"int\" return, these functions\nreturn only a positive value -- if used correctly they cannot even\nreturn 0 because the message header will necessarily be in the skb.\n\nThis makes the very common pattern of\n\n  if (genlmsg_end(...) \u003c 0) { ... }\n\nbe a whole bunch of dead code. Many places also simply do\n\n  return nlmsg_end(...);\n\nand the caller is expected to deal with it.\n\nThis also commonly (at least for me) causes errors, because it is very\ncommon to write\n\n  if (my_function(...))\n    /* error condition */\n\nand if my_function() does \"return nlmsg_end()\" this is of course wrong.\n\nAdditionally, there\u0027s not a single place in the kernel that actually\nneeds the message length returned, and if anyone needs it later then\nit\u0027ll be very easy to just use skb-\u003elen there.\n\nRemove this, and make the functions void. This removes a bunch of dead\ncode as described above. The patch adds lines because I did\n\n-\treturn nlmsg_end(...);\n+\tnlmsg_end(...);\n+\treturn 0;\n\nI could have preserved all the function\u0027s return values by returning\nskb-\u003elen, but instead I\u0027ve audited all the places calling the affected\nfunctions and found that none cared. A few places actually compared\nthe return value with \u003c\u003d 0 in dump functionality, but that could just\nbe changed to \u003c 0 with no change in behaviour, so I opted for the more\nefficient version.\n\nOne instance of the error I\u0027ve made numerous times now is also present\nin net/phonet/pn_netlink.c in the route_dumpit() function - it didn\u0027t\ncheck for \u003c0 or \u003c\u003d0 and thus broke out of the loop every single time.\nI\u0027ve preserved this since it will (I think) have caused the messages to\nuserspace to be formatted differently with just a single message for\nevery SKB returned to userspace. It\u0027s possible that this isn\u0027t needed\nfor the tools that actually use this, but I don\u0027t even know what they\nare so couldn\u0027t test that changing this behaviour would be acceptable.\n\nSigned-off-by: Johannes Berg \u003cjohannes.berg@intel.com\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ef2d730734dcca90a9690e48021d1d9a1d925791",
      "old_mode": 33188,
      "old_path": "drivers/acpi/event.c",
      "new_id": "e24ea4e796e4b920cdc437f3f76a69eb391b85c7",
      "new_mode": 33188,
      "new_path": "drivers/acpi/event.c"
    },
    {
      "type": "modify",
      "old_id": "964d719b150f17dbad58c9df9d4a7b962cece39b",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/rocker/rocker.c",
      "new_id": "d54781e71cd478a9d9f759db01924b4eb251fdb5",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/rocker/rocker.c"
    },
    {
      "type": "modify",
      "old_id": "6b6b45622a0aba085a409820e4205c4eb50b2bf9",
      "old_mode": 33188,
      "old_path": "drivers/net/vxlan.c",
      "new_id": "c5f79e7513a6bb580bed87d70e7ade99ef36a640",
      "new_mode": 33188,
      "new_path": "drivers/net/vxlan.c"
    },
    {
      "type": "modify",
      "old_id": "494e7335aa6461bf2b67ba4a3624b639d480d100",
      "old_mode": 33188,
      "old_path": "drivers/net/wireless/mac80211_hwsim.c",
      "new_id": "4a4c6586a8d2dcda2b6f49a5b767bcc48304e138",
      "new_mode": 33188,
      "new_path": "drivers/net/wireless/mac80211_hwsim.c"
    },
    {
      "type": "modify",
      "old_id": "8c27b6a77ec4b1ae9c914cfe15eb05d7dd0b371a",
      "old_mode": 33188,
      "old_path": "drivers/scsi/pmcraid.c",
      "new_id": "cf222f46eac5da0a3668516e10b346ba8344adb7",
      "new_mode": 33188,
      "new_path": "drivers/scsi/pmcraid.c"
    },
    {
      "type": "modify",
      "old_id": "1157b559683b1ff437f9eba74626a90f517d0a1e",
      "old_mode": 33188,
      "old_path": "drivers/target/target_core_user.c",
      "new_id": "1a1bcf71ec9dbf3ed5ae05cbfadcf71a29a33f87",
      "new_mode": 33188,
      "new_path": "drivers/target/target_core_user.c"
    },
    {
      "type": "modify",
      "old_id": "87e0b0782023cb37696a92150d9f0c10bd09b198",
      "old_mode": 33188,
      "old_path": "drivers/thermal/thermal_core.c",
      "new_id": "48491d1a81d650f1d10812c1fb8d5e05ff99cbe1",
      "new_mode": 33188,
      "new_path": "drivers/thermal/thermal_core.c"
    },
    {
      "type": "modify",
      "old_id": "e7cfbaf8d0e2ed66b404c259dcd64c2d4ccd5f54",
      "old_mode": 33188,
      "old_path": "fs/dlm/netlink.c",
      "new_id": "1e6e227134d7b5dae4fa3fc43feafeb994bfa708",
      "new_mode": 33188,
      "new_path": "fs/dlm/netlink.c"
    },
    {
      "type": "modify",
      "old_id": "84125088c309afb988daa4b24368c2d9e0f02588",
      "old_mode": 33188,
      "old_path": "include/net/genetlink.h",
      "new_id": "f24aa83b80b642557876c91264013b0e900f8db4",
      "new_mode": 33188,
      "new_path": "include/net/genetlink.h"
    },
    {
      "type": "modify",
      "old_id": "d5869b90bfbb96108d35cee19eb9642b70bb4c63",
      "old_mode": 33188,
      "old_path": "include/net/netlink.h",
      "new_id": "e010ee8da41ded34ae6e407cfab40734031b73aa",
      "new_mode": 33188,
      "new_path": "include/net/netlink.h"
    },
    {
      "type": "modify",
      "old_id": "670fff88a9613e07ac52d70a5365875d93e1e29c",
      "old_mode": 33188,
      "old_path": "kernel/taskstats.c",
      "new_id": "21f82c29c9143c9a39e658593b0ac4671ce9c1b9",
      "new_mode": 33188,
      "new_path": "kernel/taskstats.c"
    },
    {
      "type": "modify",
      "old_id": "03667e65cc2964d7eac5beddda536af506244ae7",
      "old_mode": 33188,
      "old_path": "net/bridge/br_fdb.c",
      "new_id": "08bf04bdac584ddfe6329967727d5afa71dac264",
      "new_mode": 33188,
      "new_path": "net/bridge/br_fdb.c"
    },
    {
      "type": "modify",
      "old_id": "fed61c971b177ab00a1b2f398832e808746ed4e7",
      "old_mode": 33188,
      "old_path": "net/bridge/br_mdb.c",
      "new_id": "409608960899630b5349bbd310200a95dc2867a2",
      "new_mode": 33188,
      "new_path": "net/bridge/br_mdb.c"
    },
    {
      "type": "modify",
      "old_id": "163950b10d8cb29f88530efcff589079cf07da47",
      "old_mode": 33188,
      "old_path": "net/bridge/br_netlink.c",
      "new_id": "528cf2790a5f6c5f66390056212e1b005e6599f0",
      "new_mode": 33188,
      "new_path": "net/bridge/br_netlink.c"
    },
    {
      "type": "modify",
      "old_id": "295f62e62eb34bf4050eb0657c48426e583b65b4",
      "old_mode": 33188,
      "old_path": "net/can/gw.c",
      "new_id": "a6f448e18ea8c97e28f02a5a50805d9629c6c7f6",
      "new_mode": 33188,
      "new_path": "net/can/gw.c"
    },
    {
      "type": "modify",
      "old_id": "185c341fafbd079714fe3a563b8209d5c5f7ead4",
      "old_mode": 33188,
      "old_path": "net/core/fib_rules.c",
      "new_id": "44706e81b2e03df3e9d39c1cd76879a4ede48d1e",
      "new_mode": 33188,
      "new_path": "net/core/fib_rules.c"
    },
    {
      "type": "modify",
      "old_id": "8d614c93f86a233a5cb3864c600d9c68fe5f9ea1",
      "old_mode": 33188,
      "old_path": "net/core/neighbour.c",
      "new_id": "d36d564f149f2fb54d9c67803cd7c564c9c4e028",
      "new_mode": 33188,
      "new_path": "net/core/neighbour.c"
    },
    {
      "type": "modify",
      "old_id": "eadc5c0e2dfa99e81d4201593bb8b2dbb3b8d42d",
      "old_mode": 33188,
      "old_path": "net/core/rtnetlink.c",
      "new_id": "e13b9dbdf1546194b23c6b83acb5c09076ab2222",
      "new_mode": 33188,
      "new_path": "net/core/rtnetlink.c"
    },
    {
      "type": "modify",
      "old_id": "4400da7739dafb3c3d42e52829086b9d3e418505",
      "old_mode": 33188,
      "old_path": "net/decnet/dn_dev.c",
      "new_id": "b2c26b081134a0c5b3697bfbad0148a029a5b95e",
      "new_mode": 33188,
      "new_path": "net/decnet/dn_dev.c"
    },
    {
      "type": "modify",
      "old_id": "daccc4a36d80ea9df6e986d53b83fc95b807b8b8",
      "old_mode": 33188,
      "old_path": "net/decnet/dn_route.c",
      "new_id": "812e5e6e88fb7153bf9bc43fd0a22c1ab80d0b51",
      "new_mode": 33188,
      "new_path": "net/decnet/dn_route.c"
    },
    {
      "type": "modify",
      "old_id": "3f19fcbf126d0395acc69f2ec51fc7e2ea486c76",
      "old_mode": 33188,
      "old_path": "net/decnet/dn_table.c",
      "new_id": "1540b506e3e0b4f1fa094d2c928d22d20c4dbf3a",
      "new_mode": 33188,
      "new_path": "net/decnet/dn_table.c"
    },
    {
      "type": "modify",
      "old_id": "fa1464762d0dafdc481b68a7cbf46cfd45d8b30a",
      "old_mode": 33188,
      "old_path": "net/ieee802154/netlink.c",
      "new_id": "c8133c07ceee4ce29411a5f9ea47c0c529231223",
      "new_mode": 33188,
      "new_path": "net/ieee802154/netlink.c"
    },
    {
      "type": "modify",
      "old_id": "3c902e9516fb69dc94508ac1f77cda79d4095d16",
      "old_mode": 33188,
      "old_path": "net/ieee802154/nl-mac.c",
      "new_id": "9105265920fe735db77650607bd3fe89d143869a",
      "new_mode": 33188,
      "new_path": "net/ieee802154/nl-mac.c"
    },
    {
      "type": "modify",
      "old_id": "7baf98b146116bd52f961c371d31a33878c0b8d8",
      "old_mode": 33188,
      "old_path": "net/ieee802154/nl-phy.c",
      "new_id": "1b9d25f6e898616d7972950692bcd1eab71ddb26",
      "new_mode": 33188,
      "new_path": "net/ieee802154/nl-phy.c"
    },
    {
      "type": "modify",
      "old_id": "a25b9bbd077be000d2e1de99bf795ac8e1fc0897",
      "old_mode": 33188,
      "old_path": "net/ieee802154/nl802154.c",
      "new_id": "a4daf91b8d0a395d6964dad93cf292e566dee22c",
      "new_mode": 33188,
      "new_path": "net/ieee802154/nl802154.c"
    },
    {
      "type": "modify",
      "old_id": "214882e7d6deea0114531124689027dfdde83df6",
      "old_mode": 33188,
      "old_path": "net/ipv4/devinet.c",
      "new_id": "5f344eb3fc25a6e3844e6fe1ae79d61c7ab04cc1",
      "new_mode": 33188,
      "new_path": "net/ipv4/devinet.c"
    },
    {
      "type": "modify",
      "old_id": "d2b7b5521b1b5cc44074868f1f032ae8f96ae878",
      "old_mode": 33188,
      "old_path": "net/ipv4/fib_semantics.c",
      "new_id": "265cb72b7c1b633aa1c431487dbda9898a22d930",
      "new_mode": 33188,
      "new_path": "net/ipv4/fib_semantics.c"
    },
    {
      "type": "modify",
      "old_id": "e34dccbc4d70bd26f7cec88c031dcea31124314a",
      "old_mode": 33188,
      "old_path": "net/ipv4/inet_diag.c",
      "new_id": "81751f12645f6224a7f076dea1da2fc0d638819a",
      "new_mode": 33188,
      "new_path": "net/ipv4/inet_diag.c"
    },
    {
      "type": "modify",
      "old_id": "c8034587859d3ebdda204711a7939abe8f66a22d",
      "old_mode": 33188,
      "old_path": "net/ipv4/ipmr.c",
      "new_id": "9d78427652d23e33a46ab7ce2d4b6dbac1660781",
      "new_mode": 33188,
      "new_path": "net/ipv4/ipmr.c"
    },
    {
      "type": "modify",
      "old_id": "ce112d0f26985ab07ed3593cbeac855f8632c651",
      "old_mode": 33188,
      "old_path": "net/ipv4/route.c",
      "new_id": "f6e43ca5e6412c6d9037d1e2c1281d38414c4646",
      "new_mode": 33188,
      "new_path": "net/ipv4/route.c"
    },
    {
      "type": "modify",
      "old_id": "ed9c9a91851ced8e719aeec58530fb326ec8a2db",
      "old_mode": 33188,
      "old_path": "net/ipv4/tcp_metrics.c",
      "new_id": "e5f41bd5ec1bcfe88199ec077f1558917b1be61b",
      "new_mode": 33188,
      "new_path": "net/ipv4/tcp_metrics.c"
    },
    {
      "type": "modify",
      "old_id": "f7c8bbeb27b704c0106f714d5a0677c27d3346e0",
      "old_mode": 33188,
      "old_path": "net/ipv6/addrconf.c",
      "new_id": "8975d9501d50d0916536236755bba97fa25d457b",
      "new_mode": 33188,
      "new_path": "net/ipv6/addrconf.c"
    },
    {
      "type": "modify",
      "old_id": "fd0dc47f471dad23566248fecadd571a1a4c00d9",
      "old_mode": 33188,
      "old_path": "net/ipv6/addrlabel.c",
      "new_id": "e43e79d0a6124caa06cd2e2c09203ad2cd032c9e",
      "new_mode": 33188,
      "new_path": "net/ipv6/addrlabel.c"
    },
    {
      "type": "modify",
      "old_id": "03c520a4ebeb62b228db91b89900e31e4fc29070",
      "old_mode": 33188,
      "old_path": "net/ipv6/ip6_fib.c",
      "new_id": "53775ee7d376fb11d5336aea9c2b5f3831c56ea1",
      "new_mode": 33188,
      "new_path": "net/ipv6/ip6_fib.c"
    },
    {
      "type": "modify",
      "old_id": "722669754bbfb89ab04ea7677f1744a967c7e13e",
      "old_mode": 33188,
      "old_path": "net/ipv6/ip6mr.c",
      "new_id": "34b682617f504359cecff4447c6015f90623e949",
      "new_mode": 33188,
      "new_path": "net/ipv6/ip6mr.c"
    },
    {
      "type": "modify",
      "old_id": "34dcbb59df7514afd0163e1a737e14aba014b030",
      "old_mode": 33188,
      "old_path": "net/ipv6/route.c",
      "new_id": "c60f15775c53ad96bee8202f977ef6ee046c697a",
      "new_mode": 33188,
      "new_path": "net/ipv6/route.c"
    },
    {
      "type": "modify",
      "old_id": "6b16598f31d557a40fa4baa0ca13a0384f685800",
      "old_mode": 33188,
      "old_path": "net/l2tp/l2tp_netlink.c",
      "new_id": "b4e923f7795460736f48c73e9942efad46b8a285",
      "new_mode": 33188,
      "new_path": "net/l2tp/l2tp_netlink.c"
    },
    {
      "type": "modify",
      "old_id": "b8295a430a5600d35b6de4163ba3b98e75c5f28c",
      "old_mode": 33188,
      "old_path": "net/netfilter/ipvs/ip_vs_ctl.c",
      "new_id": "e55759056361c47ed1fcfa5c656541ba39bfd260",
      "new_mode": 33188,
      "new_path": "net/netfilter/ipvs/ip_vs_ctl.c"
    },
    {
      "type": "modify",
      "old_id": "3b3ddb4fb9ee122a5b6d3a39450be38a64d6f614",
      "old_mode": 33188,
      "old_path": "net/netfilter/nf_tables_api.c",
      "new_id": "70f697827b9bf13798a309f9e3c4b9407bee7d9d",
      "new_mode": 33188,
      "new_path": "net/netfilter/nf_tables_api.c"
    },
    {
      "type": "modify",
      "old_id": "c2f2a53a487919bcb45e882b9ff8859c699b9d56",
      "old_mode": 33188,
      "old_path": "net/netlabel/netlabel_cipso_v4.c",
      "new_id": "179625353cacef10c850fed64732f78261714bfe",
      "new_mode": 33188,
      "new_path": "net/netlabel/netlabel_cipso_v4.c"
    },
    {
      "type": "modify",
      "old_id": "e66e977ef2fa0cf3ec52bc2ea3d6604d17de3e47",
      "old_mode": 33188,
      "old_path": "net/netlabel/netlabel_mgmt.c",
      "new_id": "8b3b789c43c2def93c6f7192a51f75e2074dc143",
      "new_mode": 33188,
      "new_path": "net/netlabel/netlabel_mgmt.c"
    },
    {
      "type": "modify",
      "old_id": "78a63c18779e443be49b5a9509499ab7cb43869a",
      "old_mode": 33188,
      "old_path": "net/netlabel/netlabel_unlabeled.c",
      "new_id": "aec7994f78cf8df09fab84817c9bbee4ec77daaa",
      "new_mode": 33188,
      "new_path": "net/netlabel/netlabel_unlabeled.c"
    },
    {
      "type": "modify",
      "old_id": "bb59a7ed0859c5179c9c14bfe63a6924fc4b1934",
      "old_mode": 33188,
      "old_path": "net/netlink/diag.c",
      "new_id": "3ee63a3cff3049cba8f837713394a5123bf54708",
      "new_mode": 33188,
      "new_path": "net/netlink/diag.c"
    },
    {
      "type": "modify",
      "old_id": "2e11061ef885562d2ff2a098448a7d9c8d1b64ee",
      "old_mode": 33188,
      "old_path": "net/netlink/genetlink.c",
      "new_id": "f52a7d5734cdd926672ec7df9a9199c05a8bceb1",
      "new_mode": 33188,
      "new_path": "net/netlink/genetlink.c"
    },
    {
      "type": "modify",
      "old_id": "44989fc8cddf19550a7a525503f9d267099470b2",
      "old_mode": 33188,
      "old_path": "net/nfc/netlink.c",
      "new_id": "be387e6219a0f52d96e03192317ba88777ec6346",
      "new_mode": 33188,
      "new_path": "net/nfc/netlink.c"
    },
    {
      "type": "modify",
      "old_id": "8bda3cc12344f89784490433d7b82fab037becc6",
      "old_mode": 33188,
      "old_path": "net/openvswitch/datapath.c",
      "new_id": "f45f1bf4422c410422df2f221d37f9c071ff3b3d",
      "new_mode": 33188,
      "new_path": "net/openvswitch/datapath.c"
    },
    {
      "type": "modify",
      "old_id": "92f2c7107eec4f307cc50cdfedfb4ea2db0e59de",
      "old_mode": 33188,
      "old_path": "net/packet/diag.c",
      "new_id": "0ed68f0238bf9416f1cc92928b61a385a1055886",
      "new_mode": 33188,
      "new_path": "net/packet/diag.c"
    },
    {
      "type": "modify",
      "old_id": "b64151ade6b33a9cbacb0980d3ddbe03d8f7b4c8",
      "old_mode": 33188,
      "old_path": "net/phonet/pn_netlink.c",
      "new_id": "54d766842c2b55a6ba03071a5991a4c91547f072",
      "new_mode": 33188,
      "new_path": "net/phonet/pn_netlink.c"
    },
    {
      "type": "modify",
      "old_id": "86fa0f3b2cafa46d47db9cd03e46dfe89c22d238",
      "old_mode": 33188,
      "old_path": "net/unix/diag.c",
      "new_id": "ef542fbca9fe52dd85f6946e9d65ee8a28f6340e",
      "new_mode": 33188,
      "new_path": "net/unix/diag.c"
    },
    {
      "type": "modify",
      "old_id": "380784378df81e1d33e80d37356ae5ef445f90a7",
      "old_mode": 33188,
      "old_path": "net/wireless/nl80211.c",
      "new_id": "4ed9039bd5f984c3a353588c8dfb8d365ec34f3b",
      "new_mode": 33188,
      "new_path": "net/wireless/nl80211.c"
    },
    {
      "type": "modify",
      "old_id": "8128594ab3797e4814e77ef80246456641458027",
      "old_mode": 33188,
      "old_path": "net/xfrm/xfrm_user.c",
      "new_id": "7de2ed9ec46ddd003ef3db00554335a12f95cb89",
      "new_mode": 33188,
      "new_path": "net/xfrm/xfrm_user.c"
    }
  ]
}
