Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp489090rdg; Tue, 10 Oct 2023 17:13:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEK378vdxuCIdU2ge7yNkQ4onJc5+tiifJLu+FKv8TJj1VQg1j+QJR5fpN+IDrrBtC1Rl2r X-Received: by 2002:a05:6808:191:b0:3a7:3ea1:b5a0 with SMTP id w17-20020a056808019100b003a73ea1b5a0mr21373366oic.47.1696983225135; Tue, 10 Oct 2023 17:13:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696983225; cv=pass; d=google.com; s=arc-20160816; b=Hg0J4ue9eIe6ug2Nm5MMMnHGwmJL+8Af7IJHk20nCZwDCoxYgz6EZGOP5iK19imuX9 F8jzo3meqDPsmQJ2rTvytHH0sc/eYDXPMCrhF20U4Cd9JqBWQAukcIf+iUlBu1EHNYVr +ygC2bDIZNmnbG7V8cuMIyRVkoibrM2D5uuGHyxdez0cf1gwp5u6RhMjhFqyZsVWGjas 5v20kg2wiwbuSdK1i6zdJG8Ug4ABHQ0uc1zon0wA23HSLyg0RpH6xjaUkIrHbYf0RPUw LDnnj5EQvDd/iDQP76It42EDoSmwLQ5AT2wxde9MxNNwdgkNRn2Q+iN9HtGuxqIQ/5ew C8JQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=fIGL3ACGT0Bbq1MqdpHVFnn6EfhY+0iztlBqC14lqso=; fh=FSpghAyNTpnqEzBwwxRnraAegIjeFW+NXG91moWFRZ0=; b=H3euMaF1kw9uVo+Kbx61+tZQg7ubWhy5Dbx8lUNVC7uZOJ4StdO9wsdY7QWIdPqCG2 +Mb00Q9tw/FTqXPVozqiejLJtK5Id75bsHsqK18JjqnEvCgMF1mCrHYQTFjEsJ2iBlbl LXUkqblC2oriO1PmBFZAWifsmUBuWv9NCLcmXD2QM7PxdK8k4URJ3XdAByV6aXFBpEE3 ifpLIYfMoq50+IeEzMrSYVR6ev278osRhiqiFeordazdFButTMgbdRPZsCuB0HN1+z5T JrAAOOiBW2Klg7XAGeQgDWP3/7rucanIzu5OTOSTtQTgxco6ebmyKUY4/oYEbdzh5nwa AuAA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=O16VK04l; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=os.amperecomputing.com dmarc=pass fromdomain=os.amperecomputing.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id t4-20020a63f344000000b0058b8c72c5ddsi9078734pgj.607.2023.10.10.17.13.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 17:13:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=O16VK04l; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=os.amperecomputing.com dmarc=pass fromdomain=os.amperecomputing.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 7FDBF8025406; Tue, 10 Oct 2023 17:13:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344282AbjJKANg (ORCPT + 99 others); Tue, 10 Oct 2023 20:13:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344314AbjJKANd (ORCPT ); Tue, 10 Oct 2023 20:13:33 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2122.outbound.protection.outlook.com [40.107.223.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C66A69B; Tue, 10 Oct 2023 17:13:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ca6HLp7UXeoEA6LIiQ2cJivD+dp1AIyZfFo1viE6HZKXHxCsJtuTiQqRq5MyGHglePRbej8O7E+/Cor8AIntv6v8/fvmOWlpv+3XAR+w9RoDvGbxJSqDSUV4RO5wOM3dguNsIWbmiDNawmeO/Jte3Co+7uJDoev7ndKxjx+H0ZYRo9sYxjL4+0v1C2g1DJIIvXyAi0EhAE4BcjCY3PwMqdjtFFVbEY25+Hoqjikq6z5dxQIZVGqeCkKCeYVauUw+hNM1wWpUwXByeVzgYi9KdQiowAZvvATex44yV6Kib+L2CikXv3ovzH3l4+4nEIjdqUjDAh9mnVkel1lR15D0ng== 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=fIGL3ACGT0Bbq1MqdpHVFnn6EfhY+0iztlBqC14lqso=; b=E1Q+w7y49SQCwl4ubZ/KInVETi1enisUO/gTmiH2nF8SZvFyBcECDT62o+uVWKbwdnrb/bslDqxYnqGt/26fRXbfzNttC9f3/FU+TTJNHPCba+Oqf/Gwi8RDsU+CaVauIJmLCqZmfjPxmiQm5oBNG/0j8VIY6vYfOxcKve/3LIuFgLicoZn1RlDBq9SgGMMQg4M9w8mc5Fd/A2h4jsd6Q/YFz0tckuDvlby+qUH9tTwWUVqml1D8cOrU23hefQbXZ6L3+KzTrB/0vatdeDH02UfdUOuJ9GzQUmyxhXtkrutkcwcdo7Q9vZ0dOsxz6rQw9A3zvmoUqjEvmIE7Tc1X0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fIGL3ACGT0Bbq1MqdpHVFnn6EfhY+0iztlBqC14lqso=; b=O16VK04lLVwlEJbuEYjs19KfAkYnfhc+gRsINeldflVIy7xipO0Uhzuc+tPaqyZ8stRYJdHK1EFIVNrUTHAgo3yqP9tOdquKrxgdZ+vXNzJTb6LoA86e2LnQUQpHQHjeNzLDiNTc9lnDB8YAstu4ddIBhRrNKme275YWA6Ysi+k= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from MWHPR0101MB2893.prod.exchangelabs.com (2603:10b6:301:33::25) by LV2PR01MB7766.prod.exchangelabs.com (2603:10b6:408:171::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.38; Wed, 11 Oct 2023 00:13:27 +0000 Received: from MWHPR0101MB2893.prod.exchangelabs.com ([fe80::b04:8319:9c23:c3]) by MWHPR0101MB2893.prod.exchangelabs.com ([fe80::b04:8319:9c23:c3%6]) with mapi id 15.20.6863.032; Wed, 11 Oct 2023 00:13:27 +0000 From: D Scott Phillips To: linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, "Rafael J. Wysocki" , Bjorn Helgaas Cc: linux-kernel@vger.kernel.org, Len Brown , Darren Hart , patches@amperecomputing.com Subject: Re: [PATCH v2 1/2] PCI: acpiphp: Allow built-in attention drivers In-Reply-To: <20230930002036.6491-1-scott@os.amperecomputing.com> References: <20230930002036.6491-1-scott@os.amperecomputing.com> Date: Tue, 10 Oct 2023 17:13:22 -0700 Message-ID: <861qe2qan1.fsf@scott-ph-mail.amperecomputing.com> Content-Type: text/plain X-ClientProxiedBy: CH5P223CA0016.NAMP223.PROD.OUTLOOK.COM (2603:10b6:610:1f3::21) To MWHPR0101MB2893.prod.exchangelabs.com (2603:10b6:301:33::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR0101MB2893:EE_|LV2PR01MB7766:EE_ X-MS-Office365-Filtering-Correlation-Id: 2808d902-1887-49a7-592d-08dbc9eee43e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7wyYm2N4UMXBqabBcYsJ3a/StMCbqb9gC4lSYixtYZCOSceuhqoXM3aGfwFfHUH/BaHv9kmxLWONgIDgv1O4u2uZ/fU69R38vg1fhO50FqS8TjRkkL/JKbTGtugMjVyVoqfmLfcq8pLyJ8plErX5KXshyENmwM9HYMRMe313SToy2tHacfX9muTah1xBiv+ymTzwl9xmQ5MM56lYke6s9sI/dhTA48hg7gobu6vOYasDYYjvpLbghSYDvDqW14Dswcl/HZHgFWjhZPQc1Rh7sXPdEWh2tHObZOEplmbv+ohe9EO5BkKeo+F9iA5+clXkponyFkkF3abf/rPw6RIQoLqkOP5n9s9ogF13lChVe3ERcswYq/f90Pis1jIGkUPoR9roRSon7j4QCSfazen3wlx1mVMUJLoswJLgkbC1L8uk4Mu/Bxm2GHpLlxRN0nlQcUP4PzSWNQT8H3klcmcFiIs2qwcLwsplxhmk6oRKwx69GXcDTaQYfigdvFd6Ot2TicdIz3CjRSw5x2aFv4hMIimdzMGtIeXpbjh3qqihWRgXPLTBRSS6jHcuTFyBTypBYgoakUh+02vPMz/M6ubh1Mrj709r+tZ6v4DZSARRwDL7gswv1bVgfj/ZHjAU7nlF X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR0101MB2893.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(136003)(39850400004)(346002)(366004)(396003)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(86362001)(2906002)(4326008)(8676002)(5660300002)(41300700001)(8936002)(110136005)(38350700002)(66946007)(66556008)(54906003)(52116002)(6506007)(38100700002)(316002)(66476007)(83380400001)(6666004)(478600001)(26005)(107886003)(6512007)(9686003)(6486002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6DfKBEXf1kPl6TiHBWCGWuCYNhpI83sBcPQ9OUGQ1LE796HJoq9Fv8V607vT?= =?us-ascii?Q?8RVOlEq66pprS9PjmUjxMqOk+Dqd91bnggcYoGmahT8lsyJ+u3pYOZ202isH?= =?us-ascii?Q?MRBNPizqnIFtELTWYTlmGMrN3BSTu6UTG4zymsnFVIBk5U9OmMblx3I/GGqq?= =?us-ascii?Q?95fruyMmeis0E90e1Hzhw0chj3to9IwnfE+i/BnvVmeJ4Tex921SsS1IlYQD?= =?us-ascii?Q?XrlSBVaZwukQ48UklY+gHinPWuQCy5K+WN7RyPi5EQmWIK57pK82d+td/K57?= =?us-ascii?Q?FDCdU7E5n3vTSJ2uaT4mUyXYeQcF3xnaW0+EpzUtZou/RGIT3Hy6DUc2s6ar?= =?us-ascii?Q?TNK5wXeOFa1KasHqQc319/PCbsfggkj/mR4loRjGO5w/BmuFDgalbA/upDar?= =?us-asc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dgdpZ7bAXQNOCavQ5?= =?us-ascii?Q?H5UgqmN/2VUib3zowDMPOgxGRn81s/r10YnLgkUm7g89Q3BRg+bdvWa+Pitn?= =?us-ascii?Q?d1wOhQK3RzED0xIKnKResinsiPYIlGk1IWOoMo5aSg4ZiqLV4K0VeWmAN2uE?= =?us-ascii?Q?0BOifyCkNrAI+4yUXzcrmnz2Pu+icr2SLbc2gnhjJhVnkBfTRahBuhK/yzPK?= =?us-ascii?Q?/IPoYoLu5d1UeoAsmwRrvjqtuvPvs+NTGhT2DlCxIvqJqW4pQFrG3wEhtZI+?= =?us-ascii?Q?xs1LXrhU8tIls2O05qh9qkOVaoS7r8zNECKZd2iT9lu+Jr8NvVL5tYsGx4OV?= =?us-ascii?Q?vcWVpZa0Fc4w0A5KioMfpME=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2808d902-1887-49a7-592d-08dbc9eee43e X-MS-Exchange-CrossTenant-AuthSource: MWHPR0101MB2893.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2023 00:13:27.4732 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iXmIkJPpoy7ntzWn4AlXDC1L11enFkXQyG1RgQ8Lf2UL3eBufouOxplSTUPYoupSbv8aRYMTmhh8RwTX8NZvMe7m6DAJV5rb6QltduB/h5pTD5+4DOgBybEUz7ZKR19V X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR01MB7766 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 10 Oct 2023 17:13:42 -0700 (PDT) X-Spam-Level: ** D Scott Phillips writes: > Starting from the introduction of the attention callback in acpiphp, a > non-zero struct module *owner field has been required in > acpiphp_register_attention(). Then intent seemed to be that the core code > could then hold a refcount on the module while invoking a callback. > > This check accidentally precludes the possiblity of attention callbacks to > drivers which are built-in. > > Remove the check on `struct module *owner` in acpiphp_register_attention() > so that attention callbacks can also be registered from built-in drivers. Hi Bjorn, ping on these, thanks Scott > > Signed-off-by: D Scott Phillips > --- > Changes since v1: > - new patch in the series > > drivers/pci/hotplug/acpiphp_core.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c > index c02257f4b61c4..9dad14e80bcf2 100644 > --- a/drivers/pci/hotplug/acpiphp_core.c > +++ b/drivers/pci/hotplug/acpiphp_core.c > @@ -78,8 +78,7 @@ int acpiphp_register_attention(struct acpiphp_attention_info *info) > { > int retval = -EINVAL; > > - if (info && info->owner && info->set_attn && > - info->get_attn && !attention_info) { > + if (info && info->set_attn && info->get_attn && !attention_info) { > retval = 0; > attention_info = info; > } > -- > 2.41.0