David Miller wrote:
From: Stephen Hemminger <[EMAIL PROTECTED]>
Date: Fri, 5 Oct 2007 08:35:56 -0700

pr_info() ?

All corrected, thanks!

From 11aaa8adc8e9141a440faaa3260ad5922c71eeda Mon Sep 17 00:00:00 2001
From: David S. Miller <[EMAIL PROTECTED]>
Date: Fri, 5 Oct 2007 15:53:21 -0700
Subject: [PATCH] [NIU]: Use pr_info().

Suggested by Stephen Hemminger.

Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/niu.c |   78 ++++++++++++++++++++++++++--------------------------
 1 files changed, 39 insertions(+), 39 deletions(-)

ACK

however long term, I would tend to prefer that we utilize the embedded struct device we have, which seems to be the way things are moving long term.

        struct net_device *ndev = ...;
        struct nic_private *np = netdev_priv(ndev);

        dev_printk(KERN_INFO, &ndev->dev,
                   "we all live in a %s submarine, "
                   "a %s submarine\n",
                   np->color ? "yellow" : "silly");

I say "long term" because we want netdev->dev.bus_id to match the net_device->name[], and it may not at this point (needs research/verification).


[as an aside...] If the message isn't directly related to a net_device, you should go ahead and use

        struct pci_dev *pdev = ...;

        dev_printk(KERN_INFO, &pdev->dev, "my message...");

because that stuff is reasonably mature (and seemingly the preferred direction).

        Jeff


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to