diff for duplicates of <20180306182128.23281-6-decui@microsoft.com> diff --git a/a/1.txt b/N1/1.txt index 370dea8..fa44f3a 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -18,29 +18,27 @@ diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c index 3a385212f666..265ba11e53e2 100644 --- a/drivers/pci/host/pci-hyperv.c +++ b/drivers/pci/host/pci-hyperv.c -@@ -1733,6 +1733,7 @@ static void hv_pci_devices_present(struct hv_pcibus_d= -evice *hbus, +@@ -1733,6 +1733,7 @@ static void hv_pci_devices_present(struct hv_pcibus_device *hbus, struct hv_dr_state *dr; struct hv_dr_work *dr_wrk; unsigned long flags; + bool pending_dr; -=20 - dr_wrk =3D kzalloc(sizeof(*dr_wrk), GFP_NOWAIT); + + dr_wrk = kzalloc(sizeof(*dr_wrk), GFP_NOWAIT); if (!dr_wrk) -@@ -1756,11 +1757,21 @@ static void hv_pci_devices_present(struct hv_pcibus= -_device *hbus, +@@ -1756,11 +1757,21 @@ static void hv_pci_devices_present(struct hv_pcibus_device *hbus, } -=20 + spin_lock_irqsave(&hbus->device_list_lock, flags); + /* + * If pending_dr is true, we have already queued a work, + * which will see the new dr. Otherwise, we need to + * queue a new work. + */ -+ pending_dr =3D !list_empty(&hbus->dr_list); ++ pending_dr = !list_empty(&hbus->dr_list); list_add_tail(&dr->list_entry, &hbus->dr_list); spin_unlock_irqrestore(&hbus->device_list_lock, flags); -=20 + - get_hvpcibus(hbus); - queue_work(hbus->wq, &dr_wrk->wrk); + if (pending_dr) { @@ -50,7 +48,11 @@ _device *hbus, + queue_work(hbus->wq, &dr_wrk->wrk); + } } -=20 + /** ---=20 +-- 2.7.4 +_______________________________________________ +devel mailing list +devel@linuxdriverproject.org +http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel diff --git a/a/content_digest b/N1/content_digest index 8d27d33..bdf0dc4 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -9,15 +9,14 @@ olaf@aepfle.de <olaf@aepfle.de> apw@canonical.com <apw@canonical.com> " jasowang@redhat.com <jasowang@redhat.com>\0" - "Cc\0linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>" + "Cc\0Haiyang Zhang <haiyangz@microsoft.com>" driverdev-devel@linuxdriverproject.org <driverdev-devel@linuxdriverproject.org> - Haiyang Zhang <haiyangz@microsoft.com> - vkuznets@redhat.com <vkuznets@redhat.com> - marcelo.cerri@canonical.com <marcelo.cerri@canonical.com> - Michael Kelley (EOSG) <Michael.H.Kelley@microsoft.com> - Dexuan Cui <decui@microsoft.com> + linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> + stable@vger.kernel.org <stable@vger.kernel.org> Jack Morgenstein <jackm@mellanox.com> - " stable@vger.kernel.org <stable@vger.kernel.org>\0" + " Michael Kelley \\(EOSG\\) <Michael.H.Kelley@microsoft.com>" + marcelo.cerri@canonical.com <marcelo.cerri@canonical.com> + " vkuznets@redhat.com <vkuznets@redhat.com>\0" "\00:1\0" "b\0" "If there is a pending work, we just need to add the new dr into\n" @@ -40,29 +39,27 @@ "index 3a385212f666..265ba11e53e2 100644\n" "--- a/drivers/pci/host/pci-hyperv.c\n" "+++ b/drivers/pci/host/pci-hyperv.c\n" - "@@ -1733,6 +1733,7 @@ static void hv_pci_devices_present(struct hv_pcibus_d=\n" - "evice *hbus,\n" + "@@ -1733,6 +1733,7 @@ static void hv_pci_devices_present(struct hv_pcibus_device *hbus,\n" " \tstruct hv_dr_state *dr;\n" " \tstruct hv_dr_work *dr_wrk;\n" " \tunsigned long flags;\n" "+\tbool pending_dr;\n" - "=20\n" - " \tdr_wrk =3D kzalloc(sizeof(*dr_wrk), GFP_NOWAIT);\n" + " \n" + " \tdr_wrk = kzalloc(sizeof(*dr_wrk), GFP_NOWAIT);\n" " \tif (!dr_wrk)\n" - "@@ -1756,11 +1757,21 @@ static void hv_pci_devices_present(struct hv_pcibus=\n" - "_device *hbus,\n" + "@@ -1756,11 +1757,21 @@ static void hv_pci_devices_present(struct hv_pcibus_device *hbus,\n" " \t}\n" - "=20\n" + " \n" " \tspin_lock_irqsave(&hbus->device_list_lock, flags);\n" "+\t/*\n" "+\t * If pending_dr is true, we have already queued a work,\n" "+\t * which will see the new dr. Otherwise, we need to\n" "+\t * queue a new work.\n" "+\t */\n" - "+\tpending_dr =3D !list_empty(&hbus->dr_list);\n" + "+\tpending_dr = !list_empty(&hbus->dr_list);\n" " \tlist_add_tail(&dr->list_entry, &hbus->dr_list);\n" " \tspin_unlock_irqrestore(&hbus->device_list_lock, flags);\n" - "=20\n" + " \n" "-\tget_hvpcibus(hbus);\n" "-\tqueue_work(hbus->wq, &dr_wrk->wrk);\n" "+\tif (pending_dr) {\n" @@ -72,9 +69,13 @@ "+\t\tqueue_work(hbus->wq, &dr_wrk->wrk);\n" "+\t}\n" " }\n" - "=20\n" + " \n" " /**\n" - "--=20\n" - 2.7.4 + "-- \n" + "2.7.4\n" + "_______________________________________________\n" + "devel mailing list\n" + "devel@linuxdriverproject.org\n" + http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel -db047f8e59892540db1a830a03aa410eff87f25a9e01926ec4b9eeafdded5701 +769784c8c1a427ba7dabbba8a74e73ea1cd247eb0e0c66c6bfb22da631950385
diff --git a/a/1.txt b/N2/1.txt index 370dea8..033e7f4 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -18,29 +18,27 @@ diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c index 3a385212f666..265ba11e53e2 100644 --- a/drivers/pci/host/pci-hyperv.c +++ b/drivers/pci/host/pci-hyperv.c -@@ -1733,6 +1733,7 @@ static void hv_pci_devices_present(struct hv_pcibus_d= -evice *hbus, +@@ -1733,6 +1733,7 @@ static void hv_pci_devices_present(struct hv_pcibus_device *hbus, struct hv_dr_state *dr; struct hv_dr_work *dr_wrk; unsigned long flags; + bool pending_dr; -=20 - dr_wrk =3D kzalloc(sizeof(*dr_wrk), GFP_NOWAIT); + + dr_wrk = kzalloc(sizeof(*dr_wrk), GFP_NOWAIT); if (!dr_wrk) -@@ -1756,11 +1757,21 @@ static void hv_pci_devices_present(struct hv_pcibus= -_device *hbus, +@@ -1756,11 +1757,21 @@ static void hv_pci_devices_present(struct hv_pcibus_device *hbus, } -=20 + spin_lock_irqsave(&hbus->device_list_lock, flags); + /* + * If pending_dr is true, we have already queued a work, + * which will see the new dr. Otherwise, we need to + * queue a new work. + */ -+ pending_dr =3D !list_empty(&hbus->dr_list); ++ pending_dr = !list_empty(&hbus->dr_list); list_add_tail(&dr->list_entry, &hbus->dr_list); spin_unlock_irqrestore(&hbus->device_list_lock, flags); -=20 + - get_hvpcibus(hbus); - queue_work(hbus->wq, &dr_wrk->wrk); + if (pending_dr) { @@ -50,7 +48,7 @@ _device *hbus, + queue_work(hbus->wq, &dr_wrk->wrk); + } } -=20 + /** ---=20 +-- 2.7.4 diff --git a/a/content_digest b/N2/content_digest index 8d27d33..91cba42 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -40,29 +40,27 @@ "index 3a385212f666..265ba11e53e2 100644\n" "--- a/drivers/pci/host/pci-hyperv.c\n" "+++ b/drivers/pci/host/pci-hyperv.c\n" - "@@ -1733,6 +1733,7 @@ static void hv_pci_devices_present(struct hv_pcibus_d=\n" - "evice *hbus,\n" + "@@ -1733,6 +1733,7 @@ static void hv_pci_devices_present(struct hv_pcibus_device *hbus,\n" " \tstruct hv_dr_state *dr;\n" " \tstruct hv_dr_work *dr_wrk;\n" " \tunsigned long flags;\n" "+\tbool pending_dr;\n" - "=20\n" - " \tdr_wrk =3D kzalloc(sizeof(*dr_wrk), GFP_NOWAIT);\n" + " \n" + " \tdr_wrk = kzalloc(sizeof(*dr_wrk), GFP_NOWAIT);\n" " \tif (!dr_wrk)\n" - "@@ -1756,11 +1757,21 @@ static void hv_pci_devices_present(struct hv_pcibus=\n" - "_device *hbus,\n" + "@@ -1756,11 +1757,21 @@ static void hv_pci_devices_present(struct hv_pcibus_device *hbus,\n" " \t}\n" - "=20\n" + " \n" " \tspin_lock_irqsave(&hbus->device_list_lock, flags);\n" "+\t/*\n" "+\t * If pending_dr is true, we have already queued a work,\n" "+\t * which will see the new dr. Otherwise, we need to\n" "+\t * queue a new work.\n" "+\t */\n" - "+\tpending_dr =3D !list_empty(&hbus->dr_list);\n" + "+\tpending_dr = !list_empty(&hbus->dr_list);\n" " \tlist_add_tail(&dr->list_entry, &hbus->dr_list);\n" " \tspin_unlock_irqrestore(&hbus->device_list_lock, flags);\n" - "=20\n" + " \n" "-\tget_hvpcibus(hbus);\n" "-\tqueue_work(hbus->wq, &dr_wrk->wrk);\n" "+\tif (pending_dr) {\n" @@ -72,9 +70,9 @@ "+\t\tqueue_work(hbus->wq, &dr_wrk->wrk);\n" "+\t}\n" " }\n" - "=20\n" + " \n" " /**\n" - "--=20\n" + "-- \n" 2.7.4 -db047f8e59892540db1a830a03aa410eff87f25a9e01926ec4b9eeafdded5701 +910e14b5c668063b291f75efc445eb7462f3fb2d546fcac350d2ee3169e8b1d9
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.