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 F2B8D34751B; Tue, 16 Jun 2026 19:03:07 +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=1781636588; cv=none; b=YsyZehwzTSQoZuFQfh8Q3fV0kH632Aa8P4UX4eW08MJOnl3FXnQ1XH1LXfHTiba8Per0CR6EIWFSzwCiQ7EFpxYHseqeRHLnb5D7PmEsfHeSFXsoW9/+yWl5fEmetPaIfeenU4HiNsu8PTz2YQ8Sk9pPXY4OA8sIZMAXorPXbfY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781636588; c=relaxed/simple; bh=NKGvEibXrvpgiTY6UEyeJlbGBASq/rejS32EYcvfso8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ja+8Z+oESPf9T16grns/0kyIqJcvNWeuIXCIQ0iIJUoSOPI6rspHwhVE+LbQGRQwZcpNa97EY1xQtE9BE5fmaG/fkbIEQx2tIOVBGylutx50/KEn1fwC7bvv/cqsyvobR8d+NcuknXoDFQBvqYT6xL/BwDYyZByadL9bu0GYI+s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PmLAUOA1; 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="PmLAUOA1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 809251F000E9; Tue, 16 Jun 2026 19:03:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781636587; bh=RRXbgdVi30H9to6PwKZyoYOwakteV0vjJZuG7oOOpBM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=PmLAUOA1klCSKeon3y24kaE+5eW+Dgfhr5029CraZxJkU6DYo5IHR6Fg6aB48W2C2 BG+wLeGDmJsvHQSy3jcVw8ymyaQT6/cL8dfl//brvN7rTBHL+XLr/QsngvnuRwQyBb 126K0bsccOEBhkUqwBijWICtC92aDdG6cyFqh2YI= 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.10 250/342] printk: add print_hex_dump_devel() Date: Tue, 16 Jun 2026 20:29:06 +0530 Message-ID: <20260616145059.880943585@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145048.348037099@linuxfoundation.org> References: <20260616145048.348037099@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.10-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 @@ -608,6 +608,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