From patchwork Fri Aug 18 14:57:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 110414 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp940878obb; Fri, 18 Aug 2017 08:02:47 -0700 (PDT) X-Received: by 10.98.8.65 with SMTP id c62mr6755154pfd.267.1503068567688; Fri, 18 Aug 2017 08:02:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503068567; cv=none; d=google.com; s=arc-20160816; b=I/05/I1OVS51GauA/nq/JZLsTTmMnwkKCbB6WvqmK/1ZdWAy39sIeljCEM1dhUfYSW oW62EcmZOb3Q4u0ilBwFPfoGkUthBbf5LWhBfUCWJOvoEOJSsZJUxL05HVNghIz76jOl EUbjr04YmFLYn+frm1UScCOTd5ePU03//4us7tUluBSCnubXtENOO8e4KjKjEICHxfVV /2eTL8WMMsWS2XwPgpn7TdiZ53QPXYHGJNhUhdHF/PzXRAI6IMaEnVUoMZgmLGUUrciJ TpJBZ8eBpoGaR9DL3R/dF9A/jUpzJ8w8nvU0F4bEDXQqxck5RbS9GShUaZsgbB4YlylA +iMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=uX0uyMCufOG8b9/c8UBYPdTmoYq7a9dgxgr6LSzlg8k=; b=y9JErYuQ/5JjYvvgpEMSVSQ13jXwarw+a6vw07Sr7JP5hTrV4B0UrOy8qAwr+w/cqA T4chupjz+NtzvFvifz7q9M5yh9072F+o7SQQ374s1j/HK9Oe4U4F8CqDmv6cHBZvvwRo lmUf9u21+rFnqIff0LZjhVfcsUSOk54OlZvzOgMoqrFVu+WWz5S/T1KAHNqJI/nRqRwu l91rFq+qfoPrlGgjvlX02t3Cv51lxBr5oUjj3SRD/DNFja0VunopYc8djMgfwq9JZrYw pQLhyzHBWN8XHslq8jSVlzFBsBKktdXZEhJh5UD2Ll6+aylCrwNky452xUzF89IGaoYb hs/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=t1MOUINa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m37si4101794plg.553.2017.08.18.08.02.47; Fri, 18 Aug 2017 08:02:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=t1MOUINa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752813AbdHRPCp (ORCPT + 26 others); Fri, 18 Aug 2017 11:02:45 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:19583 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752204AbdHRO6n (ORCPT ); Fri, 18 Aug 2017 10:58:43 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v7IEwcMq007559; Fri, 18 Aug 2017 09:58:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1503068318; bh=k3rKXzZcCVcNr6kT1pu3mg+aA8XcznWbkqB7CAvhhUo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=t1MOUINaJkPfcO8yKRJjIyk+aPpCNhQI8iZXtm66xdyTBe2EEVo6CD0gX9BPBKpBq z02851MQyevaqx0HZge1x9e2tEjpf4bfjffAqm8pXOI36RUQadaLtNhnhotEDvP2q2 ajlTP4UW5nhyRTx9vjDumT948cXuBwtZfJlM9jQw= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7IEwcLW002831; Fri, 18 Aug 2017 09:58:38 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Fri, 18 Aug 2017 09:58:38 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Fri, 18 Aug 2017 09:58:37 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Fri, 18 Aug 2017 09:58:37 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7IEwKk3023721; Fri, 18 Aug 2017 09:58:35 -0500 From: Kishon Vijay Abraham I To: Bjorn Helgaas CC: Joao Pinto , Arnd Bergmann , , , , , , Subject: [PATCH 05/18] PCI: endpoint: functions/pci-epf-test: Add "volatile" to pci_epf_test_reg Date: Fri, 18 Aug 2017 20:27:57 +0530 Message-ID: <20170818145810.17649-6-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170818145810.17649-1-kishon@ti.com> References: <20170818145810.17649-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org struct pci_epf_test_reg is the MEMSPACE of pci-epf-test function driver that will be accessed by the "host" for programming the pci-epf-test device. So this structure shouldn't be subjected to compiler optimization in pci_epf_test_cmd_handler() since the values can be changed by code outside the scope of current code at any time. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Sekhar Nori --- drivers/pci/endpoint/functions/pci-epf-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c index 53fff8030337..5cbc05a0762d 100644 --- a/drivers/pci/endpoint/functions/pci-epf-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-test.c @@ -267,7 +267,7 @@ static void pci_epf_test_cmd_handler(struct work_struct *work) cmd_handler.work); struct pci_epf *epf = epf_test->epf; struct pci_epc *epc = epf->epc; - struct pci_epf_test_reg *reg = epf_test->reg[0]; + volatile struct pci_epf_test_reg *reg = epf_test->reg[0]; if (!reg->command) goto reset_handler;