Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752057AbdCCSXv (ORCPT ); Fri, 3 Mar 2017 13:23:51 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:41314 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751584AbdCCSXq (ORCPT ); Fri, 3 Mar 2017 13:23:46 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E522C60D78 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org Date: Fri, 3 Mar 2017 10:21:13 -0800 From: Stephen Boyd To: "Dwivedi, Avaneesh Kumar (avani)" Cc: bjorn.andersson@linaro.org, agross@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org Subject: Re: [PATCH v2 2/3] remoteproc: qcom: Add scm call to protect modem mem in mss rproc drv. Message-ID: <20170303182113.GT25384@codeaurora.org> References: <1485773044-31489-1-git-send-email-akdwived@codeaurora.org> <1485773044-31489-3-git-send-email-akdwived@codeaurora.org> <20170228071632.GG25384@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 884 Lines: 26 On 03/03, Dwivedi, Avaneesh Kumar (avani) wrote: > On 2/28/2017 12:46 PM, Stephen Boyd wrote: > >On 01/30, Avaneesh Kumar Dwivedi wrote: > >>+ dest_info[i].vm = dest[i]; > >>+ dest_info[i].perm = perm[i]; > >Needs to do a cpu_to_le32() somewhere. Please run sparse. > I understand that byte reordering needed but not sure what is sparse > will check and do it. http://git.kernel.org/cgit/devel/sparse/sparse.git/ > > > >>+ dest_info[i].ctx = NULL; > >>+ dest_info[i].ctx_size = 0; > >>+ } > >Perhaps we should just allocate these first (one or two elements > >isn't a big difference) and then fill the details in directly. > Not very clear what is ask here? > > I'm saying we could fill in dest_info in the case statement instead of here in an up to 2 times loop. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project