All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20180305192134.32207-7-decui@microsoft.com>

diff --git a/a/1.txt b/N1/1.txt
index 7e3493d..2355a2e 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -18,7 +18,7 @@ Fix this by polling the channel for the PCI_EJECT message and
 hpdev->state, and by checking the PCI vendor ID.
 
 Note: actually the above issues also happen to a SMP VM, if
-"hbus->hdev->channel->target_cpu =3D=3D smp_processor_id()" is true.
+"hbus->hdev->channel->target_cpu == smp_processor_id()" is true.
 
 Signed-off-by: Dexuan Cui <decui@microsoft.com>
 Tested-by: Adrian Suhov <v-adsuho@microsoft.com>
@@ -29,8 +29,7 @@ Cc: K. Y. Srinivasan <kys@microsoft.com>
 Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
 Cc: Jack Morgenstein <jackm@mellanox.com>
 ---
- drivers/pci/host/pci-hyperv.c | 58 +++++++++++++++++++++++++++++++++++++++=
-+++-
+ drivers/pci/host/pci-hyperv.c | 58 ++++++++++++++++++++++++++++++++++++++++++-
  1 file changed, 57 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
@@ -40,22 +39,21 @@ index d3aa6736a9bb..114624dfbd97 100644
 @@ -521,6 +521,8 @@ struct hv_pci_compl {
  	s32 completion_status;
  };
-=20
+ 
 +static void hv_pci_onchannelcallback(void *context);
 +
  /**
   * hv_pci_generic_compl() - Invoked for a completion packet
   * @context:		Set up by the sender of the packet.
-@@ -665,6 +667,31 @@ static void _hv_pcifront_read_config(struct hv_pci_dev=
- *hpdev, int where,
+@@ -665,6 +667,31 @@ static void _hv_pcifront_read_config(struct hv_pci_dev *hpdev, int where,
  	}
  }
-=20
+ 
 +static u16 hv_pcifront_get_vendor_id(struct hv_pci_dev *hpdev)
 +{
 +	u16 ret;
 +	unsigned long flags;
-+	void __iomem *addr =3D hpdev->hbus->cfg_addr + CFG_PAGE_OFFSET +
++	void __iomem *addr = hpdev->hbus->cfg_addr + CFG_PAGE_OFFSET +
 +			     PCI_VENDOR_ID;
 +
 +	spin_lock_irqsave(&hpdev->hbus->config_lock, flags);
@@ -65,7 +63,7 @@ index d3aa6736a9bb..114624dfbd97 100644
 +	/* Make sure the function was chosen before we start reading. */
 +	mb();
 +	/* Read from that function's config space. */
-+	ret =3D readw(addr);
++	ret = readw(addr);
 +	/*
 +	 * mb() is not required here, because the spin_unlock_irqrestore()
 +	 * is a barrier.
@@ -79,15 +77,14 @@ index d3aa6736a9bb..114624dfbd97 100644
  /**
   * _hv_pcifront_write_config() - Internal PCI config write
   * @hpdev:	The PCI driver's representation of the device
-@@ -1107,8 +1134,37 @@ static void hv_compose_msi_msg(struct irq_data *data=
-, struct msi_msg *msg)
+@@ -1107,8 +1134,37 @@ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
  	 * Since this function is called with IRQ locks held, can't
  	 * do normal wait for completion; instead poll.
  	 */
 -	while (!try_wait_for_completion(&comp.comp_pkt.host_event))
 +	while (!try_wait_for_completion(&comp.comp_pkt.host_event)) {
 +		/* 0xFFFF means an invalid PCI VENDOR ID. */
-+		if (hv_pcifront_get_vendor_id(hpdev) =3D=3D 0xFFFF) {
++		if (hv_pcifront_get_vendor_id(hpdev) == 0xFFFF) {
 +			dev_err_once(&hbus->hdev->device,
 +				     "the device has gone\n");
 +			goto free_int_desc;
@@ -103,12 +100,12 @@ index d3aa6736a9bb..114624dfbd97 100644
 +		 */
 +		local_bh_disable();
 +
-+		if (hbus->hdev->channel->target_cpu =3D=3D smp_processor_id())
++		if (hbus->hdev->channel->target_cpu == smp_processor_id())
 +			hv_pci_onchannelcallback(hbus);
 +
 +		local_bh_enable();
 +
-+		if (hpdev->state =3D=3D hv_pcichild_ejecting) {
++		if (hpdev->state == hv_pcichild_ejecting) {
 +			dev_err_once(&hbus->hdev->device,
 +				     "the device is being ejected\n");
 +			goto free_int_desc;
@@ -116,8 +113,8 @@ index d3aa6736a9bb..114624dfbd97 100644
 +
  		udelay(100);
 +	}
-=20
+ 
  	if (comp.comp_pkt.completion_status < 0) {
  		dev_err(&hbus->hdev->device,
---=20
+-- 
 2.7.4
diff --git a/a/content_digest b/N1/content_digest
index 9b082fb..b8fe679 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -40,7 +40,7 @@
  "hpdev->state, and by checking the PCI vendor ID.\n"
  "\n"
  "Note: actually the above issues also happen to a SMP VM, if\n"
- "\"hbus->hdev->channel->target_cpu =3D=3D smp_processor_id()\" is true.\n"
+ "\"hbus->hdev->channel->target_cpu == smp_processor_id()\" is true.\n"
  "\n"
  "Signed-off-by: Dexuan Cui <decui@microsoft.com>\n"
  "Tested-by: Adrian Suhov <v-adsuho@microsoft.com>\n"
@@ -51,8 +51,7 @@
  "Cc: Vitaly Kuznetsov <vkuznets@redhat.com>\n"
  "Cc: Jack Morgenstein <jackm@mellanox.com>\n"
  "---\n"
- " drivers/pci/host/pci-hyperv.c | 58 +++++++++++++++++++++++++++++++++++++++=\n"
- "+++-\n"
+ " drivers/pci/host/pci-hyperv.c | 58 ++++++++++++++++++++++++++++++++++++++++++-\n"
  " 1 file changed, 57 insertions(+), 1 deletion(-)\n"
  "\n"
  "diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c\n"
@@ -62,22 +61,21 @@
  "@@ -521,6 +521,8 @@ struct hv_pci_compl {\n"
  " \ts32 completion_status;\n"
  " };\n"
- "=20\n"
+ " \n"
  "+static void hv_pci_onchannelcallback(void *context);\n"
  "+\n"
  " /**\n"
  "  * hv_pci_generic_compl() - Invoked for a completion packet\n"
  "  * @context:\t\tSet up by the sender of the packet.\n"
- "@@ -665,6 +667,31 @@ static void _hv_pcifront_read_config(struct hv_pci_dev=\n"
- " *hpdev, int where,\n"
+ "@@ -665,6 +667,31 @@ static void _hv_pcifront_read_config(struct hv_pci_dev *hpdev, int where,\n"
  " \t}\n"
  " }\n"
- "=20\n"
+ " \n"
  "+static u16 hv_pcifront_get_vendor_id(struct hv_pci_dev *hpdev)\n"
  "+{\n"
  "+\tu16 ret;\n"
  "+\tunsigned long flags;\n"
- "+\tvoid __iomem *addr =3D hpdev->hbus->cfg_addr + CFG_PAGE_OFFSET +\n"
+ "+\tvoid __iomem *addr = hpdev->hbus->cfg_addr + CFG_PAGE_OFFSET +\n"
  "+\t\t\t     PCI_VENDOR_ID;\n"
  "+\n"
  "+\tspin_lock_irqsave(&hpdev->hbus->config_lock, flags);\n"
@@ -87,7 +85,7 @@
  "+\t/* Make sure the function was chosen before we start reading. */\n"
  "+\tmb();\n"
  "+\t/* Read from that function's config space. */\n"
- "+\tret =3D readw(addr);\n"
+ "+\tret = readw(addr);\n"
  "+\t/*\n"
  "+\t * mb() is not required here, because the spin_unlock_irqrestore()\n"
  "+\t * is a barrier.\n"
@@ -101,15 +99,14 @@
  " /**\n"
  "  * _hv_pcifront_write_config() - Internal PCI config write\n"
  "  * @hpdev:\tThe PCI driver's representation of the device\n"
- "@@ -1107,8 +1134,37 @@ static void hv_compose_msi_msg(struct irq_data *data=\n"
- ", struct msi_msg *msg)\n"
+ "@@ -1107,8 +1134,37 @@ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)\n"
  " \t * Since this function is called with IRQ locks held, can't\n"
  " \t * do normal wait for completion; instead poll.\n"
  " \t */\n"
  "-\twhile (!try_wait_for_completion(&comp.comp_pkt.host_event))\n"
  "+\twhile (!try_wait_for_completion(&comp.comp_pkt.host_event)) {\n"
  "+\t\t/* 0xFFFF means an invalid PCI VENDOR ID. */\n"
- "+\t\tif (hv_pcifront_get_vendor_id(hpdev) =3D=3D 0xFFFF) {\n"
+ "+\t\tif (hv_pcifront_get_vendor_id(hpdev) == 0xFFFF) {\n"
  "+\t\t\tdev_err_once(&hbus->hdev->device,\n"
  "+\t\t\t\t     \"the device has gone\\n\");\n"
  "+\t\t\tgoto free_int_desc;\n"
@@ -125,12 +122,12 @@
  "+\t\t */\n"
  "+\t\tlocal_bh_disable();\n"
  "+\n"
- "+\t\tif (hbus->hdev->channel->target_cpu =3D=3D smp_processor_id())\n"
+ "+\t\tif (hbus->hdev->channel->target_cpu == smp_processor_id())\n"
  "+\t\t\thv_pci_onchannelcallback(hbus);\n"
  "+\n"
  "+\t\tlocal_bh_enable();\n"
  "+\n"
- "+\t\tif (hpdev->state =3D=3D hv_pcichild_ejecting) {\n"
+ "+\t\tif (hpdev->state == hv_pcichild_ejecting) {\n"
  "+\t\t\tdev_err_once(&hbus->hdev->device,\n"
  "+\t\t\t\t     \"the device is being ejected\\n\");\n"
  "+\t\t\tgoto free_int_desc;\n"
@@ -138,10 +135,10 @@
  "+\n"
  " \t\tudelay(100);\n"
  "+\t}\n"
- "=20\n"
+ " \n"
  " \tif (comp.comp_pkt.completion_status < 0) {\n"
  " \t\tdev_err(&hbus->hdev->device,\n"
- "--=20\n"
+ "-- \n"
  2.7.4
 
-2682c79a0b9a1ec16097b8e459a767840f0e14839cd2999529dac089f53599e5
+6616988bce3a7451aac2b614aa6f58f1f77958193b9c10e685b19896cb94437e

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.