public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] PCI: Cleanup printk logging
@ 2019-04-20  4:03 Mohan Kumar
  2019-05-07 22:50 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Mohan Kumar @ 2019-04-20  4:03 UTC (permalink / raw)
  To: rjw; +Cc: lenb, bhelgaas, linux-acpi, linux-pci, linux-kernel

Replace printk with pr_* to avoid checkpatch warnings.

Signed-off-by: Mohan Kumar <mohankumar718@gmail.com>
---
 drivers/pci/pci-acpi.c | 11 ++++-------
 drivers/pci/quirks.c   |  2 +-
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index e1949f7..3ada026 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -140,8 +140,7 @@ static acpi_status decode_type0_hpx_record(union acpi_object *record,
 		hpx->t0->enable_perr     = fields[5].integer.value;
 		break;
 	default:
-		printk(KERN_WARNING
-		       "%s: Type 0 Revision %d record not supported\n",
+		pr_warn("%s: Type 0 Revision %d record not supported\n",
 		       __func__, revision);
 		return AE_ERROR;
 	}
@@ -169,8 +168,7 @@ static acpi_status decode_type1_hpx_record(union acpi_object *record,
 		hpx->t1->tot_max_split = fields[4].integer.value;
 		break;
 	default:
-		printk(KERN_WARNING
-		       "%s: Type 1 Revision %d record not supported\n",
+		pr_warn("%s: Type 1 Revision %d record not supported\n",
 		       __func__, revision);
 		return AE_ERROR;
 	}
@@ -211,8 +209,7 @@ static acpi_status decode_type2_hpx_record(union acpi_object *record,
 		hpx->t2->sec_unc_err_mask_or   = fields[17].integer.value;
 		break;
 	default:
-		printk(KERN_WARNING
-		       "%s: Type 2 Revision %d record not supported\n",
+		pr_warn("%s: Type 2 Revision %d record not supported\n",
 		       __func__, revision);
 		return AE_ERROR;
 	}
@@ -272,7 +269,7 @@ static acpi_status acpi_run_hpx(acpi_handle handle, struct hotplug_params *hpx)
 				goto exit;
 			break;
 		default:
-			printk(KERN_ERR "%s: Type %d record not supported\n",
+			pr_err("%s: Type %d record not supported\n",
 			       __func__, type);
 			status = AE_ERROR;
 			goto exit;
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index f9cd4d4..06af0c3 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2613,7 +2613,7 @@ static void nvbridge_check_legacy_irq_routing(struct pci_dev *dev)
 	pci_read_config_dword(dev, 0x74, &cfg);
 
 	if (cfg & ((1 << 2) | (1 << 15))) {
-		printk(KERN_INFO "Rewriting IRQ routing register on MCP55\n");
+		pr_info("Rewriting IRQ routing register on MCP55\n");
 		cfg &= ~((1 << 2) | (1 << 15));
 		pci_write_config_dword(dev, 0x74, cfg);
 	}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/3] PCI: Cleanup printk logging
  2019-04-20  4:03 [PATCH 1/3] PCI: Cleanup printk logging Mohan Kumar
@ 2019-05-07 22:50 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2019-05-07 22:50 UTC (permalink / raw)
  To: Mohan Kumar; +Cc: rjw, lenb, linux-acpi, linux-pci, linux-kernel

Hi Mohan,

On Sat, Apr 20, 2019 at 07:03:46AM +0300, Mohan Kumar wrote:
> Replace printk with pr_* to avoid checkpatch warnings.

This looks fine, and I applied it to pci/printk with the intent of
putting it in v5.2.  I squashed in some pieces of your second patch,
and I'll respond to that one with the details.

When you post more than one patch in a series, it's nice to include a
cover letter where I can respond to the series as a whole.

> Signed-off-by: Mohan Kumar <mohankumar718@gmail.com>
> ---
>  drivers/pci/pci-acpi.c | 11 ++++-------
>  drivers/pci/quirks.c   |  2 +-
>  2 files changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
> index e1949f7..3ada026 100644
> --- a/drivers/pci/pci-acpi.c
> +++ b/drivers/pci/pci-acpi.c
> @@ -140,8 +140,7 @@ static acpi_status decode_type0_hpx_record(union acpi_object *record,
>  		hpx->t0->enable_perr     = fields[5].integer.value;
>  		break;
>  	default:
> -		printk(KERN_WARNING
> -		       "%s: Type 0 Revision %d record not supported\n",
> +		pr_warn("%s: Type 0 Revision %d record not supported\n",
>  		       __func__, revision);
>  		return AE_ERROR;
>  	}
> @@ -169,8 +168,7 @@ static acpi_status decode_type1_hpx_record(union acpi_object *record,
>  		hpx->t1->tot_max_split = fields[4].integer.value;
>  		break;
>  	default:
> -		printk(KERN_WARNING
> -		       "%s: Type 1 Revision %d record not supported\n",
> +		pr_warn("%s: Type 1 Revision %d record not supported\n",
>  		       __func__, revision);
>  		return AE_ERROR;
>  	}
> @@ -211,8 +209,7 @@ static acpi_status decode_type2_hpx_record(union acpi_object *record,
>  		hpx->t2->sec_unc_err_mask_or   = fields[17].integer.value;
>  		break;
>  	default:
> -		printk(KERN_WARNING
> -		       "%s: Type 2 Revision %d record not supported\n",
> +		pr_warn("%s: Type 2 Revision %d record not supported\n",
>  		       __func__, revision);
>  		return AE_ERROR;
>  	}
> @@ -272,7 +269,7 @@ static acpi_status acpi_run_hpx(acpi_handle handle, struct hotplug_params *hpx)
>  				goto exit;
>  			break;
>  		default:
> -			printk(KERN_ERR "%s: Type %d record not supported\n",
> +			pr_err("%s: Type %d record not supported\n",
>  			       __func__, type);
>  			status = AE_ERROR;
>  			goto exit;
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index f9cd4d4..06af0c3 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -2613,7 +2613,7 @@ static void nvbridge_check_legacy_irq_routing(struct pci_dev *dev)
>  	pci_read_config_dword(dev, 0x74, &cfg);
>  
>  	if (cfg & ((1 << 2) | (1 << 15))) {
> -		printk(KERN_INFO "Rewriting IRQ routing register on MCP55\n");
> +		pr_info("Rewriting IRQ routing register on MCP55\n");
>  		cfg &= ~((1 << 2) | (1 << 15));
>  		pci_write_config_dword(dev, 0x74, cfg);
>  	}
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-07 22:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-20  4:03 [PATCH 1/3] PCI: Cleanup printk logging Mohan Kumar
2019-05-07 22:50 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox