From patchwork Sun Aug 23 00:57:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 7056791 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D22869F344 for ; Sun, 23 Aug 2015 00:57:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 009B320689 for ; Sun, 23 Aug 2015 00:57:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2E84B206D8 for ; Sun, 23 Aug 2015 00:57:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 37F4D6E86E; Sat, 22 Aug 2015 17:57:48 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by gabe.freedesktop.org (Postfix) with ESMTPS id D51A56E86E for ; Sat, 22 Aug 2015 17:57:46 -0700 (PDT) Received: by wicja10 with SMTP id ja10so42940084wic.1 for ; Sat, 22 Aug 2015 17:57:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=A4LesFGNUcaE9dlRR2a758GrxO8XU7/tIUQEXWL2zBM=; b=I+rINi0LhEGc8uWxQBJnkBwIupEpYvpYnRqnmyuyYDTm+rlTmZz0nAVjLx26pR+4M9 gUptnhVdKpFISzkT/ofXE2ZOFG71pX0FRrl8pzkztu/0NFBnNF9HZtmeSz1Dwv7eQcjv 5cTvqgpMO1Vb0KHONpfW3rvlHHaoE/GsvCxuhv0kg63GEMe4FVC02q8Kcxf71byDwL2L 2djrVAycc/5pfFHsZdHFI/K8IvNl1RCBFX5FxRIoAG2EFs5hSgzHqnK+a7X8/adx3cSa /f3tCAnRdVcGujWIAUDLtHny3MDR+u0rIv8QF8hf+mG9YUjPdSZwJJL1B7dPeSV/XleH SxMA== X-Received: by 10.194.203.3 with SMTP id km3mr27034490wjc.114.1440291465089; Sat, 22 Aug 2015 17:57:45 -0700 (PDT) Received: from localhost.localdomain ([5.20.220.27]) by smtp.gmail.com with ESMTPSA id gt10sm9453176wib.20.2015.08.22.17.57.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 22 Aug 2015 17:57:44 -0700 (PDT) From: Grazvydas Ignotas To: dri-devel@lists.freedesktop.org Subject: [PATCH 4/4] drm/radeon: remove volatile qualifier Date: Sun, 23 Aug 2015 03:57:38 +0300 Message-Id: <1440291458-11602-5-git-send-email-notasas@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440291458-11602-1-git-send-email-notasas@gmail.com> References: <1440291458-11602-1-git-send-email-notasas@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There doesn't seem to be any need to have 'ib' volatile, the code is not even consistent with it and some places already miss it. As it is now it's just making gcc produce worse code. If there are special requirements for that memory, then proper primitives like memory barriers or accessor functions should be used, but it doesn't look like that is needed here. While at it, change the type to match the one in radeon_ib structure. Signed-off-by: Grazvydas Ignotas --- drivers/gpu/drm/radeon/evergreen_cs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c index e31076e..46f87d4 100644 --- a/drivers/gpu/drm/radeon/evergreen_cs.c +++ b/drivers/gpu/drm/radeon/evergreen_cs.c @@ -447,7 +447,7 @@ static int evergreen_cs_track_validate_cb(struct radeon_cs_parser *p, unsigned i * command stream. */ if (!surf.mode) { - volatile u32 *ib = p->ib.ptr; + uint32_t *ib = p->ib.ptr; unsigned long tmp, nby, bsize, size, min = 0; /* find the height the ddx wants */ @@ -1773,7 +1773,7 @@ static int evergreen_packet3_check(struct radeon_cs_parser *p, { struct radeon_bo_list *reloc; struct evergreen_cs_track *track; - volatile u32 *ib; + uint32_t *ib; unsigned idx; unsigned i; unsigned start_reg, end_reg, reg; @@ -2747,7 +2747,7 @@ int evergreen_dma_cs_parse(struct radeon_cs_parser *p) struct radeon_cs_chunk *ib_chunk = p->chunk_ib; struct radeon_bo_list *src_reloc, *dst_reloc, *dst2_reloc; u32 header, cmd, count, sub_cmd; - volatile u32 *ib = p->ib.ptr; + uint32_t *ib = p->ib.ptr; u32 idx; u64 src_offset, dst_offset, dst2_offset; int r;