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 13FBFC433FE for ; Tue, 11 Oct 2022 07:22:24 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A444984595; Tue, 11 Oct 2022 09:22:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="sMC1hx0i"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BD4F784C0C; Tue, 11 Oct 2022 09:22:20 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2086.outbound.protection.outlook.com [40.107.244.86]) (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 20F1D84312 for ; Tue, 11 Oct 2022 09:22:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=michal.simek@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qqc1NLcMtNv7y/rhjhRkLxiSj1YRMrktbYoK2HH+xCIMQ0kF99J6KhSt98NCyK/6o2x3kb6Os7aC8NlDw2oXw1fRzTSj7yPk3Mbq6OPHwhpvTor0kJbayJ7b2hGvg9fk8p5Hs//nyTpKffTB+fPSzHYe7gA1lkg1noTBW8OLzucYaRuUrarRTgTLo/BmF+Gjnq8s5aBeqxwXDGx3GsJwYoYsvYjDcYi2+PGmBxTksBwNIvbUWpfHVE7afcat46LFqwuVNsPWwR5c6I5iYkxvyQyXRs1Ab7zEfn0C6ZtFPVPHxJZ5U2OYmMATzp6ojv9njreozkZTd1pPb/K+IFfgcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VnOn0v8cWyC++VfxrgAHDqditdMcGa22moKzUlSCEjA=; b=VqBm6JzcrN/7iLUJR4z6WoirUgzPPF0DkFMDJe01Xn76aLoGUDP7bqubJxiXTXUf5WChRRBnazODazJg3YXHhN7VCr+1Gvc2QtZrvES+Fh01w8E25HTSE5ABNKGpm11Fita+IJaFQcy1f11ZOM89IvHoIWBZobshszkNkJ2GKtC3KprhSK0uInK8UvQhIjMN979zvZM4cpDW/zVwSHrli/X1rwgKsnaS7VAE4oBtKt1DfAuKGTpLLUQDBdXHrv3LBJeRZ2LlvMnmShxl+h9FLUA9A926udLWmjqDgSQJvM0iniUch5f7j2fvrj+cPf8WrRwEzUzGcQwp/3jzz0nTnA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=thorsis.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VnOn0v8cWyC++VfxrgAHDqditdMcGa22moKzUlSCEjA=; b=sMC1hx0i2Miot9l1MLz26x/17GBAzk0QkKluz+GlJOuRoi5NzPuK3YXrKQXowOSop1P84F4MzNxZb6IpGaycemV6CYRtcCynSNewqEh5lkCUndXwW57rcADN2m9jHEOkQGL1cW3kUI7kwQkzlzX7j34arTFU/KaPUQ9wbjA8HQo= Received: from MWH0EPF00056D10.namprd21.prod.outlook.com (2603:10b6:30f:fff2:0:1:0:13) by CH2PR12MB5017.namprd12.prod.outlook.com (2603:10b6:610:36::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.18; Tue, 11 Oct 2022 07:22:12 +0000 Received: from CO1NAM11FT052.eop-nam11.prod.protection.outlook.com (2a01:111:f400:7eab::201) by MWH0EPF00056D10.outlook.office365.com (2603:1036:d20::b) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.6 via Frontend Transport; Tue, 11 Oct 2022 07:22:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT052.mail.protection.outlook.com (10.13.174.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5709.10 via Frontend Transport; Tue, 11 Oct 2022 07:22:11 +0000 Received: from [10.254.241.52] (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Tue, 11 Oct 2022 02:22:10 -0500 Message-ID: Date: Tue, 11 Oct 2022 09:22:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH v4 00/10] Use logging feature instead of FPGA_DEBUG Content-Language: en-US To: Alexander Dahl , References: <20221007122003.11239-1-ada@thorsis.com> From: Michal Simek In-Reply-To: <20221007122003.11239-1-ada@thorsis.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT052:EE_|CH2PR12MB5017:EE_ X-MS-Office365-Filtering-Correlation-Id: b315612c-27be-4110-b8d0-08daab5950b2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sP3ydGsrfqabmRhtACRbSQ+yUiFVsPrPOoZTYf4ExSd0flhRIkUNqOm7evOF0k0n9LQj4sunskJ0Y+3s2Bn8Zlg3fmstu00M12nlLG8RIg1vcBWNjjwg9sm3rcsIAfZzPz/iJhjx/mpU47yhvxKRMw6ynCENBUjkvhWgEPB3XTOMLI240eatKPgvm+0hR9GFtqPBUeq+37xgX8s8ZpP0FRdvNqL8Cd1+H16Hn1YZ+YhBQOPmdSTkg1fwOhdaUJW1sx+E2Wy0X4w2DEHj63dezbEwJtchOG+ujUQXtc0Xi+dTggVodipY0NzzSzI3pecb8w3HOad8vyTrJTt1VJaYmPKgYX4C5r2XSa0P2FSRqr6UwaWjumxo1f7g7cDhhIeDjfw9CcaQKA+keqmeVd6jEQMzcSyMJNQuExwdVp9CexBh0xqAgpUWpyMndz1z8E+0/odBfjDYzzTeCb0Q76URo9u0Rhak9goRmv22ZBUE3jzAM1Yiu/BzOrjTIhLKSIcSRYUIWIq2/C4bqY/PQeZKNf/7RsYP5REiRpiL5QmhZBgHwV96myeP2M3hnyQeV69V41tkIODr1bxbVq/aOqXqGd48juVjj6YUxzLCCPLyF86UUL+wubO9UcWu2wE1KEY4RfAi4gFAvj9bD+bOn2tIDQsojGWy61ZOYiH7z69pgFR5gOHUdVPCqToJ9huMMtTk95g5X5l8Diye35vg+hQlKkUuCwtMBtrqh7Gd8292IEYwJv/kGulHQvqQIcuEkouX956UfezrgEzWzWUbOFUipNhft1XbCcvhvKm8eoCCa+mYR6vcB4n3MVjqViVjXze84AKkDsJ+DiKLCEnlCvmWcw== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(396003)(346002)(136003)(376002)(451199015)(36840700001)(46966006)(40470700004)(31686004)(110136005)(316002)(16576012)(40480700001)(356005)(478600001)(36860700001)(81166007)(40460700003)(36756003)(86362001)(82740400003)(31696002)(336012)(426003)(83380400001)(47076005)(53546011)(186003)(16526019)(26005)(2616005)(6666004)(8676002)(44832011)(8936002)(5660300002)(70206006)(82310400005)(70586007)(2906002)(41300700001)(36900700001)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2022 07:22:11.8956 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b315612c-27be-4110-b8d0-08daab5950b2 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT052.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB5017 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 On 10/7/22 14:19, Alexander Dahl wrote: > 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 Applied. M