Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp330741ybk; Wed, 13 May 2020 01:04:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxCvPoCIFCKEGSN/TsnAT92rPWH6BAxRE7R7K6dymdOpOzkfkDUrBr0IfuzpN/Da/5+KDP X-Received: by 2002:a17:906:a415:: with SMTP id l21mr1745515ejz.100.1589357088560; Wed, 13 May 2020 01:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589357088; cv=none; d=google.com; s=arc-20160816; b=s2S+6dXiF0ouj8zCYifMWWnxuzeJuQcwXcNNDGk6tyGatpH5UOn8B8G2bHadIohs4V mE+GrIKuN+Tl1pOKOIT0bCI3grrrmmoqAdMFDcR9O5MgRsJ6X0SH9+qYkyFNISGK0OdF fyqt2fVWMPRKhgrMY1KfSBRqi8WAeNWtuM1+mQK8NNG0UAXzB+F9RifFGz36mR1+7GDV jsA4HoItqdwJMIUyH6VN+ooXQMMlkNXi7ZlZq/J6AzDIFBUbhd9rAYuMbQJXxKuUfROH ypt3JGwVTfpbXrzokfwBwdlgreSJ3r9G59bvHisf8AvuPZmer0CrU/G8J7eTdjBs77ll CkPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=752wX5EL8J2MRxEP0ymF9v/OZ2YrwmsmZn47Ie44qaI=; b=oAzkpobVCDfB91sUKlut15Vh9ngtmKFLPhN3VQfdmHovStnpFZoJITveRTUmKLiJs2 9NESlsauS6PPr3/Ukq66+rcyYXGhy+75LQaUGEcSkM6ufigWzqRNvOeMIEq6BvcZH3bK 9F6z+7W5qsBEapmp4dncq6LMdF27iu0NNZGrnS0RbRu8rk2sItbsX9MYCAPO99g1QBq7 gJ27igSJrupQnjs1X0NIYbk+Mdi+jO4+g8pAVN6+S0gs9tPwQjnfd9cvdAE8oDWY82z7 Pn3kKA+O/QqfuNxtnBdW1QMioUJoGRT/L4RTCPZZMgs6ForV6EzJKdvHw66FrQaOTuXO 9fPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rzUIJD94; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs26si8781309ejb.527.2020.05.13.01.04.25; Wed, 13 May 2020 01:04:48 -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=@linaro.org header.s=google header.b=rzUIJD94; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729834AbgEMIAa (ORCPT + 99 others); Wed, 13 May 2020 04:00:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728101AbgEMIAa (ORCPT ); Wed, 13 May 2020 04:00:30 -0400 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 394FDC061A0C for ; Wed, 13 May 2020 01:00:30 -0700 (PDT) Received: by mail-oi1-x242.google.com with SMTP id i13so20672132oie.9 for ; Wed, 13 May 2020 01:00:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=752wX5EL8J2MRxEP0ymF9v/OZ2YrwmsmZn47Ie44qaI=; b=rzUIJD94/+BI+arzuqPTef71Q93uEKSOMWuAnxcmv9nKtHkQIlFHhdNukmUsmEjezD noFfDehSBiDBkirx1JC4NtgDWLrxYS+nk1EmTAZFFQHv6sTCiMrB23SsRcCNb9JxrD07 0cLVsqVNcdoKX10ph/+LGflRjgp9RDdIJEZrjTHBuy90fIHqZpNfBTGeleaaMWAmcZ9x Z8UlW6OuhZ2Pjtx0w4JDtqFA7JZIWCoZJ93CNtnVCHLc063nUBhr+sWhYnjLsOsi3nup Csj+3W12eMKWOHjF0bQj2Kdvs+gKHEI5euCCqkhqVCC2KKMnLyuw+MmKbZ9IVbk435E5 CMEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=752wX5EL8J2MRxEP0ymF9v/OZ2YrwmsmZn47Ie44qaI=; b=J9SeVq8M77+CX4lPBMaVP0qHrR26VydlYNnvlOQyCI8YI9SJePIkjTplkCQOXVulxN HCqPlm9KFAWW/ts/T6c0lyoQQUW42T7sxiIu5LTOrXpeW4X91na64HcP10khaUkHfche /bAMIJAUR/Ywfx9Rjr2oo/JmjXZA/QVeqHHuWWd6aNB4kkz5T+THjiqjJDj8laWT+Hzz tRds7sbHv5LwPmV2oVmdDdeHwW7erbG/uMv4iaa8MjMmm/TXjaeTf/fP1C7sO4h9URPW aZZdjyKT+x5+xt5Lsl7IDosufUbKXJXLVWXuZVAsX1sW04pHZS3EoMbYcA//8lBwOFD9 KkAA== X-Gm-Message-State: AGi0PuZnHlPgGjMl6l8Z/LOoYZJteGXwD+KyylhQvwkI7IYgG7U6PN4N 0E3SHO2qSw3XXg9xnScKmheUGDUnsSJfeThfD1sfRQ== X-Received: by 2002:aca:d50c:: with SMTP id m12mr27228872oig.149.1589356829004; Wed, 13 May 2020 01:00:29 -0700 (PDT) MIME-Version: 1.0 References: <20200513003430.651232-1-vlad.babchuk@gmail.com> <20200513003625.651340-1-vlad.babchuk@gmail.com> In-Reply-To: <20200513003625.651340-1-vlad.babchuk@gmail.com> From: Jens Wiklander Date: Wed, 13 May 2020 10:00:18 +0200 Message-ID: Subject: Re: [PATCH] optee: don't fail on unsuccessful device enumeration To: Volodymyr Babchuk Cc: open list , "tee-dev @ lists . linaro . org" , Jerome Forissier , Sumit Garg Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Volodymyr, On Wed, May 13, 2020 at 2:36 AM Volodymyr Babchuk wrote: > > optee_enumerate_devices() can fail for multiple of reasons. For > example, I encountered issue when Xen OP-TEE mediator NACKed > PTA_CMD_GET_DEVICES call. This should not result in driver > initialization error because this is an optional feature. > > Thus, it is better to print warning, instead of termination driver > initialization. > > Signed-off-by: Volodymyr Babchuk > --- Looks good. Didn't apply directly at latest, but the conflict was easy enough to resolve. I'll pick up this in a day unless someone objects. I'll add a Fixes: c3fa24af9244 ("tee: optee: add TEE bus device enumeration support") Line. Thanks, Jens > > resend: fixed email in s-o-b tag. Sorry for the noise > > drivers/tee/optee/core.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c > index 34409c916882..a053930032f2 100644 > --- a/drivers/tee/optee/core.c > +++ b/drivers/tee/optee/core.c > @@ -728,10 +728,8 @@ static int __init optee_driver_init(void) > return PTR_ERR(optee); > > rc = optee_enumerate_devices(); > - if (rc) { > - optee_remove(optee); > - return rc; > - } > + if (rc) > + pr_warn("can't enumerate optee devices: %d\n", rc); > > pr_info("initialized driver\n"); > > -- > 2.26.2 >