From patchwork Fri Sep 4 13:14:01 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: 1357455 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=t0S8DNfy; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4BjdSF6Jdlz9sVf for ; Fri, 4 Sep 2020 23:14:36 +1000 (AEST) Received: from localhost ([::1]:46946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEBY2-0006UN-68 for incoming@patchwork.ozlabs.org; Fri, 04 Sep 2020 09:14:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEBXd-0006S4-N8; Fri, 04 Sep 2020 09:14:09 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:35549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kEBXc-0002Yd-7N; Fri, 04 Sep 2020 09:14:09 -0400 Received: by mail-wr1-x441.google.com with SMTP id e16so6735694wrm.2; Fri, 04 Sep 2020 06:14:07 -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=pUn9OQfvIDUS2owgm25WBMJmc8HrxsJALivDp1WyLus=; b=t0S8DNfyCrw+6326yuho28EHfZtwxIw2KXDtB7c1/BmmgEjUjwLdfMBa9DLaUUclF4 Z6R9aL1+T2Tb8asyj5NGO+fpTKy4XP4BBFzflUfWLhMdkVLnmdIGR0MVOTG6AioxT94B nluhSIlNlK75VjoMOuqyIUpDfgfLIkDiUL7Tjk9ka2OtaRrkq+Rr3dAt+ENeRhY3uoBQ CR1uoW0RLH2OaYm+guWvS6uLqosEIneYPtvRV8X+FlEJdbxtFlVpnDVBTfFAkU84IUJA 5PMkp7uSblXCLsMPz1smHQax/gsJeRpbxCBEpUhNmIOrVQLBlHYMt17dut3/LdxJUMcl CIkw== 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=pUn9OQfvIDUS2owgm25WBMJmc8HrxsJALivDp1WyLus=; b=DP4Y8rIVj63cNmmjmlOZuuj5ExaSLUfkLJeATthQ+/v0ydN2JYnBdxCZ1r9B6AgQBu paQauOikYjfcVCNBKOLaIPmWftODs5kXrAhBqgcejboYh4xFjgLkMNIDHhomF9lx+ChM 5+0LsmJgh3UN14E2FbMOyPLSiyRzUUDv1Oi66Yg3DsFGItdFNTlhLXLZduj5vzjyi3fS uBz9Ee8woZU5G0kVZe7wgz+iQqidS3Nqk9+oehiwQBG9C1Zw+S+pss7fKBjTpGRNL+a8 veJie9Qmc3ry7kc3l+0C4KhNmiJV6BeEI0OY2s+5No2q76rppqSr0+JQ2icelIYsQasY nFNQ== X-Gm-Message-State: AOAM533TAU+myAw724MZZ4CG13Xb++eetSBvD9MmO5AFJHBIdAOPm+SM Jk2aHCcXwPExeTS0Cap5iksTvyF+Bn4= X-Google-Smtp-Source: ABdhPJzLV6g4Dgv0eESpOeTF74h/1V0KaOo6HQFhbeKOhVGKSk2d5pysLascdKoRlEYpoWXXWoC/uw== X-Received: by 2002:a5d:45c9:: with SMTP id b9mr7477835wrs.283.1599225246129; Fri, 04 Sep 2020 06:14:06 -0700 (PDT) Received: from localhost.localdomain (50.red-83-52-54.dynamicip.rima-tde.net. [83.52.54.50]) by smtp.gmail.com with ESMTPSA id b1sm11923559wru.54.2020.09.04.06.14.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2020 06:14:05 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/2] hw/net/e1000e: Remove overwritten read handler for STATUS register Date: Fri, 4 Sep 2020 15:14:01 +0200 Message-Id: <20200904131402.590055-2-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200904131402.590055-1-f4bug@amsat.org> References: <20200904131402.590055-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x441.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: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no 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: qemu-trivial@nongnu.org, Jason Wang , Dmitry Fleytman , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The STATUS register readop handler is initialized first with the generic e1000e_mac_readreg() handler: 2861 #define e1000e_getreg(x) [x] = e1000e_mac_readreg 2862 typedef uint32_t (*readops)(E1000ECore *, int); 2863 static const readops e1000e_macreg_readops[] = { .... 2919 e1000e_getreg(STATUS), Then overwritten with the specific e1000e_get_status handler: 3018 [STATUS] = e1000e_get_status, To avoid confusion, remove the overwritten initialization. 6f3fbe4ed0 ("net: Introduce e1000e device emulation") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Li Qiang --- hw/net/e1000e_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index bcd186cac52..5170e6a4563 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -2916,7 +2916,6 @@ static const readops e1000e_macreg_readops[] = { e1000e_getreg(TSYNCRXCTL), e1000e_getreg(TDH), e1000e_getreg(LEDCTL), - e1000e_getreg(STATUS), e1000e_getreg(TCTL), e1000e_getreg(TDBAL), e1000e_getreg(TDLEN), From patchwork Fri Sep 4 13:14:02 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: 1357457 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=KAMmVWiH; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4BjdSN1kkwz9sVd for ; Fri, 4 Sep 2020 23:14:44 +1000 (AEST) Received: from localhost ([::1]:48018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEBYA-0006ux-5l for incoming@patchwork.ozlabs.org; Fri, 04 Sep 2020 09:14:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEBXf-0006Ti-9H; Fri, 04 Sep 2020 09:14:11 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:54195) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kEBXd-0002Z9-MM; Fri, 04 Sep 2020 09:14:10 -0400 Received: by mail-wm1-x341.google.com with SMTP id u18so6042753wmc.3; Fri, 04 Sep 2020 06:14:08 -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=U5Nf/dsZpglT/fNEe0BRVA0EwoDYwFpAKvTQELhkWw4=; b=KAMmVWiH0poKB9PnqGwd+tjUHSvmueCm+6am8OJxcwedZtKRAsfzUZMnQbLSoDMD45 VhsfaSjOzSyf1MbjQgBOnDxMipDNNdxKtoPFwI3moFBR+fMNsIFLtUJbCIRWnTZzisuc qx1Awuik+C7kIOFJ7ufhCexGCUHwbVi7thw4xvZREmpCRcuNP2oaZHZoEPVkQWmX7Ui5 HlORwErw9oiGE6QIv1dymPd+MSu3ptXulCdjB22RD4SdtdGp+3i95t9LZvKHBeRlPzJy AHnYKftmfEnvL/WRz6jDp2AOaPJNKr7k2BrSeuoxaR/Kh875oOxm5r+xX01buk88gQHM tRQQ== 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=U5Nf/dsZpglT/fNEe0BRVA0EwoDYwFpAKvTQELhkWw4=; b=RVggC94apX1b5OxhdT0pyQy33+Rju3dA191U0JseaEg2dSrzd32Bw+qMtzLqqg75MI yR1BC4AqE7GzsqGU9fT41FYM1w7TTvVgC440NvHm51Nus65hhdlZeWDKV032qvskQsEK Gj6+BVsnwZJ8T5TwJ4K4U9XYij8zP994f2l4MxH4lI/Gk5gLcU05tYd4U4jE21YKbZA6 vxbvZZ1PckpeHMI6DE3uJFVFfHSIsPKOgPzlaSWg/xaqS6u0SmFHCc8cbhAvo0LAfG+l B+ctVxXasfE5dOPgK1IcW4gyp/toRs/P05jS4V6rYNZTKBSqC2DKlwmHxTcl3Lq6sJhd IKvw== X-Gm-Message-State: AOAM5325iNJaoJ2gKQGhD9Ww7tF7pvT2EMPDtuISQwptSY2HhH/NPs7p NsEsKIF8o/YB01q33kVPf2jmA0aDF1A= X-Google-Smtp-Source: ABdhPJz/7kZSdD5rrx50dbwD7r+e+fFO+u6K2DTvGPgX0raKlN4ET7nL7jY044irKs3XMBfD1DrSkg== X-Received: by 2002:a1c:b703:: with SMTP id h3mr7474239wmf.131.1599225247743; Fri, 04 Sep 2020 06:14:07 -0700 (PDT) Received: from localhost.localdomain (50.red-83-52-54.dynamicip.rima-tde.net. [83.52.54.50]) by smtp.gmail.com with ESMTPSA id b1sm11923559wru.54.2020.09.04.06.14.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2020 06:14:07 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/2] hw/net/e1000e: Remove duplicated write handler for FLSWDATA register Date: Fri, 4 Sep 2020 15:14:02 +0200 Message-Id: <20200904131402.590055-3-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200904131402.590055-1-f4bug@amsat.org> References: <20200904131402.590055-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::341; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x341.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: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no 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: qemu-trivial@nongnu.org, Jason Wang , Dmitry Fleytman , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The FLSWDATA register writeop handler is initialized twice: 3067 #define e1000e_putreg(x) [x] = e1000e_mac_writereg 3068 typedef void (*writeops)(E1000ECore *, int, uint32_t); 3069 static const writeops e1000e_macreg_writeops[] = { .... 3102 e1000e_putreg(FLSWDATA), .... 3145 e1000e_putreg(FLSWDATA), To avoid confusion, remove the duplicated initialization. Fixes: 6f3fbe4ed0 ("net: Introduce e1000e device emulation") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Li Qiang --- Noticed after looking for other cases of the previous patch. --- hw/net/e1000e_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index 5170e6a4563..bcfd46696ff 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -3141,7 +3141,6 @@ static const writeops e1000e_macreg_writeops[] = { e1000e_putreg(RXCFGL), e1000e_putreg(TSYNCRXCTL), e1000e_putreg(TSYNCTXCTL), - e1000e_putreg(FLSWDATA), e1000e_putreg(EXTCNF_SIZE), e1000e_putreg(EEMNGCTL), e1000e_putreg(RA),