)]}'
{
  "commit": "597781f3e51f48ef8e67be772196d9e9673752c4",
  "tree": "6e1974bc899889da40f2fde47b04a5ece0bd3399",
  "parents": [
    "3edd4fc9537d95e460d502987c63a90d6b9a7a82"
  ],
  "author": {
    "name": "Cesar Eduardo Barros",
    "email": "cesarb@cesarb.net",
    "time": "Mon Aug 09 17:18:32 2010 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Mon Aug 09 20:44:54 2010 -0700"
  },
  "message": "kmap_atomic: make kunmap_atomic() harder to misuse\n\nkunmap_atomic() is currently at level -4 on Rusty\u0027s \"Hard To Misuse\"\nlist[1] (\"Follow common convention and you\u0027ll get it wrong\"), except in\nsome architectures when CONFIG_DEBUG_HIGHMEM is set[2][3].\n\nkunmap() takes a pointer to a struct page; kunmap_atomic(), however, takes\ntakes a pointer to within the page itself.  This seems to once in a while\ntrip people up (the convention they are following is the one from\nkunmap()).\n\nMake it much harder to misuse, by moving it to level 9 on Rusty\u0027s list[4]\n(\"The compiler/linker won\u0027t let you get it wrong\").  This is done by\nrefusing to build if the type of its first argument is a pointer to a\nstruct page.\n\nThe real kunmap_atomic() is renamed to kunmap_atomic_notypecheck()\n(which is what you would call in case for some strange reason calling it\nwith a pointer to a struct page is not incorrect in your code).\n\nThe previous version of this patch was compile tested on x86-64.\n\n[1] http://ozlabs.org/~rusty/index.cgi/tech/2008-04-01.html\n[2] In these cases, it is at level 5, \"Do it right or it will always\n    break at runtime.\"\n[3] At least mips and powerpc look very similar, and sparc also seems to\n    share a common ancestor with both; there seems to be quite some\n    degree of copy-and-paste coding here. The include/asm/highmem.h file\n    for these three archs mention x86 CPUs at its top.\n[4] http://ozlabs.org/~rusty/index.cgi/tech/2008-03-30.html\n[5] As an aside, could someone tell me why mn10300 uses unsigned long as\n    the first parameter of kunmap_atomic() instead of void *?\n\nSigned-off-by: Cesar Eduardo Barros \u003ccesarb@cesarb.net\u003e\nCc: Russell King \u003clinux@arm.linux.org.uk\u003e (arch/arm)\nCc: Ralf Baechle \u003cralf@linux-mips.org\u003e (arch/mips)\nCc: David Howells \u003cdhowells@redhat.com\u003e (arch/frv, arch/mn10300)\nCc: Koichi Yasutake \u003cyasutake.koichi@jp.panasonic.com\u003e (arch/mn10300)\nCc: Kyle McMartin \u003ckyle@mcmartin.ca\u003e (arch/parisc)\nCc: Helge Deller \u003cdeller@gmx.de\u003e (arch/parisc)\nCc: \"James E.J. Bottomley\" \u003cjejb@parisc-linux.org\u003e (arch/parisc)\nCc: Benjamin Herrenschmidt \u003cbenh@kernel.crashing.org\u003e (arch/powerpc)\nCc: Paul Mackerras \u003cpaulus@samba.org\u003e (arch/powerpc)\nCc: \"David S. Miller\" \u003cdavem@davemloft.net\u003e (arch/sparc)\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e (arch/x86)\nCc: Ingo Molnar \u003cmingo@redhat.com\u003e (arch/x86)\nCc: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e (arch/x86)\nCc: Arnd Bergmann \u003carnd@arndb.de\u003e (include/asm-generic)\nCc: Rusty Russell \u003crusty@rustcorp.com.au\u003e (\"Hard To Misuse\" list)\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "feb988a7ec37dcf2336d7a908e5561b0cc3ee7d5",
      "old_mode": 33188,
      "old_path": "arch/arm/include/asm/highmem.h",
      "new_id": "5aff581266024831e359ce30658dd191403714cd",
      "new_mode": 33188,
      "new_path": "arch/arm/include/asm/highmem.h"
    },
    {
      "type": "modify",
      "old_id": "6ab244062b4ab2f720e84d870011faac64878c81",
      "old_mode": 33188,
      "old_path": "arch/arm/mm/highmem.c",
      "new_id": "1fbdb55bfd1bd34a480ea0e45b7f3a39a2934c6a",
      "new_mode": 33188,
      "new_path": "arch/arm/mm/highmem.c"
    },
    {
      "type": "modify",
      "old_id": "68e4677fb9e73f87bdb6194e2ad3dd24ca726606",
      "old_mode": 33188,
      "old_path": "arch/frv/include/asm/highmem.h",
      "new_id": "cb4c317eaecc8db55074398fa8d593a2f37a9da3",
      "new_mode": 33188,
      "new_path": "arch/frv/include/asm/highmem.h"
    },
    {
      "type": "modify",
      "old_id": "25adfb02923dccd65e89faeeb0b1dbc6154c3c8a",
      "old_mode": 33188,
      "old_path": "arch/mips/include/asm/highmem.h",
      "new_id": "75753ca73bfd1c9e0d6ad82681ef15e4f2783897",
      "new_mode": 33188,
      "new_path": "arch/mips/include/asm/highmem.h"
    },
    {
      "type": "modify",
      "old_id": "127d732474bf0ceb63dd38c75db8d0cfde1312c0",
      "old_mode": 33188,
      "old_path": "arch/mips/mm/highmem.c",
      "new_id": "6a2b1bf9ef112571ef771e1ba039ec0992d18311",
      "new_mode": 33188,
      "new_path": "arch/mips/mm/highmem.c"
    },
    {
      "type": "modify",
      "old_id": "90f2abb04bfdc5178ab50645852fe04ab812d3da",
      "old_mode": 33188,
      "old_path": "arch/mn10300/include/asm/highmem.h",
      "new_id": "b0b187a29b8862a9a99e1c98404c90bb3eb74225",
      "new_mode": 33188,
      "new_path": "arch/mn10300/include/asm/highmem.h"
    },
    {
      "type": "modify",
      "old_id": "4556d820128a435abf969933c0b25e67a9f57600",
      "old_mode": 33188,
      "old_path": "arch/parisc/include/asm/cacheflush.h",
      "new_id": "dba11aedce1b3c9dd8d0d76b53c14ac831cea882",
      "new_mode": 33188,
      "new_path": "arch/parisc/include/asm/cacheflush.h"
    },
    {
      "type": "modify",
      "old_id": "a74c4ee6c0205dbad7e938ab76e012bfa6491c28",
      "old_mode": 33188,
      "old_path": "arch/powerpc/include/asm/highmem.h",
      "new_id": "d10d64a4be38c2c5725a853498007406e211f817",
      "new_mode": 33188,
      "new_path": "arch/powerpc/include/asm/highmem.h"
    },
    {
      "type": "modify",
      "old_id": "c2186c74c85a89e8379da569db31f28cafd15fdd",
      "old_mode": 33188,
      "old_path": "arch/powerpc/mm/highmem.c",
      "new_id": "857d4173f9c69358209eaf8793b6b64f4f0cfd89",
      "new_mode": 33188,
      "new_path": "arch/powerpc/mm/highmem.c"
    },
    {
      "type": "modify",
      "old_id": "3de42e776274e1436a18417202326eab98130277",
      "old_mode": 33188,
      "old_path": "arch/sparc/include/asm/highmem.h",
      "new_id": "ec23b0a87b98fa1ea3038cb1e8b0141da05ec991",
      "new_mode": 33188,
      "new_path": "arch/sparc/include/asm/highmem.h"
    },
    {
      "type": "modify",
      "old_id": "7916feba6e4a03a0e1f5c203932e3cb856593b8f",
      "old_mode": 33188,
      "old_path": "arch/sparc/mm/highmem.c",
      "new_id": "e139e9cbf5f7a2aaa94c7d8d2f561e67b1fa0951",
      "new_mode": 33188,
      "new_path": "arch/sparc/mm/highmem.c"
    },
    {
      "type": "modify",
      "old_id": "a726650fc80fbc35364c37dc23ff136e989b2cce",
      "old_mode": 33188,
      "old_path": "arch/x86/include/asm/highmem.h",
      "new_id": "8caac76ac324b39c647fc3762b25920b06fe6a08",
      "new_mode": 33188,
      "new_path": "arch/x86/include/asm/highmem.h"
    },
    {
      "type": "modify",
      "old_id": "63a6ba66cbe07393fa9029c1e4da5d557c0f59f6",
      "old_mode": 33188,
      "old_path": "arch/x86/mm/highmem_32.c",
      "new_id": "5e8fa12ef861738aae4e91ec8b165f6d2e58a55b",
      "new_mode": 33188,
      "new_path": "arch/x86/mm/highmem_32.c"
    },
    {
      "type": "modify",
      "old_id": "caafd0561aa1353c88a2ef56bcde5ec026fd7e8c",
      "old_mode": 33188,
      "old_path": "include/linux/highmem.h",
      "new_id": "67460f0102245ed147fad98def1ba6d78ab98f1a",
      "new_mode": 33188,
      "new_path": "include/linux/highmem.h"
    }
  ]
}
