From patchwork Fri Jul 30 10:13:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Delaunay X-Patchwork-Id: 1511587 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector1 header.b=Kaxld8Ox; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GbjsH0q0Sz9sRK for ; Fri, 30 Jul 2021 20:13:23 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4D2B6832C6; Fri, 30 Jul 2021 12:13:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.b="Kaxld8Ox"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 90039832D1; Fri, 30 Jul 2021 12:13:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9BFDD832B8 for ; Fri, 30 Jul 2021 12:13:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=prvs=284573d4b2=patrick.delaunay@foss.st.com Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16UA6aLZ032309; Fri, 30 Jul 2021 12:13:15 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=selector1; bh=lM4obzjtzlnWqjBzkXmzGy4iSRaFJPseabcTFkJ78Ek=; b=Kaxld8Ox+DEIXcX/jqdeu8xkaGD/cU3hD+Yn9QbM3U8yv9QqxGkbwP414s4dEcRmKGDC XYtO5Fnd/fUadElapdxu5PhltBw3DTT/MmjhWdhCtHvOW0xgfFw0xPLm1MhzX6hqdBRE 43e2VPm7yzaDkpirW8d7+RoE/DVR3IpbJGcWWjYb+kEqFiVf0ULrYBMDFdNj2/ToeEFr RepCiZveXu4O54Qxt02LjDrqwD2fVYf83LOIZM3pM7BrvOpWPYsuHQqpGC0eyccoXu3i 0WZyPWCo7SQ+sDbCZf+MOLRCsKHNXWEIangquV+KgnCX7qF0BsrtVuFW2tgHwiVy8b/Y 9w== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 3a4c0q194u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Jul 2021 12:13:15 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 34F7310002A; Fri, 30 Jul 2021 12:13:14 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 2C16421FE91; Fri, 30 Jul 2021 12:13:14 +0200 (CEST) Received: from localhost (10.75.127.44) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 30 Jul 2021 12:13:13 +0200 From: Patrick Delaunay To: CC: Patrick Delaunay , Simon Glass , U-Boot STM32 Subject: [PATCH] dm: migrate the dm_warn to use the log macro Date: Fri, 30 Jul 2021 12:13:11 +0200 Message-ID: <20210730121253.1.I548969a35a3522881113dc073f34b86bb15d29a6@changeid> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.75.127.44] X-ClientProxiedBy: SFHDAG2NODE2.st.com (10.75.127.5) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-30_05:2021-07-29, 2021-07-30 signatures=0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Migrate the dm_warn function to log macro with LOGC_DM category and LOGL_WARNING level. This macro allows filtering with log command and allows output on all log backend. Signed-off-by: Patrick Delaunay Reviewed-by: Simon Glass Reviewed-by: Simon Glass --- drivers/core/util.c | 11 ----------- include/dm/util.h | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/core/util.c b/drivers/core/util.c index 91e93b0cf1..5be4ee79de 100644 --- a/drivers/core/util.c +++ b/drivers/core/util.c @@ -11,17 +11,6 @@ #include #include -#if CONFIG_IS_ENABLED(DM_WARN) -void dm_warn(const char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - vprintf(fmt, args); - va_end(args); -} -#endif - int list_count_items(struct list_head *head) { struct list_head *node; diff --git a/include/dm/util.h b/include/dm/util.h index 138893c935..c634e470e7 100644 --- a/include/dm/util.h +++ b/include/dm/util.h @@ -7,7 +7,7 @@ #define __DM_UTIL_H #if CONFIG_IS_ENABLED(DM_WARN) -void dm_warn(const char *fmt, ...); +#define dm_warn(fmt...) log(LOGC_DM, LOGL_WARNING, ##fmt) #else static inline void dm_warn(const char *fmt, ...) {