: Use pr_info
Subsystems (2)
PATCH 1/1 : Use pr_info
--- drivers/scsi/megaraid/megaraid_sas.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-)
drivers/scsi/megaraid/megaraid_sas.c +6 -8
@@ -1341,8 +1341,7 @@ megasas_transition_to_ready(struct megasas_instance* instance) fw_state = instance->instancet->read_fw_status_reg (instance->reg_set) &MFI_STATE_MASK ;if (fw_state !=MFI_STATE_READY ) -printk (KERN_INFO "megasas: Waiting for FW to come to ready" -" state\n" ); +pr_info ("megasas: Waiting for FW to come to ready state\n" );while (fw_state !=MFI_STATE_READY ) {
@@ -1444,7 +1443,7 @@ megasas_transition_to_ready(struct megasas_instance* instance)return -ENODEV ; } }; -printk (KERN_INFO "megasas: FW now in Ready state\n" ); +pr_info ("megasas: FW now in Ready state\n" );return 0 ; }
@@ -2277,9 +2276,9 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)/* * Announce PCI information */ -printk (KERN_INFO "megasas: %#4.04x:%#4.04x:%#4.04x:%#4.04x: " , - pdev->vendor, pdev->device, pdev->subsystem_vendor, - pdev->subsystem_device); +pr_info ("megasas: %#4.04x:%#4.04x:%#4.04x:%#4.04x: " , + pdev->vendor, pdev->device, pdev->subsystem_vendor, + pdev->subsystem_device);printk ("bus %d:slot %d:func %d\n" , pdev->bus->number,PCI_SLOT (pdev->devfn),PCI_FUNC (pdev->devfn));
@@ -3030,8 +3029,7 @@ static int __init megasas_init(void)/* * Announce driver version and other information */ -printk (KERN_INFO "megasas: %s %s\n" ,MEGASAS_VERSION , -MEGASAS_EXT_VERSION ); +pr_info ("megasas: %s %s\n" ,MEGASAS_VERSION ,MEGASAS_EXT_VERSION );/* * Register character device node
Signature · 1 line
1.5.2.2
Hello Arnaldo,
Throughout the megaraid_sas driver code there are printk's with
appropriate flags (that includes KERN_INFO). What is the incentive to change printk with KERN_INFO to pr_info?
Regards,
Sumant
-----Original Message-----
From: Arnaldo Carvalho de Melo [mailto:[email protected]] On Behalf Of Arnaldo Carvalho de Melo
Sent: Wednesday, August 08, 2007 4:15 PM
To: DL-MegaRAID Linux
Cc: [email protected]; James Bottomley
Subject: [PATCH] [MEGARAID_SAS]: Use pr_info
--- drivers/scsi/megaraid/megaraid_sas.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-)
(quoted diff) +0 -0
b/drivers/scsi/megaraid/megaraid_sas.c
index 59099da..4a8cf06 100644
drivers/scsi/megaraid/megaraid_sas.c +0 -0
@@ -1341,8 +1341,7 @@ megasas_transition_to_ready(struct
megasas_instance* instance)
fw_state =instance->instancet->read_fw_status_reg(instance->reg_set) & MFI_STATE_MASK;
if (fw_state != MFI_STATE_READY)
- printk(KERN_INFO "megasas: Waiting for FW to come to
ready"
- " state\n");
+ pr_info("megasas: Waiting for FW to come to ready
state\n");
while (fw_state != MFI_STATE_READY) {
@@ -1444,7 +1443,7 @@ megasas_transition_to_ready(struct megasas_instance* instance)
return -ENODEV;
}
};
- printk(KERN_INFO "megasas: FW now in Ready state\n");
+ pr_info("megasas: FW now in Ready state\n");
return 0;
}
@@ -2277,9 +2276,9 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
/*
* Announce PCI information
*/
- printk(KERN_INFO "megasas: %#4.04x:%#4.04x:%#4.04x:%#4.04x: ",
- pdev->vendor, pdev->device, pdev->subsystem_vendor,
- pdev->subsystem_device);
+ pr_info("megasas: %#4.04x:%#4.04x:%#4.04x:%#4.04x: ",
+ pdev->vendor, pdev->device, pdev->subsystem_vendor,
+ pdev->subsystem_device);
printk("bus %d:slot %d:func %d\n",
pdev->bus->number, PCI_SLOT(pdev->devfn),PCI_FUNC(pdev->devfn)); @@ -3030,8 +3029,7 @@ static int __init megasas_init(void)
/*
* Announce driver version and other information */
- printk(KERN_INFO "megasas: %s %s\n", MEGASAS_VERSION,
- MEGASAS_EXT_VERSION);
+ pr_info("megasas: %s %s\n", MEGASAS_VERSION,MEGASAS_EXT_VERSION);
/*
* Register character device node
--
1.5.2.2
Quoted 5 lines · Sumant
Hello Arnaldo,
Throughout the
megaraid_sasdriver code there are printk's with
appropriate flags (that includesKERN_INFO). What is the incentive to change printk withKERN_INFOtopr_info?
And why not change most of these to dev_printk and friends?
-Brian
Quoted 81 lines
Regards,
Sumant
-----Original Message-----
From: Arnaldo Carvalho de Melo [mailto:[email protected]] On Behalf Of Arnaldo Carvalho de Melo
Sent: Wednesday, August 08, 2007 4:15 PM
To: DL-MegaRAID Linux
Cc: [email protected]; James Bottomley
Subject: [PATCH] [MEGARAID_SAS]: Usepr_infoSigned-off-by Arnaldo Carvalho de Melo <[email protected]>--- drivers/scsi/megaraid/megaraid_sas.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-)drivers/scsi/megaraid/megaraid_sas.c +0
-0@@ -1341,8 +1341,7 @@ megasas_transition_to_ready(struct megasas_instance* instance) fw_state =
instance->instancet->read_fw_status_reg(instance->reg_set)&MFI_STATE_MASK;drivers/scsi/megaraid/megaraid_sas.c +0
-1if (fw_state !=MFI_STATE_READY ) - printk(KERN_INFO "megasas: Waiting for FW to come toready"
drivers/scsi/megaraid/megaraid_sas.c +1
-1- " state\n"); + pr_info("megasas: Waiting for FW to come to readystate\n");
drivers/scsi/megaraid/megaraid_sas.c +1
-1while (fw_state !=MFI_STATE_READY ) {@@ -1444,7 +1443,7 @@ megasas_transition_to_ready(struct megasas_instance* instance)return -ENODEV ; } }; -printk (KERN_INFO "megasas: FW now in Ready state\n" ); +pr_info ("megasas: FW now in Ready state\n" );return 0 ;}
drivers/scsi/megaraid/megaraid_sas.c +3
-3@@ -2277,9 +2276,9 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) /* * Announce PCI information */ - printk(KERN_INFO "megasas: %#4.04x:%#4.04x:%#4.04x:%#4.04x: ", - pdev->vendor, pdev->device, pdev->subsystem_vendor, - pdev->subsystem_device); + pr_info("megasas: %#4.04x:%#4.04x:%#4.04x:%#4.04x: ", + pdev->vendor, pdev->device, pdev->subsystem_vendor, + pdev->subsystem_device); printk("bus %d:slot %d:func %d\n",
pdev->bus->number,PCI_SLOT(pdev->devfn),PCI_FUNC(pdev->devfn)); @@ -3030,8 +3029,7 @@ static int__initmegasas_init(void)drivers/scsi/megaraid/megaraid_sas.c +1
-2/* * Announce driver version and other information */ -printk (KERN_INFO "megasas: %s %s\n" ,MEGASAS_VERSION , -MEGASAS_EXT_VERSION ); + pr_info("megasas: %s %s\n", MEGASAS_VERSION,
MEGASAS_EXT_VERSION);drivers/scsi/megaraid/megaraid_sas.c +0
-1/* * Register character device node -- 1.5.2.2
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Brian King Linux on Power Virtualization IBM Linux Technology Center