Received: by 2002:ac0:c50a:0:0:0:0:0 with SMTP id y10csp1209393imi; Fri, 1 Jul 2022 05:27:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1schNtqOZa8dPFCmg85m0ifM3wbHh28hGMZkb+4rBRCrnqMvPfI1udPRfIfh5zu/9C1EDaW X-Received: by 2002:a05:6402:2708:b0:435:da6f:3272 with SMTP id y8-20020a056402270800b00435da6f3272mr18193331edd.160.1656678476620; Fri, 01 Jul 2022 05:27:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656678476; cv=none; d=google.com; s=arc-20160816; b=ERX0xsmo0wo7riM1wQAh2CuNi82F/CFRzmPrfLRluQ6H5Y8/BISMzth8+Q57vIkzyK AO9fzP0hbhz/H8Pw1vK6ZWqbt74SehT1YNlWHgqJ2TZUGn9GcGbb+PjVygfws++z9EsC mdRyyJZ3W4r6Bx1GuyqONFWqAIfJ1vRNtN88/RkE1EJrsoLIoUYn0Pyr4SSY9lCdVSRS Ueqnoc7LSGEIALo4hd4W1xbz7AfLufXkq6Ico10nZjcovQNQtpyRC0Y1fuPfsjtuYECb ohJnsFuyNF3Ebl5PkBLvC3fChLvcEu//xVidBSk1Q/JnCuufEEL3QqQaq7pfQal9UpjF ZCKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=gyPwB5+OVO7siaEhrsEb3sbbKDhwy+paF7E/JsUmC4o=; b=asdhOedifdrvbMMkcNXWvODwTqrm5vmET1FicrbKSpA+ozXnpPCX6/ldMCptyHwLO9 weLHu2yFmm+4hJaXV+ab5+mrO5bzwfT3tOVMF66KJoNcxiMVhKg7BAFBpE2Inipbz+V0 kfTMj7wCbYFChc5gY/LP4rXIPC0HknWvipSSRT2+G+y7QXTI8Jqj9ra74h6GRFJlrEFb ZXQv54lyBQNdRunAb9SGY34ZJLhF6Gr/yRVohcUjySqmb5ixWGM70cQUQI7QKD51eLx0 QV/CaO/IqydfHa8sSebmVk2e2EF8BLOf7atdlzLH6sBGGwWkTVXKUBAQ1VUb9l8wtKfg fhEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=eDjzAQca; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g16-20020a50ee10000000b0043580a9f835si738576eds.494.2022.07.01.05.27.31; Fri, 01 Jul 2022 05:27:56 -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=@sberdevices.ru header.s=mail header.b=eDjzAQca; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236314AbiGAMAj (ORCPT + 99 others); Fri, 1 Jul 2022 08:00:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbiGAMAh (ORCPT ); Fri, 1 Jul 2022 08:00:37 -0400 Received: from mail.sberdevices.ru (mail.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB62F83F08; Fri, 1 Jul 2022 05:00:31 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mail.sberdevices.ru (Postfix) with ESMTP id 5CC6F5FD04; Fri, 1 Jul 2022 15:00:28 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1656676828; bh=gyPwB5+OVO7siaEhrsEb3sbbKDhwy+paF7E/JsUmC4o=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=eDjzAQcaJMOWRF96FnZqGtaG2uqpv70+/HYiJdlEJlXceRdQTaaS1kH7u7CkU2hDa AtpoXSaPdwPwOUL4+WjbXLk/5iVFXmocr/xsBvien4bGoxTErP9Y+qqH7ATtlHReK6 LYUTE+uzSzuFHJJEcwlX3aB+L38EnmZvPlw8wag0pOH0Cv0mjtwSPUsDZ3zns4e7gT YVgxcc5nBHPm2XPbcdWahSvsI7DD3MHjOHkkpXS/uTJVNJ/ZAKoh4zJHRLYa0JOuQ/ 9DFyISIg/fwdjRK+20POfGmHzU5T5hREjPp5gK4V/s/zh6yttn9GyoikOWRpWdBuAk SoVKM3N3BeG/w== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mail.sberdevices.ru (Postfix) with ESMTP; Fri, 1 Jul 2022 15:00:27 +0300 (MSK) From: Dmitry Rokosov To: Jonathan Cameron 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 Thread-Topic: [RFC PATCH v1] iio: trigger: move trig->owner init to trigger allocate() stage Thread-Index: AQHYdd/Pt2zXEFx7c0Or/RCut5+rEK0/GLKAgCpM/oA= Date: Fri, 1 Jul 2022 11:59:59 +0000 Message-ID: <20220701115823.vywhifktaxcr72cc@CAB-WSD-L081021.sigma.sbrf.ru> References: <20220601174837.20292-1-ddrokosov@sberdevices.ru> <20220604145955.2a1108ca@jic23-huawei> In-Reply-To: <20220604145955.2a1108ca@jic23-huawei> Accept-Language: ru-RU, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.1.12] Content-Type: text/plain; charset="us-ascii" Content-ID: <18D36DC6D25ED14FBF5A05D4E02E3307@sberdevices.ru> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2022/07/01 07:59:00 #19867624 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR 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 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? 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: >=20 > > To provide a new IIO trigger to the IIO core, usually driver executes t= he > > following pipeline: allocate()/register()/get(). Before, IIO core assig= ned > > 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. > >=20 > > 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. > >=20 > > Signed-off-by: Dmitry Rokosov >=20 > Hi Dmitry, >=20 > 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. >=20 > 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. >=20 > Thanks for following up on this! >=20 > Jonathan >=20 --=20 Thank you, Dmitry=