From patchwork Thu Apr 9 09:48:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Behme X-Patchwork-Id: 11481517 X-Patchwork-Delegate: geert@linux-m68k.org 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 514C51744 for ; Thu, 9 Apr 2020 09:48:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 26C8F214DB for ; Thu, 9 Apr 2020 09:48:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=de.bosch.com header.i=@de.bosch.com header.b="nLcpmftl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726654AbgDIJs4 (ORCPT ); Thu, 9 Apr 2020 05:48:56 -0400 Received: from de-out1.bosch-org.com ([139.15.230.186]:37096 "EHLO de-out1.bosch-org.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725970AbgDIJs4 (ORCPT ); Thu, 9 Apr 2020 05:48:56 -0400 Received: from si0vm1948.rbesz01.com (unknown [139.15.230.188]) by fe0vms0186.rbdmz01.com (Postfix) with ESMTPS id 48ybv961Slz1XLFjw; Thu, 9 Apr 2020 11:48:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=de.bosch.com; s=key3-intmail; t=1586425733; bh=QQnWX1HHy6PykuHJlNj2nWQVf1g9ixSCCO3f33fTj/w=; l=10; h=From:Subject:From:Reply-To:Sender; b=nLcpmftlXqqFa5ADSqD9os+b51jSIj/2quYJ8/uAos+oJ9mJtOW0p2AJ2Ci8CFPII JoXx50REOvhdEPNHEUSuE13zd19AcKb+7mgtdOqa0x8LHTcVQsHy8PjEcnDVQeuHxY NufTiVWY5FrQnDpsbUxJyPmkf5Bn5V25I/XP0wek= Received: from fe0vm1741.rbesz01.com (unknown [10.58.172.176]) by si0vm1948.rbesz01.com (Postfix) with ESMTPS id 48ybv95Zwpz5vq; Thu, 9 Apr 2020 11:48:53 +0200 (CEST) X-AuditID: 0a3aad15-2e9ff7000000622b-10-5e8eef852a39 Received: from si0vm1949.rbesz01.com ( [10.58.173.29]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by fe0vm1741.rbesz01.com (SMG Outbound) with SMTP id CD.20.25131.58FEE8E5; Thu, 9 Apr 2020 11:48:53 +0200 (CEST) Received: from SI-HUB2000.de.bosch.com (si-hub2000.de.bosch.com [10.4.103.108]) by si0vm1949.rbesz01.com (Postfix) with ESMTPS id 48ybv94011z6CjZNv; Thu, 9 Apr 2020 11:48:53 +0200 (CEST) Received: from HI-Z0EVG.hi.de.bosch.com (10.34.218.219) by SI-HUB2000.de.bosch.com (10.4.103.108) with Microsoft SMTP Server id 15.1.1979.3; Thu, 9 Apr 2020 11:48:53 +0200 From: Dirk Behme To: , Sergei Shtylyov CC: , , Julia Lawall Subject: [PATCH v2 1/2] ravb: Fix RAVB_RXTSTAMP_TYPE_ALL value Date: Thu, 9 Apr 2020 11:48:50 +0200 Message-ID: <20200409094851.22142-1-dirk.behme@de.bosch.com> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Originating-IP: [10.34.218.219] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrBLsWRmVeSWpSXmKPExsXCZbVWVrf1fV+cQUuTusXc2ZMYLZpW9TNb bH35jsnizKpb7A4sHg+m/mfymHhW12PSi0MsHp83yQWwRHHZpKTmZJalFunbJXBlrHz4kb3g I3dFx70drA2Ms7i6GDk5JARMJCZOP83UxcjFISQwg0li0qLJbBDOfkaJM5v+MkI46xklti77 yA7SwiagJbFzQgeYLSIQL9GyoYUNxGYWSJBY0nCLGcQWFrCT+LW6gxHEZhFQkZg/7TYriM0r YCNx/H4jE8RqeYlpq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ux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org In the function ravb_hwtstamp_get() in ravb_main.c with the existing values for RAVB_RXTSTAMP_TYPE_V2_L2_EVENT (0x2) and RAVB_RXTSTAMP_TYPE_ALL (0x6) if (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE_V2_L2_EVENT) config.rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT; else if (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE_ALL) config.rx_filter = HWTSTAMP_FILTER_ALL; if the test on RAVB_RXTSTAMP_TYPE_ALL should be true, it will never be reached. Correct this by changing RAVB_RXTSTAMP_TYPE_ALL to 0x4. Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") Reported-by: Julia Lawall Suggested-by: Sergei Shtylyov Signed-off-by: Dirk Behme Reviewed-by: Sergei Shtylyov --- Changes in v2: Split fix and cleanup into two patches. drivers/net/ethernet/renesas/ravb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h index 9f88b5db4f89..e921eae82022 100644 --- a/drivers/net/ethernet/renesas/ravb.h +++ b/drivers/net/ethernet/renesas/ravb.h @@ -41,7 +41,7 @@ #define RAVB_RXTSTAMP_VALID 0x00000001 /* RX timestamp valid */ #define RAVB_RXTSTAMP_TYPE 0x00000006 /* RX type mask */ #define RAVB_RXTSTAMP_TYPE_V2_L2_EVENT 0x00000002 -#define RAVB_RXTSTAMP_TYPE_ALL 0x00000006 +#define RAVB_RXTSTAMP_TYPE_ALL 0x00000004 #define RAVB_RXTSTAMP_ENABLED 0x00000010 /* Enable RX timestamping */ enum ravb_reg { From patchwork Thu Apr 9 09:48:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Behme X-Patchwork-Id: 11481519 X-Patchwork-Delegate: geert@linux-m68k.org 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 6E3881805 for ; Thu, 9 Apr 2020 09:48:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E053221EA for ; Thu, 9 Apr 2020 09:48:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=de.bosch.com header.i=@de.bosch.com header.b="Geihg/He" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725970AbgDIJs4 (ORCPT ); Thu, 9 Apr 2020 05:48:56 -0400 Received: from de-out1.bosch-org.com ([139.15.230.186]:55272 "EHLO de-out1.bosch-org.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726632AbgDIJs4 (ORCPT ); Thu, 9 Apr 2020 05:48:56 -0400 Received: from fe0vm1649.rbesz01.com (unknown [139.15.230.188]) by si0vms0217.rbdmz01.com (Postfix) with ESMTPS id 48ybv973dSz4f3lwd; Thu, 9 Apr 2020 11:48:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=de.bosch.com; s=key3-intmail; t=1586425734; bh=Emk+oCatsj2UF/58rIn7CY0omkGnijASbVgyPSDoea8=; l=10; h=From:Subject:From:Reply-To:Sender; b=Geihg/HejHHOFwlvAV39mNZ6o0nGfJoc6En/3Xk6U9AtNmaUcwcsNdrWHEwT7hV2u Ac2JLAGSndg1Aef4I+3PsZxZZAzUqxvWnZk7PZyAk8EacBd64akUNgn0B/hAWigXXd 5x53rf180EoXXl/e0HgLC1LKAkuZQVsCWwt/fA6A= Received: from si0vm2082.rbesz01.com (unknown [10.58.172.176]) by fe0vm1649.rbesz01.com (Postfix) with ESMTPS id 48ybv96qf0z2cL; Thu, 9 Apr 2020 11:48:53 +0200 (CEST) X-AuditID: 0a3aad16-993ff70000002671-70-5e8eef85e3d3 Received: from fe0vm1651.rbesz01.com ( [10.58.173.29]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by si0vm2082.rbesz01.com (SMG Outbound) with SMTP id 4C.7B.09841.58FEE8E5; Thu, 9 Apr 2020 11:48:53 +0200 (CEST) Received: from SI-HUB2000.de.bosch.com (si-hub2000.de.bosch.com [10.4.103.108]) by fe0vm1651.rbesz01.com (Postfix) with ESMTPS id 48ybv95XM2zvl5; Thu, 9 Apr 2020 11:48:53 +0200 (CEST) Received: from HI-Z0EVG.hi.de.bosch.com (10.34.218.219) by SI-HUB2000.de.bosch.com (10.4.103.108) with Microsoft SMTP Server id 15.1.1979.3; Thu, 9 Apr 2020 11:48:53 +0200 From: Dirk Behme To: , Sergei Shtylyov CC: , Subject: [PATCH v2 2/2] ravb: Drop unused RAVB_{R,T}XTSTAMP_VALID macros Date: Thu, 9 Apr 2020 11:48:51 +0200 Message-ID: <20200409094851.22142-2-dirk.behme@de.bosch.com> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20200409094851.22142-1-dirk.behme@de.bosch.com> References: <20200409094851.22142-1-dirk.behme@de.bosch.com> MIME-Version: 1.0 X-Originating-IP: [10.34.218.219] X-Brightmail-Tracker: H4sIAAAAAAAAA22SbUxTZxTHedoObptec7mIHDsQuY6FobC2jNkhItsXyYyDLIzMAWXFXmhn W7AXGsBlFgTDqGKZQRjC4tgwFdgbiswXfCk4wQyGTpGXD+CCszBEawEHiK4vIP2wbyfnf37n f55/HoxNnvESYEpNDq3VyFSUJ4/Di/ohIKzkUblUeGExQlJ3/CskaR2fYkl+bxzyimXHjVa+ YMVV9ITF2VrWJbA/4UXLaZVSR2vfjPmUp3jx/CAnW4/lPe196qVHDzzLEBcD4i241lWJyhAP I4lqFvxWUchyCCRxEcGA9TOX8BOC1pNWL4fgSYTCOWOps15NpEHxz8XOTWxCAnNTY07Yh4gD w0KRc4ZDvAb35w3OGieiYeFiB9vlHAjHmsqc81xiK4zYBuxXYHazaDh6l3KNe0P312Mc1/pA ONB6nO2qAa5aLEtrgqC55twrRuRd44bUuCE1bsgJxG5EvoxSqFOLhRJxuDadZgqEovDdWeoW 5Mp3za+orexxuBmxMGRGkRiL8sXP3y+XkqvSs+T5ChmjSNPmqmiGEuD7J79MJX1etpncdLWS YZRZGjMCjE2txncUHZaSuFyWX0Brs1yYGb2KcSg/3Je3T0oSmbIceg9NZ9PaZXULhlGAL07Z Db21dCadl6FU5SzLVACOPDw8yDXuirstC+OaUQTGt3uPO27GmWyZmlFmLuFrXTi53F1Bb6DN Aj/c6rAlHKoiV/PSVeCPi5vsD/F1E1bICTSIMET54FIHzLf/1hU/wPWOiLyXmiuQuMHOEKUc +PdQBQcK65/wwfLsWxKsC1W+MDlS6AcXxuoFcFrfHADm24MhYGp4Fgq2quJNMG89FAXN04Pv ga2mcCdMt9V+AJVzffEwNDL8oX2kMwkquydTobyxUwZzdTdlYKo4KIfTAzflcLmwNBNmrjxU QPftb5QwcrZnD1gW6tQwPTyvhurZMxqobpnRwJHemb1wdPFK7oQ9TJY9zP50gyPMHFnO/4S5 1F15nUDPOsyIB+rfjjYGH/P/Z6xdsu6xqTfI7G0MoGrbh4MnFjYmq4NwuoNtmFnVx4U0U16/ 7U/+RlHifG3D2s6I65ctLT5xf2/5PHhoW2Ksqf0NzmhY/q1T/SElmx6ISn6MtySn9Yhmu6VN hqZdmmvJgZakjK7tjO11of/6R7noO4lYN963u0txomR468m5gdiQmDs6ML5f9kubz35uwdl7 locf9eTJJ97x7GhPKFCRz7eZ7p33l1yPT9Hcok/d+T5m2K9I05owbdnsOWLQfeG1V/vHbFL1 jlD5u39tvxq5XnUpfqgrdd8BfpQ0T/PxaIYl9sbdxMFdl6IiU/ixT5TBKRtSpVWJFIdRyESh bC0j+w8WZA9GxwQAAA== Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org These macros are unused, we can safely drop them. Cleanup only, no functional change. Suggested-by: Sergei Shtylyov Signed-off-by: Dirk Behme Reviewed-by: Sergei Shtylyov --- Changes in v2: Split fix and cleanup into two patches. drivers/net/ethernet/renesas/ravb.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h index e921eae82022..5a05b74a6fe6 100644 --- a/drivers/net/ethernet/renesas/ravb.h +++ b/drivers/net/ethernet/renesas/ravb.h @@ -35,10 +35,8 @@ #define RAVB_ALIGN 128 /* Hardware time stamp */ -#define RAVB_TXTSTAMP_VALID 0x00000001 /* TX timestamp valid */ #define RAVB_TXTSTAMP_ENABLED 0x00000010 /* Enable TX timestamping */ -#define RAVB_RXTSTAMP_VALID 0x00000001 /* RX timestamp valid */ #define RAVB_RXTSTAMP_TYPE 0x00000006 /* RX type mask */ #define RAVB_RXTSTAMP_TYPE_V2_L2_EVENT 0x00000002 #define RAVB_RXTSTAMP_TYPE_ALL 0x00000004