Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1906162imn; Mon, 1 Aug 2022 04:41:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR5+/0DlnmmW7beOuCuD5NmGjKOtjcyDXvNUb8QTzs9+mTySbV4l46VXrDmDDV7tCBoHRPoO X-Received: by 2002:a17:90b:4d91:b0:1f5:24a:ff7e with SMTP id oj17-20020a17090b4d9100b001f5024aff7emr4558073pjb.194.1659354095959; Mon, 01 Aug 2022 04:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659354095; cv=none; d=google.com; s=arc-20160816; b=CpMkXmdqf4Ye+iHN8vLVMaEawYg/4d9U2G6CoUghev9IDp92IdsTAG579OIkt1Gem1 JTjXqwpW0uzhKDayvnhGZ8E+KG9/2dqZdaR2wT+yPnC0laQ8Xi4AIlqKrNf+s/fBf0pg RM2xXkvvHdjDXfhmict3/Bf0StdCvdUwwkUzAL0HxewpcBp0uEdz8MJHeaVLNOquZOzP O97kYo9HWsB5/Olvfe1awZa4kCwEgthaLdZKDqcVQnkSAkGQ9O/aTk0hKqlsl4G275i0 LQ+8hWnsA2lt3fFb3gcoFgWEAQRbNhTYw2I6YH8OGZjBHSIiFNbompmKAZRTPhM5Vtd9 /WqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hr7aEVDfPA3dYafjUV8hGRFyRDiv7hTNOFhknOQL4qo=; b=Pb8Offb+OqfLBMFrBBtMSfmT/MYNdby8ChOf6jTSC2cz18KTXa73jyXZQm/ccNI7W8 3Z9XfpvLGdtRQw12+Qcsm9iLNk/18lI/xn7/prUi/J5khmH185SPnxqfofwJtM+vt558 8joszT8+dAvKd3kPqgLj07oStNHN8AS/NEjVvuBo3/lye2LZ/K9EVLJHMUcXNZjMWrFr Cdb39pIqvM0O/nS/CPEbwRWgh9x2NVYvAvPkF9lY4HPV2rMiOz/EiINXMeB3wg0TjhTg xEsYe8Ziuo8uGAmr1JkCQNg3amSrPP0SeYeMzvgTiZMKEe0JmgDxL95N4vYQNuAGn7Ee 4JeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QXIcOzFM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y72-20020a638a4b000000b0040c99b681a2si4527536pgd.31.2022.08.01.04.41.21; Mon, 01 Aug 2022 04:41:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QXIcOzFM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230525AbiHALfa (ORCPT + 99 others); Mon, 1 Aug 2022 07:35:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229935AbiHALf2 (ORCPT ); Mon, 1 Aug 2022 07:35:28 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21901186DE for ; Mon, 1 Aug 2022 04:35:25 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id fy29so19727529ejc.12 for ; Mon, 01 Aug 2022 04:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=hr7aEVDfPA3dYafjUV8hGRFyRDiv7hTNOFhknOQL4qo=; b=QXIcOzFMphH/aKPBRA3u4zzR+WbNW/9qCVgwX2WNuvFK9d5l+bHewJUlTh+f+qB6qY s7G8CvTLKDGcXKp4TqXEt3mpi8wxw3j/PAt4uvJIIjQCjyRqOfJzbb8K3GMbARk9SN8x jDtywyjzU6zGv+jojrMeq8zWN3/QqLMZMSXDOmkzKiDKBig3u8f8/COoMg4YuXs8bTll egDF4PQV0CFgRjGkrTAEk8JQACAVLh2tIWGru82gsj4pOZfYslq+/Y1pxtor2sQJMAuO zNB/Kq19cNGMYD+Doc2kQOldUynXQiVL7RnrS8lEr4jBO27BFB6L8J3hd/wz31MT8r25 5b5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=hr7aEVDfPA3dYafjUV8hGRFyRDiv7hTNOFhknOQL4qo=; b=DUSPYn85HGtnYlPGFYY5ML3oex3e/N9ONTE5aclMuhwLx4Phh+E4/w87ugjpEIdIAd NGSt+nuNWO+SBw7cB4L6cc4GOT3w+Ft8m3UdV8QyNZcTuDg3nJKwx/rnI1+vz1BVX5mN YNgokqEaDid6XuQ5dBHvtc/T5gakj6Hx+Gi/TZhqfDuwFj86gy6I3IeLhbhsVbX3fTRw +MOcduYGGcDp/VKT8ZlesNuN5kCHRvqRq/CqgE45yzkqW6CJzo+0iQP7QCY+BN4ssVii xEOg5HGCii5YV+J/z0e8+s8RvlhsWNRwQzgDx2ecG8npOGEvN+ZAFVv5v+FWbQ9NJH2C +Zrw== X-Gm-Message-State: AJIora+9wIhBhJ9ZisjOtjlyB6JN2yqrHHqyla188BBc6DsXic65ezVS TMBbnBsLnq8kDqPOxKkMr665oUaDe0BPd87jH+g= X-Received: by 2002:a17:907:9706:b0:72b:4b0d:86a2 with SMTP id jg6-20020a170907970600b0072b4b0d86a2mr11793826ejc.242.1659353723699; Mon, 01 Aug 2022 04:35:23 -0700 (PDT) MIME-Version: 1.0 References: <20220731201258.11262-1-andriy.shevchenko@linux.intel.com> <9b9abdf0-7cd5-df51-adbf-2225291f0dd2@redhat.com> <98f1509a-2386-7c8f-cf53-cdb93990aa74@redhat.com> <76186bb4-63ac-857f-f9f6-d020ca44c380@redhat.com> In-Reply-To: <76186bb4-63ac-857f-f9f6-d020ca44c380@redhat.com> From: Andy Shevchenko Date: Mon, 1 Aug 2022 13:34:47 +0200 Message-ID: Subject: Re: [PATCH v2 01/10] mfd: intel_soc_pmic: Fix an error handling path in intel_soc_pmic_i2c_probe() To: Hans de Goede Cc: Andy Shevchenko , Lee Jones , Linux Kernel Mailing List , Lee Jones , Andy Shevchenko , Christophe JAILLET Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Mon, Aug 1, 2022 at 12:53 PM Hans de Goede wrote: > On 8/1/22 12:38, Andy Shevchenko wrote: > > On Mon, Aug 1, 2022 at 11:52 AM Hans de Goede wrote: > >> On 8/1/22 11:29, Andy Shevchenko wrote: > >>> On Mon, Aug 1, 2022 at 11:14 AM Andy Shevchenko > >>> wrote: > >>>> On Mon, Aug 1, 2022 at 10:43 AM Hans de Goede wrote: > >>>>> On 7/31/22 22:12, Andy Shevchenko wrote: > > > > ... > > > >>>>> Note alternatively we could just move the pwm_add_table() to just before the "return 0", > >>>>> there is no strict ordering between adding the mfd devices and the pwm_add_table() > >>>>> (the pwm device only becomes available after the pwm-driver has bound to the mfd > >>>>> instantiated platform device which happens later). > >>> > >>> Just to be sure... How is it guaranteed that that happens later? > >> > >> Ah you are right, it could happen immediately if the driver is builtin and > >> has already registered (if the PWM driver is a module, as it is on Fedora, > >> then the driver will only bind once the module is loaded). > >> > >> Regardless there are no ordering guarantees between the probe() function of > >> intel_soc_pmic and the consumer of the PWM device, so the consumer must > >> be prepared to deal with the lookup not being present yet when its probe() > >> function runs (*). > > > > Would be nice to have, but isn't it the issue with all lookup tables > > so far, e.g. consumers of GPIO ones are also affected the very same > > way? > > > >> *) ATM this is actually an unsolved problem and this works only because the PMIC > >> drivers are builtin and i915, which consumes the PWM for backlight control > >> is a module. Swapping the order does not impact this. > > > > Even so, I think we can't change order right now because the issue is > > much broader. > > Ok, lets go with the original v2 1/10 patch then. In that case, you > may add my: Will do. > Reviewed-by: Hans de Goede > > to the original v2 1/10 patch. Thanks! -- With Best Regards, Andy Shevchenko