From: NeilBrown <neilb@suse.com>
To: Arnd Bergmann <arnd@arndb.de>,
Oleg Drokin <oleg.drokin@intel.com>,
Andreas Dilger <andreas.dilger@intel.com>,
James Simmons <jsimmons@infradead.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org,
Aliaksei Karaliou <akaraliou.dev@gmail.com>,
linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
lustre-devel@lists.lustre.org
Subject: Re: [PATCH] staging: lustre: use module_name() macro for debug printf
Date: Wed, 14 Mar 2018 08:56:45 +1100 [thread overview]
Message-ID: <87in9zd4gy.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20180313130425.3975930-1-arnd@arndb.de>
[-- Attachment #1.1: Type: text/plain, Size: 2146 bytes --]
On Tue, Mar 13 2018, Arnd Bergmann wrote:
> We now allow lustre to be built when CONFIG_MODULES is disabled,
> but that causes a build failure:
>
> In file included from drivers/staging/lustre/include/linux/libcfs/libcfs.h:42,
> from drivers/staging/lustre/lustre/obdclass/lu_object.c:44:
> drivers/staging/lustre/lustre/obdclass/lu_object.c: In function 'lu_context_key_degister':
> drivers/staging/lustre/lustre/obdclass/lu_object.c:1410:51: error: dereferencing pointer to incomplete type 'struct module'
>
> This particular case can be avoided by using the module_name()
> macro that was designed exactly to handle printing the name of
> a module in all configurations.
Learn something new every day :-)
Reviewed-by: NeilBrown <neilb@suse.com>
Thanks,
NeilBrown
>
> Cc: NeilBrown <neilb@suse.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/staging/lustre/lustre/obdclass/lu_object.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c
> index 8ddf23b82a2c..3ae16e8501c2 100644
> --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
> +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
> @@ -1407,7 +1407,7 @@ void lu_context_key_degister(struct lu_context_key *key)
> while (atomic_read(&key->lct_used) > 1) {
> spin_unlock(&lu_keys_guard);
> CDEBUG(D_INFO, "%s: \"%s\" %p, %d\n",
> - __func__, key->lct_owner ? key->lct_owner->name : "",
> + __func__, module_name(key->lct_owner),
> key, atomic_read(&key->lct_used));
> schedule();
> spin_lock(&lu_keys_guard);
> @@ -1547,7 +1547,7 @@ void lu_context_key_quiesce(struct lu_context_key *key)
> spin_unlock(&lu_keys_guard);
> CDEBUG(D_INFO, "%s: \"%s\" %p, %d (%d)\n",
> __func__,
> - key->lct_owner ? key->lct_owner->name : "",
> + module_name(key->lct_owner),
> key, atomic_read(&key->lct_used),
> atomic_read(&lu_key_initing_cnt));
> schedule();
> --
> 2.9.0
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 169 bytes --]
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
prev parent reply other threads:[~2018-03-13 21:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 13:03 Arnd Bergmann
2018-03-13 21:56 ` NeilBrown [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=87in9zd4gy.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=akaraliou.dev@gmail.com \
--cc=andreas.dilger@intel.com \
--cc=arnd@arndb.de \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jsimmons@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=oleg.drokin@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 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®