From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 62AFBC001E0 for ; Mon, 31 Jul 2023 16:13:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:Cc:To:From:Date:References: In-Reply-To:Message-Id:Mime-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+PmQfo/S+VvoHgXvCgiHYZMuFgaLVyBkf6sL9eK3dkk=; b=V4YA8a2LAb877j 1cQinj7q7wSWcwwZjHMZUwVJQ4LgHzqf0C4WhTxM7+wVbqrFNHVSYVyj58Bnd0lW5rfy1X8l3Zwgx pPoBewAObWT3wsu1hAIebtGAoKiUS0wr5odKbqBkTSmBtfioqmG80DfwfPcqDHUVWMS8LfcZR8TNm KqITgAEbl278CqXlV+f10YzCZChbNyo1v2I/ttlBVqw3jzUB9t5wD/ADmHbsNBm2TncAHvYqWm1W0 YFWmcW1PaXmehCMOGFyAgnHXPWBzclYZ2GKuMgG9gDg/SoEpFGU/SFsqmeNyoEC/5tQSuQ6Y8ydo3 bDTDoEYLyPdHc8Fx+M/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qQVVm-00GXSQ-2Y; Mon, 31 Jul 2023 16:12:46 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qQVVj-00GXRi-2v for linux-arm-kernel@lists.infradead.org; Mon, 31 Jul 2023 16:12:45 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 1B18E5C018D; Mon, 31 Jul 2023 12:12:43 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Mon, 31 Jul 2023 12:12:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1690819963; x=1690906363; bh=Nd NmSxtlFsEMzoXcqa9Y1UrUq7PfRm3QMd0u0om9fwo=; b=ii9PkP06rCG12PbQ2X Yjg/A+IYqX36u8EBJpq/Ing971sRR6zrDbZ6cT1ddBVFDrkrHDi+wWFkxCJBwktB aSzd4r8TcIHtXtga+FV1aQa923Yn18Uh0LDtKfNgLUtk2u0B3h/WFyo+9i+0+hOF mP3vh2bF3KWScKLCs6F96G76psUFmE+qwVnic/I/8ghy8LNna0JWBQpr4xf/nQOt UVC3ikGyElg7ltzFCMaM1hjI3Mkgc5dE3SFjrgFggPX0pWhLFq7p60IxzR+tfqc4 XkA64vCjTOuRswlr65nxf84YUbI22Rq40WGYCOJEnqo2cDt9mrADY87s8i98Si97 2S7g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1690819963; x=1690906363; bh=NdNmSxtlFsEMz oXcqa9Y1UrUq7PfRm3QMd0u0om9fwo=; b=Hxxvyo0t9jvGwDZlFnhWVPwW+PdpP Ff63Sv8xYnqbbghP5b3W7QMVJxmlmdJxb1b0geAXuBJwlVStdSmPJkrxe8rgLy/x olGLR3r06sole5M96I9tdJjblMcQh17TJW982jatrpc7UeMaop3oMN/X+GehqdUL h6bVwKxf+KM6nMsI/pzGTIH0CsdqDS08HoVm2cUf2OsrTlN0AYyG2NJ9i2u8Y0T3 PkDlc0mK+wGm+PEAepV/g2+0gPzQQWTGct/5cMgqPVPIZ3b6qGHOeY1RtBRh9Wz8 89a50cKliSeZ/9kyzpm3xQRfrhN1SeIxFL4WSHyfOi0KQaKiWE2hrGjfg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrjeeggdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedtkeet ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh hnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id A74B6B60089; Mon, 31 Jul 2023 12:12:42 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-592-ga9d4a09b4b-fm-defalarms-20230725.001-ga9d4a09b Mime-Version: 1.0 Message-Id: <86b73242-94bb-4537-92ec-51da02127848@app.fastmail.com> In-Reply-To: <20230731083806.453036-2-hch@lst.de> References: <20230731083806.453036-1-hch@lst.de> <20230731083806.453036-2-hch@lst.de> Date: Mon, 31 Jul 2023 18:12:22 +0200 From: "Arnd Bergmann" To: "Christoph Hellwig" , "Luis Chamberlain" , "Greg Kroah-Hartman" , "Daniel Mack" , "Haojian Zhuang" , "Robert Jarzmik" , "Ulf Hansson" , "Yangbo Lu" , "Joshua Kinard" Cc: "Daniel Vetter" , linux-arm-kernel@lists.infradead.org, "open list" , "linux-mmc @ vger . kernel . org" , Netdev , linux-rtc@vger.kernel.org, linux-modules@vger.kernel.org Subject: Re: [PATCH 1/5] ARM/pxa: use EXPORT_SYMBOL_GPL for sharpsl_battery_kick X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230731_091244_014205_57D1C427 X-CRM114-Status: GOOD ( 13.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jul 31, 2023, at 10:38, Christoph Hellwig wrote: > sharpsl_battery_kick is only used via symbol_get, which was only ever > intended for very internal symbols like this one. Use EXPORT_SYMBOL_GPL > for it so that symbol_get can enforce only being used on > EXPORT_SYMBOL_GPL symbols. > > Signed-off-by: Christoph Hellwig The reasoning makes sense, and the patch looks good, so feel free to take this through your tree. Acked-by: Arnd Bergmann Or let me know if you want a better fix. Since sharpsl_pm.c and spitz.c are no longer loadable modules and just get linked together these days, I think the variant below would be simpler (this could be cleanup up further, endlessly, of course): --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -518,17 +518,6 @@ static struct gpiod_lookup_table spitz_ads7846_gpio_table = { }, }; -static void spitz_bl_kick_battery(void) -{ - void (*kick_batt)(void); - - kick_batt = symbol_get(sharpsl_battery_kick); - if (kick_batt) { - kick_batt(); - symbol_put(sharpsl_battery_kick); - } -} - static struct gpiod_lookup_table spitz_lcdcon_gpio_table = { .dev_id = "spi2.1", .table = { @@ -556,7 +545,7 @@ static struct corgi_lcd_platform_data spitz_lcdcon_info = { .max_intensity = 0x2f, .default_intensity = 0x1f, .limit_mask = 0x0b, - .kick_battery = spitz_bl_kick_battery, + .kick_battery = sharpsl_battery_kick, }; static struct spi_board_info spitz_spi_devices[] = { _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel