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 3EB2E47CC71; Tue, 16 Jun 2026 18:33:12 +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=1781634794; cv=none; b=AmNCpzKPFiF06l5wKWSioOUaKvDiq2a27yJk3NkRkKXlTNWJSGAUsLEm2PyVCyvyYJLj/nzuUlNpW0x9P/0ioIFuQp92DmPLzmz+peRpT61ivKb8xMGCZ56JcSRI2aXPPbggmiNyZKvGwsdWXsxBTubaeLLyNKz0M4lLrgviLrE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781634794; c=relaxed/simple; bh=ODdNzHFr0rAtSt32WFn7qmwd27ScU6RYILIre1eDmtY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Cds6CjMpMBgxnfL+EJcft+LxQULDs6qpbGmcoKnCXKH7PETyguDgmOL4LyCqnsA2Fs9rhHPkQYGVI3tccZODfvtpwr2WE8wQh1bAYWBmQ+oYa/BzXm70wZ01wJ0hZHGIQpSPKObbZu5Xn4MMnNxxAyaYL8DANDI5xl9a93Mitak= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pxqjiGIR; 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="pxqjiGIR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E78BB1F000E9; Tue, 16 Jun 2026 18:33:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781634792; bh=cL3IXt/CBAGrwj6A7uTK94U40+4XxDIAg9aGeP6PcY0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=pxqjiGIRGXpbMI3P5sW+yQtZVpsVZYhTOHGB1HTAavDOToJw3aAHo/DpWYoqJEvLY R1vhntDxuofcTPUf3bqWd0+414W+4Qk3mGbeU+WCD/T9dEfEDg/VbkTAB5Zd/pzkPH sIzvwL1x8KMfLyNAvP7jiYpB75bFmi5qu0UO4cJU= 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 5.15 300/411] printk: add print_hex_dump_devel() Date: Tue, 16 Jun 2026 20:28:58 +0530 Message-ID: <20260616145117.092738029@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145100.376842714@linuxfoundation.org> References: <20260616145100.376842714@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 5.15-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 @@ -740,6 +740,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