Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4881715rdb; Tue, 12 Dec 2023 11:56:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQQSKInErhXUsVEgm9aKyFCwfqAZdzKTh+KtY0S0TqnH6jvF/dNka7qBVXHRi2FkC1VvXC X-Received: by 2002:a17:90b:514:b0:286:ab98:ea56 with SMTP id r20-20020a17090b051400b00286ab98ea56mr5219784pjz.82.1702411019538; Tue, 12 Dec 2023 11:56:59 -0800 (PST) Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id em9-20020a17090b014900b0028ad088026asi704008pjb.76.2023.12.12.11.56.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 11:56:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=C6pOAmIE; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 9627580A97FE; Tue, 12 Dec 2023 11:56:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229975AbjLLT4n (ORCPT + 99 others); Tue, 12 Dec 2023 14:56:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377250AbjLLTlw (ORCPT ); Tue, 12 Dec 2023 14:41:52 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1EB0A6; Tue, 12 Dec 2023 11:41:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702410117; x=1733946117; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=vIWEtOl4Uah8SXwm6r6/k3M+wS2Pt4Yd4dbZ3qtxOTc=; b=C6pOAmIEKNkFp7/BZXCzQwFxYjK3zxDnPiuSGvYc0jyPvAigqlHpbY4a jhGQIOCRRhAaSc4ExFqdRLQT1148sr1jhsyhjAMZIkZfHVA2JNIgEVWKI PWp1nugug6wh0+HSfq9QycifNYdxo0LZSByrQ7QUZEkO4ysJA4mtAbCmo 1lt4wbZFz7KmmhI4jpBTrza3XLTsuip6fN4zW0R7ZFsJdArMSIFvyKiKK WFOa1zh9FC3je8YI31lgHI7vJ5EN6142+yAAuOeFhuUuZDsvwDL8+ddMS X8pArrVjtIDCAegfJEgYfe2PqYoJPCE0WxHXuf7jTmiAxFAEDl+vC9OOK A==; X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="1699542" X-IronPort-AV: E=Sophos;i="6.04,271,1695711600"; d="scan'208";a="1699542" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2023 11:41:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="864332592" X-IronPort-AV: E=Sophos;i="6.04,271,1695711600"; d="scan'208";a="864332592" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by FMSMGA003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 12 Dec 2023 11:41:55 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 12 Dec 2023 11:41:55 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Tue, 12 Dec 2023 11:41:55 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 12 Dec 2023 11:41:55 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZvcQhUByucUQxsrCEp++waU1KaE5jDmPxo7vRnPeqCV8Mafss+xECMkcDmJdFAihqV+P6M2AUTzhFGTuGvia0Lv1S4l3kgZRL0+MJlDyu2YgFlz/8h3ibf16pk+ctkZVpTjQVPW/VBSHsNJ9c4JWSysp7hh+WIdHfiJjM6DbTq7QqFkWgWNTphWqDWlDGT2B1xxsntNnc8ERRp1lnOuSOXG3JJ1jN1YzusAotX7CMzJP0gXJfr1Z+ThEShV255BsCmbGK0hhD3vo3yHFNknLaWE57EYeNx8FoPIzczou2VG26iY1U5IKwYJ3D33kC+SH892wZf6OJtpFqOR8q+lyLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oZWNeBADV+qgMEDdakW6iBB5r3Luk3LfuKDwf3a7mPc=; b=U+LZYyYI1hpQP0FaHPNG2LVkaNKN2WIHaYnsUI5xDmE9hG/Zba/P697PybMdBoJJ+xD1Zs6HbL2LO8s5Q2tL+bZ6K+iRmVJXcpWAp+wqaWUt6+X/72j7oXLKwvOlzzeMJkHtppOl7Zne75cGO1xoOEr7Zyf3ZjYzLdBcxew780WufYT/2xYI7lX+2B0v/lQKsvTTnL4FwuXJlxaRbaVrGddYUo7Kfd9fkDrKebptpahwK7AWQ5KtKdRmYvftP1ULJvRV4ZM2zq0tcpfAPTdp2/IQQLdadf6gmfNBFWu5jtDEcXReW6dCB95l9ajeUlQYNr6Ga8LZg8cDxA2zfLLX+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SA1PR11MB6733.namprd11.prod.outlook.com (2603:10b6:806:25c::17) by SJ0PR11MB7703.namprd11.prod.outlook.com (2603:10b6:a03:4e6::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.33; Tue, 12 Dec 2023 19:41:53 +0000 Received: from SA1PR11MB6733.namprd11.prod.outlook.com ([fe80::da91:dbe5:857c:fa9c]) by SA1PR11MB6733.namprd11.prod.outlook.com ([fe80::da91:dbe5:857c:fa9c%4]) with mapi id 15.20.7068.031; Tue, 12 Dec 2023 19:41:53 +0000 Date: Tue, 12 Dec 2023 11:41:49 -0800 From: Ira Weiny To: Vishal Verma , Dan Williams , Dave Jiang CC: , , , David Hildenbrand , "Dave Hansen" , Huang Ying , "Joao Martins" Subject: Re: [PATCH v4 2/3] dax/bus: Introduce guard(device) for device_{lock,unlock} flows Message-ID: <6578b77dc911e_22601629440@iweiny-mobl.notmuch> References: <20231212-vv-dax_abi-v4-0-1351758f0c92@intel.com> <20231212-vv-dax_abi-v4-2-1351758f0c92@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20231212-vv-dax_abi-v4-2-1351758f0c92@intel.com> X-ClientProxiedBy: SJ0PR05CA0059.namprd05.prod.outlook.com (2603:10b6:a03:33f::34) To SA1PR11MB6733.namprd11.prod.outlook.com (2603:10b6:806:25c::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR11MB6733:EE_|SJ0PR11MB7703:EE_ X-MS-Office365-Filtering-Correlation-Id: 2015c629-ecb9-4e04-e064-08dbfb4a640b X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IqOxw8peDe0jXpXjJ9emtx1HKDF8Bv1fBM6HUxNa0OQ1mBZGKr/YRv2YDTL2zQG+9o/2l+5JDqmBbKKdin/0Mv3ZnGP+njIE8P6W81iBwPBdDqPNjesolitJcYBx19gN8p0jO+9mokih6oEzENaBnaoSyJF+404/QnZSh7YKyiNcRLJ12bjsHq7aZhvhE3VnYxxiyLU958LJwIkdbbU1Za0wpXoyJkLY5741y7vn65KFpw7BNN+zG+o6yLCopLJaLAMzBYVmYXfcbmwjcLERdKi8IiZrPiL4iv7n7U2DyYqeba0S1AAe9gg1ZdAc+5ginkDlNyZbolulLcRPE1acQkGmG8V/BKWhRmkmu7F2ZQdGG+x0yCBzAsUs+i/EXAki844yr6fFibWJN5ob7/mS4YfKNh4aSNR+i1pscX6fCPWgc3eg0Wn4sroCXkZ9Ox85fQUIVPyQaeBDcgS6LCYhBmPQFgALq6QXjpKXeligmQuSxAuDGm/mFlW9yZVzmB7vfnjCXOh/9hFmJyC+jCHLV0CnDiykulw6ZHJrOiBYYZOj+BUX6TDjbjpdD07U1cXm X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR11MB6733.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(136003)(346002)(376002)(366004)(396003)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(9686003)(6512007)(6506007)(5660300002)(26005)(44832011)(6636002)(54906003)(66946007)(66476007)(66556008)(4744005)(6486002)(2906002)(83380400001)(82960400001)(86362001)(478600001)(41300700001)(8936002)(8676002)(4326008)(110136005)(316002)(38100700002)(6666004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?BzAstGTQ5qJ2+HhC94uA9P+WWtwwrG2H51TINnXchz4CthHDlzwDO/7XpnK9?= =?us-ascii?Q?IW4z8DZ3mccChm/muw80nt1lIj8Mb1+ic/T069E0/UB6m70VX7gvtCaDSztU?= =?us-ascii?Q?Jwiineag2XXnKE0Ehza7I1SrcuAX62wJeiclTkS+Rx9OqeQNUXpWAayy9+5G?= =?us-ascii?Q?kQb6F6cCuGSFKBw2SmVdGlxW6rGUNFA9gAw3/iCEPHe50E/qiNpC0yQzJxnM?= =?us-ascii?Q?MCggMLRwORQCKebUhqZNoEj4z7WlLetkhUcqlnpuxldCvTxok1+SIH11RIrb?= =?us-ascii?Q?/BZ6xmxS8wTk/XVpOIScfhoB0C/6BsFrHe3RohkNJU5EA2PGCPiipCpbvDDa?= =?us-ascii?Q?oUdYGsQzOpst55jQ88RhrbUsyGULJxfJxrtWBssQc35dypW9bHXbJ2mCLH6v?= =?us-ascii?Q?Zazeu+iBkfvhN0jJzfBazLK1ndbmR5XuZfhh4WiwzPrS3n6ZJe56xyyeKmBv?= =?us-ascii?Q?SzItL+y9RPV2ZUcaIQk+xUgOLC243BdAKlkBFKa06EljFwNtcUBF5sC9DdKh?= =?us-ascii?Q?AAb2+LBBs96uqD2jPDi47qIj5asbEMAtUYOk2KlWiUXln8uYK7W6ujMVko3s?= =?us-ascii?Q?RuYc4ZQFAHtQIzrKfu9zx4nhFNbEG2i/uROSpLvNIkwvtOx8FXsqdUN9L8Ns?= =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XXjRkqYi02V0F?= =?us-ascii?Q?zWK1iP22PGbFsFyHYi6ocUZlyNRpN1rDHCU+tbGv?= X-MS-Exchange-CrossTenant-Network-Message-Id: 2015c629-ecb9-4e04-e064-08dbfb4a640b X-MS-Exchange-CrossTenant-AuthSource: SA1PR11MB6733.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2023 19:41:52.9474 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PlcqWNjKBzigE+EWEaUxwMd5bejkKAU+6eNdmVONoq6Pxm4LLCx1rPAdy7lvkHunfu4WkDKQiIouI+r8GvZV7A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB7703 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 12 Dec 2023 11:56:56 -0800 (PST) Vishal Verma wrote: > Introduce a guard(device) macro to lock a 'struct device', and unlock it > automatically when going out of scope using Scope Based Resource > Management semantics. A lot of the sysfs attribute writes in > drivers/dax/bus.c benefit from a cleanup using these, so change these > where applicable. > > Cc: Joao Martins > Suggested-by: Dan Williams > Signed-off-by: Vishal Verma > Reviewed-by: Ira Weiny