From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 329B632A3C9; Tue, 16 Jun 2026 17:50:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781632210; cv=none; b=ipgzYChflwWfeXp/rlKpTHwWbwBumG/DY3OsEVREcVlsRmQqFkcax7+Ce13ehhds7/F1eQ+gdqSApBrpRc0kmBmjM6VdzFUbml7C3koyTxwsOIpF3E6wqI1/ZVgyuBNVJmLk7cuP6NGtmv40Of9dBm1bKSqpTF6c9YMKgvGQuIE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781632210; c=relaxed/simple; bh=SlM1ANEGngFIhEd22gnfc98d1U6uymeYWu2AofIIDnI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WIoaa4PmLVCRPF8FRWBx4h1j7PTRjY8GT1xHZvSqLLcapBfJfKg8BV/63Ns/4/0saT/01/6edLRzPN5QSqJ5gCpjiFCSyi2hw9fpmtkJ+XOeH9G3e6a1vyhp5rYu8yAKvxnxd6VeQJIoQIKjJgOoBAPzaA+4CvGf1mOxsB9Rwfw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Z/2FpIgY; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Z/2FpIgY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 328A71F000E9; Tue, 16 Jun 2026 17:50:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781632209; bh=vd5XKrkqIYS2R4+9zX3FuIgszZt2NmFCDnnisM6X0Zo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Z/2FpIgYHYG78f3jw6vGVGqtySu6nkDZa/bcA8y1niac0iiUCBXrBJRn1KxVkW61I EXNWg7IDMvzFO0+IaYKIqoRsEYMZ+LYkeRyESvDfYx2a/Y8oefMt+t9DVVQKGXXKSW HioiRwrW1CbHR8NbYGoXc40PpwSvxk6wLhN9nKSQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Herbert Xu , Thorsten Blum , John Ogness , Sasha Levin Subject: [PATCH 6.1 366/522] printk: add print_hex_dump_devel() Date: Tue, 16 Jun 2026 20:28:33 +0530 Message-ID: <20260616145142.905607469@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145125.307082728@linuxfoundation.org> References: <20260616145125.307082728@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thorsten Blum [ Upstream commit d134feeb5df33fbf77f482f52a366a44642dba09 ] Add print_hex_dump_devel() as the hex dump equivalent of pr_devel(), which emits output only when DEBUG is enabled, but keeps call sites compiled otherwise. Suggested-by: Herbert Xu Signed-off-by: Thorsten Blum Reviewed-by: John Ogness Signed-off-by: Herbert Xu Stable-dep-of: 177730a273b1 ("crypto: caam - guard HMAC key hex dumps in hash_digest_key") Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- include/linux/printk.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -747,6 +747,19 @@ static inline void print_hex_dump_debug( } #endif +#if defined(DEBUG) +#define print_hex_dump_devel(prefix_str, prefix_type, rowsize, \ + groupsize, buf, len, ascii) \ + print_hex_dump(KERN_DEBUG, prefix_str, prefix_type, rowsize, \ + groupsize, buf, len, ascii) +#else +static inline void print_hex_dump_devel(const char *prefix_str, int prefix_type, + int rowsize, int groupsize, + const void *buf, size_t len, bool ascii) +{ +} +#endif + /** * print_hex_dump_bytes - shorthand form of print_hex_dump_debug() with default * params