Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751549AbdLNBVR (ORCPT ); Wed, 13 Dec 2017 20:21:17 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:45386 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750795AbdLNBVN (ORCPT ); Wed, 13 Dec 2017 20:21:13 -0500 X-Google-Smtp-Source: ACJfBouU5DNLtsZvLAKTkpumCcK8bHVKcploF6qAPPyDkxDbUUdfs/yZiXOeOR2tiMuCM/ALzYpUFA== Date: Wed, 13 Dec 2017 17:21:10 -0800 From: Bjorn Andersson To: Loic Pallardy Cc: ohad@wizery.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, arnaud.pouliquen@st.com, benjamin.gaignard@linaro.org Subject: Re: [PATCH v2 08/16] remoteproc: add name in rproc_mem_entry struct Message-ID: <20171214012110.GJ17344@builder> References: <1512060411-729-1-git-send-email-loic.pallardy@st.com> <1512060411-729-9-git-send-email-loic.pallardy@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1512060411-729-9-git-send-email-loic.pallardy@st.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1005 Lines: 27 On Thu 30 Nov 08:46 PST 2017, Loic Pallardy wrote: > Add name field in struc rproc_mem_entry. > This new field will be used to match memory area > requested in resource table with pre-registered carveout. > > Signed-off-by: Loic Pallardy > --- > drivers/remoteproc/remoteproc_core.c | 1 + > drivers/remoteproc/remoteproc_debugfs.c | 1 + > include/linux/remoteproc.h | 2 ++ > 3 files changed, 4 insertions(+) > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index bdc99cd..cc53247 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -835,6 +835,7 @@ static int rproc_handle_carveout(struct rproc *rproc, > carveout->da = rsc->da; > carveout->release = rproc_release_carveout; > carveout->priv = (void *)CARVEOUT_RSC_ALLOCATED; > + strncpy(carveout->name, rsc->name, sizeof(carveout->name)); Please ensure that this string is NUL terminated. Regards, Bjorn