From patchwork Wed Jul 28 15:03:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 114812 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6SF4TUw015809 for ; Wed, 28 Jul 2010 15:05:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754553Ab0G1PD7 (ORCPT ); Wed, 28 Jul 2010 11:03:59 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:33586 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753882Ab0G1PD6 (ORCPT ); Wed, 28 Jul 2010 11:03:58 -0400 Received: from dlep35.itg.ti.com ([157.170.170.118]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o6SF3oB1030996 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 28 Jul 2010 10:03:50 -0500 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id o6SF3opP029415; Wed, 28 Jul 2010 10:03:50 -0500 (CDT) Received: from dlee73.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id o6SF3oKA019060; Wed, 28 Jul 2010 10:03:50 -0500 (CDT) Received: from [128.247.74.250] (128.247.74.250) by dlee73.ent.ti.com (157.170.170.88) with Microsoft SMTP Server id 8.1.358.0; Wed, 28 Jul 2010 10:03:49 -0500 Message-ID: <4C5046D5.6010306@ti.com> Date: Wed, 28 Jul 2010 10:03:49 -0500 From: Nishanth Menon User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: "Ramos Falcon, Ernesto" CC: "gregkh@suse.de" , "Ramirez Luna, Omar" , "ohad@wizery.com" , "ameya.palande@nokia.com" , "felipe.contreras@nokia.com" , "Guzman Lugo, Fernando" , "linux-kernel@vger.kernel.org" , "andy.shevchenko@gmail.com" , "linux-omap@vger.kernel.org" Subject: Re: [PATCH 4/5] staging:ti dspbridge: remove unnecessary volatile variables References: <1280328052-31292-1-git-send-email-ernesto@ti.com> <1280328052-31292-2-git-send-email-ernesto@ti.com> <1280328052-31292-3-git-send-email-ernesto@ti.com> <1280328052-31292-4-git-send-email-ernesto@ti.com> <1280328052-31292-5-git-send-email-ernesto@ti.com> In-Reply-To: <1280328052-31292-5-git-send-email-ernesto@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 28 Jul 2010 15:05:17 +0000 (UTC) --- a/drivers/staging/tidspbridge/pmgr/cmm.c +++ b/drivers/staging/tidspbridge/pmgr/cmm.c @@ -1022,18 +1022,17 @@ void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf, DBC_REQUIRE(xlator_obj->ul_seg_id > 0); if (xlator_obj) { + void *t_buf = 0; attrs.ul_seg_id = xlator_obj->ul_seg_id; - *(volatile u32 *)va_buf = 0; /* Alloc SM */ pbuf = cmm_calloc_buf(xlator_obj->hcmm_mgr, pa_size, &attrs, NULL); if (pbuf) { /* convert to translator(node/strm) process Virtual * address */ - *(volatile u32 **)va_buf = - (u32 *) cmm_xlator_translate(xlator, - pbuf, CMM_PA2VA); + t_buf = cmm_xlator_translate(xlator, pbuf, CMM_PA2VA); } + writel(t_buf, va_buf); } return pbuf;