Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2565174rwi; Fri, 21 Oct 2022 05:29:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4fQ7Jjhm9f2VqEdDr0EBBA1XJaJR16E3Z5Ec58psnlV4a4/bH60y+ckK9hroYkbXIoSNS1 X-Received: by 2002:a17:90b:3c8f:b0:20d:959b:26f4 with SMTP id pv15-20020a17090b3c8f00b0020d959b26f4mr22270353pjb.104.1666355387119; Fri, 21 Oct 2022 05:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666355387; cv=none; d=google.com; s=arc-20160816; b=oppvcARA4uOI16xuVO3d18ZkHWdSUvUFS93lJbHt+EOKEAYD/NY/mAbUTaREUENeno VnAYFBgWWlpgN0UBTa12snY8P33mSC8TH+V2hF3PL22byv+uMqlIlNncnlAtAhuCVTnO wlLA96+wofwea5pK3lZjgucAUAJZneXrphHjaBGcB3LH6VQoOJOzRtHcltjs/h910XXv MUd7ZuywFogTDq5fiyjBinNjI4ZtMn9Rcbs/QVI2mBabSPlgX2mOiu65H5fvZigtFL9A ve2Op+p5ldyvLoON2+f2jhCws1Pv+wALWRkLAHjcb4Zvsw2KNr54S0wMvQdZnMj+h1Yl X9ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=W7sGysXuTWvdYu2hT9y4eGhEIx0EIX5/uMDrorU+zGM=; b=V2cdxG+uItkKfQt71Ymq2EFcEhUKW+UrT4BNJRb+ib1YwoLx3vlLrF42m28+0RHNFQ z0nXu4ceRoe2j/P158LmL+7yK/z/ncTM/TZSHhRIsDWJIebxODcyXFuNrdX1ryUd3FIx tgojS6LoLjghtl87JAvKpfnknHVUH2LBc7eoszLMfrQlC6DO9Oj/jA+RBu1ua8D+IfC+ Vi3Ei4dlTYMCwAYzBh+zpMqLQ/nL2jJwdCyUD06qt7VRXPFqGWNkabdaD1evbbkQxd0E sXuyFwBfITcT54uDlkiAjBERaxJaJBPwuN10pOyQcfESworCUB8AtMtsk+h/cOCGCgmz 9ZcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=C9ykRMFB; dkim=neutral (no key) header.i=@suse.de header.b=OhP8pZ1K; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z20-20020a17090ab11400b00212ce534ef7si1953742pjq.22.2022.10.21.05.29.24; Fri, 21 Oct 2022 05:29:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=C9ykRMFB; dkim=neutral (no key) header.i=@suse.de header.b=OhP8pZ1K; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229756AbiJUMYB (ORCPT + 99 others); Fri, 21 Oct 2022 08:24:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbiJUMYA (ORCPT ); Fri, 21 Oct 2022 08:24:00 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 570DF132258 for ; Fri, 21 Oct 2022 05:23:59 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A1B6E21FA6; Fri, 21 Oct 2022 12:23:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1666355037; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=W7sGysXuTWvdYu2hT9y4eGhEIx0EIX5/uMDrorU+zGM=; b=C9ykRMFBaNBQPui56UHCpwv7YW0TffFuIIL/rz+7MoB+bowFM0Nj0t9WCYmAn0jAuigh8n JCFZhUTINwxq8UYB6d5hRO+09BLvBQZji4HKScq8bORTKkDqZbjgEzmvh1ByHqXAkQ5Cl3 j4VJxcaBL9a4c6+ECDU4NoenZ7avUZc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1666355037; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=W7sGysXuTWvdYu2hT9y4eGhEIx0EIX5/uMDrorU+zGM=; b=OhP8pZ1KNWeih2k15TgINkRWp2zsr5/ptGgqhPN2X2/8GI7uJo5mBhvxR77L6ERlCfR3MY LFMWO0pXDK5JLwDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7D6FB13A0E; Fri, 21 Oct 2022 12:23:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id NsM4HV2PUmOEXQAAMHmgww (envelope-from ); Fri, 21 Oct 2022 12:23:57 +0000 From: David Disseldorp To: linux-nfs@vger.kernel.org Cc: neilb@suse.de, David Disseldorp Subject: [PATCH] exportfs: use pr_debug for unreachable debug statements Date: Fri, 21 Oct 2022 14:24:14 +0200 Message-Id: <20221021122414.20555-1-ddiss@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org expfs.c has a bunch of dprintk statements which are unusable due to: #define dprintk(fmt, args...) do{}while(0) Use pr_debug so that they can be enabled dynamically. Also make some minor changes to the debug statements to fix some incorrect types, and remove __func__ which can be handled by dynamic debug separately. Signed-off-by: David Disseldorp --- fs/exportfs/expfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index c648a493faf23..3204bd33e4e8a 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c @@ -18,7 +18,7 @@ #include #include -#define dprintk(fmt, args...) do{}while(0) +#define dprintk(fmt, args...) pr_debug(fmt, ##args) static int get_name(const struct path *path, char *name, struct dentry *child); @@ -132,8 +132,8 @@ static struct dentry *reconnect_one(struct vfsmount *mnt, inode_unlock(dentry->d_inode); if (IS_ERR(parent)) { - dprintk("%s: get_parent of %ld failed, err %d\n", - __func__, dentry->d_inode->i_ino, PTR_ERR(parent)); + dprintk("get_parent of %lu failed, err %ld\n", + dentry->d_inode->i_ino, PTR_ERR(parent)); return parent; } @@ -147,7 +147,7 @@ static struct dentry *reconnect_one(struct vfsmount *mnt, dprintk("%s: found name: %s\n", __func__, nbuf); tmp = lookup_one_unlocked(mnt_user_ns(mnt), nbuf, parent, strlen(nbuf)); if (IS_ERR(tmp)) { - dprintk("%s: lookup failed: %d\n", __func__, PTR_ERR(tmp)); + dprintk("lookup failed: %ld\n", PTR_ERR(tmp)); err = PTR_ERR(tmp); goto out_err; } -- 2.35.3