From patchwork Fri Sep 26 19:34:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4987191 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 29128BEEA6 for ; Fri, 26 Sep 2014 19:36:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 66E9720179 for ; Fri, 26 Sep 2014 19:36:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8ED1020166 for ; Fri, 26 Sep 2014 19:35:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755703AbaIZTfU (ORCPT ); Fri, 26 Sep 2014 15:35:20 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:57320 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754978AbaIZTfS (ORCPT ); Fri, 26 Sep 2014 15:35:18 -0400 Received: from klappe2.localnet (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue006) with ESMTP (Nemesis) id 0LZpZx-1XydZb1tvB-00liYN; Fri, 26 Sep 2014 21:35:02 +0200 From: Arnd Bergmann To: Pramod Gurav Subject: [PATCH] mmc: atmel-mci: fix mismatched section on atmci_cleanup_slot Date: Fri, 26 Sep 2014 21:34:58 +0200 User-Agent: KMail/1.12.2 (Linux/3.8.0-35-generic; KDE/4.3.2; x86_64; ; ) Cc: linux-kernel@vger.kernel.org, Ludovic Desroches , Chris Ball , Ulf Hansson , linux-mmc@vger.kernel.org References: <1411467606-13041-1-git-send-email-pramod.gurav@smartplayin.com> <1411467606-13041-2-git-send-email-pramod.gurav@smartplayin.com> In-Reply-To: <1411467606-13041-2-git-send-email-pramod.gurav@smartplayin.com> MIME-Version: 1.0 Message-Id: <201409262134.58457.arnd@arndb.de> X-Provags-ID: V02:K0:nlHdPn/4DEhtRaswddCjD9Np6/9jhdg0nJXlQdDs+hE 0obbUbSihe5YZn0Cz3O1Va8CH49TPnW+c/+YP3Mbl3DlLsVn5R fKUSls9kfop1lE3eVoM5L28e1MO1nq/yZoEqKwzcEsgTUo8Zm9 UG/Le9mMh/xGS23+HpT6vqFGF+BpEG4y7omhaSqnTE1RUVr9VP diV9mQ4H58Zh0sBfXRGU2uCfKDF1t4WAgWmImVLaILIhz0MEAh +RTF/lOccg2L5iPiM6StLZIvimtplSjS9v04gs4Gnug2lgSozz nBA75mVMyKswoAKe0byV0R5D2M95X9caOwOo7ibxiKaiRn6e0h DJwGvy4iYkhSTk9+X7Ik= X-UI-Out-Filterresults: notjunk:1; Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As of 528bc7808f4e ("mmc: atmel-mci: Release mmc resources on failure in probe"), the atmci_probe() function calls atmci_cleanup_slot in the failure path. This causes a new warning whenever the driver is built: WARNING: drivers/mmc/host/built-in.o(.init.text+0xa04): Section mismatch in reference from the function atmci_probe() to the function .exit.text:atmci_cleanup_slot() The function __init atmci_probe() references a function __exit atmci_cleanup_slot(). Gcc correctly warns about this function getting dropped in the link stage for the built-in case, which would cause undefined behavior when this error path is hit. The solution is to simply drop the __exit annotation. Signed-off-by: Arnd Bergmann Fixes: 528bc7808f4e ("mmc: atmel-mci: Release mmc resources on failure in probe") Acked-by: Ludovic Desroches --- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 772ef5b0e4d5..974626087732 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -2244,7 +2244,7 @@ static int __init atmci_init_slot(struct atmel_mci *host, return 0; } -static void __exit atmci_cleanup_slot(struct atmel_mci_slot *slot, +static void atmci_cleanup_slot(struct atmel_mci_slot *slot, unsigned int id) { /* Debugfs stuff is cleaned up by mmc core */