All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: "Love, Robert W" <robert.w.love@intel.com>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] fcoe: fix incorrect use of struct module
Date: Tue, 30 Dec 2008 08:42:46 -0800	[thread overview]
Message-ID: <495A4F86.30603@oracle.com> (raw)
In-Reply-To: <1230652112.3296.5.camel@localhost.localdomain>

James Bottomley wrote:
> This structure may not be defined if CONFIG_MODULE=n, so never deref
> it.  Change uses of module->name to module_name(module) and corrects
> some dyslexic printks and docbook comments.
> 
> Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>

Ack again.

> ---
>  drivers/scsi/fcoe/libfcoe.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
> index 1cb549c..e419f48 100644
> --- a/drivers/scsi/fcoe/libfcoe.c
> +++ b/drivers/scsi/fcoe/libfcoe.c
> @@ -166,7 +166,7 @@ static int fcoe_cpu_callback(struct notifier_block *nfb, unsigned long action,
>  #endif /* CONFIG_HOTPLUG_CPU */
>  
>  /**
> - * foce_rcv - this is the fcoe receive function called by NET_RX_SOFTIRQ
> + * fcoe_rcv - this is the fcoe receive function called by NET_RX_SOFTIRQ
>   * @skb: the receive skb
>   * @dev: associated net device
>   * @ptype: context
> @@ -991,8 +991,8 @@ static int fcoe_ethdrv_get(const struct net_device *netdev)
>  
>  	owner = fcoe_netdev_to_module_owner(netdev);
>  	if (owner) {
> -		printk(KERN_DEBUG "foce:hold driver module %s for %s\n",
> -		       owner->name, netdev->name);
> +		printk(KERN_DEBUG "fcoe:hold driver module %s for %s\n",
> +		       module_name(owner), netdev->name);
>  		return  try_module_get(owner);
>  	}
>  	return -ENODEV;
> @@ -1011,8 +1011,8 @@ static int fcoe_ethdrv_put(const struct net_device *netdev)
>  
>  	owner = fcoe_netdev_to_module_owner(netdev);
>  	if (owner) {
> -		printk(KERN_DEBUG "foce:release driver module %s for %s\n",
> -		       owner->name, netdev->name);
> +		printk(KERN_DEBUG "fcoe:release driver module %s for %s\n",
> +		       module_name(owner), netdev->name);
>  		module_put(owner);
>  		return 0;
>  	}


-- 
~Randy

      reply	other threads:[~2008-12-30 16:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-30 15:48 [PATCH] fcoe: fix incorrect use of struct module James Bottomley
2008-12-30 16:42 ` Randy Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=495A4F86.30603@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=robert.w.love@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.