Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp380573pxb; Wed, 14 Apr 2021 18:29:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHTHbd3T5cQose75JDcGAb/GDyIMYd+EukQ9y4ugSW0oENkLR90BMKkhdu+NjZAQ49rXvt X-Received: by 2002:a05:6402:176c:: with SMTP id da12mr1106131edb.325.1618450164836; Wed, 14 Apr 2021 18:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618450164; cv=none; d=google.com; s=arc-20160816; b=kpVunnibj+1sLsoq6jTiy7k9og4XNYrb5A7f1d0+NW4sRkZEx564gmCxMz7SxemJ9p 1vck0fasWwpEvLIvLEwsK34ysj7Ivhx7H605Zo1OpzEtWMYggiaSTrFhwUi5aLkCmeMX f7tfPLs3pWNwZ6CbM9DMtM+G1t0THFoSTUyzN1+H6b/V9Ur0ON25Uf0cfVxO3osl/S1M 1pc46IdkOIbApOAvt7C10N7YKN9iWQJzV4jMzzkL2XTgVdi3G1igYIzhwYrRHyeiEKhk Meo/22lRon6kDLyvTj+Due90Ky4bBP/MJr8EkFoHZuJuy6OfcG+/q77JP6o4M2MJ+VYg F9ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=FOM9b0pdtnYk8Fnx4fGxxS9X4Bl0c34VqGJkMkPLCys=; b=ORuYlKIt937tkWdL88R2I08SnBn4RGx7x0fNWCditMWjulrvflwxdVqINIaK9coGlr Fx3gaq63R2vgqGXfEIoUxGpnNi5dwNE8GmnbYsMLDJAUaP3gA/wLgWL5hCskw4SVYpz4 zvPsRZewj3zVkdNjXT/b6oMy9XK/ZZtDCWacWgWip/Y5f/kG8480w2uYNxH3ndqn5HFI La49GgKXj+zALOadrjHysxfpEftR8knJ0T1oEvT3ZhVcqZO0SlSPnYL1BXGUGYCs3p1X z8XBBdnnN5kMVJux6ZmKntDEAIRnAn4cm7MiTp385urmZciy5NbYq5a2oRLSjsfZPFDo 9Scg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yj16si901181ejb.413.2021.04.14.18.29.01; Wed, 14 Apr 2021 18:29:24 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229493AbhDOB2f (ORCPT + 99 others); Wed, 14 Apr 2021 21:28:35 -0400 Received: from gw.atmark-techno.com ([13.115.124.170]:36044 "EHLO gw.atmark-techno.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbhDOB2f (ORCPT ); Wed, 14 Apr 2021 21:28:35 -0400 Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by gw.atmark-techno.com (Postfix) with ESMTPS id 718408048E for ; Thu, 15 Apr 2021 10:28:12 +0900 (JST) Received: by mail-pj1-f71.google.com with SMTP id h15-20020a17090a054fb02900c66a1b9826so9523899pjf.8 for ; Wed, 14 Apr 2021 18:28:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FOM9b0pdtnYk8Fnx4fGxxS9X4Bl0c34VqGJkMkPLCys=; b=f2q5AA2VPFvCF8vSvrH0QtkiOmqhH5/AAIwc2tW+osoZRgBQTu7sEH/8PDcieFsgkr AnUKRxkAbY9e78GTZUqV4lOOEd3k51QGgyXf856iPJ32aqJ6OVYMKvV2+wsgveR0cu44 N+Vm9x9lfoQO285Md/1GrpAF/e1ZKye6VdoIOMIrDL2QTrgndDWNT1KFsMCFnlO+eRRb CegLBPc4CEQOZF/NwegWjQsE/ha+JV0VZHxvyW63gISSRLpMOYVZJN5Nt/ZyTan9hYwX hnhxoeQfpWZf3lKaPAbpr9xiajxFftetPn2IuCsVELeBq0HScHA9jII39Dz2ylWdkys8 mn9A== X-Gm-Message-State: AOAM533aSyFX366s6NXjFkzj8n8eQh512kDPONXyC6IkRg69gGtaQEuu Co5qoJ0QAG0sQ4YA6akQhtODhktZtAqZVl609LfzF1TM/Wp+KtxxujC9EYjAK1uj203mnmGCyjm 4R2wzC4MMDOcqhlb2uRnUgYV7mj3f X-Received: by 2002:aa7:9299:0:b029:21d:7ad1:2320 with SMTP id j25-20020aa792990000b029021d7ad12320mr936593pfa.22.1618450091301; Wed, 14 Apr 2021 18:28:11 -0700 (PDT) X-Received: by 2002:aa7:9299:0:b029:21d:7ad1:2320 with SMTP id j25-20020aa792990000b029021d7ad12320mr936569pfa.22.1618450090996; Wed, 14 Apr 2021 18:28:10 -0700 (PDT) Received: from pc-0115 (178.101.200.35.bc.googleusercontent.com. [35.200.101.178]) by smtp.gmail.com with ESMTPSA id e1sm643595pgl.25.2021.04.14.18.28.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Apr 2021 18:28:10 -0700 (PDT) Received: from martinet by pc-0115 with local (Exim 4.94) (envelope-from ) id 1lWqng-004w4O-Qv; Thu, 15 Apr 2021 10:28:08 +0900 Date: Thu, 15 Apr 2021 10:27:58 +0900 From: Dominique MARTINET To: "Alice Guo (OSS)" Cc: Shawn Guo , Krzysztof Kozlowski , "robh+dt@kernel.org" , "devicetree@vger.kernel.org" , Peng Fan , dl-linux-imx , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [EXT] regression due to soc_device_match not handling defer (Was: [PATCH v4 4/4] soc: imx8m: change to use platform driver) Message-ID: References: <20201120101112.31819-4-alice.guo@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alice Guo (OSS) wrote on Tue, Mar 30, 2021 at 02:41:23AM +0000: > Thanks for reporting this issue, I'll check and add a fix to handle defer probe. I haven't seen any follow up on this, have you had a chance to take a look? If this won't make it for 5.12 (in a couple of week probably?) would it make sense to revert 7d981405d0fd ("soc: imx8m: change to use platform driver") for now? While looking at the code earlier I also have an unrelated, late-review on the patch itself: > +static u32 __init imx8mq_soc_revision(struct device *dev) > [...] > @@ -191,8 +223,16 @@ static int __init imx8_soc_init(void) > data = id->data; > if (data) { > soc_dev_attr->soc_id = data->name; > - if (data->soc_revision) > - soc_rev = data->soc_revision(); > + if (data->soc_revision) { > + if (pdev) { > + soc_rev = data->soc_revision(&pdev->dev); > + ret = soc_rev; > + if (ret < 0) I appreciate current soc_revision are "small enough" (looking at include/soc/imx/revision.h we're talking < 256) so this actually works, but would it make sense to either make soc_rev signed, or to have soc_revision() return a s64, or have the revision filled in another *u32 argument to make sure the error is an error and not just a large rev? This is most definitely fine for now but that kind of code patterns can lead to weird errors down the road. Thanks, -- Dominique