From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932751AbeALIT4 convert rfc822-to-8bit (ORCPT + 1 other); Fri, 12 Jan 2018 03:19:56 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:39169 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754537AbeALITx (ORCPT ); Fri, 12 Jan 2018 03:19:53 -0500 From: Loic PALLARDY To: Bjorn Andersson CC: "ohad@wizery.com" , "linux-remoteproc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Arnaud POULIQUEN , "benjamin.gaignard@linaro.org" Subject: RE: [PATCH v2 08/16] remoteproc: add name in rproc_mem_entry struct Thread-Topic: [PATCH v2 08/16] remoteproc: add name in rproc_mem_entry struct Thread-Index: AQHTafrh+h8X7Yrx9UO1GYNQpRuIL6NCDuwAgC4ZNRA= Date: Fri, 12 Jan 2018 08:19:50 +0000 Message-ID: <89505210a56a412e9716f1052267b231@SFHDAG7NODE2.st.com> References: <1512060411-729-1-git-send-email-loic.pallardy@st.com> <1512060411-729-9-git-send-email-loic.pallardy@st.com> <20171214012110.GJ17344@builder> In-Reply-To: <20171214012110.GJ17344@builder> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.50] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-12_05:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: > -----Original Message----- > From: Bjorn Andersson [mailto:bjorn.andersson@linaro.org] > Sent: Thursday, December 14, 2017 2:21 AM > To: Loic PALLARDY > Cc: ohad@wizery.com; linux-remoteproc@vger.kernel.org; linux- > kernel@vger.kernel.org; Arnaud POULIQUEN ; > benjamin.gaignard@linaro.org > Subject: Re: [PATCH v2 08/16] remoteproc: add name in rproc_mem_entry > struct > > 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. I'll use strlcpy instead Regards, Loic > > Regards, > Bjorn