Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5062556imu; Tue, 25 Dec 2018 16:53:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN4fml8Ot7EjLAf5kkgh98bwW5AgITo6BvdmGXC6PXBwEOOB8FFwVLsbNb4yKGPvcx4Wk2VC X-Received: by 2002:a17:902:280b:: with SMTP id e11mr18001019plb.269.1545785616956; Tue, 25 Dec 2018 16:53:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545785616; cv=none; d=google.com; s=arc-20160816; b=PhDd6kVt2b2MuVq1DPZXRUaFsCHB6IoaJnO3sss+PodoxtwLqTpQ22WsvWFINweiHQ wXjIEXKW8gvgdOojM1yl9msy1LfVhCXT+KajM0kVh9F6qFFgDAGzfyBxtAFsWovBhF+0 Uk7V3aFgdyiHz6bSs8hZt8sQL32A6laUlhXQVJIHyHfa0ik+M7+RSJoZ5xeyEUEhSJZO DQsi3/cQRORWS6tPu+Z0QSIxosbDheU5bzLSiy7Tf/8OZP6+iDZkgY/GX474DRi2YvSh Wfv52/8tOhGOObNBERSP12+yEvKeetca64dGaL93r0G+s0CjG49Ri6GAAJunf386BZE3 kotw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:from:references:in-reply-to :message-id:cc:to; bh=SL1LfI4trsEQPV4XPz126n7sGFqPcmNwTJw5ZnKJd68=; b=J6OQdcgjIhN9d0KMrXmDWA0Mp0hcpwwbHSUXMNKzuhQdTirBmcW0qvtbfTjljCnyTN lycBLovXOpNJff4IPdiW7Ftl6SWL35ZQNosIvqFrsJOcyRjqWK7TFLjxD4ohIPpkaz32 aUziuJ3MD9B57zkoX3SHsqGq5qxkunsLEQpqIaq9W9rYQSHqPQPu5IqCt/ST2XlE8IeR o8NlViRuS3impuQHfrsi5QNBGCyIddVSEaNm0Zw+lLMm0eMSSDCB0tZIGQ0RjTBZMICg 8Dt9pulMdV3e9JFpv8+W8A/eAg9J3HQ57ARmIb3n7qz2L/l1QwVQVGF8E7a4xu0py0zj 8/uw== 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 b11si4010434pla.405.2018.12.25.16.53.22; Tue, 25 Dec 2018 16:53:36 -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 S1729728AbeLZApD (ORCPT + 99 others); Tue, 25 Dec 2018 19:45:03 -0500 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:57382 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726596AbeLZAoB (ORCPT ); Tue, 25 Dec 2018 19:44:01 -0500 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id F11482952A; Tue, 25 Dec 2018 19:43:56 -0500 (EST) To: Arnd Bergmann , Greg Kroah-Hartman , Geert Uytterhoeven Cc: linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org Message-Id: In-Reply-To: References: From: Finn Thain Subject: [PATCH v8 21/25] nvram: Drop nvram_* symbol exports and prototypes Date: Wed, 26 Dec 2018 11:37:59 +1100 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk 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 Acked-by: Geert Uytterhoeven --- arch/m68k/atari/nvram.c | 6 +++--- drivers/char/nvram.c | 27 +++++---------------------- include/linux/nvram.h | 8 -------- 3 files changed, 8 insertions(+), 33 deletions(-) diff --git a/arch/m68k/atari/nvram.c b/arch/m68k/atari/nvram.c index 0a6fe59c95e8..2906743f0da3 100644 --- a/arch/m68k/atari/nvram.c +++ b/arch/m68k/atari/nvram.c @@ -34,13 +34,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); } @@ -52,7 +52,7 @@ void __nvram_write_byte(unsigned char c, int i) #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; diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index 466e1fb02052..8339885e8e9b 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c @@ -81,13 +81,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; @@ -97,16 +96,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; @@ -114,14 +111,13 @@ void nvram_write_byte(unsigned char c, int 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; @@ -133,19 +129,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) { diff --git a/include/linux/nvram.h b/include/linux/nvram.h index 24a57675dba1..251472f1b2bd 100644 --- a/include/linux/nvram.h +++ b/include/linux/nvram.h @@ -4,14 +4,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 *); -- 2.19.2