]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/mlx4/main.c
drivers/net/mlx4: Use %pV, pr_<level>, printk_once
[net-next-2.6.git] / drivers / net / mlx4 / main.c
index e3e0d54a7c87851ca15df3f640326de174dc9a42..5102ab1ac561dbaece380465a9806d886d29f651 100644 (file)
@@ -1050,8 +1050,7 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
        int err;
        int port;
 
-       printk(KERN_INFO PFX "Initializing %s\n",
-              pci_name(pdev));
+       pr_info(DRV_NAME ": Initializing %s\n", pci_name(pdev));
 
        err = pci_enable_device(pdev);
        if (err) {
@@ -1216,12 +1215,7 @@ err_disable_pdev:
 static int __devinit mlx4_init_one(struct pci_dev *pdev,
                                   const struct pci_device_id *id)
 {
-       static int mlx4_version_printed;
-
-       if (!mlx4_version_printed) {
-               printk(KERN_INFO "%s", mlx4_version);
-               ++mlx4_version_printed;
-       }
+       printk_once(KERN_INFO "%s", mlx4_version);
 
        return __mlx4_init_one(pdev, id);
 }
@@ -1301,17 +1295,17 @@ static struct pci_driver mlx4_driver = {
 static int __init mlx4_verify_params(void)
 {
        if ((log_num_mac < 0) || (log_num_mac > 7)) {
-               printk(KERN_WARNING "mlx4_core: bad num_mac: %d\n", log_num_mac);
+               pr_warning("mlx4_core: bad num_mac: %d\n", log_num_mac);
                return -1;
        }
 
        if ((log_num_vlan < 0) || (log_num_vlan > 7)) {
-               printk(KERN_WARNING "mlx4_core: bad num_vlan: %d\n", log_num_vlan);
+               pr_warning("mlx4_core: bad num_vlan: %d\n", log_num_vlan);
                return -1;
        }
 
        if ((log_mtts_per_seg < 1) || (log_mtts_per_seg > 5)) {
-               printk(KERN_WARNING "mlx4_core: bad log_mtts_per_seg: %d\n", log_mtts_per_seg);
+               pr_warning("mlx4_core: bad log_mtts_per_seg: %d\n", log_mtts_per_seg);
                return -1;
        }