)]}'
{
  "commit": "287980e49ffc0f6d911601e7e352a812ed27768e",
  "tree": "a906f835eb5be85dca4fd0c9c6f21b8f60920424",
  "parents": [
    "7ded384a12688c2a86b618da16bc87713404dfcc"
  ],
  "author": {
    "name": "Arnd Bergmann",
    "email": "arnd@arndb.de",
    "time": "Fri May 27 23:23:25 2016 +0200"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Fri May 27 15:26:11 2016 -0700"
  },
  "message": "remove lots of IS_ERR_VALUE abuses\n\nMost users of IS_ERR_VALUE() in the kernel are wrong, as they\npass an \u0027int\u0027 into a function that takes an \u0027unsigned long\u0027\nargument. This happens to work because the type is sign-extended\non 64-bit architectures before it gets converted into an\nunsigned type.\n\nHowever, anything that passes an \u0027unsigned short\u0027 or \u0027unsigned int\u0027\nargument into IS_ERR_VALUE() is guaranteed to be broken, as are\n8-bit integers and types that are wider than \u0027unsigned long\u0027.\n\nAndrzej Hajda has already fixed a lot of the worst abusers that\nwere causing actual bugs, but it would be nice to prevent any\nusers that are not passing \u0027unsigned long\u0027 arguments.\n\nThis patch changes all users of IS_ERR_VALUE() that I could find\non 32-bit ARM randconfig builds and x86 allmodconfig. For the\nmoment, this doesn\u0027t change the definition of IS_ERR_VALUE()\nbecause there are probably still architecture specific users\nelsewhere.\n\nAlmost all the warnings I got are for files that are better off\nusing \u0027if (err)\u0027 or \u0027if (err \u003c 0)\u0027.\nThe only legitimate user I could find that we get a warning for\nis the (32-bit only) freescale fman driver, so I did not remove\nthe IS_ERR_VALUE() there but changed the type to \u0027unsigned long\u0027.\nFor 9pfs, I just worked around one user whose calling conventions\nare so obscure that I did not dare change the behavior.\n\nI was using this definition for testing:\n\n #define IS_ERR_VALUE(x) ((unsigned long*)NULL \u003d\u003d (typeof (x)*)NULL \u0026\u0026 \\\n       unlikely((unsigned long long)(x) \u003e\u003d (unsigned long long)(typeof(x))-MAX_ERRNO))\n\nwhich ends up making all 16-bit or wider types work correctly with\nthe most plausible interpretation of what IS_ERR_VALUE() was supposed\nto return according to its users, but also causes a compile-time\nwarning for any users that do not pass an \u0027unsigned long\u0027 argument.\n\nI suggested this approach earlier this year, but back then we ended\nup deciding to just fix the users that are obviously broken. After\nthe initial warning that caused me to get involved in the discussion\n(fs/gfs2/dir.c) showed up again in the mainline kernel, Linus\nasked me to send the whole thing again.\n\n[ Updated the 9p parts as per Al Viro  - Linus ]\n\nSigned-off-by: Arnd Bergmann \u003carnd@arndb.de\u003e\nCc: Andrzej Hajda \u003ca.hajda@samsung.com\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nLink: https://lkml.org/lkml/2016/1/7/363\nLink: https://lkml.org/lkml/2016/5/27/486\nAcked-by: Srinivas Kandagatla \u003csrinivas.kandagatla@linaro.org\u003e # For nvmem part\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "15e4604efba7d298f8a5e1931eb3919452f26dbf",
      "old_mode": 33188,
      "old_path": "drivers/acpi/acpi_dbg.c",
      "new_id": "1f4128487dd4be1b342df522e010de6c29c6756b",
      "new_mode": 33188,
      "new_path": "drivers/acpi/acpi_dbg.c"
    },
    {
      "type": "modify",
      "old_id": "8638d575b2b99baef3d9a429e99fbc5287b4f1e1",
      "old_mode": 33188,
      "old_path": "drivers/ata/sata_highbank.c",
      "new_id": "aafb8cc03523212dee4d8d3fe66434af2406ae76",
      "new_mode": 33188,
      "new_path": "drivers/ata/sata_highbank.c"
    },
    {
      "type": "modify",
      "old_id": "b8551813ec4363908b19e405d166ee445719a0fe",
      "old_mode": 33188,
      "old_path": "drivers/clk/tegra/clk-tegra210.c",
      "new_id": "456cf586d2c2b86a23d74680787190ac44048989",
      "new_mode": 33188,
      "new_path": "drivers/clk/tegra/clk-tegra210.c"
    },
    {
      "type": "modify",
      "old_id": "cead9bec4843a18e0d564e4b5d3522d0681cd778",
      "old_mode": 33188,
      "old_path": "drivers/cpufreq/omap-cpufreq.c",
      "new_id": "376e63ca94e840e5334ae4d803dc9a173a69ab15",
      "new_mode": 33188,
      "new_path": "drivers/cpufreq/omap-cpufreq.c"
    },
    {
      "type": "modify",
      "old_id": "44d30b45f3cc35a44ee692bc6b48706e819b760c",
      "old_mode": 33188,
      "old_path": "drivers/crypto/caam/ctrl.c",
      "new_id": "5ad5f3009ae013407b80c88f23c7eaa769fcc095",
      "new_mode": 33188,
      "new_path": "drivers/crypto/caam/ctrl.c"
    },
    {
      "type": "modify",
      "old_id": "e0df233dde929b4fc5390104ed9b3227d3bd663e",
      "old_mode": 33188,
      "old_path": "drivers/dma/sun4i-dma.c",
      "new_id": "57aa227bfadb3eae97cb348372cacdf6eafc4586",
      "new_mode": 33188,
      "new_path": "drivers/dma/sun4i-dma.c"
    },
    {
      "type": "modify",
      "old_id": "08897dc1191555f56c9dd108a9863fe1f5394f32",
      "old_mode": 33188,
      "old_path": "drivers/gpio/gpio-xlp.c",
      "new_id": "1a33a19d95b98bd01744a3d2200db212f1ab60c7",
      "new_mode": 33188,
      "new_path": "drivers/gpio/gpio-xlp.c"
    },
    {
      "type": "modify",
      "old_id": "32c7986b63ab30e7f8b20036d98dd28e83d9e17c",
      "old_mode": 33188,
      "old_path": "drivers/gpu/drm/sti/sti_vtg.c",
      "new_id": "6bf4ce466d20fc194e968098bf76cca1efa77d84",
      "new_mode": 33188,
      "new_path": "drivers/gpu/drm/sti/sti_vtg.c"
    },
    {
      "type": "modify",
      "old_id": "7716f42f8aab3449105bd070189d28e287aaa420",
      "old_mode": 33188,
      "old_path": "drivers/gpu/drm/tilcdc/tilcdc_tfp410.c",
      "new_id": "6b8c5b3bf588b01b56a8a398f0f61918507086c3",
      "new_mode": 33188,
      "new_path": "drivers/gpu/drm/tilcdc/tilcdc_tfp410.c"
    },
    {
      "type": "modify",
      "old_id": "498b37e39058a6c212ff581e54c676465c826ec0",
      "old_mode": 33188,
      "old_path": "drivers/gpu/host1x/hw/intr_hw.c",
      "new_id": "e1e31e9e67cd96bdb17297ec66fb1ad8415a0ebd",
      "new_mode": 33188,
      "new_path": "drivers/gpu/host1x/hw/intr_hw.c"
    },
    {
      "type": "modify",
      "old_id": "ebab33e77d6729d5f3d2450d42761355f7cd29b8",
      "old_mode": 33188,
      "old_path": "drivers/iommu/arm-smmu-v3.c",
      "new_id": "94b68213c50dae945b9c0789afe8b6465dfd5411",
      "new_mode": 33188,
      "new_path": "drivers/iommu/arm-smmu-v3.c"
    },
    {
      "type": "modify",
      "old_id": "e206ce7a4e4bdb7ed2fb1a7d60dd1ea90e15cb0c",
      "old_mode": 33188,
      "old_path": "drivers/iommu/arm-smmu.c",
      "new_id": "9345a3fcb706dc00ce0e202ab87f2ddc64078fee",
      "new_mode": 33188,
      "new_path": "drivers/iommu/arm-smmu.c"
    },
    {
      "type": "modify",
      "old_id": "eb5eb0cd414d21a78e6bbc59704c809287dffdd0",
      "old_mode": 33188,
      "old_path": "drivers/irqchip/irq-clps711x.c",
      "new_id": "2223b3f15d6809b11dec6e0e69dc379e4dbb8093",
      "new_mode": 33188,
      "new_path": "drivers/irqchip/irq-clps711x.c"
    },
    {
      "type": "modify",
      "old_id": "b4e647179346611a5a296a373a0aacdabf9fc9b0",
      "old_mode": 33188,
      "old_path": "drivers/irqchip/irq-gic.c",
      "new_id": "fbc4ae2afd294934f8a1bc8321b8c29c2f73d1ed",
      "new_mode": 33188,
      "new_path": "drivers/irqchip/irq-gic.c"
    },
    {
      "type": "modify",
      "old_id": "9688d2e2a6364d2accbe77f323dd3b9f1d735dfa",
      "old_mode": 33188,
      "old_path": "drivers/irqchip/irq-hip04.c",
      "new_id": "9e25d8ce08e5b48f91b7dccc6c44e2eedea8151f",
      "new_mode": 33188,
      "new_path": "drivers/irqchip/irq-hip04.c"
    },
    {
      "type": "modify",
      "old_id": "1ccd2abed65f5348d0beaa114a2d1326c8cc1b67",
      "old_mode": 33188,
      "old_path": "drivers/irqchip/spear-shirq.c",
      "new_id": "1518ba31a80c99ba67d11ce8c83aa8988486cbd3",
      "new_mode": 33188,
      "new_path": "drivers/irqchip/spear-shirq.c"
    },
    {
      "type": "modify",
      "old_id": "9e1731c565e7eb2e6a7b57f8be4a172b4da2b094",
      "old_mode": 33188,
      "old_path": "drivers/media/i2c/adp1653.c",
      "new_id": "e191e295c95116e311fc226f64dc850b6a4ba196",
      "new_mode": 33188,
      "new_path": "drivers/media/i2c/adp1653.c"
    },
    {
      "type": "modify",
      "old_id": "5ef67774971dc34225c9079533287a33c6e1d659",
      "old_mode": 33188,
      "old_path": "drivers/media/platform/s5p-tv/mixer_drv.c",
      "new_id": "8a5d19469ddc2d126602e0f9f47f4152a9e89309",
      "new_mode": 33188,
      "new_path": "drivers/media/platform/s5p-tv/mixer_drv.c"
    },
    {
      "type": "modify",
      "old_id": "40e51b0baa46b57ec10a2ec0893ca0d6d1c82884",
      "old_mode": 33188,
      "old_path": "drivers/mfd/twl4030-irq.c",
      "new_id": "b46c0cfc27d9586c946474853c1b3dd8eaaf1e92",
      "new_mode": 33188,
      "new_path": "drivers/mfd/twl4030-irq.c"
    },
    {
      "type": "modify",
      "old_id": "b81b08f81325721037362213997618b7ebfc1e10",
      "old_mode": 33188,
      "old_path": "drivers/mmc/core/mmc.c",
      "new_id": "c984321d1881d90ea8b7633abd0c55a605d78502",
      "new_mode": 33188,
      "new_path": "drivers/mmc/core/mmc.c"
    },
    {
      "type": "modify",
      "old_id": "829a6eebcdcee551ee23f9679f2fb4c8bac46b13",
      "old_mode": 33188,
      "old_path": "drivers/mmc/host/dw_mmc.c",
      "new_id": "2cc6123b1df98a0c188d3a7626fa8f72424e4f22",
      "new_mode": 33188,
      "new_path": "drivers/mmc/host/dw_mmc.c"
    },
    {
      "type": "modify",
      "old_id": "2d300d87cda8b867075daaa06754bc29b2438214",
      "old_mode": 33188,
      "old_path": "drivers/mmc/host/sdhci-esdhc-imx.c",
      "new_id": "9d3ae1f4bd3cc799b6716355f19dbbbec2ceeda4",
      "new_mode": 33188,
      "new_path": "drivers/mmc/host/sdhci-esdhc-imx.c"
    },
    {
      "type": "modify",
      "old_id": "25f779e09d8e81e12b038157188ae446bf69eebe",
      "old_mode": 33188,
      "old_path": "drivers/mmc/host/sdhci-of-at91.c",
      "new_id": "d4cef713d246451c9187af6f314f2183db2a9353",
      "new_mode": 33188,
      "new_path": "drivers/mmc/host/sdhci-of-at91.c"
    },
    {
      "type": "modify",
      "old_id": "e010ea4eb6f5672ecc4d1f7e8cfac98856e6b243",
      "old_mode": 33188,
      "old_path": "drivers/mmc/host/sdhci.c",
      "new_id": "0e3d7c056cb135dfc1408dd30950f4327ccd84ba",
      "new_mode": 33188,
      "new_path": "drivers/mmc/host/sdhci.c"
    },
    {
      "type": "modify",
      "old_id": "bcb9dccada4dcbb898e3660d6dd1cf11ec588423",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/freescale/fman/fman.c",
      "new_id": "1de2e1e51c2be6c2259f8d6dca61b92a1338597e",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/freescale/fman/fman.c"
    },
    {
      "type": "modify",
      "old_id": "4eb0e9ac7182479724fb44e1997c4560e79775f9",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/freescale/fman/fman_muram.c",
      "new_id": "47394c45b6e8e4598827d9b1979e5a7116b612d0",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/freescale/fman/fman_muram.c"
    },
    {
      "type": "modify",
      "old_id": "dbf0af9e5bb584d6b5934183cd68da04670606d2",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/freescale/fman/fman_muram.h",
      "new_id": "889649ad89316587eeb9dc636e4d6d6756ea6efb",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/freescale/fman/fman_muram.h"
    },
    {
      "type": "modify",
      "old_id": "020ac1a4b40834131d6355a7464b73129fd93ad1",
      "old_mode": 33188,
      "old_path": "drivers/net/wireless/ti/wlcore/spi.c",
      "new_id": "cea9443c22a6b6983e5697dc5a027dcf867cd033",
      "new_mode": 33188,
      "new_path": "drivers/net/wireless/ti/wlcore/spi.c"
    },
    {
      "type": "modify",
      "old_id": "bb4ea123547f169b02044d6cc15f867b188f6f5c",
      "old_mode": 33188,
      "old_path": "drivers/nvmem/core.c",
      "new_id": "965911d9b36a77af3867ff6361169f977e71392b",
      "new_mode": 33188,
      "new_path": "drivers/nvmem/core.c"
    },
    {
      "type": "modify",
      "old_id": "a2aa655f56c4a8175c56d12845607dcb84786c14",
      "old_mode": 33188,
      "old_path": "drivers/tty/serial/amba-pl011.c",
      "new_id": "1b7331e40d795e1ec5482d6a82871bd5ce050b60",
      "new_mode": 33188,
      "new_path": "drivers/tty/serial/amba-pl011.c"
    },
    {
      "type": "modify",
      "old_id": "18971063f95fa17f4929e4cbc7014fff65172148",
      "old_mode": 33188,
      "old_path": "drivers/tty/serial/sprd_serial.c",
      "new_id": "699447aa8b4344ecbfc721fae03154ea6480df6c",
      "new_mode": 33188,
      "new_path": "drivers/tty/serial/sprd_serial.c"
    },
    {
      "type": "modify",
      "old_id": "d8d583d32a37bda2867e4a0af6627c8aa1cfccb6",
      "old_mode": 33188,
      "old_path": "drivers/video/fbdev/da8xx-fb.c",
      "new_id": "c229b1a0d13b350bce029d2fcd78ef60bd4c65b1",
      "new_mode": 33188,
      "new_path": "drivers/video/fbdev/da8xx-fb.c"
    },
    {
      "type": "modify",
      "old_id": "65de439bdc4f5402bc513eae3e66c09ce685965f",
      "old_mode": 33188,
      "old_path": "fs/afs/write.c",
      "new_id": "14d506efd1aaabebd33d4e08a3891e001da2b80f",
      "new_mode": 33188,
      "new_path": "fs/afs/write.c"
    },
    {
      "type": "modify",
      "old_id": "f723cd3a455cbde47e5be8cabb798e0725eefb8e",
      "old_mode": 33188,
      "old_path": "fs/binfmt_flat.c",
      "new_id": "caf9e39bb82b7fbd0b2387b6dea5332cdc5699de",
      "new_mode": 33188,
      "new_path": "fs/binfmt_flat.c"
    },
    {
      "type": "modify",
      "old_id": "4a01f30e99954616811a932dc1f54644f0e0f68d",
      "old_mode": 33188,
      "old_path": "fs/gfs2/dir.c",
      "new_id": "271d93905bac6eed449f6d968324497f22a38301",
      "new_mode": 33188,
      "new_path": "fs/gfs2/dir.c"
    },
    {
      "type": "modify",
      "old_id": "4d73a834c7e6590e29eb0d1a71645caf6c274016",
      "old_mode": 33188,
      "old_path": "kernel/pid.c",
      "new_id": "f66162f2359bfb2e85777ce4c5faed637a15db60",
      "new_mode": 33188,
      "new_path": "kernel/pid.c"
    },
    {
      "type": "modify",
      "old_id": "ea79ee9a73489f43a88e57c2eb529fc11d894e5f",
      "old_mode": 33188,
      "old_path": "net/9p/client.c",
      "new_id": "3fc94a49ccd53c2dba661acb4d6b0433de9c393b",
      "new_mode": 33188,
      "new_path": "net/9p/client.c"
    },
    {
      "type": "modify",
      "old_id": "6e8665430bd5efc22e06f6934a7133d1b62306ea",
      "old_mode": 33188,
      "old_path": "sound/soc/qcom/lpass-platform.c",
      "new_id": "ddfe34434765ce8e40ae297ca98110d4fcb35f08",
      "new_mode": 33188,
      "new_path": "sound/soc/qcom/lpass-platform.c"
    }
  ]
}
