mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Joe Eykholt <jeykholt@cisco.com>,
	Kiran Patil <kiran.patil@intel.com>,
	Nicholas Bellinger <nab@linux-iscsi.org>,
	"James E.J. Bottomley" <JBottomley@parallels.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	scsi <linux-scsi@vger.kernel.org>
Subject: Re: [SCSI] tcm_fc: Adding FC_FC4 provider (tcm_fc) for FCoE target (TCM - target core) support
Date: Wed, 8 Jun 2011 22:10:14 +0200	[thread overview]
Message-ID: <BANLkTimLbj1FHy9j56ScRGwc2t6Ci+QhAw@mail.gmail.com> (raw)
In-Reply-To: <201105202102.p4KL28Io025077@hera.kernel.org>

>    [SCSI] tcm_fc: Adding FC_FC4 provider (tcm_fc) for FCoE target (TCM - target core) support
>
>    This is a comprehensive patch for FC-FC4 provider. tcm_fc is a FC-FC4
>    provider which glues target core (TCM) with Fiber channel library
>    (libfc). tcm_fc uses existing FC4 provider hooks from Fiber channel
>    library. This Fiber channel library is used by FCoE (transport - FC
>    over Ethernet) protocol driver as well.

> --- /dev/null
> +++ b/drivers/target/tcm_fc/tfc_conf.c

> +static int __init ft_init(void)
> +{
> +       if (ft_register_configfs())
> +               return -1;
> +       if (fc_fc4_register_provider(FC_TYPE_FCP, &ft_prov)) {
> +               ft_deregister_configfs();
> +               return -1;
> +       }
> +       blocking_notifier_chain_register(&fc_lport_notifier_head, &ft_notifier);
> +       fc_lport_iterate(ft_lport_add, NULL);
> +       return 0;
> +}
> +
> +static void __exit ft_exit(void)
> +{
> +       blocking_notifier_chain_unregister(&fc_lport_notifier_head,
> +                                          &ft_notifier);
> +       fc_fc4_deregister_provider(FC_TYPE_FCP, &ft_prov);
> +       fc_lport_iterate(ft_lport_del, NULL);
> +       ft_deregister_configfs();
> +       synchronize_rcu();
> +}
> +
> +#ifdef MODULE
> +MODULE_DESCRIPTION("FC TCM fabric driver " FT_VERSION);
> +MODULE_LICENSE("GPL");
> +module_init(ft_init);
> +module_exit(ft_exit);
> +#endif /* MODULE */

If CONFIG_TCM_FC=y, this gives:

| drivers/target/tcm_fc/tfc_conf.c:642: warning: ‘ft_init’ defined but not used

Shouldn't the #ifdef MODULE and #endif just be removed?

Who else initializes this module if it's builtin?
E.g. ft_register_configfs() is global, but not used outside this source file?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

       reply	other threads:[~2011-06-08 20:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201105202102.p4KL28Io025077@hera.kernel.org>
2011-06-08 20:10 ` Geert Uytterhoeven [this message]
2011-06-08 20:51   ` Kiran Patil

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=BANLkTimLbj1FHy9j56ScRGwc2t6Ci+QhAw@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=JBottomley@parallels.com \
    --cc=jeykholt@cisco.com \
    --cc=kiran.patil@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®