From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 651FDC433F5 for ; Fri, 7 Oct 2022 12:21:31 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8222C84E70; Fri, 7 Oct 2022 14:20:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=thorsis.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=thorsis.com header.i=@thorsis.com header.b="hDzBTHU2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 390D784E84; Fri, 7 Oct 2022 14:20:16 +0200 (CEST) Received: from mail.thorsis.com (mail.thorsis.com [92.198.35.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B443384E83 for ; Fri, 7 Oct 2022 14:20:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=thorsis.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ada@thorsis.com Received: from adahl by ada.ifak-system.com with local (Exim 4.92) (envelope-from ) id 1ogmKh-0002wN-0v; Fri, 07 Oct 2022 14:20:03 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=default; t=1665145203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=50wsCtnOfbMl9cjombh/BR3A7nVHfpmm+t0U2QmtIYQ=; b=hDzBTHU2pFn09bL7Duke7/oHIAJx9asWqBLhkEVISJmwljzgK7Kgdqx3hJBzUXWJxyyEHL rC7fDhUTSCXrRBDAmS8Hke63ZYCkDFQdFOC6uL/JvfyjGhs+8gGEmwI5djWIzk9O/i7XCY l4cq1x3zWSPUmrhgHkaB4+3nLId9OCKj+Kj8sbmeRkqd3Z547psaIW0vy+TO068P1rUpez kaX+tuJx8egpo4FO+KHjfvHS2/y06jC9wjlNcFQz/jlFUQ+sGfw0kTHftCtJGGGl7VHLUd yRuwvVEN3NVcGPPDqfOSsQWypeJNvKgoRPS4A2eHAsNyvYSgBl29CBmpH+xgWQ== From: Alexander Dahl To: u-boot@lists.denx.de Cc: Michal Simek Subject: [PATCH v4 00/10] Use logging feature instead of FPGA_DEBUG Date: Fri, 7 Oct 2022 14:19:53 +0200 Message-Id: <20221007122003.11239-1-ada@thorsis.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean Hei hei, while working on FPGA support for a new device I discovered debug logging in some FPGA drivers is still done as in the old days. Bring that to what I thougt would be the currently preferred approach. Notes: Adding those Kconfig symbols in patch 1 is just to be able to build two of the old drivers. All drivers touched were build tested with sandbox_defconfig and GCC 8 on Debian GNU/Linux 10 (buster). Lines with other possibly questionable output were not touched, only what seemed to be designated debug output, and only for FPGA drivers having that ancient FPGA_DEBUG / PRINTF macros, so there's room for future improvements. Changelog: v3 -> v4: - Reordered patches, Kconfig patch comes first now (made it easier to build and test the series step by step) - Added three patches fixing printf compiler warnings first, before changing to the new logging framework (so CI should not fail anymore with -Werror) v2 -> v3: - Patch introducing FPGA uclass was completely reworked, sent independently from this series, and applied already, thus removed - Because requiring that new FPGA uclass changes, rebased on Michal's microblaze branch '20221005' - Removed '"%s …", __func__' and '"%d …", __line__' from log messages, because log framework can add those (enabled by CONFIG_LOGF_FUNC and CONFIG_LOGF_LINE) v1 -> v2: - Rebased on master - Added patch to introduce new FPGA uclass in front of the other patches - Use that new uclass as log category - Slightly reworded cover letter Greets Alex Cc: Michal Simek Alexander Dahl (10): fpga: Add missing Kconfig symbols for old FPGA drivers fpga: spartan2: Fix printf arguments warning fpga: spartan3: Fix printf arguments warning fpga: virtex2: Fix printf format string warnings fpga: altera: Use logging feature instead of FPGA_DEBUG fpga: cyclon2: Use logging feature instead of FPGA_DEBUG fpga: ACEX1K: Use logging feature instead of FPGA_DEBUG fpga: spartan2: Use logging feature instead of FPGA_DEBUG fpga: spartan3: Use logging feature instead of FPGA_DEBUG fpga: virtex2: Use logging feature instead of FPGA_DEBUG drivers/fpga/ACEX1K.c | 37 +++++++++---------- drivers/fpga/Kconfig | 12 +++++++ drivers/fpga/altera.c | 11 +++--- drivers/fpga/cyclon2.c | 38 +++++++++----------- drivers/fpga/spartan2.c | 80 +++++++++++++++++++---------------------- drivers/fpga/spartan3.c | 80 +++++++++++++++++++---------------------- drivers/fpga/virtex2.c | 69 ++++++++++++++++------------------- 7 files changed, 152 insertions(+), 175 deletions(-) base-commit: 2d8cf392a77815f062446ef441f1078958dc1b2a -- 2.30.2