From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C91A9A0C4D; Mon, 16 Aug 2021 15:28:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 554CB40143; Mon, 16 Aug 2021 15:28:44 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2051.outbound.protection.outlook.com [40.107.20.51]) by mails.dpdk.org (Postfix) with ESMTP id 513004003C for ; Mon, 16 Aug 2021 15:28:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BbEI5k5dv0owXAU49fP5RN+16m0ej304ci3/0bPUOHM=; b=zl3HyJzyL3HHMTyYS+H5ZI44zveV0e9UkJGcUYZBfMA7aszS540quMrN4iKuCkaiWQBUm9M5iLj2RdGyjjzQvd62u56g1JpGgnKd2/oSHgy/bLJ6qVMjwPcgN8iUH0nQa6PBYsfYdtaGQ3YYOI/f1N6Q4H8VnTqJr+k7oNSaA6o= Received: from AM6P191CA0082.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:8a::23) by VI1PR08MB3551.eurprd08.prod.outlook.com (2603:10a6:803:79::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.17; Mon, 16 Aug 2021 13:28:41 +0000 Received: from VE1EUR03FT051.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8a:cafe::da) by AM6P191CA0082.outlook.office365.com (2603:10a6:209:8a::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16 via Frontend Transport; Mon, 16 Aug 2021 13:28:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT051.mail.protection.outlook.com (10.152.19.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16 via Frontend Transport; Mon, 16 Aug 2021 13:28:40 +0000 Received: ("Tessian outbound 6ba9ec11d42b:v103"); Mon, 16 Aug 2021 13:28:40 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8b8e2dd63ed9941c X-CR-MTA-TID: 64aa7808 Received: from c71a59af94d1.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5D97F452-7AA5-4DB7-B8C6-5FFE992700F5.1; Mon, 16 Aug 2021 13:28:33 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c71a59af94d1.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 16 Aug 2021 13:28:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fbhtzk4QH3YKDYHcTTHev8M+EuLH1j3iGGwZg/75KvsQC8SCWWn6N7QiwO+QeKmbDipAp9SfVnDqOvN7nGVKhLf3SDfxtiCUxi00VCsmB0L2PocxBBmnBCHBwIsk0YJS9CXmmV0XaO0656APWtR8c1k/9J5Cyjc+KS1t2JS4O7SqaCcVORCRQkA94tPkDONg66MpPArUclyOFiFikquuBEmFLw/GhBi0Yk8zYKyeFd98Y0qQfGCQDpoHdUsGxrmCO4PrfPHNtVgnNzPSBZPzyzKJGNGNxtzfT/0Q1LwZcJCz6yCSCyULI/C8NxcQc9Ttsgh+nCqyd15yIROkd1Iedw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BbEI5k5dv0owXAU49fP5RN+16m0ej304ci3/0bPUOHM=; b=PhIk/9zQlu63q5E/x1JQQMeMVjNdNHuoupZntkCn5Zuw/chNRWd4xIydxxR7L3TOZV/7XD4Yc2Mhl/vFNP29fbRWYc9QQkdg1p3TN/6o+pAk4gjMctesf/DyibD4gA9jlyCa9kvgdoPXajPjIzlE0asv97s4VaiRAgBFqPGPN+BIGAYFCQoJj/poSKuKxiqQxmtmbnFn+gwN+zwJRiwJdMfhAzn2iDAGaPfSUZ0ZDtWuYMnSQKPMhkr0Y10lHWRAFNJtl6t9mf9UNGccv8pIAdVzXAvnj/zGXFrpwpVfPECztvLh6I+24x2JPcC+JzNIPX8yj3s630XWO4DpBfJ2vg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BbEI5k5dv0owXAU49fP5RN+16m0ej304ci3/0bPUOHM=; b=zl3HyJzyL3HHMTyYS+H5ZI44zveV0e9UkJGcUYZBfMA7aszS540quMrN4iKuCkaiWQBUm9M5iLj2RdGyjjzQvd62u56g1JpGgnKd2/oSHgy/bLJ6qVMjwPcgN8iUH0nQa6PBYsfYdtaGQ3YYOI/f1N6Q4H8VnTqJr+k7oNSaA6o= Received: from VI1PR08MB4622.eurprd08.prod.outlook.com (2603:10a6:803:bc::17) by VI1PR08MB4336.eurprd08.prod.outlook.com (2603:10a6:803:fe::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.17; Mon, 16 Aug 2021 13:28:30 +0000 Received: from VI1PR08MB4622.eurprd08.prod.outlook.com ([fe80::846f:da46:d27d:edb1]) by VI1PR08MB4622.eurprd08.prod.outlook.com ([fe80::846f:da46:d27d:edb1%7]) with mapi id 15.20.4415.023; Mon, 16 Aug 2021 13:28:30 +0000 From: Dharmik Thakkar To: Stephen Hemminger CC: "thomas@monjalon.net" , "dev@dpdk.org" , nd , Ruifeng Wang , "david.marchand@redhat.com" Thread-Topic: [PATCH] checkpatch: enable volatile warning Thread-Index: AQHXFZ1dGioES/jwTEKuKHSDZ4WMkap9EJmAgABDR4CA+cYXAA== Date: Mon, 16 Aug 2021 13:28:30 +0000 Message-ID: <3F9575F7-D720-4853-ABF0-5F242B21F4C6@arm.com> References: <20210310110451.10885-1-dharmik.thakkar@arm.com> <62130884.hdUCYtv3VG@thomas> <20210310071017.157a4105@hermes.local> In-Reply-To: <20210310071017.157a4105@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=arm.com; x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: b27c9416-b6e6-48c4-fff5-08d960b9c318 x-ms-traffictypediagnostic: VI1PR08MB4336:|VI1PR08MB3551: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:2512;OLM:2512; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: uvSqizSJFg/BislGbfm9XxcsJ9eSNPdMfQhDrPUILOdUe05lMP8c4q/BvXaspMEsJpTM0i07041OeV7YUCOAbpG/8sEW+pWSceB3JiK1VRTm02VKOa92d/VzM2dv5wx4plUzmj388Usxyt5wq8ZdQZgxmrW3oloZ/5kExLMmS+6Q5tUNmVatu/JRqrgVlNTkhBn0AG2lv+wZJZlguMAXe83DW76ckbsryus1aMleF5w7Xed6lSZtbO9q25NW7/Brl63s7fBp0l/qaCcyTsXufFz0UoSiNGdlOeXHO/F/KdjOyKFY3u5r4IJcfxHeJwVZxjsdkAiTzdRiUz0aMIPkVIj6GgMXVXrHFGudbcSAyr8K4zWcBRNG70uNSRB+f+eAfFcRkHhOBoytfPET9SpYytfRggONm3wC/2m8FT919Q1zL2v5wx3lLed3CLPQgYPqY2KkptCTBQGOQMzl7Eevfi78deWF1ahcEKq+QfVyCpSEWr4r8y3sMbgXKbL3H5rPZciiw4hT/coOZLsXQGIYBkozPWdKULDFlFS54LFIoaxSy0LcI+wJsQKFdaJdE6bM/vcvv8CEfZmaEyXyb+riZ+2BbxY3XszDck5zCO3Li3QpkuEOqeKE6cc39ibzj3GKQrlPxPt+7fiNenFWdA6VjSqTufJjDOIdUzFsGYVMhPDhV+3QedhhNULbyF/mGv/bLf6MOVWIaZFPJuJAC2U12ik+DXEjsUp2WhA3HCvn0h5B9MDx5L0z9KPSDwIgW/n+ X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB4622.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(396003)(366004)(39860400002)(136003)(376002)(8676002)(54906003)(53546011)(6506007)(71200400001)(33656002)(8936002)(4326008)(26005)(186003)(478600001)(83380400001)(2616005)(86362001)(6916009)(6512007)(6486002)(76116006)(91956017)(66446008)(66556008)(66476007)(2906002)(4744005)(64756008)(316002)(5660300002)(38100700002)(122000001)(36756003)(66946007)(38070700005)(45980500001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?9CqLf/OUGn+wjxxNSGqm2qqV1tYCtCS/R+436clbPSFqq0FKL5Xl+nkVvLRr?= =?us-ascii?Q?VcpcTM4YFspViX7NxluTZK04E3+5ZwniVq5Tp4g83pCnGfLHtl+GiJTfwFOV?= =?us-ascii?Q?zDm+q6k9M7xBurFfjmvYBmdrlP1HKnxl2z/KBVtcjhplLbWqRiGwd1oUI+gA?= =?us-ascii?Q?jSFbK5hSMrIc7032YtVSsqxS+WHZmQrFmZU6mDHJPA3VTck1pip8/Ke5t4Uj?= =?us-ascii?Q?jpjWakoHPemrOgOxAb2nbXPy/TqcZx3Q63mLE6Z7DTTSPG+W12IbRoM4tzgb?= =?us-ascii?Q?Z9PBm78DiwOF9GTP9nLNK46nVvqdLMSg3e9Xzu+PQ3S8hnghe/nCjEVU14Nr?= =?us-ascii?Q?4nyxnhb1qf1MdC0F2TipHSuxROyFNoXILBWIUELYySLqp5UkCTq0AoLqtZYH?= =?us-ascii?Q?FSdxlR/0kPt4SxWiZGM2/ZhnAJOJLYmQf5Gl7nU0IZQqiKtATTAMbU+rfsdV?= =?us-ascii?Q?o8fB1HvzuQ4PAMl3xpORvH2qUq9Ms6RUTVno3qBajw5X3eMezG6omlME0kxG?= =?us-ascii?Q?aKBDT6W9MkPQN+m8UAk5QfHAUCADniol1F4ei1R/NDDSkw2JGe5a1VqwALJj?= =?us-ascii?Q?Ida4LDA+sZC/isA1nnavcwiYb5oPyIRfPPHe0HbBZl0qEr6FJqbt5+jtXCN8?= =?us-ascii?Q?SF6A0PfefXkH8zrKUhjNnIikVAqlAxq2MJ5c1ViI7XzT8k37t6NtCqxvlATn?= =?us-ascii?Q?QsOpdxVD7/qlLjzXMWOQaAUVIjkiD4gujPZ64azDGeiBZzrUO+kq1be9Iw6H?= =?us-ascii?Q?xkaqMMcGPnPJ6YKwkughZkA6CE0QjPAPm0TCWdV+MiEEm/tub1SJy+g/1g60?= =?us-ascii?Q?+jAg7snEfmZK8IW6wiWj5VF8D4jyiTTdH3yKbIep3L0z05fkOWsXx1mv7zyx?= =?us-ascii?Q?+FCNx4YJp6t/7QuHxVNsWkZ8x9AH/KooyAmK7Ir+Xrna0r7b6NgkqD+aQIwe?= =?us-ascii?Q?giZNkc+u5sugnW7YmNxuc9hSCrpkLCmwtDFLm0m3qYAMkTNIcE9DwTz1S0T2?= =?us-ascii?Q?fSdfZhpv6TaEZq5pS6yFXrmcnSXfdChjdp6t9OyOT8zNY+wb9uD/zjBmPIxA?= =?us-ascii?Q?yek/KeLk0cwCBLfLP2q2VPstRGin26V+En3CGTnjR8FrHwFHBONSxjdjUZEb?= =?us-ascii?Q?gxDIBWxhyQqKy9DYiFLoqmoF7B2MRyE8wr5zm2M2nUulBH2G01o2QJZ2rczo?= =?us-ascii?Q?UkTA+GWQlpFiWD4kcSfyP0fUHQNMfqU9BO1v6XpYd1LZl6PV0WyKruU25EPD?= =?us-ascii?Q?jeqxZRG8xQCmELpbAVJ7TaYHFTuYxdSPoc2UWX0gyVf+my2tDJUoAqfN0a5+?= =?us-ascii?Q?BALvMo425n3saD6S133aJEac?= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4336 Original-Authentication-Results: networkplumber.org; dkim=none (message not signed) header.d=none; networkplumber.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 88a9e69c-7b91-41bc-cde9-08d960b9bcdf X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0objaq8mg75VpXFoPdVp4EvQLz56BHnKNx0pd4luOrcVyfGB/RP0/EoT2+7/E13SNbdQCiX6i2vqwfQJ1B0zshS+PYuBDICnZmWnbtkVx4ypjUtkoaKgikSpbInhC2tGJPxu691B6CJprBwcnfHIgFlPXlRFoSIoPlR4XPe4ZagNXdl7SPI0Tv4zHukvJJOopGI+LiHnGQhpkVzjgqyAPAvxQSfsv9Vt0BRWjRxGcWjAb7Ok0d1hocDCJOyJkGwnYhJkxl9LqShLVMZYhcnh6ulMO1G+qTNRZeTinyWDg5JFPKXPHEdKSqpd25XCOz+q9sg00crryXGadj4DxoTfvQlWPfJ5yVwws6BEUKB15A2wGd1NxeBIS7ob2EgasbTd5BUAS4QdX2vMaHGsQFEoN7uq3uHCQxrC+BOE//IyfdM4k0CYrKrKsxsHeJ+urb86HrV4yzp4EJGfGfgoFskXzprAK6kQ/MZE+I5xA6erKsxizwWUS9WWmSkx0TalyvhLABttk/Zr9LAnl3j+hve9G6sbbaocUg7XbhssldjgXdHipLW3hk2OcqpVlD8/O3o6VOFBLOgxs09l6Gft6BVbv9SHvmTCXLTzcFUUlTFt5vTuzlveOIL2fK3dPd3Mpfc+nxZKjOAXhzgM03rB3lay3wQdiktwvHOLojl5Iph1yBZ+gek50uiWJ06Wqbu3MbJXF9WMnoKEzjSG05ROpOPDIA== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(346002)(376002)(136003)(396003)(39860400002)(46966006)(36840700001)(186003)(36756003)(107886003)(6862004)(4326008)(82310400003)(8936002)(336012)(8676002)(47076005)(33656002)(83380400001)(356005)(6512007)(82740400003)(6506007)(86362001)(54906003)(2616005)(81166007)(478600001)(70586007)(316002)(70206006)(53546011)(2906002)(26005)(5660300002)(6486002)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2021 13:28:40.5868 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b27c9416-b6e6-48c4-fff5-08d960b9c318 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT051.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3551 Subject: Re: [dpdk-dev] [PATCH] checkpatch: enable volatile warning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Apologies for the delayed response! > On Mar 10, 2021, at 9:10 AM, Stephen Hemminger wrote: >=20 > On Wed, 10 Mar 2021 12:10:01 +0100 > Thomas Monjalon wrote: >=20 >> 10/03/2021 12:04, Dharmik Thakkar: >>> Enable volatile considered harmful warning since use of volatile >>> is suspect. >>>=20 >>> Suggested-by: Stephen Hemminger >>> Signed-off-by: Dharmik Thakkar >>> Reviewed-by: Ruifeng Wang =20 >>=20 >> git grep -w volatile | wc -l >> 1796 >>=20 >> How much is it suspect? >>=20 >>=20 >=20 > Many seem to be unsafe. > testpmd: uses flags values in unsafe manner > it also uses volatile when accessing hardware registers >=20 > test-alarm is expecting that alarm() is a signal > (it is not) >=20 > test-atomic is ok > test-barrier is doing barriers and not using __atomic >=20 > drivers use volatile to mark hardware registers. >=20 > It is still true volatile is not enough are not weak memory model. Agree, and this warning should help avoid such unsafe / incorrect use of vo= latile for future patches.=