Received: by 10.223.185.116 with SMTP id b49csp4345987wrg; Tue, 6 Mar 2018 14:10:15 -0800 (PST) X-Google-Smtp-Source: AG47ELs2ad3KvPNkF/mH1hc686Re9u9levHhUCV3KeCz5D+H6UTQzo6jhzx1kFvEhumYyNWaSyku X-Received: by 10.101.67.137 with SMTP id m9mr15827951pgp.301.1520374214985; Tue, 06 Mar 2018 14:10:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520374214; cv=none; d=google.com; s=arc-20160816; b=OdpagcAkbn8+DTaQN7B53zlbld0rV9RzoM2b2xJNA73xM9ZGUtSfWekWF70P+6GTpR KuNhhaTrlrhzN0FxkVCOFxhUGknh3nMx+qCTQ+TebWCvWQTY6Izy42vEZ3TsGBNbLv8t NAB7ffaRJ0WozMtn6JfzU6DyfcLaR7Lsn2MvBviQRY9mnx/tIvnO/OpsjrgAVvkSspUV 8cag3eiZv1+g51o1lJQdvPYvVDaCCi2Ggcd3jN/QAN22hey/iD92BfHs+hM840C/qpk9 jeleYCjthncB/8YjZSAR3l97Uqu62lGskFBhrKinv7fwsL2AuQ9Anw0x2jNSTnu+QwYg cviA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=AUjrOZLnwqgSRMBQItfEppTm/0IeQg3tw+uTFCfj8x0=; b=dHhmxZPq7oYVqIaKlzN4SG6O7Uo4Vy83Xh+gYW2L2EGa7xFpnuxS79jGZxDtvPlKgp 9fhlLlxzHvLagNKbiBt0fUQNSmM6ROSWWd3bImces1F5nr0M0rFYcZYIo+KpGhfj/MUG PH/Ty4ufNshsTRAhM3EemhStVoXlKDMfN/hYmk7Qb013EHDplQJyFhr4yMqrJHoorOxC 9sPGk1qymvsIpEVWrgj802iVyV9WQ1e4cYKFWf8HTHv9WDPrp87vCCcwJXKcjcr5335H 2IewTk40om8DpLozUMqt7x8swPiJNp+XgMP0f/dM4fZsAz0/emL8UUFZAzZEy1Iax4XQ iI9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Rr1mnsFs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1-v6si11835661pld.80.2018.03.06.14.10.00; Tue, 06 Mar 2018 14:10:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Rr1mnsFs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933141AbeCFWI7 (ORCPT + 99 others); Tue, 6 Mar 2018 17:08:59 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34764 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933042AbeCFWI6 (ORCPT ); Tue, 6 Mar 2018 17:08:58 -0500 Received: by mail-pg0-f66.google.com with SMTP id m19so88597pgn.1 for ; Tue, 06 Mar 2018 14:08:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:to:from:in-reply-to:cc :references:message-id:user-agent:subject:date; bh=AUjrOZLnwqgSRMBQItfEppTm/0IeQg3tw+uTFCfj8x0=; b=Rr1mnsFsr62W5gB7ZxjsyKPiekqpJF83EKSjosLExGsBbz+KL9f7jbJI9SEM6H3gfA IMuv8jjQQi7n+SVoDzbUwkwHJT/tlsCZExdvEBifRMPmklJBN6v4jm6xarEo35LeSe6m T0zYWUqMCsZnpANfJ2RbQ8FOBoOrvpoNzo+xU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding:to:from :in-reply-to:cc:references:message-id:user-agent:subject:date; bh=AUjrOZLnwqgSRMBQItfEppTm/0IeQg3tw+uTFCfj8x0=; b=TouLlaVQ2Y9uGI0ERK0oV2ksuYggC9TtRdiePe6zbzOD/y/jtiJAfFf+7J3z+iFTPx /Vdf7JVksZ+8b1rHPzDDNebTKX6UzF/INW+ucWEwkwMS9EDYCA1MYc0QIgeBwDJe0gW6 bdj4M+PxRwG2QiYs2POyTWyHzlQYAyfzP+Tj3z7dJqkixsboC4rDPc7RCJLeJ94LH+v0 Qg44ihkVgeRS3/1rq9t/BG2cUZMWfekvJ57K3Y/YRhHNrEjdZaAmJtJVCjMfyhdNF99e hr6yW8uOry79Tu5ycz/1pxd48mzUu985rYy3QAEIZWDquZ1Cm+y7buHHGtYoDYvVNSi+ uvpQ== X-Gm-Message-State: APf1xPCnTN6s9/hW/8TXcVWai7Ht5lQ7Xfyjydx0ewBZ3f56z4Yb00Cc K4h5x2q1ZtGIot4ZbbACEyzjUg== X-Received: by 10.101.64.197 with SMTP id u5mr16469947pgp.23.1520374137283; Tue, 06 Mar 2018 14:08:57 -0800 (PST) Received: from localhost ([2620:0:1000:1501:422f:ca5c:71a2:c3b3]) by smtp.gmail.com with ESMTPSA id z126sm8984755pfz.27.2018.03.06.14.08.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Mar 2018 14:08:56 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Lina Iyer From: Stephen Boyd In-Reply-To: <20180306165619.GD4930@codeaurora.org> Cc: andy.gross@linaro.org, david.brown@linaro.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, rnayak@codeaurora.org, bjorn.andersson@linaro.org, linux-kernel@vger.kernel.org, Mahesh Sivasubramanian References: <20180226175802.20052-1-ilina@codeaurora.org> <20180226175802.20052-2-ilina@codeaurora.org> <152027534725.108663.13213325833387672227@swboyd.mtv.corp.google.com> <20180306162140.GC4930@codeaurora.org> <20180306165619.GD4930@codeaurora.org> Message-ID: <152037413587.218381.10264640935822620220@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v4 1/2] drivers: qcom: add command DB driver Date: Tue, 06 Mar 2018 14:08:55 -0800 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Lina Iyer (2018-03-06 08:56:19) > On Tue, Mar 06 2018 at 09:21 -0700, Lina Iyer wrote: > >On Mon, Mar 05 2018 at 11:42 -0700, Stephen Boyd wrote: > >>Quoting Lina Iyer (2018-02-26 09:58:01) > >>>+size_t cmd_db_read_aux_data_len(const char *id) > >>>+{ > >>>+ int ret; > >>>+ struct entry_header ent; > >>>+ struct rsc_hdr rsc_hdr; > >>>+ > >>>+ ret =3D cmd_db_get_header_by_rsc_id(id, &ent, &rsc_hdr); > >> > >>A bunch of code is calling this function. Why not change the user > >>interface to use an opaque 'resource' cookie that we can 'get' or 'find' > >>and then use that cookie in the rest of the API to pull out the data > >>that's desired? > >> > >Fair point. Let me find out. I suspect this was done to keep the API > >similar to other non-Linux interfaces. I am not sure why they all didn't > >use a handle instead of char *. > > > I was reminded that the APIs are generally used once for each resource > and are used for multiple resources and usually only at init. The handle > method doesn't buy much in benefits. > = Ok. Let's take the wait and see approach then.