From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0423CECAAA3 for ; Fri, 26 Aug 2022 09:19:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BBFDE848DD; Fri, 26 Aug 2022 11:19:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="USq0k2+Z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 13D77848DD; Fri, 26 Aug 2022 11:19:18 +0200 (CEST) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6A0B3848E9 for ; Fri, 26 Aug 2022 11:19:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-ej1-x634.google.com with SMTP id lx1so1969871ejb.12 for ; Fri, 26 Aug 2022 02:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=hMLvB4f3WHQGJGD9edgQj7Wp+Bvmb5N2EYQfm6yRKT0=; b=USq0k2+Zyqqr0AuwTkSCuaovDHqWGTcuBy3KPCKuC76BFgBDcWgEhAxHhX0hrgK1FT n3rRfBXhhV6Q7uipSTZhLeixBsoJ3eBbOfwol3Cyjp9MSbo2pE7G4oBDoWTdi1R9yviI M4m77wTdxYrqpyz26OIbawihV7udZijv/HH7lUGEcXotiHJ7TQ2K+jkNCGKJ74fqn0bV VX6aFaZhYAFvlEDYWeejix3Rw1wlKrPNklc4djYq0X1rWYk0stB48LUm7pvET9W9+GR+ pq9lvFLwgZEuqeCEe8Xge7YedL3IcxYuWscaPzEOiJDgXcAhrOd1LDWwZLCqg7hYt3VO fmUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=hMLvB4f3WHQGJGD9edgQj7Wp+Bvmb5N2EYQfm6yRKT0=; b=GurJ/6k4qKauqsKxjfPaKC+y1iJ/M8FYlX2obM0kpyCjDQ9QepjV7aQOgp/MARIUsf JqENjbuWGb5k857eKyPoYuo90+XnWdPJeRpYckmeAUXeZzWsEZPa/mW9JKXpv1oR+PEv Oyy5lIA8aYJXlJcNC1ldEZyCKMmPy4bu/VyLtUFHyl6Q6Wrb+KUdA3efGQtzh8c1oshR HNxvzdDRLj0apZ5KKW3IYbuhBtJtWMOC2KzuXBeNCJCJSHYybUjyZ5CIzwAEy6/OlFJ3 cK8FPiSbPy8IlIXlcgD4MnAbgxOFjmwcwPI0+bTnT/r+2go1aixJQAaAd9TX0XfxEn+k YoZQ== X-Gm-Message-State: ACgBeo1EX2N/xSMmPCS2cKCgWzAC6U4Xokd8bek+XzaPoSM9XQCSxj9A E+R94GXOyay5YajqfBmiTBUcLg== X-Google-Smtp-Source: AA6agR4xT6ofsE6HHaFvcipNp2cPZNylbLhtV3ojtiuQsqmKqV+X/k6DPoCz/X1y3aVEv1aJUkQEpA== X-Received: by 2002:a17:907:96a1:b0:73d:75f2:336 with SMTP id hd33-20020a17090796a100b0073d75f20336mr4866403ejc.43.1661505553006; Fri, 26 Aug 2022 02:19:13 -0700 (PDT) Received: from hades ([46.103.15.185]) by smtp.gmail.com with ESMTPSA id e16-20020a056402089000b0043cab10f702sm950497edy.90.2022.08.26.02.19.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Aug 2022 02:19:12 -0700 (PDT) Date: Fri, 26 Aug 2022 12:19:08 +0300 From: Ilias Apalodimas To: Etienne Carriere Cc: Jens Wiklander , u-boot@lists.denx.de, Patrick Delaunay Subject: Re: [PATCH] tee: optee: rework TA bus scanning code Message-ID: References: <20220823081141.344833-1-ilias.apalodimas@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Hey Etienne, Jens [...] > > > - if (IS_ENABLED(CONFIG_RNG_OPTEE)) { > > > - ret = device_bind_driver(dev, "optee-rng", "optee-rng", &child); > > > + > > > + for (i = 0; i < MAX_TEE_BUS_DEV_COUNT; i++) { > > I would use ARRAY_SIZE(optee_bus_probe) straight here. Macro > indirection is not really useful imho. Sure > > > > + ret = device_bind_driver(dev, optee_bus_probe[i].drv_name, > > > + optee_bus_probe[i].dev_name, &child); > > > if (ret) > > > return ret; > > > > I wonder which behaviour is most useful. Disable OP-TEE support > > completely if there's some error when binding dependent drivers or to > > just complain a bit but continue. > > I agree with you, this should better print the status and proceed with > the next driver. > There are other occurrences of such behaviour in U-Boot. I also agree, however this changes the behaviour of *existing* code, which I tried to avoid. Since you both think it's better, I'll just add a log_err() on v2 and continue. Thanks /Ilias > > Br, > etienne > > > > > > Cheers, > > Jens > > > > > > > > > > } > > > -- > > > 2.34.1 > > >