Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2634160imm; Sun, 7 Oct 2018 08:22:22 -0700 (PDT) X-Google-Smtp-Source: ACcGV63ET5vewzfbBSy1a+P5OXF7LzaxI/4sptVtGWo28MMuEymY5Tq8SJoih3sqqj99SBmRzGH8 X-Received: by 2002:a63:6342:: with SMTP id x63-v6mr16791332pgb.83.1538925742597; Sun, 07 Oct 2018 08:22:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538925742; cv=none; d=google.com; s=arc-20160816; b=iNYLXdTLyzROH1eAXwBA8doByWSKmmY0PqSVvaAIqCq87SicCX6jAKTslp3yBiShPV Ujw554H45AtTwFI5jOqJA6DfmgXsYfKETeaPPd1qEq8Ojx/Nd6Z0h/ELZQp+GdzIc4Bp 7Hd1xEhtgONFyInfSSLWHkvrNE3c6VbJc9XtztrFtedbpVsw8ljJwxbP1fJYTCHBw4Pi Mndbne3oo6UixKzcGn9vTKBTPIbO88AWTdNvLjBek7yaZlqbVqxdT/KK3JFiRbzWnOoK molrPIV1A0yGZSjo/xwJM/+irZic8xILWnygwJGNGbgM60QziFV1Ss8x0Po23R620vVV 03Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=X+Uca5Mp743lH1VHw2E6EHtdOEjs+BdxT8TdWNOEi4A=; b=xg5+bM0I1cF2yzl3h0ozaXIO9RtmgiahXSNp1VIhNW7NxbcacuPn8N6+fUGfVFgFc7 qWElaFmdx4omuZUb6o5FOTx7ax6yaEIWIqj6/lOK6MNYGO82CJMtXD92nd9M0WC9PKYu 2+FUHwoePqrEU5IJelTSZis48GKxHtI+AS+e7aeIg9NP6x2WOOdvAZyqL9u901bsI+SE /uMBR50MTykSVqGv25W5XOOZnVlzpwj8BCB8+YYUMuoXrLm2IWFY4GytqmB7b1T8p4t6 pXjbnjw6j8/+2qwoBOxOVV1jaKLiAFyiKGdF6ors+tJ1eXXPLBj2wg4atHgIKhkNGKEE CmEA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6-v6si12256764pgh.373.2018.10.07.08.22.07; Sun, 07 Oct 2018 08:22:22 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728461AbeJGW3P (ORCPT + 99 others); Sun, 7 Oct 2018 18:29:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57946 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726448AbeJGW3N (ORCPT ); Sun, 7 Oct 2018 18:29:13 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 651DA83F3F; Sun, 7 Oct 2018 15:21:38 +0000 (UTC) Received: from rf.usersys.redhat.com (ovpn-116-29.gru2.redhat.com [10.97.116.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35A8010021B2; Sun, 7 Oct 2018 15:21:37 +0000 (UTC) From: Rodrigo Freire To: linux-kernel@vger.kernel.org Cc: sfrench@samba.org, linux-cifs@vger.kernel.org, piastryyy@gmail.com Subject: [PATCH v3 1/2] CIFS: Adds information-level logging function Date: Sun, 7 Oct 2018 12:21:25 -0300 Message-Id: <3e9246011e68c3ebeea111c8bb743d1a189ce6ac.1538873915.git.rfreire@redhat.com> In-Reply-To: References: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sun, 07 Oct 2018 15:21:38 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, CIFS lacks a internal logging function that prints out data when CIFS_DEBUG=n. When CIFS_DEBUG=y, the only message level for CIFS events are KERN_ERR or KERN_DEBUG. This patch creates cifs_info(), which is useful for printing non-critical event messges, at either CIFS_DEBUG state. Signed-off-by: Rodrigo Freire --- fs/cifs/cifs_debug.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/fs/cifs/cifs_debug.h b/fs/cifs/cifs_debug.h index f4f3f08..72db298 100644 --- a/fs/cifs/cifs_debug.h +++ b/fs/cifs/cifs_debug.h @@ -47,6 +47,17 @@ */ #ifdef CONFIG_CIFS_DEBUG +/* Information level messages, minor events */ +#define cifs_info_func(ratefunc, fmt, ...) \ +do { \ + pr_info_ ## ratefunc("CIFS: " fmt, ##__VA_ARGS__); \ +} while (0) + +#define cifs_info(fmt, ...) \ +do { \ + cifs_info_func(ratelimited, fmt, ##__VA_ARGS__); \ +} while (0) + /* information message: e.g., configuration, major event */ #define cifs_dbg_func(ratefunc, type, fmt, ...) \ do { \ @@ -81,6 +92,11 @@ if (0) \ pr_debug(fmt, ##__VA_ARGS__); \ } while (0) + +#define cifs_info(fmt, ...) \ +do { \ + pr_info("CIFS: "fmt, ##__VA_ARGS__); \ +} while (0) #endif #endif /* _H_CIFS_DEBUG */ -- 1.8.3.1