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 X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F01E1C433E0 for ; Sun, 5 Jul 2020 20:49:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B9DAB2073E for ; Sun, 5 Jul 2020 20:49:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JJczDjML" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9DAB2073E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jsBa9-00013r-2B for qemu-devel@archiver.kernel.org; Sun, 05 Jul 2020 16:49:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jsBX3-0004Mm-4Z; Sun, 05 Jul 2020 16:46:37 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:38675) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jsBX1-0000oo-J7; Sun, 05 Jul 2020 16:46:36 -0400 Received: by mail-wm1-x342.google.com with SMTP id f18so39594667wml.3; Sun, 05 Jul 2020 13:46:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=G37x8W0rCVo00GrhnCpy9+AXL7M1+3sgu4vRFcZInrU=; b=JJczDjMLwMoXPKH+0R+2mc8M0V5x0fBL5XvAeVmEQu99CdurZAJztHO9STsOU0vEaJ SG8DAY7+LTfanaJkzCZYR2+Uu04pzvSRxkXws5SK3fCFwTMsAMgZNtOSxAnSUaFSThpO H/RupYVTFwisJoa/9TeF9VKdcGHkYJzhtfeK/E80ty0B2dwHu6f4YHG8qOhBIzzg1iZ3 mx4XApkCKKLDh0lp9zeSJ1A7riNMTCuU0afNGRSPGg0uiY/psA6krnUvXDYIJ9RZPO6f F59inMBbDlQ5jFbVJ6KyZLmkVNS3HXTHsbOZxC4L3Baqj7hmq6igKphPPAy6rnBjm9Ws oJlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=G37x8W0rCVo00GrhnCpy9+AXL7M1+3sgu4vRFcZInrU=; b=Y0xytoydmUnImSWShUs78XfcAgT4MQWNOLJr3wkNqud7yCK4Ix8dzQ4Pw2uk1MnyW8 w0POVcfz4ut2WuNdPBYiwDw3orUqFxO3zOSd9fzRdDGrNN6AaQwWxuWnr9C6pwKiKH0x kHL5R41jv98A7dW4OjV5rfh9jrh1AP7xQ3IUwlq54sfBG+Nw3MvZdo8S1lGin+T617Bk JzyRhmh5s8qn9taDhAYGKEGYLZTxNZUiUDA70EjdW8d1c9XmoWrrnlvNm3X5jVMvToWu 8SY4YFI7yS+xu9Cf1hVpn4e8iEbq71d/BG4iaGgZ+wm2b+c7X5YJoJjNKYVqlS+fGuV5 o/0Q== X-Gm-Message-State: AOAM530zZ0orWjrpX+Nn9vdzLPqNPXLS3c7AayTiGfhmTdA3xjk0DpFK PHiIoQMIQY/wxu9wfDUHhnvmvcbKt2w= X-Google-Smtp-Source: ABdhPJxoF+/qcYu3Da7PSaZmAENMPjDleFND+iYJdIA5FD6YvAvgnKWLL7LxdeMYwbFhM+tHyW18nA== X-Received: by 2002:a05:600c:258:: with SMTP id 24mr7340640wmj.126.1593981993901; Sun, 05 Jul 2020 13:46:33 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id g144sm51397817wme.2.2020.07.05.13.46.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jul 2020 13:46:33 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v4 01/10] hw/sd/pl181: Replace fprintf(stderr, "*\n") with error_report() Date: Sun, 5 Jul 2020 22:46:21 +0200 Message-Id: <20200705204630.4133-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200705204630.4133-1-f4bug@amsat.org> References: <20200705204630.4133-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x342.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alistair Francis , Alistair Francis Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + Some lines where then manually tweaked to pass checkpatch. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alistair Francis Message-Id: <488ba8d4c562ea44119de8ea0f385a898bd8fa1e.1513790495.git.alistair.francis@xilinx.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/pl181.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c index 2b3776a6a0..649386ec3d 100644 --- a/hw/sd/pl181.c +++ b/hw/sd/pl181.c @@ -15,6 +15,7 @@ #include "hw/sd/sd.h" #include "qemu/log.h" #include "qemu/module.h" +#include "qemu/error-report.h" #include "qapi/error.h" //#define DEBUG_PL181 1 @@ -148,7 +149,7 @@ static void pl181_fifo_push(PL181State *s, uint32_t value) int n; if (s->fifo_len == PL181_FIFO_LEN) { - fprintf(stderr, "pl181: FIFO overflow\n"); + error_report("%s: FIFO overflow", __func__); return; } n = (s->fifo_pos + s->fifo_len) & (PL181_FIFO_LEN - 1); @@ -162,7 +163,7 @@ static uint32_t pl181_fifo_pop(PL181State *s) uint32_t value; if (s->fifo_len == 0) { - fprintf(stderr, "pl181: FIFO underflow\n"); + error_report("%s: FIFO underflow", __func__); return 0; } value = s->fifo[s->fifo_pos]; -- 2.21.3