Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp892616imw; Wed, 13 Jul 2022 09:50:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sUAfHXVdGLPPWwQ4fzEM8i2/bO0+PJJW0Eza6GwNNmVfMmd8RaRyU//DyhpxFMmh+w9Y9I X-Received: by 2002:aa7:8e17:0:b0:528:9f8d:ad38 with SMTP id c23-20020aa78e17000000b005289f8dad38mr3957334pfr.4.1657731017576; Wed, 13 Jul 2022 09:50:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657731017; cv=none; d=google.com; s=arc-20160816; b=Q45CM7rZMtAcuWS4AXBUqQqbwRvNWpMb4372G5G8Ad7vu/MsWKGM03kK893L4P08ZY Qzyn6ZV2IUCkm0Q9uEUMMTWNI9wQiaV9F0L6Pp6VQTzreX7oYclKphEd6Ma7HawImEQU 6FrX95s1amftlZBrUT8/fo5oOwbVYYYBudsKhhe0HYPYy/DGkWgdt4wYQlqirR8QHYPU MGrwDwVMmIJF/iYPAnLoRuL05xQ3dFNuPIB4cW+iuLj+6HP8Pol+SorutBs+rl72bCCv 5bwIUHbOFlMmGaw/jxJg6ygLFQkr4V7hifsDC+lCuS/127RgTwCLFQa5R2LL/h0nbeaP 2K0Q== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=CH+o7CKIzFO1/d98xK236zo2e6LLycyceC97szn8mTM=; b=D07wTMutOyuyy6kMlcPYaVdaUhxczfI8X56/UM0XzT9WMaJJbSbxpVhvffj4nz4zXU vBjSrotdEI55wW6aKd04RGmSXKE4IquQI70LQ87pXLkKFq/2l4wDVyLA3YqxeRbzHLZg COUqkfH8gMIzxSEq8iBYazh2WFieXlXWNaXBVkn5DBceysi0GpOga04DoMoQk4YBYTB8 KrjEvj6/gpaXHT4sWnIZ9T6zUH0QIT/AOGjj6vFmnDDKOqweTsl07RuZv2u+os+hckCL da482K99gGVoZrxR0W3PgCIRPnfvpjBx1clRRh3QG7aabXJBuwOFcJKQU3OQ4VikwDM3 g8mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GoRZ576T; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y8-20020a62b508000000b0052ac0e55a13si14624890pfe.197.2022.07.13.09.50.03; Wed, 13 Jul 2022 09:50:17 -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=@kernel.org header.s=k20201202 header.b=GoRZ576T; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236837AbiGMPyz (ORCPT + 99 others); Wed, 13 Jul 2022 11:54:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231703AbiGMPyx (ORCPT ); Wed, 13 Jul 2022 11:54:53 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C6164D4F0; Wed, 13 Jul 2022 08:54:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id B3792CE2311; Wed, 13 Jul 2022 15:54:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDA5BC34114; Wed, 13 Jul 2022 15:54:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657727687; bh=yzj2tQXkHXeXbrjacBMpqSpUwIv3NFm5hxQonwujK30=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GoRZ576TwxqW+bs/Qw6T/u3KWjC32ul69wVFyyN2sjCMau09dzsCAwPt67j20lA7F hDgkyfQv8EH9FLHIB8v72eF63c6O3JKzwRCLvmApLBsNTOvyE7lVirpvNcNWChHrya lzUJX0GWqTWp1o3mL6VWWHZd/eM+z9/S0XkchLRe1BATTZ0bZ0PcxDhjTePHslBksV WArYwu3efGYaRctPpd/cVHtoXPv+ox1yfjzaLic/QzB40m3iTk6/8EVlnXtvs6Yx/U WmXI3ty6vvIgIgpxhJ/4k/S1t0Jmnm6UHsbRPNSkCJyeFV1DUdUmt70isrLEPc1fCs CLaSL/+zbljAQ== Date: Wed, 13 Jul 2022 17:04:36 +0100 From: Jonathan Cameron To: Dmitry Rokosov Cc: "robh+dt@kernel.org" , "lars@metafoo.de" , "andy.shevchenko@gmail.com" , "noname.nuno@gmail.com" , "linux-iio@vger.kernel.org" , kernel , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH v1] iio: trigger: move trig->owner init to trigger allocate() stage Message-ID: <20220713170436.32330fa6@jic23-huawei> In-Reply-To: <20220701115823.vywhifktaxcr72cc@CAB-WSD-L081021.sigma.sbrf.ru> References: <20220601174837.20292-1-ddrokosov@sberdevices.ru> <20220604145955.2a1108ca@jic23-huawei> <20220701115823.vywhifktaxcr72cc@CAB-WSD-L081021.sigma.sbrf.ru> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Fri, 1 Jul 2022 11:59:59 +0000 Dmitry Rokosov wrote: > Hello Jonathan, > > This patch has been on the mailing list for one month already, but no > comments from other IIO reviewers. What do you think we should do with it? > Is it a helpful change or not? Given I'm way behind and timing in cycle, I'm probably going to kick this back to start of the next cycle. Sorry for delay, Jonathan > > On Sat, Jun 04, 2022 at 02:59:55PM +0100, Jonathan Cameron wrote: > > On Wed, 1 Jun 2022 17:48:32 +0000 > > Dmitry Rokosov wrote: > > > > > To provide a new IIO trigger to the IIO core, usually driver executes the > > > following pipeline: allocate()/register()/get(). Before, IIO core assigned > > > trig->owner as a pointer to the module which registered this trigger at > > > the register() stage. But actually the trigger object is owned by the > > > module earlier, on the allocate() stage, when trigger object is > > > successfully allocated for the driver. > > > > > > This patch moves trig->owner initialization from register() > > > stage of trigger initialization pipeline to allocate() stage to > > > eliminate all misunderstandings and time gaps between trigger object > > > creation and owner acquiring. > > > > > > Signed-off-by: Dmitry Rokosov > > > > Hi Dmitry, > > > > I 'think' this is fine, but its in the high risk category that I'd like > > to keep it on list for a few weeks before applying. > > > > Note I'm still keen that in general we keep the flow such that > > we do allocate()/register()/get() as there is no guarantee that the get() > > will never do anything that requires the trigger to be registered, even > > though that is true today. Which is another way of saying I'm still > > keen we fix up any cases that sneak in after your fix up set dealt with > > the current ones. > > > > Thanks for following up on this! > > > > Jonathan > > >