From: Adrian Bunk <bunk@stusta.de>
To: mikulas@artax.karlin.mff.cuni.cz
Cc: linux-kernel@vger.kernel.org
Subject: [2.6 patch] fs/hpfs/: make some code static
Date: Fri, 7 Jan 2005 02:27:32 +0100 [thread overview]
Message-ID: <20050107012732.GC14108@stusta.de> (raw)
The patch below makes some needlessly global code static.
diffstat output:
fs/hpfs/alloc.c | 4 +++-
fs/hpfs/dentry.c | 6 +++---
fs/hpfs/dnode.c | 14 ++++++++------
fs/hpfs/hpfs_fn.h | 4 ----
fs/hpfs/inode.c | 2 +-
fs/hpfs/name.c | 4 ++--
fs/hpfs/super.c | 6 +++---
7 files changed, 20 insertions(+), 20 deletions(-)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.10-mm2-full/fs/hpfs/hpfs_fn.h.old 2005-01-07 00:49:31.000000000 +0100
+++ linux-2.6.10-mm2-full/fs/hpfs/hpfs_fn.h 2005-01-07 00:52:55.000000000 +0100
@@ -202,7 +202,6 @@
int hpfs_chk_sectors(struct super_block *, secno, int, char *);
secno hpfs_alloc_sector(struct super_block *, secno, unsigned, int, int);
-int hpfs_alloc_if_possible_nolock(struct super_block *, secno);
int hpfs_alloc_if_possible(struct super_block *, secno);
void hpfs_free_sectors(struct super_block *, secno, unsigned);
int hpfs_check_free_dnodes(struct super_block *, int);
@@ -247,8 +246,6 @@
void hpfs_add_pos(struct inode *, loff_t *);
void hpfs_del_pos(struct inode *, loff_t *);
struct hpfs_dirent *hpfs_add_de(struct super_block *, struct dnode *, unsigned char *, unsigned, secno);
-void hpfs_delete_de(struct super_block *, struct dnode *, struct hpfs_dirent *);
-int hpfs_add_to_dnode(struct inode *, dnode_secno, unsigned char *, unsigned, struct hpfs_dirent *, dnode_secno);
int hpfs_add_dirent(struct inode *, unsigned char *, unsigned, struct hpfs_dirent *, int);
int hpfs_remove_dirent(struct inode *, dnode_secno, struct hpfs_dirent *, struct quad_buffer_head *, int);
void hpfs_count_dnodes(struct super_block *, dnode_secno, int *, int *, int *);
@@ -276,7 +273,6 @@
void hpfs_init_inode(struct inode *);
void hpfs_read_inode(struct inode *);
-void hpfs_write_inode_ea(struct inode *, struct fnode *);
void hpfs_write_inode(struct inode *);
void hpfs_write_inode_nolock(struct inode *);
int hpfs_notify_change(struct dentry *, struct iattr *);
--- linux-2.6.10-mm2-full/fs/hpfs/alloc.c.old 2005-01-07 00:49:42.000000000 +0100
+++ linux-2.6.10-mm2-full/fs/hpfs/alloc.c 2005-01-07 00:50:06.000000000 +0100
@@ -8,6 +8,8 @@
#include "hpfs_fn.h"
+static int hpfs_alloc_if_possible_nolock(struct super_block *s, secno sec);
+
/*
* Check if a sector is allocated in bitmap
* This is really slow. Turned on only if chk==2
@@ -243,7 +245,7 @@
/* Alloc sector if it's free */
-int hpfs_alloc_if_possible_nolock(struct super_block *s, secno sec)
+static int hpfs_alloc_if_possible_nolock(struct super_block *s, secno sec)
{
struct quad_buffer_head qbh;
unsigned *bmp;
--- linux-2.6.10-mm2-full/fs/hpfs/dentry.c.old 2005-01-07 00:50:19.000000000 +0100
+++ linux-2.6.10-mm2-full/fs/hpfs/dentry.c 2005-01-07 00:50:57.000000000 +0100
@@ -12,7 +12,7 @@
* Note: the dentry argument is the parent dentry.
*/
-int hpfs_hash_dentry(struct dentry *dentry, struct qstr *qstr)
+static int hpfs_hash_dentry(struct dentry *dentry, struct qstr *qstr)
{
unsigned long hash;
int i;
@@ -34,7 +34,7 @@
return 0;
}
-int hpfs_compare_dentry(struct dentry *dentry, struct qstr *a, struct qstr *b)
+static int hpfs_compare_dentry(struct dentry *dentry, struct qstr *a, struct qstr *b)
{
unsigned al=a->len;
unsigned bl=b->len;
@@ -49,7 +49,7 @@
return 0;
}
-struct dentry_operations hpfs_dentry_operations = {
+static struct dentry_operations hpfs_dentry_operations = {
.d_hash = hpfs_hash_dentry,
.d_compare = hpfs_compare_dentry,
};
--- linux-2.6.10-mm2-full/fs/hpfs/dnode.c.old 2005-01-07 00:51:23.000000000 +0100
+++ linux-2.6.10-mm2-full/fs/hpfs/dnode.c 2005-01-07 00:52:44.000000000 +0100
@@ -78,7 +78,7 @@
return;
}
-void hpfs_pos_subst(loff_t *p, loff_t f, loff_t t)
+static void hpfs_pos_subst(loff_t *p, loff_t f, loff_t t)
{
if (*p == f) *p = t;
}
@@ -88,7 +88,7 @@
if ((*p & ~0x3f) == (f & ~0x3f)) *p = (t & ~0x3f) | (*p & 0x3f);
}*/
-void hpfs_pos_ins(loff_t *p, loff_t d, loff_t c)
+static void hpfs_pos_ins(loff_t *p, loff_t d, loff_t c)
{
if ((*p & ~0x3f) == (d & ~0x3f) && (*p & 0x3f) >= (d & 0x3f)) {
int n = (*p & 0x3f) + c;
@@ -97,7 +97,7 @@
}
}
-void hpfs_pos_del(loff_t *p, loff_t d, loff_t c)
+static void hpfs_pos_del(loff_t *p, loff_t d, loff_t c)
{
if ((*p & ~0x3f) == (d & ~0x3f) && (*p & 0x3f) >= (d & 0x3f)) {
int n = (*p & 0x3f) - c;
@@ -189,7 +189,8 @@
/* Delete dirent and don't care about its subtree */
-void hpfs_delete_de(struct super_block *s, struct dnode *d, struct hpfs_dirent *de)
+static void hpfs_delete_de(struct super_block *s, struct dnode *d,
+ struct hpfs_dirent *de)
{
if (de->last) {
hpfs_error(s, "attempt to delete last dirent in dnode %08x", d->self);
@@ -221,8 +222,9 @@
/* Add an entry to dnode and do dnode splitting if required */
-int hpfs_add_to_dnode(struct inode *i, dnode_secno dno, unsigned char *name, unsigned namelen,
- struct hpfs_dirent *new_de, dnode_secno down_ptr)
+static int hpfs_add_to_dnode(struct inode *i, dnode_secno dno,
+ unsigned char *name, unsigned namelen,
+ struct hpfs_dirent *new_de, dnode_secno down_ptr)
{
struct quad_buffer_head qbh, qbh1, qbh2;
struct dnode *d, *ad, *rd, *nd = NULL;
--- linux-2.6.10-mm2-full/fs/hpfs/inode.c.old 2005-01-07 00:53:03.000000000 +0100
+++ linux-2.6.10-mm2-full/fs/hpfs/inode.c 2005-01-07 00:53:08.000000000 +0100
@@ -141,7 +141,7 @@
brelse(bh);
}
-void hpfs_write_inode_ea(struct inode *i, struct fnode *fnode)
+static void hpfs_write_inode_ea(struct inode *i, struct fnode *fnode)
{
struct hpfs_inode_info *hpfs_inode = hpfs_i(i);
/*if (fnode->acl_size_l || fnode->acl_size_s) {
--- linux-2.6.10-mm2-full/fs/hpfs/name.c.old 2005-01-07 00:53:26.000000000 +0100
+++ linux-2.6.10-mm2-full/fs/hpfs/name.c 2005-01-07 00:53:43.000000000 +0100
@@ -8,12 +8,12 @@
#include "hpfs_fn.h"
-char *text_postfix[]={
+static char *text_postfix[]={
".ASM", ".BAS", ".BAT", ".C", ".CC", ".CFG", ".CMD", ".CON", ".CPP", ".DEF",
".DOC", ".DPR", ".ERX", ".H", ".HPP", ".HTM", ".HTML", ".JAVA", ".LOG", ".PAS",
".RC", ".TEX", ".TXT", ".Y", ""};
-char *text_prefix[]={
+static char *text_prefix[]={
"AUTOEXEC.", "CHANGES", "COPYING", "CONFIG.", "CREDITS", "FAQ", "FILE_ID.DIZ",
"MAKEFILE", "READ.ME", "README", "TERMCAP", ""};
--- linux-2.6.10-mm2-full/fs/hpfs/super.c.old 2005-01-07 00:53:57.000000000 +0100
+++ linux-2.6.10-mm2-full/fs/hpfs/super.c 2005-01-07 00:54:15.000000000 +0100
@@ -246,9 +246,9 @@
{Opt_err, NULL},
};
-int parse_opts(char *opts, uid_t *uid, gid_t *gid, umode_t *umask,
- int *lowercase, int *conv, int *eas, int *chk, int *errs,
- int *chkdsk, int *timeshift)
+static int parse_opts(char *opts, uid_t *uid, gid_t *gid, umode_t *umask,
+ int *lowercase, int *conv, int *eas, int *chk, int *errs,
+ int *chkdsk, int *timeshift)
{
char *p;
int option;
next reply other threads:[~2005-01-07 1:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-07 1:27 Adrian Bunk [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-01-31 23:42 [2.6 patch] fs/hpfs/: make some code static Adrian Bunk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050107012732.GC14108@stusta.de \
--to=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mikulas@artax.karlin.mff.cuni.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.