Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755925AbYGaMlj (ORCPT ); Thu, 31 Jul 2008 08:41:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754134AbYGaMkk (ORCPT ); Thu, 31 Jul 2008 08:40:40 -0400 Received: from mtagate5.de.ibm.com ([195.212.29.154]:48901 "EHLO mtagate5.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754685AbYGaMki (ORCPT ); Thu, 31 Jul 2008 08:40:38 -0400 Message-Id: <20080731123932.854951652@de.ibm.com> References: <20080731123004.868574766@de.ibm.com> User-Agent: quilt/0.46-1 Date: Thu, 31 Jul 2008 14:30:07 +0200 From: Martin Schwidefsky To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Cc: Heiko Carstens , Martin Schwidefsky Subject: [patch 3/6] qdio: fix section mismatch bug. Content-Disposition: inline; filename=102-qdio-section.diff Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2481 Lines: 68 From: Heiko Carstens Fix the two section mismatch warnings below. This fixes two real bugs since the code which has __exit annotations may already be gone when it is called. WARNING: vmlinux.o(.init.text+0x1cc4a): Section mismatch in reference from the function init_QDIO() to the function .exit.text:qdio_setup_exit() The function __init init_QDIO() references a function __exit qdio_setup_exit(). This is often seen when error handling in the init function uses functionality in the exit path. The fix is often to remove the __exit annotation of qdio_setup_exit() so it may be used outside an exit section. WARNING: vmlinux.o(.init.text+0x1cc7a): Section mismatch in reference from the function init_QDIO() to the function .exit.text:qdio_remove_perf_stats() The function __init init_QDIO() references a function __exit qdio_remove_perf_stats(). This is often seen when error handling in the init function uses functionality in the exit path. The fix is often to remove the __exit annotation of qdio_remove_perf_stats() so it may be used outside an exit section. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- drivers/s390/cio/qdio_perf.c | 2 +- drivers/s390/cio/qdio_setup.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: quilt-2.6/drivers/s390/cio/qdio_perf.c =================================================================== --- quilt-2.6.orig/drivers/s390/cio/qdio_perf.c +++ quilt-2.6/drivers/s390/cio/qdio_perf.c @@ -142,7 +142,7 @@ int __init qdio_setup_perf_stats(void) return 0; } -void __exit qdio_remove_perf_stats(void) +void qdio_remove_perf_stats(void) { #ifdef CONFIG_PROC_FS remove_proc_entry("qdio_perf", NULL); Index: quilt-2.6/drivers/s390/cio/qdio_setup.c =================================================================== --- quilt-2.6.orig/drivers/s390/cio/qdio_setup.c +++ quilt-2.6/drivers/s390/cio/qdio_setup.c @@ -515,7 +515,7 @@ int __init qdio_setup_init(void) return 0; } -void __exit qdio_setup_exit(void) +void qdio_setup_exit(void) { kmem_cache_destroy(qdio_q_cache); } -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/