PCI: Replace printks with appropriate pr_*()
PATCH 8/8 PCI: Replace printks with appropriate pr_*()
Replace deprecated printk(KERN_ERR...) with pr_err() in arch/ia64/pci/pci.c
--- arch/ia64/pci/pci.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
arch/ia64/pci/pci.c +5 -5
@@ -157,7 +157,7 @@ new_space (u64 phys_base, int sparse)return i;if (num_io_spaces =MAX_IO_SPACES ) { -printk (KERN_ERR "PCI: Too many IO port spaces " +pr_err ("PCI: Too many IO port spaces " "(MAX_IO_SPACES=%lu)\n" ,MAX_IO_SPACES );return ~0 ; }
@@ -181,7 +181,7 @@ static u64 add_io_space(struct pci_root_info *info, len =strlen (info->name) +32 ; iospace =kzalloc (sizeof (*iospace) + len,GFP_KERNEL );if (!iospace) { -printk (KERN_ERR "PCI: No memory for %s I/O port space\n" , +pr_err ("PCI: No memory for %s I/O port space\n" , info->name); goto out; }
@@ -444,7 +444,7 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) info =kzalloc (sizeof (*info),GFP_KERNEL );if (!info) { -printk (KERN_WARNING "pci_bus %04x:%02x: " +pr_warn ("pci_bus %04x:%02x: " "ignored (out of memory)\n" , domain, busnum);kfree (controller);return NULL ;
@@ -779,7 +779,7 @@ static void __init set_pci_dfl_cacheline_size(void) status =ia64_pal_cache_summary (&levels, &unique_caches);if (status !=0 ) { -printk (KERN_ERR "%s: ia64_pal_cache_summary() failed " +pr_err ("%s: ia64_pal_cache_summary() failed " "(status=%ld)\n" , __func__, status);return ; }
@@ -787,7 +787,7 @@ static void __init set_pci_dfl_cacheline_size(void) status =ia64_pal_cache_config_info (levels -1 ,/* cache_type (data_or_unified)= */ 2 , &cci);if (status !=0 ) { -printk (KERN_ERR "%s: ia64_pal_cache_config_info() failed " +pr_err ("%s: ia64_pal_cache_config_info() failed " "(status=%ld)\n" , __func__, status);return ; }
Signature · 1 line
1.7.1
Quoted 21 lines · Yijing Wang
Replace deprecated
printk(KERN_ERR...)withpr_err()inarch/ia64/pci/pci.cSigned-off-by Yijing Wang <[email protected]>--- arch/ia64/pci/pci.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)arch/ia64/pci/pci.c +1
-1@@ -157,7 +157,7 @@ new_space (u64 phys_base, int sparse)return i;if (num_io_spaces =MAX_IO_SPACES ) { -printk (KERN_ERR "PCI: Too many IO port spaces " +pr_err ("PCI: Too many IO port spaces " "(MAX_IO_SPACES=%lu)\n" ,MAX_IO_SPACES );return ~0 ; }
arch/ia64/pci/pci.c static u64 add_io_space(struct pci_root_info *info, · line 184
Quoted 5 lines
arch/ia64/pci/pci.c +1
-1@@ -181,7 +181,7 @@ static u64 add_io_space(struct pci_root_info *info, len =strlen (info->name) +32 ; iospace =kzalloc (sizeof (*iospace) + len,GFP_KERNEL );if (!iospace) { - printk(KERN_ERR "PCI: No memory for %s I/O port space\n", + pr_err("PCI: No memory for %s I/O port space\n",
Use dev_err() here, since you have the struct acpi_device pointer (info->bridge).
arch/ia64/pci/pci.c struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) · line 448
Quoted 10 lines
arch/ia64/pci/pci.c +1
-1info->name); goto out; }@@ -444,7 +444,7 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) info =kzalloc (sizeof (*info),GFP_KERNEL );if (!info) { -printk (KERN_WARNING "pci_bus %04x:%02x: " +pr_warn ("pci_bus %04x:%02x: " "ignored (out of memory)\n" , domain, busnum);
And here.
Quoted 24 lines
arch/ia64/pci/pci.c +2
-3kfree (controller);return NULL ;@@ -779,7 +779,7 @@ static void __init set_pci_dfl_cacheline_size(void) status =ia64_pal_cache_summary (&levels, &unique_caches);if (status !=0 ) { -printk (KERN_ERR "%s: ia64_pal_cache_summary() failed " +pr_err ("%s: ia64_pal_cache_summary() failed " "(status=%ld)\n" , __func__, status);return ; }@@ -787,7 +787,7 @@ static void __init set_pci_dfl_cacheline_size(void) status =ia64_pal_cache_config_info (levels -1 ,/* cache_type (data_or_unified)= */ 2 , &cci);if (status !=0 ) { -printk (KERN_ERR "%s: ia64_pal_cache_config_info() failed " +pr_err ("%s: ia64_pal_cache_config_info() failed " "(status=%ld)\n" , __func__, status);return ; } --1.7.1
Quoted 5 lines
arch/ia64/pci/pci.c static u64 add_io_space(struct pci_root_info *info, · line 184
Quoted 2 lines
arch/ia64/pci/pci.c +1
-1- printk(KERN_ERR "PCI: No memory for %s I/O port space\n", + pr_err("PCI: No memory for %s I/O port space\n",Use
dev_err()here, since you have the structacpi_devicepointer (info->bridge).
Sure, I will update it.
Quoted 6 lines
Quoted 6 lines
info->name); goto out; }(quoted diff) +0
-0@@ -444,7 +444,7 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
Quoted 7 lines
arch/ia64/pci/pci.c struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) · line 448
Quoted 5 lines
arch/ia64/pci/pci.c +1
-1info =kzalloc (sizeof (*info),GFP_KERNEL );if (!info) { -printk (KERN_WARNING "pci_bus %04x:%02x: " +pr_warn ("pci_bus %04x:%02x: " "ignored (out of memory)\n" , domain, busnum);And here.
will update too, thanks!
Quoted 28 lines
Quoted 22 lines
arch/ia64/pci/pci.c +2
-3kfree (controller);return NULL ;@@ -779,7 +779,7 @@ static void __init set_pci_dfl_cacheline_size(void) status =ia64_pal_cache_summary (&levels, &unique_caches);if (status !=0 ) { -printk (KERN_ERR "%s: ia64_pal_cache_summary() failed " +pr_err ("%s: ia64_pal_cache_summary() failed " "(status=%ld)\n" , __func__, status);return ; }@@ -787,7 +787,7 @@ static void __init set_pci_dfl_cacheline_size(void) status =ia64_pal_cache_config_info (levels -1 ,/* cache_type (data_or_unified)= */ 2 , &cci);if (status !=0 ) { -printk (KERN_ERR "%s: ia64_pal_cache_config_info() failed " +pr_err ("%s: ia64_pal_cache_config_info() failed " "(status=%ld)\n" , __func__, status);return ; } --Quoted 3 lines
1.7.1
.
Signature · 2 lines
Thanks! Yijing