Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1115524pxb; Wed, 6 Apr 2022 09:04:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAqTCh7iAuKIDIMdaxFvE4eIBX0KLpdNIwwUcv69WkGJ00f2D8ub3n98NrldMzsnTJV0Vb X-Received: by 2002:a63:f4e:0:b0:382:1e31:79e8 with SMTP id 14-20020a630f4e000000b003821e3179e8mr7846019pgp.167.1649261095731; Wed, 06 Apr 2022 09:04:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649261095; cv=none; d=google.com; s=arc-20160816; b=CQfSPogEvoWR8Sfkw5Nuys613E2xZztoAzq2pIsB04cAfFtU2YVdgZWIfrXfdmsCN6 6bGTG6qgym3tR21NIeckbo7BnDnof3WhkJ1IzUfC2PmpxLqAPqDUrxy8PReky/h45LE2 BoGVjjekVr04UWlOfIgXfH3BjIfZ5G7qf3bVaNetAiiafRwDK4b3FOyETqq9J7O/eNw8 IP6nENx3i3dUK0r02JK+O3B9JPlOlistzzr/JVA9v7SN+EQdXxpPVxlmY/k4dp8KEDLi /AGa+nhnEcY10GEa7W0+MQtVBxPRv4a11W5aV52k39+L/stDafoYb0IQA1RWol3w11ZQ hhZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:in-reply-to:date:subject:cc:to:from:user-agent :references:dkim-signature; bh=qoco3RRZczrBsbcgQAlfSk5MIz7VjrCwvzbtrToaDgc=; b=GzoH1/vNH/Vua7p/HU2uu+uB4kXKrYro/BExz3hNTOFK5NRL1ysX5x9nijED9hWoZJ Xc9A2fiBI3Wzw/KUAa8K8HQvIALVpAZ6zIPh+XSTeSn5XlKeAkosyrm0+Rzk+Ow6QaR9 j4JZRWz4RtW+FtfgUAQzvKCW1ccbKs385gyginc01Or8sDIHKXGxDqIC8Cr0iL5MYE1g 2TlUshXZfzRZNe8+W7+80D8IfZISWbw3hisUjgyRx7eraxvu/w/kHS8McnjQqqpA3L8F CMVe5dguKOpq8KeetRN57qEdSoeJ7mUE3CbsII1IaphtDu1iBXBaQ78tdNLLLStmk9ww dFPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lYViyLKu; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id o24-20020a635a18000000b00399563035e3si5898692pgb.809.2022.04.06.09.04.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 09:04:55 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lYViyLKu; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A89BB4ED06D; Wed, 6 Apr 2022 07:47:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235258AbiDFOtL (ORCPT + 99 others); Wed, 6 Apr 2022 10:49:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235238AbiDFOtD (ORCPT ); Wed, 6 Apr 2022 10:49:03 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 605665E8669 for ; Wed, 6 Apr 2022 04:21:50 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id b15so2216731edn.4 for ; Wed, 06 Apr 2022 04:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=qoco3RRZczrBsbcgQAlfSk5MIz7VjrCwvzbtrToaDgc=; b=lYViyLKuxnmWvVOxSiIAvZo7ThzWayhTEithFwUkjoinkLc5FCaTrrYpbT4lWoKBwf SHgPUoZKJ7UV2IPYqxkuXYeeTYGRB83bdEMwIdBmZQKFxyDvfCEnlmoTCLT2OUjBdixY +G+SZiFdv3qepH4rdbFuW+L7cxBLBF32dysdgWgzwToIpOZTyeNLqWrZ4wQUZazH7P+G 7hlLeTWPdexl+2Jz1SfDUOV3df8qLraggMceTQvB2595SmmUUQCz69mNwcRT30DswAW8 p2g82mMXlYeye2LNaq72Bx0B1+oaVmBEYPJJneZtBT5wcJXOArVR1HP8KLHXNn2Q7dhs SQDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version:content-transfer-encoding; bh=qoco3RRZczrBsbcgQAlfSk5MIz7VjrCwvzbtrToaDgc=; b=UkoeIQ5MuM5DQG+cTWEddZbPXsIAEhQwNH7CdNWy07dbC2wKt9V6FzwGzp88ex2M9R vzFttbthRmk1ERkuGEmWhWvfbAVcw7zlrcihvw6Un28jeDDjAtbzTmks8xCAMq1bSNv0 oJaNOTpWTG7z6/+Y7ncsnbUXjUnZFk4YKlcmPuO0Q+PBBnQIX4Oh92Dm0zeOiAobR0Kt cGqOQo/ZxZbZVYOu+njdHdoHha1OmY6PUBzchkCaG2D00g7fc+v6kPuAt+x5Fjqn8pJu Bne8e36PZ7vAgpuVbSwcKRDTGCZ9gKaWjYOQKbcLsI8wuLhupGldeDHJXKDgXK6ZYmZg l9xw== X-Gm-Message-State: AOAM5337JJg4+u6iQOHO1B2coHk9OvowDga+JTkKYLwKZ85DLutARXga WCpoVrCwCJ4ergO7ouYL71oglQ== X-Received: by 2002:a05:6402:430d:b0:419:45cd:7ab1 with SMTP id m13-20020a056402430d00b0041945cd7ab1mr8041132edc.367.1649244108812; Wed, 06 Apr 2022 04:21:48 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id og49-20020a1709071df100b006db0dcf673esm6505430ejc.27.2022.04.06.04.21.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 04:21:47 -0700 (PDT) Received: from zen (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 22DB51FFB7; Wed, 6 Apr 2022 12:21:47 +0100 (BST) References: <20220405093759.1126835-1-alex.bennee@linaro.org> <20220405093759.1126835-2-alex.bennee@linaro.org> User-agent: mu4e 1.7.12; emacs 28.1.50 From: Alex =?utf-8?Q?Benn=C3=A9e?= To: Bart Van Assche Cc: linux-kernel@vger.kernel.org, maxim.uvarov@linaro.org, joakim.bech@linaro.org, ulf.hansson@linaro.org, ilias.apalodimas@linaro.org, arnd@linaro.org, ruchika.gupta@linaro.org, tomas.winkler@intel.com, yang.huang@intel.com, bing.zhu@intel.com, Matti.Moell@opensynergy.com, hmo@opensynergy.com, linux-mmc@vger.kernel.org, linux-scsi@vger.kernel.org, Linus Walleij , Arnd Bergmann , Eric Biggers Subject: Re: [PATCH v2 1/4] rpmb: add Replay Protected Memory Block (RPMB) subsystem Date: Wed, 06 Apr 2022 12:21:15 +0100 In-reply-to: Message-ID: <87ilrmjw38.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bart Van Assche writes: > On 4/5/22 02:37, Alex Benn=C3=A9e wrote: >> +int rpmb_get_write_count(struct rpmb_dev *rdev, int len, u8 *request, i= nt rlen, u8 *resp) >> +{ >> + int err; >> + >> + if (!rdev) >> + return -EINVAL; >> + >> + mutex_lock(&rdev->lock); >> + err =3D -EOPNOTSUPP; >> + if (rdev->ops && rdev->ops->get_write_count) >> + err =3D rdev->ops->get_write_count(rdev->dev.parent, rdev->target, >> + len, request, rlen, resp); >> + mutex_unlock(&rdev->lock); >> + >> + return err; >> +} > > The names rpmb_get_write_count() and get_write_count() look confusing > to me since these functions query the write counter. How about adding > "er" at the end of both function names? > > Are there any plans to add an implementation of struct rpmb_ops for > UFS devices? Not by me but I agree it would be a useful exercise to see if a unified API makes sense. --=20 Alex Benn=C3=A9e