Received: by 2002:a05:7412:a9a3:b0:f9:93eb:408e with SMTP id o35csp51849rdh; Wed, 20 Dec 2023 22:38:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFjNwtlGIYmrq+cmSpikPTM4FGJn69BZsTqhS4sRYoOk94b00EqxDKyMiAGOpZ9yezU/cNN X-Received: by 2002:a05:620a:1d94:b0:77f:9540:56ab with SMTP id pj20-20020a05620a1d9400b0077f954056abmr14057284qkn.123.1703140730610; Wed, 20 Dec 2023 22:38:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703140730; cv=none; d=google.com; s=arc-20160816; b=CMKJI5hO1/pGSq2mHpgqPvrDYPB3fJKAD5bBITaI1mQZQx1mmYrbl0FfbQA6KDOaNx 3eKwxtsVbMSJiTFndqzf0vzk60bI37AT+98fACi0N6gL/V3UP2t7kiaO/86/JEmyKrKT Wc3sR5eRpPrMSkq2U7HRmhA37HVWc5QmHEBNtxNeXhScRoNUT/AukxIJ9jFUGHSPX4+y RT9cIXpOEMdvyNwrWxdesQXeheH/JU3n9IjJVFze5c1XMWNMf4uyJOXWOpmi7QQOsmCq oue74NLc8YqTuaWowaUHn3bQs9uqQdlnRE9xBzhx8UNm+CwsD7xJ9IlEYgSQBsWmbgrt wn5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=3ZzYbUlIU14pNseOaoPPMeYp1fvlmMMyDUXgP/pPHyo=; fh=4UjVP+1ZNAkkjUTLXq5wbKlM1nuAF24kCM23vrYH868=; b=k9nWsBdgyktnC85hVr1np6mg2/7A5Mg5nQZOTKQycZfL5yMAjnMuTY+EQ/EiE2Lozv 1QBEy4MRtOvoHCDIigJBSeySFPz2Zr6wwnRHOHYDavCmk8QssyTOW1mkw04sBn7HCiwT Zc1QwMUot9nT3vExrvSFDQOHAdfuNOqCXOvm66mGaghvX74v7xHJ7ECcBkFJnldXqZqJ rwZ0ntzOZ4rHqpz4TnNiv2b169VQWqPN+oHomSYlcNGJhOvT8dcKxN7tzLakIR2Pd/nz 1amt1s17s7KfmMARudCyulRowIG3YSQhxQiMwLUqfcSvkiaQQrDwsI+BBWeqa3XMNEw5 +ewg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jBtKBo2Z; spf=pass (google.com: domain of linux-wireless+bounces-1133-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1133-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id n4-20020a05620a294400b007810c541f20si1598162qkp.274.2023.12.20.22.38.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 22:38:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1133-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jBtKBo2Z; spf=pass (google.com: domain of linux-wireless+bounces-1133-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1133-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5F01A1C22F43 for ; Thu, 21 Dec 2023 06:38:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F192B672; Thu, 21 Dec 2023 06:38:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jBtKBo2Z" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BE5B11733; Thu, 21 Dec 2023 06:38:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9343DC433C8; Thu, 21 Dec 2023 06:38:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703140716; bh=Yhl/ykyxVA6LA1kDZOxQMgUP3Z7vfjny1ZSJoKucqog=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=jBtKBo2ZiBpDcT422t0EOms8MP/5gNWYSaAN1ggNe2OggUvouJznOezeC94w6b1Z6 cTAX5Rrnp/va+W1GfKitWezNesm2EIoqYKPnvu3vIdjaTTgEiJr58GuXy1Oc3CZXX8 KK5lDh23OJ6Vj1fHORrGFO7wWF8ZjKASNFD2//xaAjVwp0lu1KPO1TqVgpKvSmANOq veWV8V6Fndry8QbjxQkrO1LIM9K5eVkZbu3uQ2cb6Sy3VAcnohMYZlsKq6cNomkKM7 Cz0u9b+SIwnDAo/oLZzh5fiv29mgP6wX2hJeVDCVRb9BE7fnU/ychZW+Yrv9DsR9zl RdooDQ6blXDIw== From: Kalle Valo To: "Ma, Jun" Cc: Mario Limonciello , Johannes Berg , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "open list:MAC80211" , "open list:NETWORKING [GENERAL]" , open list , Jun Ma Subject: Re: [PATCH] wifi: mac80211: Use subsystem appropriate debug call References: <20231215145439.57286-1-mario.limonciello@amd.com> <87frzzsfoi.fsf@kernel.org> <46bf6ed5-31f6-48f4-b63d-f532e163204e@amd.com> Date: Thu, 21 Dec 2023 08:38:32 +0200 In-Reply-To: <46bf6ed5-31f6-48f4-b63d-f532e163204e@amd.com> (Jun Ma's message of "Thu, 21 Dec 2023 13:57:50 +0800") Message-ID: <87cyv0oyaf.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "Ma, Jun" writes: > Hi, > > On 12/18/2023 11:17 PM, Kalle Valo wrote: >> Mario Limonciello writes: >> >>> mac80211 doesn't use dev_dbg() but instead various macros from >>> net/mac80211/debug.h. Adjust wbrf code to use wiphy_dbg() instead. >>> >>> Cc: Jun Ma >>> Reported-by: kvalo@kernel.org >>> Closes: >>> https://lore.kernel.org/amd-gfx/8bd60010-7534-4c22-9337-c4219946d8d6@amd.com/T/#mfe2f29372c45130d27745912faf33d9f7ce50118 >>> Fixes: d34be4310cbe ("wifi: mac80211: Add support for WBRF features") >>> Signed-off-by: Mario Limonciello >>> --- >>> net/mac80211/wbrf.c | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/net/mac80211/wbrf.c b/net/mac80211/wbrf.c >>> index a05c5b971789..12c23e14f884 100644 >>> --- a/net/mac80211/wbrf.c >>> +++ b/net/mac80211/wbrf.c >>> @@ -23,8 +23,8 @@ void ieee80211_check_wbrf_support(struct ieee80211_local *local) >>> return; >>> >>> local->wbrf_supported = acpi_amd_wbrf_supported_producer(dev); >>> - dev_dbg(dev, "WBRF is %s supported\n", >>> - local->wbrf_supported ? "" : "not"); >>> + wiphy_dbg(wiphy, "WBRF is %s supported\n", >>> + local->wbrf_supported ? "" : "not"); >>> } >> >> This won't work, I still see the debug message: >> >> [ 333.765867] ieee80211 phy0: WBRF is not supported >> >> The issue seems to be that mac80211 defines DEBUG in >> net/mac80211/Makefile: >> >> ccflags-y += -DDEBUG >> >> That -DDEBUG should be cleaned up, but I think separately. It's just >> that I cannot come up with any good proposal, all the macros in >> net/mac80211/debug.h require sdata and we don't have that in this stage. >> Any ideas? > > I will submit a patch that only compiles wbrf.c when CONFIG_AMD_WBRF=y But does this mean that the debug is still printed when CONFIG_AMD_WBRF is enabled? And I would assume all distros enable that, right? -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches