From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752890AbbGLKoF (ORCPT ); Sun, 12 Jul 2015 06:44:05 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:58232 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751722AbbGLKkl (ORCPT ); Sun, 12 Jul 2015 06:40:41 -0400 Message-Id: <20150712102531.745918093@telegraphics.com.au> User-Agent: quilt/0.50-1 Date: Sun, 12 Jul 2015 20:25:45 +1000 From: Finn Thain To: , , , Geert Uytterhoeven , Arnd Bergmann , Greg Kroah-Hartman Subject: [RFC v4 18/25] nvram: Drop nvram_* symbol exports and prototypes References: <20150712102527.356151908@telegraphics.com.au> Content-Disposition: inline; filename=remove-exported-nvram-functions Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Drivers now use the arch_nvram_ops calls so remove the function exports and prototypes. nvram_check_checksum() is unused so remove it. Signed-off-by: Finn Thain --- arch/m68k/atari/nvram.c | 6 +++--- drivers/char/nvram.c | 27 +++++---------------------- include/linux/nvram.h | 8 -------- 3 files changed, 8 insertions(+), 33 deletions(-) Index: linux/drivers/char/nvram.c =================================================================== --- linux.orig/drivers/char/nvram.c 2015-07-12 20:25:11.000000000 +1000 +++ linux/drivers/char/nvram.c 2015-07-12 20:25:15.000000000 +1000 @@ -82,13 +82,12 @@ static ssize_t nvram_size; * periodic 11 min sync from kernel/time/ntp.c vs. this driver.) */ -unsigned char __nvram_read_byte(int i) +static unsigned char __nvram_read_byte(int i) { return CMOS_READ(NVRAM_FIRST_BYTE + i); } -EXPORT_SYMBOL(__nvram_read_byte); -unsigned char nvram_read_byte(int i) +static unsigned char nvram_read_byte(int i) { unsigned long flags; unsigned char c; @@ -98,16 +97,14 @@ unsigned char nvram_read_byte(int i) spin_unlock_irqrestore(&rtc_lock, flags); return c; } -EXPORT_SYMBOL(nvram_read_byte); /* This races nicely with trying to read with checksum checking (nvram_read) */ -void __nvram_write_byte(unsigned char c, int i) +static void __nvram_write_byte(unsigned char c, int i) { CMOS_WRITE(c, NVRAM_FIRST_BYTE + i); } -EXPORT_SYMBOL(__nvram_write_byte); -void nvram_write_byte(unsigned char c, int i) +static void nvram_write_byte(unsigned char c, int i) { unsigned long flags; @@ -115,14 +112,13 @@ void nvram_write_byte(unsigned char c, i __nvram_write_byte(c, i); spin_unlock_irqrestore(&rtc_lock, flags); } -EXPORT_SYMBOL(nvram_write_byte); /* On PCs, the checksum is built only over bytes 2..31 */ #define PC_CKS_RANGE_START 2 #define PC_CKS_RANGE_END 31 #define PC_CKS_LOC 32 -int __nvram_check_checksum(void) +static int __nvram_check_checksum(void) { int i; unsigned short sum = 0; @@ -134,19 +130,6 @@ int __nvram_check_checksum(void) __nvram_read_byte(PC_CKS_LOC+1); return (sum & 0xffff) == expect; } -EXPORT_SYMBOL(__nvram_check_checksum); - -int nvram_check_checksum(void) -{ - unsigned long flags; - int rv; - - spin_lock_irqsave(&rtc_lock, flags); - rv = __nvram_check_checksum(); - spin_unlock_irqrestore(&rtc_lock, flags); - return rv; -} -EXPORT_SYMBOL(nvram_check_checksum); static void __nvram_set_checksum(void) { Index: linux/include/linux/nvram.h =================================================================== --- linux.orig/include/linux/nvram.h 2015-07-12 20:25:11.000000000 +1000 +++ linux/include/linux/nvram.h 2015-07-12 20:25:15.000000000 +1000 @@ -3,14 +3,6 @@ #include -/* __foo is foo without grabbing the rtc_lock - get it yourself */ -extern unsigned char __nvram_read_byte(int i); -extern unsigned char nvram_read_byte(int i); -extern void __nvram_write_byte(unsigned char c, int i); -extern void nvram_write_byte(unsigned char c, int i); -extern int __nvram_check_checksum(void); -extern int nvram_check_checksum(void); - struct nvram_ops { ssize_t (*read)(char *, size_t, loff_t *); ssize_t (*write)(char *, size_t, loff_t *); Index: linux/arch/m68k/atari/nvram.c =================================================================== --- linux.orig/arch/m68k/atari/nvram.c 2015-07-12 20:25:05.000000000 +1000 +++ linux/arch/m68k/atari/nvram.c 2015-07-12 20:25:15.000000000 +1000 @@ -33,13 +33,13 @@ * periodic 11 min sync from kernel/time/ntp.c vs. this driver.) */ -unsigned char __nvram_read_byte(int i) +static unsigned char __nvram_read_byte(int i) { return CMOS_READ(NVRAM_FIRST_BYTE + i); } /* This races nicely with trying to read with checksum checking */ -void __nvram_write_byte(unsigned char c, int i) +static void __nvram_write_byte(unsigned char c, int i) { CMOS_WRITE(c, NVRAM_FIRST_BYTE + i); } @@ -51,7 +51,7 @@ void __nvram_write_byte(unsigned char c, #define ATARI_CKS_RANGE_END 47 #define ATARI_CKS_LOC 48 -int __nvram_check_checksum(void) +static int __nvram_check_checksum(void) { int i; unsigned char sum = 0; From mboxrd@z Thu Jan 1 00:00:00 1970 From: Finn Thain Subject: [RFC v4 18/25] nvram: Drop nvram_* symbol exports and prototypes Date: Sun, 12 Jul 2015 20:25:45 +1000 Message-ID: <20150712102531.745918093@telegraphics.com.au> References: <20150712102527.356151908@telegraphics.com.au> Return-path: Content-Disposition: inline; filename=remove-exported-nvram-functions Sender: linux-kernel-owner@vger.kernel.org To: linux-kernel@vger.kernel.org, linux-m68k@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Geert Uytterhoeven , Arnd Bergmann , Greg Kroah-Hartman List-Id: linux-m68k@vger.kernel.org Drivers now use the arch_nvram_ops calls so remove the function exports and prototypes. nvram_check_checksum() is unused so remove it. Signed-off-by: Finn Thain --- arch/m68k/atari/nvram.c | 6 +++--- drivers/char/nvram.c | 27 +++++---------------------- include/linux/nvram.h | 8 -------- 3 files changed, 8 insertions(+), 33 deletions(-) Index: linux/drivers/char/nvram.c =================================================================== --- linux.orig/drivers/char/nvram.c 2015-07-12 20:25:11.000000000 +1000 +++ linux/drivers/char/nvram.c 2015-07-12 20:25:15.000000000 +1000 @@ -82,13 +82,12 @@ static ssize_t nvram_size; * periodic 11 min sync from kernel/time/ntp.c vs. this driver.) */ -unsigned char __nvram_read_byte(int i) +static unsigned char __nvram_read_byte(int i) { return CMOS_READ(NVRAM_FIRST_BYTE + i); } -EXPORT_SYMBOL(__nvram_read_byte); -unsigned char nvram_read_byte(int i) +static unsigned char nvram_read_byte(int i) { unsigned long flags; unsigned char c; @@ -98,16 +97,14 @@ unsigned char nvram_read_byte(int i) spin_unlock_irqrestore(&rtc_lock, flags); return c; } -EXPORT_SYMBOL(nvram_read_byte); /* This races nicely with trying to read with checksum checking (nvram_read) */ -void __nvram_write_byte(unsigned char c, int i) +static void __nvram_write_byte(unsigned char c, int i) { CMOS_WRITE(c, NVRAM_FIRST_BYTE + i); } -EXPORT_SYMBOL(__nvram_write_byte); -void nvram_write_byte(unsigned char c, int i) +static void nvram_write_byte(unsigned char c, int i) { unsigned long flags; @@ -115,14 +112,13 @@ void nvram_write_byte(unsigned char c, i __nvram_write_byte(c, i); spin_unlock_irqrestore(&rtc_lock, flags); } -EXPORT_SYMBOL(nvram_write_byte); /* On PCs, the checksum is built only over bytes 2..31 */ #define PC_CKS_RANGE_START 2 #define PC_CKS_RANGE_END 31 #define PC_CKS_LOC 32 -int __nvram_check_checksum(void) +static int __nvram_check_checksum(void) { int i; unsigned short sum = 0; @@ -134,19 +130,6 @@ int __nvram_check_checksum(void) __nvram_read_byte(PC_CKS_LOC+1); return (sum & 0xffff) == expect; } -EXPORT_SYMBOL(__nvram_check_checksum); - -int nvram_check_checksum(void) -{ - unsigned long flags; - int rv; - - spin_lock_irqsave(&rtc_lock, flags); - rv = __nvram_check_checksum(); - spin_unlock_irqrestore(&rtc_lock, flags); - return rv; -} -EXPORT_SYMBOL(nvram_check_checksum); static void __nvram_set_checksum(void) { Index: linux/include/linux/nvram.h =================================================================== --- linux.orig/include/linux/nvram.h 2015-07-12 20:25:11.000000000 +1000 +++ linux/include/linux/nvram.h 2015-07-12 20:25:15.000000000 +1000 @@ -3,14 +3,6 @@ #include -/* __foo is foo without grabbing the rtc_lock - get it yourself */ -extern unsigned char __nvram_read_byte(int i); -extern unsigned char nvram_read_byte(int i); -extern void __nvram_write_byte(unsigned char c, int i); -extern void nvram_write_byte(unsigned char c, int i); -extern int __nvram_check_checksum(void); -extern int nvram_check_checksum(void); - struct nvram_ops { ssize_t (*read)(char *, size_t, loff_t *); ssize_t (*write)(char *, size_t, loff_t *); Index: linux/arch/m68k/atari/nvram.c =================================================================== --- linux.orig/arch/m68k/atari/nvram.c 2015-07-12 20:25:05.000000000 +1000 +++ linux/arch/m68k/atari/nvram.c 2015-07-12 20:25:15.000000000 +1000 @@ -33,13 +33,13 @@ * periodic 11 min sync from kernel/time/ntp.c vs. this driver.) */ -unsigned char __nvram_read_byte(int i) +static unsigned char __nvram_read_byte(int i) { return CMOS_READ(NVRAM_FIRST_BYTE + i); } /* This races nicely with trying to read with checksum checking */ -void __nvram_write_byte(unsigned char c, int i) +static void __nvram_write_byte(unsigned char c, int i) { CMOS_WRITE(c, NVRAM_FIRST_BYTE + i); } @@ -51,7 +51,7 @@ void __nvram_write_byte(unsigned char c, #define ATARI_CKS_RANGE_END 47 #define ATARI_CKS_LOC 48 -int __nvram_check_checksum(void) +static int __nvram_check_checksum(void) { int i; unsigned char sum = 0; From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from kvm5.telegraphics.com.au (kvm5.telegraphics.com.au [98.124.60.144]) by lists.ozlabs.org (Postfix) with ESMTP id A61441A0216 for ; Sun, 12 Jul 2015 20:40:41 +1000 (AEST) Message-Id: <20150712102531.745918093@telegraphics.com.au> Date: Sun, 12 Jul 2015 20:25:45 +1000 From: Finn Thain To: , , , Geert Uytterhoeven , Arnd Bergmann , Greg Kroah-Hartman Subject: [RFC v4 18/25] nvram: Drop nvram_* symbol exports and prototypes References: <20150712102527.356151908@telegraphics.com.au> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Drivers now use the arch_nvram_ops calls so remove the function exports and prototypes. nvram_check_checksum() is unused so remove it. Signed-off-by: Finn Thain --- arch/m68k/atari/nvram.c | 6 +++--- drivers/char/nvram.c | 27 +++++---------------------- include/linux/nvram.h | 8 -------- 3 files changed, 8 insertions(+), 33 deletions(-) Index: linux/drivers/char/nvram.c =================================================================== --- linux.orig/drivers/char/nvram.c 2015-07-12 20:25:11.000000000 +1000 +++ linux/drivers/char/nvram.c 2015-07-12 20:25:15.000000000 +1000 @@ -82,13 +82,12 @@ static ssize_t nvram_size; * periodic 11 min sync from kernel/time/ntp.c vs. this driver.) */ -unsigned char __nvram_read_byte(int i) +static unsigned char __nvram_read_byte(int i) { return CMOS_READ(NVRAM_FIRST_BYTE + i); } -EXPORT_SYMBOL(__nvram_read_byte); -unsigned char nvram_read_byte(int i) +static unsigned char nvram_read_byte(int i) { unsigned long flags; unsigned char c; @@ -98,16 +97,14 @@ unsigned char nvram_read_byte(int i) spin_unlock_irqrestore(&rtc_lock, flags); return c; } -EXPORT_SYMBOL(nvram_read_byte); /* This races nicely with trying to read with checksum checking (nvram_read) */ -void __nvram_write_byte(unsigned char c, int i) +static void __nvram_write_byte(unsigned char c, int i) { CMOS_WRITE(c, NVRAM_FIRST_BYTE + i); } -EXPORT_SYMBOL(__nvram_write_byte); -void nvram_write_byte(unsigned char c, int i) +static void nvram_write_byte(unsigned char c, int i) { unsigned long flags; @@ -115,14 +112,13 @@ void nvram_write_byte(unsigned char c, i __nvram_write_byte(c, i); spin_unlock_irqrestore(&rtc_lock, flags); } -EXPORT_SYMBOL(nvram_write_byte); /* On PCs, the checksum is built only over bytes 2..31 */ #define PC_CKS_RANGE_START 2 #define PC_CKS_RANGE_END 31 #define PC_CKS_LOC 32 -int __nvram_check_checksum(void) +static int __nvram_check_checksum(void) { int i; unsigned short sum = 0; @@ -134,19 +130,6 @@ int __nvram_check_checksum(void) __nvram_read_byte(PC_CKS_LOC+1); return (sum & 0xffff) == expect; } -EXPORT_SYMBOL(__nvram_check_checksum); - -int nvram_check_checksum(void) -{ - unsigned long flags; - int rv; - - spin_lock_irqsave(&rtc_lock, flags); - rv = __nvram_check_checksum(); - spin_unlock_irqrestore(&rtc_lock, flags); - return rv; -} -EXPORT_SYMBOL(nvram_check_checksum); static void __nvram_set_checksum(void) { Index: linux/include/linux/nvram.h =================================================================== --- linux.orig/include/linux/nvram.h 2015-07-12 20:25:11.000000000 +1000 +++ linux/include/linux/nvram.h 2015-07-12 20:25:15.000000000 +1000 @@ -3,14 +3,6 @@ #include -/* __foo is foo without grabbing the rtc_lock - get it yourself */ -extern unsigned char __nvram_read_byte(int i); -extern unsigned char nvram_read_byte(int i); -extern void __nvram_write_byte(unsigned char c, int i); -extern void nvram_write_byte(unsigned char c, int i); -extern int __nvram_check_checksum(void); -extern int nvram_check_checksum(void); - struct nvram_ops { ssize_t (*read)(char *, size_t, loff_t *); ssize_t (*write)(char *, size_t, loff_t *); Index: linux/arch/m68k/atari/nvram.c =================================================================== --- linux.orig/arch/m68k/atari/nvram.c 2015-07-12 20:25:05.000000000 +1000 +++ linux/arch/m68k/atari/nvram.c 2015-07-12 20:25:15.000000000 +1000 @@ -33,13 +33,13 @@ * periodic 11 min sync from kernel/time/ntp.c vs. this driver.) */ -unsigned char __nvram_read_byte(int i) +static unsigned char __nvram_read_byte(int i) { return CMOS_READ(NVRAM_FIRST_BYTE + i); } /* This races nicely with trying to read with checksum checking */ -void __nvram_write_byte(unsigned char c, int i) +static void __nvram_write_byte(unsigned char c, int i) { CMOS_WRITE(c, NVRAM_FIRST_BYTE + i); } @@ -51,7 +51,7 @@ void __nvram_write_byte(unsigned char c, #define ATARI_CKS_RANGE_END 47 #define ATARI_CKS_LOC 48 -int __nvram_check_checksum(void) +static int __nvram_check_checksum(void) { int i; unsigned char sum = 0;