Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3178418pxk; Mon, 7 Sep 2020 05:39:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwb8jY5a5fDUYaoSMgBlWPG6YVoRpS2+8UGTvCegdFsvpo72enk6cU0uWtqXRaK+ZOF+2Ad X-Received: by 2002:a17:906:a1c2:: with SMTP id bx2mr21771853ejb.426.1599482344366; Mon, 07 Sep 2020 05:39:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599482344; cv=none; d=google.com; s=arc-20160816; b=GEC/5FxJPKlxB59rOk6MxbikAur7Kq5hWUZEf1Q3PSpixU/m9ahrCxS1gsfUTjXX8c VIl5kwYFs/W0690eBGmFahfdr22QplyXUCUwhyBzR1PSJJg553Y2sgmPlI4ZSOg/wGDO lUM/vrsxYhEo/mJXFkXxCw3uZXqROgjQXv81IkIwTsXkf9+TtjDJIljOKIn1N6JZ2UJc UVWtBQwgXbxIURRInjwljDYgoC3AD1DXK96TzwHN+CaIXnm3RjDlPwpPBXnwxb4CY0Ig Fov1z2osRVkzhPgQby4FlbaFjO2IV/AKUGrMM8QBor4ab80+wuxE3KrtGoId19iGdu9b 3Yyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=8F0VXM1Ibg59QFC2KdnMp38zly2O35Ha54dWnCVrOR0=; b=1JTXpnq12e3d4e/9RmDZJylapTf7jMzQ1N6Guc2MYnoJUy1utmsfojHHsBUJrURnCs 0xGdEqEYSUpo3+I7kpREdPM0AfdBmq6OHFCWuwP9HilOdf7K4MQ31I1HShVecluUNV50 H84WmFqi5M476ypJ+CMdhafcn9+MWjaIxdrpxpbRCBIhkfRVuV7Ylz7ashys8WK09+nm ftJrPNg3rUqzgsuOU/pdv3s5ryL8oZfyXUQMmc2qCx1RB3FNA5s/ugk4yOa3rWDla1mz zq3z0ayNqn6FZVjlVOGvZLaa4V9vG2/z6CJJ5eY/XrKLorMmmsJw3gubQ9jPOyO+87mo ysYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vutxjeTK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o23si9394720ejj.533.2020.09.07.05.38.41; Mon, 07 Sep 2020 05:39:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vutxjeTK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729079AbgIGMeg (ORCPT + 99 others); Mon, 7 Sep 2020 08:34:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:45932 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728792AbgIGMdb (ORCPT ); Mon, 7 Sep 2020 08:33:31 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DFD56206E6; Mon, 7 Sep 2020 12:33:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599482010; bh=kDHQv3XCIPb67Uc5kjThYASF43s8jQiU+rU4a6we73I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vutxjeTK+c84QOcfrmiQZoAi3MNhUbkZMzAVZmEnKl5xXrZQEmSlf1zS7Xgi3ZePG Kq2LM/1sU1DPH/RLJRbJoSq+gDNSSX/2E59CxSiQy0JhaWF2Ume6S88ru0CV/ry47x bcA5p9/yYPLlnsQpMe147ImA3SQHie1kywQFTOTs= Date: Mon, 7 Sep 2020 14:33:44 +0200 From: Greg Kroah-Hartman To: Jonathan Marek Cc: linux-arm-msm@vger.kernel.org, Arnd Bergmann , Srinivas Kandagatla , Jorge Ramirez-Ortiz , open list Subject: Re: [PATCH] misc: fastrpc: add ioctl for attaching to sensors pd Message-ID: <20200907123344.GA2371705@kroah.com> References: <20200901003300.11985-1-jonathan@marek.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200901003300.11985-1-jonathan@marek.ca> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 31, 2020 at 08:32:59PM -0400, Jonathan Marek wrote: > Initializing sensors requires attaching to pd 2. Add an ioctl for that. > > This corresponds to FASTRPC_INIT_ATTACH_SENSORS in the downstream driver. > > Signed-off-by: Jonathan Marek > --- > drivers/misc/fastrpc.c | 9 ++++++--- > include/uapi/misc/fastrpc.h | 5 +++-- > 2 files changed, 9 insertions(+), 5 deletions(-) > > diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c > index 7939c55daceb..ea5e9ca0d705 100644 > --- a/drivers/misc/fastrpc.c > +++ b/drivers/misc/fastrpc.c > @@ -1276,7 +1276,7 @@ static int fastrpc_dmabuf_alloc(struct fastrpc_user *fl, char __user *argp) > return 0; > } > > -static int fastrpc_init_attach(struct fastrpc_user *fl) > +static int fastrpc_init_attach(struct fastrpc_user *fl, int pd) > { > struct fastrpc_invoke_args args[1]; > int tgid = fl->tgid; > @@ -1287,7 +1287,7 @@ static int fastrpc_init_attach(struct fastrpc_user *fl) > args[0].fd = -1; > args[0].reserved = 0; > sc = FASTRPC_SCALARS(FASTRPC_RMID_INIT_ATTACH, 1, 0); > - fl->pd = 0; > + fl->pd = pd; > > return fastrpc_internal_invoke(fl, true, FASTRPC_INIT_HANDLE, > sc, &args[0]); > @@ -1477,7 +1477,10 @@ static long fastrpc_device_ioctl(struct file *file, unsigned int cmd, > err = fastrpc_invoke(fl, argp); > break; > case FASTRPC_IOCTL_INIT_ATTACH: > - err = fastrpc_init_attach(fl); > + err = fastrpc_init_attach(fl, 0); > + break; > + case FASTRPC_IOCTL_INIT_ATTACH_SNS: > + err = fastrpc_init_attach(fl, 2); Shouldn't you have #defines for those magic numbers somewhere? What does 0 and 2 mean? thanks, greg k-h