diff mbox

[Part2,v4,18/31] PCI/MSI, trivial: Fix minor syntax issues according to coding styles

Message ID 1415102525-9898-19-git-send-email-jiang.liu@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jiang Liu Nov. 4, 2014, 12:01 p.m. UTC
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
 drivers/pci/msi.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Comments

Bjorn Helgaas Nov. 5, 2014, 10:10 p.m. UTC | #1
On Tue, Nov 04, 2014 at 08:01:52PM +0800, Jiang Liu wrote:
> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>

Needs a changelog, even if it's similar to the topic.

Speaking of the topic, please run "git log --oneline drivers/pci/msi.c" and
make yours look similar to the others.  This doesn't really fix a syntax
issue; the existing code is syntactically correct.  It's only a style
issue.

I'd say something like:

  PCI/MSI: Remove unnecessary braces around single statements

  Per Documentation/CodingStyle, don't use braces around single statements.

> ---
>  drivers/pci/msi.c |    9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index 9fab30af0e75..fb2ccb536324 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -244,9 +244,8 @@ void default_restore_msi_irqs(struct pci_dev *dev)
>  {
>  	struct msi_desc *entry;
>  
> -	list_for_each_entry(entry, &dev->msi_list, list) {
> +	list_for_each_entry(entry, &dev->msi_list, list)
>  		default_restore_msi_irq(dev, entry->irq);
> -	}
>  }
>  
>  void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
> @@ -451,9 +450,8 @@ static void __pci_restore_msix_state(struct pci_dev *dev)
>  				PCI_MSIX_FLAGS_ENABLE | PCI_MSIX_FLAGS_MASKALL);
>  
>  	arch_restore_msi_irqs(dev);
> -	list_for_each_entry(entry, &dev->msi_list, list) {
> +	list_for_each_entry(entry, &dev->msi_list, list)
>  		msix_mask_irq(entry, entry->masked);
> -	}
>  
>  	msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_MASKALL, 0);
>  }
> @@ -497,9 +495,8 @@ static int populate_msi_sysfs(struct pci_dev *pdev)
>  	int count = 0;
>  
>  	/* Determine how many msi entries we have */
> -	list_for_each_entry(entry, &pdev->msi_list, list) {
> +	list_for_each_entry(entry, &pdev->msi_list, list)
>  		++num_msi;
> -	}
>  	if (!num_msi)
>  		return 0;
>  
> -- 
> 1.7.10.4
>
Bjorn Helgaas Nov. 5, 2014, 10:10 p.m. UTC | #2
On Tue, Nov 04, 2014 at 08:01:52PM +0800, Jiang Liu wrote:
> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>

Oh, I forgot:

Acked-by: Bjorn Helgaas <bhelgaas@google.com>

> ---
>  drivers/pci/msi.c |    9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index 9fab30af0e75..fb2ccb536324 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -244,9 +244,8 @@ void default_restore_msi_irqs(struct pci_dev *dev)
>  {
>  	struct msi_desc *entry;
>  
> -	list_for_each_entry(entry, &dev->msi_list, list) {
> +	list_for_each_entry(entry, &dev->msi_list, list)
>  		default_restore_msi_irq(dev, entry->irq);
> -	}
>  }
>  
>  void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
> @@ -451,9 +450,8 @@ static void __pci_restore_msix_state(struct pci_dev *dev)
>  				PCI_MSIX_FLAGS_ENABLE | PCI_MSIX_FLAGS_MASKALL);
>  
>  	arch_restore_msi_irqs(dev);
> -	list_for_each_entry(entry, &dev->msi_list, list) {
> +	list_for_each_entry(entry, &dev->msi_list, list)
>  		msix_mask_irq(entry, entry->masked);
> -	}
>  
>  	msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_MASKALL, 0);
>  }
> @@ -497,9 +495,8 @@ static int populate_msi_sysfs(struct pci_dev *pdev)
>  	int count = 0;
>  
>  	/* Determine how many msi entries we have */
> -	list_for_each_entry(entry, &pdev->msi_list, list) {
> +	list_for_each_entry(entry, &pdev->msi_list, list)
>  		++num_msi;
> -	}
>  	if (!num_msi)
>  		return 0;
>  
> -- 
> 1.7.10.4
>
diff mbox

Patch

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 9fab30af0e75..fb2ccb536324 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -244,9 +244,8 @@  void default_restore_msi_irqs(struct pci_dev *dev)
 {
 	struct msi_desc *entry;
 
-	list_for_each_entry(entry, &dev->msi_list, list) {
+	list_for_each_entry(entry, &dev->msi_list, list)
 		default_restore_msi_irq(dev, entry->irq);
-	}
 }
 
 void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
@@ -451,9 +450,8 @@  static void __pci_restore_msix_state(struct pci_dev *dev)
 				PCI_MSIX_FLAGS_ENABLE | PCI_MSIX_FLAGS_MASKALL);
 
 	arch_restore_msi_irqs(dev);
-	list_for_each_entry(entry, &dev->msi_list, list) {
+	list_for_each_entry(entry, &dev->msi_list, list)
 		msix_mask_irq(entry, entry->masked);
-	}
 
 	msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_MASKALL, 0);
 }
@@ -497,9 +495,8 @@  static int populate_msi_sysfs(struct pci_dev *pdev)
 	int count = 0;
 
 	/* Determine how many msi entries we have */
-	list_for_each_entry(entry, &pdev->msi_list, list) {
+	list_for_each_entry(entry, &pdev->msi_list, list)
 		++num_msi;
-	}
 	if (!num_msi)
 		return 0;