From patchwork Sun Apr 12 21:09:52 2020 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: 11484789 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E68D76CA for ; Sun, 12 Apr 2020 21:11:27 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 C2456206E5 for ; Sun, 12 Apr 2020 21:11:27 +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="TKsyfLjr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2456206E5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jNjrj-0007Da-52; Sun, 12 Apr 2020 21:10:07 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jNjrh-00072p-Qs for xen-devel@lists.xenproject.org; Sun, 12 Apr 2020 21:10:05 +0000 X-Inumbo-ID: fa21079a-7d01-11ea-83d8-bc764e2007e4 Received: from mail-wr1-x443.google.com (unknown [2a00:1450:4864:20::443]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id fa21079a-7d01-11ea-83d8-bc764e2007e4; Sun, 12 Apr 2020 21:10:03 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id i10so8378278wrv.10 for ; Sun, 12 Apr 2020 14:10:03 -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=eWubfF2iDWfZ1hbsO/IXecVFoz0dDRJS/Xj5DAW2JNo=; b=TKsyfLjrtirKrDYfamB6nSrrR1fPhrULfxHjh5dsXKznOBbWceZZrZQvEgoeZxVwzh lyJwOD9688ualAfVSJptSzKTDdFxJmthHKBJK+Zzg977Bw1z5adwWSDk7qwbN0r+btX/ VgcDBQWB1idyVqirNa1KnHS0CTnRxSpja5/oIGNROIK0uS38xV2hbPpj/ESifO26aecS t++f3fH9j6yhpg5IpeK0CdEbMOlUMsAvicHE/sEEZptPqxP5EE1D4KJgdxQse8zEOmnv WuYFZdR7TlOo5Wtd9u6MzWOwp5xvBCfBKt/2HASpFTnxjpmuCx3jFscSZH0JywZchrBM nEZg== 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=eWubfF2iDWfZ1hbsO/IXecVFoz0dDRJS/Xj5DAW2JNo=; b=oLwgYip9i337YhuotGWwIUz46Bo2ZhGvhRAhvB+a/MR8qSbgO35KCUtuLw08YS15Td w0EK4xzo8bDxhiOHoam7cvUn217oKI1fMn0c9whksqDOJRzohVEWkKeX31jy6EUU2l0J MekdU+OfZoLXduBIKyR/CJ/8YIiHJZrAarytmAauHSA+FU9bNzx7VHxoGzMutMpUGcaI r+V/McGP+ROQYJgcYVml42ybUewa9XVAbbf0mtfrXwRhAwKYdEe5vFqi+RimrXD1jcqi drIdSThKeXlJtZhLwUD0a/LCv/lQa/ojcHEa2YHM/Dk/jVyarrVbj/cFGVxqq0eOLZW+ SZ+g== X-Gm-Message-State: AGi0PuZim3CAfxE22fM38hSGO7J+ZnWbQEy4VmN1IAsbglvty16C9d44 aQIyI4Lj1Exh4FtGlXpRk1Q= X-Google-Smtp-Source: APiQypIm1u1/S0kMjoDLIIDr4V7cLU5DYZtELtqiKjq5NrnqQBzkjtQPdfba4f3psDwbQLE84Uft9A== X-Received: by 2002:adf:cc8c:: with SMTP id p12mr15464439wrj.165.1586725803042; Sun, 12 Apr 2020 14:10:03 -0700 (PDT) Received: from localhost.localdomain (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id o16sm12553602wrs.44.2020.04.12.14.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Apr 2020 14:10:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.1 1/3] target: Remove unnecessary CPU() cast Date: Sun, 12 Apr 2020 23:09:52 +0200 Message-Id: <20200412210954.32313-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200412210954.32313-1-f4bug@amsat.org> References: <20200412210954.32313-1-f4bug@amsat.org> MIME-Version: 1.0 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , David Hildenbrand , Jason Wang , Mark Cave-Ayland , BALATON Zoltan , Gerd Hoffmann , "Edgar E. Iglesias" , Stefano Stabellini , qemu-block@nongnu.org, Paul Durrant , Markus Armbruster , Halil Pasic , Christian Borntraeger , Aleksandar Markovic , Joel Stanley , Anthony Perard , xen-devel@lists.xenproject.org, David Gibson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost , Corey Minyard , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?C?= =?utf-8?q?=C3=A9dric_Le_Goater?= , John Snow , Richard Henderson , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Andrew Jeffery , Cornelia Huck , Laurent Vivier , qemu-ppc@nongnu.org, Paolo Bonzini , Aurelien Jarno , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The CPU() macro is defined as: #define CPU(obj) ((CPUState *)(obj)) Remove an unnecessary CPU() cast. Patch created mechanically using spatch with this script: @@ typedef CPUState; CPUState *s; @@ - CPU(s) + s Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson Reviewed-by: Cédric Le Goater --- target/ppc/mmu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c index 86c667b094..8972714775 100644 --- a/target/ppc/mmu_helper.c +++ b/target/ppc/mmu_helper.c @@ -1820,7 +1820,7 @@ static inline void do_invalidate_BAT(CPUPPCState *env, target_ulong BATu, if (((end - base) >> TARGET_PAGE_BITS) > 1024) { /* Flushing 1024 4K pages is slower than a complete flush */ LOG_BATS("Flush all BATs\n"); - tlb_flush(CPU(cs)); + tlb_flush(cs); LOG_BATS("Flush done\n"); return; }