Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5848086ybl; Tue, 10 Dec 2019 12:29:54 -0800 (PST) X-Google-Smtp-Source: APXvYqz7v6P1uZ22BapXgL+7ohePU8DlNQrfw7ZNUsgI9DluIXqHaQ9MZW4SkgSaHlPA5jYf/par X-Received: by 2002:a9d:7e8a:: with SMTP id m10mr25891600otp.27.1576009794291; Tue, 10 Dec 2019 12:29:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576009794; cv=none; d=google.com; s=arc-20160816; b=wFGTjWFCBFl1Zn7rwI//iBlknVlI79RHLyoP780OgYNboz/oCrxcglmTDaC2p1uqpf O8z76yLH297RIz9VxZ2Y26vbVd1k7SzD7Bt9Op5qFowCiPJZDEso97TGuyxeR/dhpymP fwgOrEk7uu4fKI2x3oyNUY/BOVBpghw0dpMfK8uLR9lJO8OP9KZIj/7BF+bxvdlNoqDX H1gL0uT5EjYWu2XWkmoG/Hdjk/pe2VsVjxZwBSFlpChts0F99vNFV97psBYih0URdwrm Nef7X2fvoWwjFPrjzTrqqU2vFFMF8UDMigT/2KqxVcYYTBknjYaGn42PEZl3IYtAnLhM vwhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=T5NqVSYG1ZArntFyrOOa83VtS5v+uKQ2Skqm6ykRFv0=; b=AGs2N+ULhpV1O+myEPX5sjJATA+pdh6CfzQgeEYEZluBMkQpCAt/zYoHDLc2PWbFPm 88EhYOp0fvWvjARI7ehtumRJbFutkkr6SFhn/qCAf3qbGPH339heZfQq3pXPMtbEJbOz D7bRFGePM/4Y0R7KfSdmT4BqYjzi9K6HoCDw8RgIRtd8WRLMnxNtzIWylSQFEI8DE1Kw +u/TQoiFeFL1L9Ej3dztkmfF9aWk3IL3sOwDoylc1+XoZwuEmRP+4+2yaik9VNXSaJ2b Puw5ErkeLOvjl1Wfa/O7sUmGvSEb1xb6YLjPFoBXOC6djmYUSlCQF+HeqgEgo27kOKxT qvpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r202si2528735oie.247.2019.12.10.12.29.41; Tue, 10 Dec 2019 12:29:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726928AbfLJU2f (ORCPT + 99 others); Tue, 10 Dec 2019 15:28:35 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:59857 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725999AbfLJU2e (ORCPT ); Tue, 10 Dec 2019 15:28:34 -0500 Received: from mail-qk1-f179.google.com ([209.85.222.179]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPSA (Nemesis) id 1M89P1-1iiKUE0lgh-005KcS; Tue, 10 Dec 2019 21:28:33 +0100 Received: by mail-qk1-f179.google.com with SMTP id k6so17641251qki.5; Tue, 10 Dec 2019 12:28:32 -0800 (PST) X-Gm-Message-State: APjAAAWN0jcFRxy70ZS5Pbt2Dt+hbgrm8lRcFMX/xbUJCc/mA19gE89e wOkP4w5vx/wSuh/N3Mq/Gdn3WhRJYUXZ1rhQ+II= X-Received: by 2002:a37:5b45:: with SMTP id p66mr6225717qkb.394.1576009711991; Tue, 10 Dec 2019 12:28:31 -0800 (PST) MIME-Version: 1.0 References: <20191210195414.705239-1-arnd@arndb.de> <01669f6c5d0e40c7a410da2dcce6c9e825e4a1d4.camel@alliedtelesis.co.nz> In-Reply-To: <01669f6c5d0e40c7a410da2dcce6c9e825e4a1d4.camel@alliedtelesis.co.nz> From: Arnd Bergmann Date: Tue, 10 Dec 2019 21:28:15 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] gpio: xgs-iproc: remove __exit annotation for iproc_gpio_remove To: Chris Packham Cc: "linus.walleij@linaro.org" , "bgolaszewski@baylibre.com" , "scott.branden@broadcom.com" , "linux-kernel@vger.kernel.org" , "bcm-kernel-feedback-list@broadcom.com" , "yoshihiro.shimoda.uh@renesas.com" , "yuehaibing@huawei.com" , "linux-gpio@vger.kernel.org" , "broonie@kernel.org" , "rjui@broadcom.com" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:/o7CudpYHFP0rDjHiqPJCJgRGCgB9HvzhXdeU3v+nhQ/O99Z0sR 4sO9+1w4cKFImpI4I5w9WYji6mulKAuIbtv86682+z21ft1bg7N0ynRlfe9xljtP9Hq1irW KRRMppP5BstRLVCuOsRejAJ5+ssvjAEPhbxGHae1nFzOHeBpbEG1XvtfSqgEUPh5Af1BCGq NTHsOY3Zz8eRxJyhRk/2g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:zAmb2zOHaDg=:onB4eygwOw8tQBK2DbnZ9z tOqkpO4IYhi9qqodNPRK9zByp8XScvBvIbik3ieseDjoo0uBsbQo8B90XEVwMXJDCn92vEHDD yqHsEI39EW19iQMnSNXcMcMf/RuHD39PGM7317WqO8MOk4D9VUkT85SrOZB+OMYmqHXdInQJv OZiM7h1G3CmjifR0/NpW0XuX674QwhDLZQDUjTd/injBq+UvG3ZzH0+FwUDsytDYmgipm+Lob tY50lsl4YfU7MWRcCCiI5+8z8F82f8RB6gVhnevd3WkIs+5fOw9jUHavo3dUll5MOu1IyGaih ANoHoI6HBV7BvAipFc1VaA9a/K+GVOAoL0n+1DL9u4fOl0dUff4AeCwUjx5lKhx9RUBHRbslI OxcoPKFTytMfIEnJz2jvIHLhOrvXECO56KlLXYAdh8K8624gLJrEThyTYptJXeeZIPFAObZvV iRCHoFgfsTNbH+bm/q98IrjFG/5dFoQe0da/7FegdBEUGmIHqNUVU3bJnCexJyRGQsok+bD9P bRZ+o5yqZWhp64O0VLiobYAONKLBvr/Py0JllQqTwm/sfSbVdEABHMTx94PssOCyZ7mwJe47L quranFGST4PUk2cxWuvEBw1vJQxPKqWKBJ43QQrAsMnE6PZWfJq4Cr/W0tl/DPMZoJfSAD2IR VCkeZAUCh1kHvyE4wPhNcW7HZooTB+hZgtSc9bSvEl//RDHgHrXGtmqK8M7WX5de4D3as85hw +EKwyYU+qucdybel8huHQ+jTHugsmHGVoq4q6FcxNutDSFmklYReG48/fdxJK4x5fQL+Nxgvm WIInG9jvHi1A00jNcmN/NwJjsm3Uv723deYWujYeyYG8l/OA+E4nGT3kj3huAJcn1yq7Jd0vP QR3drhE+8c9MP2n04ZPw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 10, 2019 at 9:24 PM Chris Packham wrote: > > On Tue, 2019-12-10 at 20:54 +0100, Arnd Bergmann wrote: > > When built into the kernel, the driver causes a link problem: > > > > `iproc_gpio_remove' referenced in section `.data' of drivers/gpio/gpio-xgs-iproc.o: defined in discarded section `.exit.text' of drivers/gpio/gpio-xgs-iproc.o > > > > Remove the incorrect annotation. > > > > Fixes: 6a41b6c5fc20 ("gpio: Add xgs-iproc driver") > > Signed-off-by: Arnd Bergmann > > Reviewed-by: Chris Packham > > What's the current best practice w.r.t.__init and __exit? I seem to > have messed this up on multiple fronts. These are used for anything that is a module_init() function or a module_exit() function, or called from one, but generally not for any callbacks. In particular the probe() and remove() callbacks of a device driver can get called at runtime when the device is hotplugged through sysfs. Arnd