From patchwork Mon Feb 27 14:01:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 657065 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2380022wrb; Mon, 27 Feb 2023 06:26:08 -0800 (PST) X-Google-Smtp-Source: AK7set9T/nt6f/RbP/ygILwW/4doPuoCHI4kuFmI0ELlw8WdWrpTbyvIAN2OrBru8Pw8RxHLn3+o X-Received: by 2002:ad4:5ec6:0:b0:56e:9dd8:4812 with SMTP id jm6-20020ad45ec6000000b0056e9dd84812mr51981882qvb.3.1677507968265; Mon, 27 Feb 2023 06:26:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507968; cv=none; d=google.com; s=arc-20160816; b=Wd5J6Gzv6DSZVPu+IZbpQ+xeRtLEuFXb5lCPsyrHsMvqAVSecYJYRh2ntgLeVYaTQi PtayD/4VYMbdvcmAsE5wR6l9SCj3gv6IyS0XDIPD5/4pltvtQv3VmjWYYgHEqOJ3k+O8 yvy3Y6QyLo0tuXgLLLwN+gwPQDFs/bdmACAVONX1DXLNEmhpSmwWFUXtsJnJH3ll9+1Z qxkSXwP0TuT1kjjZ3Xd5ITOlyKwU57G7ljsFzWvhdmM83NCf8iw0QwV7CCedxTTGzEVs XIV9NbVQGSpdP5Nip44KYRGx0qUasfhZDTjUBx524MORxPF0dYOq2973l/uMOk8eQDAC xxcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=SxuGCiDEM4B0M1G1+5/Ku1B4TwdzfOaRDWtMa7ZXM5M=; b=bvxg1L6TKMfY3pkTlIR+Bt0XK0Ts/JClhEB8NdXTYlCehtQa7pBf433s3RgWxEcwuK 4r9k91Ntg0JsqK3lKtL6KvAD9HB4CAtk4jpny1E7zpSTRlFeC8x1xCbSXM+Yv25MnMNF lQ6TG41jkcN9/r08AqR2Tdw91KcJAbnOJGd7JSZ2Hek8hw1JiR1NEXZNMbXI3kjJozhS qACRbXPAGyKPTF5sO6l4i7ZI0paPQ5USUAlqudv5mtq1IzfXT0kF80yEKlp/3CBO4rK7 pi14QxFR0T5caUmaCQuurYorYO2s1ksbhS5zBMVvp81Bm2BkWMwnPaQaVMaZ3A61rnSQ MI1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v+ngnNRk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d4-20020a0cf0c4000000b0056eb1bfcb15si6296398qvl.76.2023.02.27.06.26.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:26:08 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v+ngnNRk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWeFR-0002ac-Km; Mon, 27 Feb 2023 09:13:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWeE3-0000Km-IH for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:40 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeDx-000197-Pn for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:34 -0500 Received: by mail-wr1-x434.google.com with SMTP id bw19so6335184wrb.13 for ; Mon, 27 Feb 2023 06:11:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=SxuGCiDEM4B0M1G1+5/Ku1B4TwdzfOaRDWtMa7ZXM5M=; b=v+ngnNRkK7KZt97Puyy/+fqfZ5hLZm83yxqPNlUUDN+0ZA0XBDT7CICfJ99fWbaWOK rgHVu+0w8BWvQ/ebU2boa/W+AiIXh8/BcDdNPYWYUHe3ZN97ywpxYWsltKhR3HQ4EPjn E0EYrrwcTyeySZuvPcX7gs3QLXgFWVBF3DTeJ5iym/XwMA9lH9KPbn6hPIfevbveZ8Jv I+MWGA2lH2HLVin3zoZ78SpCaedtQQbtmhbbxDRlZYVJlxCF9V5bCIc1Yq7/NpAaqmJL 3NYacHnYXYIsphADR/PjNGXM9aAeoBpfUmT9ahCE24bzriGGXV2mr2RwOTwDYpj8IPZG g92w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SxuGCiDEM4B0M1G1+5/Ku1B4TwdzfOaRDWtMa7ZXM5M=; b=cOE114oCNXiBxUP2LbLNBTZ6enwm0pF61kdBH/MPbFyktm5qbrJvYF1EjkWoEqtXIu nnT13JgK9clvIpqC8v8t1Z+ufSw6dREdypZeU8IdIOo6yl2S4ag7F2FLBMjrXmNSzIj+ EBBesr5sJQ9RfNsVr+c7ON9+ezKrnSnWcFK3pcYhwqvlAPXYbBwknwM5prjaZRx2oO+S 9kBwkz6OQQvDwqntjgp7N2lNTIejGrMlMrqmL+uj33FWo0JjYi+DAIlxjshKOBAYW2vQ EDEqPUnf3EL9NrGGZOkGAzbXhbtvZ0xxXIJjdCUsj4WXgqSS1FmIJqoTrQESa1Ak2gOh /6HQ== X-Gm-Message-State: AO0yUKX5xJd5L8p7HQIlR887Up1ptVhhMFl3MWY6I++Bg1ZyTcXh2Y5o YLFRORzDCzl+sBbIPM4NXqBuWRKV9ml04Owb X-Received: by 2002:adf:f887:0:b0:2c7:f82:827a with SMTP id u7-20020adff887000000b002c70f82827amr11809947wrp.19.1677507081761; Mon, 27 Feb 2023 06:11:21 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id x6-20020adff646000000b002c56046a3b5sm7059757wrp.53.2023.02.27.06.11.20 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:11:21 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 110/126] hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd() Date: Mon, 27 Feb 2023 15:01:57 +0100 Message-Id: <20230227140213.35084-101-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org ide_exec_cmd() operates on a IDEBus; rename it as ide_bus_exec_cmd() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_exec_cmd/ide_bus_exec_cmd/g' \ $(git grep -wl ide_exec_cmd) Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-14-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ahci.c | 2 +- hw/ide/core.c | 6 +++--- hw/ide/trace-events | 2 +- include/hw/ide/internal.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 316dbb97d3..e6498964af 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1269,7 +1269,7 @@ static void handle_reg_h2d_fis(AHCIState *s, int port, cmd->status = 0; /* We're ready to process the command in FIS byte 2. */ - ide_exec_cmd(&s->dev[port].port, cmd_fis[2]); + ide_bus_exec_cmd(&s->dev[port].port, cmd_fis[2]); } static int handle_cmd(AHCIState *s, int port, uint8_t slot) diff --git a/hw/ide/core.c b/hw/ide/core.c index 5897411b95..1be0731d1a 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1327,7 +1327,7 @@ void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val) case ATA_IOPORT_WR_COMMAND: ide_clear_hob(bus); qemu_irq_lower(bus->irq); - ide_exec_cmd(bus, val); + ide_bus_exec_cmd(bus, val); break; } } @@ -2123,13 +2123,13 @@ static bool ide_cmd_permitted(IDEState *s, uint32_t cmd) && (ide_cmd_table[cmd].flags & (1u << s->drive_kind)); } -void ide_exec_cmd(IDEBus *bus, uint32_t val) +void ide_bus_exec_cmd(IDEBus *bus, uint32_t val) { IDEState *s; bool complete; s = idebus_active_if(bus); - trace_ide_exec_cmd(bus, s, val); + trace_ide_bus_exec_cmd(bus, s, val); /* ignore commands to non existent slave */ if (s != bus->ifs && !s->blk) { diff --git a/hw/ide/trace-events b/hw/ide/trace-events index 5ef344ae73..57042cafdd 100644 --- a/hw/ide/trace-events +++ b/hw/ide/trace-events @@ -12,7 +12,7 @@ ide_data_writew(uint32_t addr, uint32_t val, void *bus, void *s) ide_data_readl(uint32_t addr, uint32_t val, void *bus, void *s) "IDE PIO rd @ 0x%"PRIx32" (Data: Long); val 0x%08"PRIx32"; bus %p; IDEState %p" ide_data_writel(uint32_t addr, uint32_t val, void *bus, void *s) "IDE PIO wr @ 0x%"PRIx32" (Data: Long); val 0x%08"PRIx32"; bus %p; IDEState %p" # misc -ide_exec_cmd(void *bus, void *state, uint32_t cmd) "IDE exec cmd: bus %p; state %p; cmd 0x%02x" +ide_bus_exec_cmd(void *bus, void *state, uint32_t cmd) "IDE exec cmd: bus %p; state %p; cmd 0x%02x" ide_cancel_dma_sync_buffered(void *fn, void *req) "invoking cb %p of buffered request %p with -ECANCELED" ide_cancel_dma_sync_remaining(void) "draining all remaining requests" ide_sector_read(int64_t sector_num, int nsectors) "sector=%"PRId64" nsectors=%d" diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index cc95cd47a0..11a4931ef9 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -622,7 +622,7 @@ int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2); void ide_bus_set_irq(IDEBus *bus); void ide_bus_register_restart_cb(IDEBus *bus); -void ide_exec_cmd(IDEBus *bus, uint32_t val); +void ide_bus_exec_cmd(IDEBus *bus, uint32_t val); void ide_transfer_start(IDEState *s, uint8_t *buf, int size, EndTransferFunc *end_transfer_func);