mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] fixup! include: rename printk.h to printf.h
       [not found] <to=<20250106091906.3435166-1-a.fatoum@pengutronix.de>
@ 2025-01-06 10:37 ` Ahmad Fatoum
  2025-01-06 13:21   ` (subset) " Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-01-06 10:37 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Missing file...

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/printf.h | 63 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 include/printf.h

diff --git a/include/printf.h b/include/printf.h
new file mode 100644
index 000000000000..9a84850d02bf
--- /dev/null
+++ b/include/printf.h
@@ -0,0 +1,63 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef __PRINTF_H
+#define __PRINTF_H
+
+#include <linux/types.h>
+
+struct device;
+
+#define KERN_EMERG      ""   /* system is unusable                   */
+#define KERN_ALERT      ""   /* action must be taken immediately     */
+#define KERN_CRIT       ""   /* critical conditions                  */
+#define KERN_ERR        ""   /* error conditions                     */
+#define KERN_WARNING    ""   /* warning conditions                   */
+#define KERN_NOTICE     ""   /* normal but significant condition     */
+#define KERN_INFO       ""   /* informational                        */
+#define KERN_DEBUG      ""   /* debug-level messages                 */
+#define KERN_CONT       ""
+
+#if (IN_PROPER && !defined(CONFIG_CONSOLE_NONE)) || \
+	(IN_PBL && defined(CONFIG_PBL_CONSOLE))
+int printf(const char *fmt, ...) __attribute__ ((format(__printf__, 1, 2)));
+#else
+static int printf(const char *fmt, ...) __attribute__ ((format(__printf__, 1, 2)));
+static inline int printf(const char *fmt, ...)
+{
+	return 0;
+}
+#endif
+
+void __attribute__((noreturn)) panic(const char *fmt, ...);
+void __attribute__((noreturn)) panic_no_stacktrace(const char *fmt, ...);
+
+#define printk			printf
+
+enum {
+	DUMP_PREFIX_NONE,
+	DUMP_PREFIX_ADDRESS,
+	DUMP_PREFIX_OFFSET
+};
+extern int hex_dump_to_buffer(const void *buf, size_t len, int rowsize,
+			      int groupsize, char *linebuf, size_t linebuflen,
+			      bool ascii);
+extern void dev_print_hex_dump(struct device *dev, const char *level,
+			       const char *prefix_str, int prefix_type,
+			       int rowsize, int groupsize, const void *buf,
+			       size_t len, bool ascii);
+
+#define print_hex_dump(level, prefix_str, prefix_type, rowsize,		       \
+			     groupsize, buf, len, ascii)		       \
+	dev_print_hex_dump(NULL, level, prefix_str, prefix_type, rowsize,      \
+		       groupsize, buf, len, ascii)
+
+#ifdef CONFIG_ARCH_HAS_STACK_DUMP
+void dump_stack(void);
+#else
+static inline void dump_stack(void)
+{
+	printf("no stack data available\n");
+}
+#endif
+
+
+#endif
-- 
2.39.5




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: (subset) [PATCH] fixup! include: rename printk.h to printf.h
  2025-01-06 10:37 ` [PATCH] fixup! include: rename printk.h to printf.h Ahmad Fatoum
@ 2025-01-06 13:21   ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2025-01-06 13:21 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Mon, 06 Jan 2025 11:37:41 +0100, Ahmad Fatoum wrote:
> Missing file...
> 
> 

Applied, thanks!

[1/1] fixup! include: rename printk.h to printf.h
      https://git.pengutronix.de/cgit/barebox/commit/?id=0109f7143506 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-06 13:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <to=<20250106091906.3435166-1-a.fatoum@pengutronix.de>
2025-01-06 10:37 ` [PATCH] fixup! include: rename printk.h to printf.h Ahmad Fatoum
2025-01-06 13:21   ` (subset) " Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox