)]}'
{
  "commit": "c9f50cea70a15967daec9bf48fed37eafefdd584",
  "tree": "3d14f1e549df1454dcaf6eab695e40c3387d4fb3",
  "parents": [
    "358b54654aa85f97402aca4be3b1a7b7d08bab70"
  ],
  "author": {
    "name": "Michael S. Tsirkin",
    "email": "mst@redhat.com",
    "time": "Tue Feb 21 15:41:30 2012 +0200"
  },
  "committer": {
    "name": "Anthony Liguori",
    "email": "aliguori@us.ibm.com",
    "time": "Wed Feb 22 09:02:18 2012 -0600"
  },
  "message": "pci: add accessors to get/set registers by mask\n\npci_regs.h specifies many registers by mask +\nshifted register values.\nThere\u0027s always some duplication when using such:\nfor example to override device type, we would need:\n\npci_word_test_and_clear_mask(cap + PCI_EXP_FLAGS,\n     PCI_EXP_FLAGS_TYPE);\npci_word_test_and_set_mask(cap + PCI_EXP_FLAGS,\n    PCI_EXP_TYPE_ENDPOINT \u003c\u003c (ffs(PCI_EXP_FLAGS_TYPE) - 1));\n\nGetting such registers also uses some duplication:\n\nword \u003d pci_get_word(cap + PCI_EXP_FLAGS) \u0026 PCI_EXP_FLAGS_TYPE;\nif ((word \u003e\u003e ffs((PCI_EXP_FLAGS_TYPE) - 1)) \u003d\u003d PCI_EXP_TYPE_ENDPOINT)\n\nAdd API to access such registers in one line:\npci_set_word_by_mask(cap + PCI_EXP_FLAGS, PCI_EXP_FLAGS_TYPE,\n\t\t     PCI_EXP_TYPE_ENDPOINT)\n\nand\nword \u003d pci_get_word_by_mask(cap + PCI_EXP_FLAGS, PCI_EXP_FLAGS_TYPE)\nif (word \u003d\u003d PCI_EXP_TYPE_ENDPOINT)\n\nSigned-off-by: Michael S. Tsirkin \u003cmst@redhat.com\u003e\nSigned-off-by: Anthony Liguori \u003caliguori@us.ibm.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "33b0b184ea452ff46dc65caa38cc441fda291a9a",
      "old_mode": 33188,
      "old_path": "hw/pci.h",
      "new_id": "ee53f26bb19625af2f939f4cd68bdf03c92b5401",
      "new_mode": 33188,
      "new_path": "hw/pci.h"
    }
  ]
}
