From mboxrd@z Thu Jan 1 00:00:00 1970 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 091F218DB2A for ; Sun, 10 May 2026 13:15:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778418912; cv=none; b=rX5Ulnn/uSpuaajunnz1Yyroo21mrHFXCyK2y9mBpjpJA+86ma1RcjnYvKJlPRjn1CB1Q8nFVZhgfIhtSse9NkfBweB+LdCsDdl1pLOOenWMnAXXvWVKWR6dMpVPVUwK/5CwbsPbdaN4HtVKQ/88N+wWmXmoho+RE7GxKFsUnAs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778418912; c=relaxed/simple; bh=H5WNjIBi5nZomZSreYqC7ewf+bwwynkIMnOYDt0p/qU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ed1YIodhnb3PKIFz3f+WkVimsk99HdV3QLgKyZw+iwsTW38LZKfDqqd6HEVnRvtZsWFk6Ke3onnQhTasSIxrLLbZ5thGRkU/Z6kROJW8Ta+AFSCA/wiwVF1ZmSdRKQSdCXB/it4ILXkYXnstoJExP5emOGgHpHrbFIZtC9ipMbU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cIvnV9Ht; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cIvnV9Ht" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1239C2BCC9; Sun, 10 May 2026 13:15:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778418911; bh=H5WNjIBi5nZomZSreYqC7ewf+bwwynkIMnOYDt0p/qU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cIvnV9Ht6HY2TkCBotTj5LU5VnQGUcOyeKcmdwOb2DBBBeOFK/j21L7xRKtm8r3ns FQ4yQ2wbEqsCeM6W+cz2OoleZsiRABowWulKeccVTfuqoofTXkcQ8q3rnG1stPPtaN BBUXTW20zWr+ltEl2sZTPevShmST7QW8uZrwqXSZJir4x6IYSvVNnOFrNF5VmCp8Sd pTE6TgAaREiRXTjrL8ADI2UKNTq/aWoQ9KlVuiJGA8MWA97IDYZeNX6o5wZGgMbYRz AtWjU5ooIlsGLNwJg7wYYvoL973PReFYV9RaCImpMsBb1CwjqV1o5mNPZVeq5EDRnI 62/4u08sxM5Pg== From: Sasha Levin To: stable@vger.kernel.org Cc: Thorsten Blum , Herbert Xu , John Ogness , Sasha Levin Subject: [PATCH 6.6.y 1/2] printk: add print_hex_dump_devel() Date: Sun, 10 May 2026 09:15:07 -0400 Message-ID: <20260510131508.4113857-1-sashal@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <2026050437-viability-scholar-82fb@gregkh> References: <2026050437-viability-scholar-82fb@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- include/linux/printk.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/linux/printk.h b/include/linux/printk.h index e4878bb58f663..478203bb2369c 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -745,6 +745,19 @@ static inline void print_hex_dump_debug(const char *prefix_str, int prefix_type, } #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() with default params * @prefix_str: string to prefix each line with; -- 2.53.0