From patchwork Tue Mar 13 13:03:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 131463 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp709635ljb; Tue, 13 Mar 2018 06:05:06 -0700 (PDT) X-Google-Smtp-Source: AG47ELvpM1yAMG6ZKxXMuunD2rGUo+wu0briaNP9bdvAZ9/kV2znESLbJf15UX0x3YDSkGYxEk0G X-Received: by 10.98.107.134 with SMTP id g128mr554105pfc.238.1520946306424; Tue, 13 Mar 2018 06:05:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520946306; cv=none; d=google.com; s=arc-20160816; b=NCpMgiEWYNtTf6eyFmAZHVqv8cVemzb/9yMbOXPAxyuwRdlaq/+IT4XMyleXdR/ls9 UhC4gNq6ei+zr1vM+24dezpeOGYqzCsP20CghJZSRL5X0HbEitYuiwWf/B5QHzIKBdsc hn+Yn57qwHle3Uyl0DUgO/JtOB43d4k+yYVwsTdDZvoaRz2axWO1Wxt1RI4AQ9H3fswp igUTQ7mBQ3jvV15nQN2Al3RDzPO6QUzqUbdO0ImHKYZwBw0dAB7YXvfO66MVuvRhvR6M iXTCBZrMJrVl1c17WNFn+0Pgk6kqtjDffqASyWoqjOioQXiv17qdnJv3Y5pypdmYROtr ir/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=mYwu6PYiPbZCshEsng96HBd+bJFkDhrLUYWRbU28HIM=; b=JarFdgC3/cf2HO+lPVis3euz92WeIiBFpItH8WeLHuz63Xx8sJWPaVPxQMGquUnHSF ug+kKHiV8BewLFxWWaicCsKXJTiiFlqd85xvzg/TrfZxgfpcTWQ5rFQfDiJzpMZbhLSm qVcrcjDzcwnm8RbnUgjgVs4rc4pD1nInll7nTU/RtRihL/bhSK0BGj4ps87wM9D4Mja6 ltClFMP2MRoFmY1/Hmc9wI6PAgjyMIfsII6bCjr69ndsVePcd5a52k8DYo6vkT4yrotd rE6GNHRawMLxaUeDfE2is2S23L5cJOy4v6jsErztzyd/TQBJydMuJN9IR4eoFeQTZnkA Um9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r65si132589pfa.79.2018.03.13.06.05.05; Tue, 13 Mar 2018 06:05:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752651AbeCMNFB (ORCPT + 28 others); Tue, 13 Mar 2018 09:05:01 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:37341 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752272AbeCMNE7 (ORCPT ); Tue, 13 Mar 2018 09:04:59 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0Lle2C-1eMOqs1ZfE-00ZKyj; Tue, 13 Mar 2018 14:04:30 +0100 From: Arnd Bergmann To: Oleg Drokin , Andreas Dilger , James Simmons , Greg Kroah-Hartman Cc: Arnd Bergmann , NeilBrown , Aliaksei Karaliou , lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: lustre: use module_name() macro for debug printf Date: Tue, 13 Mar 2018 14:03:44 +0100 Message-Id: <20180313130425.3975930-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:fc9YuYrJ713TPvQg3TjkQhYpocT9qT4sZK/RGiGJBhoLJ8x2vff JzcZw0h5dcFiRY+K8OtQZawBxjMYUuqFyIABgxQ+mJ+bTU7eYsVIqClOC0o6qL7W2xWlJJ3 hJhZs0dkdal8WfeuB/LPFrCWSAemHv5oGhTH6pmAiyY0ZebPkKVR1ODixUYi4620jvHroUe BqHzS8VfGJluZ/28tAbEA== X-UI-Out-Filterresults: notjunk:1; V01:K0:8zzGvBnANzc=:E3pIG0k8Be2vcqYy9CH7pr XU2DyWW2Vb0xlgmQm0xPVHGunW1saxiQIfDPjDuI2tuzJVglHyhXs/KWRfxARpnx8pW6pp3bY OviE9JxlfgG+yCZVhN9Lv+QtFDfxF6gmXN9449U88ek6jzb2mxrvCHsh9sm0BWzOAFR5EBA+I Sqj7v5ExAmzKMwle9A8kbuflDSXdwiQxKmfI8nE0uN7Tnv5C838qAnvdWlo9atlist2tOKsqC 7lGXtbEdgLSVddRDtK3ld6RYNv+PAchTAHgplffIQMosx7S6RTV+IDlNfQhUjPtcisR4VObk8 pi13pi4JM9LGiw5H4cy15eA1gZ7mcSom5Ut5e4tpMtamx/fJFfL/Xy4R7LPGoww5kYz1QqQw5 DigiAM2DGstNO0CNxJRUJYSiUvtT0Cui+0Ueca2I3kd3PvQWDmGjOwIlWZygKCohW5/XIWaLg Qha7iFO7MmzbwRBNvqP/XnggtiXus9n/ePJASzGHHepUC0T+rPlF6y6N1syXwDNnztBSMr0Ph B9SLYydSW4zavIoUXFSDRvQnL8zZZBSH18qgZAI0SmET0NVDRA47D2FpanF/xVyIh2sODExL3 TgYGYXe/0I7Mn1AXArVg21kD6e+vfKpXhRy7jJMUklCOozRIs9ZRpr+hF3IaUXnTNNqtXxsbs J4CDxJjQwMerpa5HDf342QzeV4ur5kpDhCBlmwPLqJ09nexAb4kpa194syXjtb7Tr3NquO9Ut MXjJU8jlNAy9nEEbTr1AK/x2EXCX8DMHHjS8RA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Cc: NeilBrown Signed-off-by: Arnd Bergmann --- drivers/staging/lustre/lustre/obdclass/lu_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 Reviewed-by: NeilBrown 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();