fs: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
This commit is contained in:
Marek Vasut 2024-07-13 15:19:21 +02:00 committed by Tom Rini
parent 73a48dc856
commit dc5e205713
37 changed files with 0 additions and 137 deletions

View file

@ -461,7 +461,6 @@ static inline u8 *btrfs_dev_extent_chunk_tree_uuid(struct btrfs_dev_extent *dev)
return (u8 *)((unsigned long)dev + ptr); return (u8 *)((unsigned long)dev + ptr);
} }
/* struct btrfs_extent_item */ /* struct btrfs_extent_item */
BTRFS_SETGET_FUNCS(extent_refs, struct btrfs_extent_item, refs, 64); BTRFS_SETGET_FUNCS(extent_refs, struct btrfs_extent_item, refs, 64);
BTRFS_SETGET_STACK_FUNCS(stack_extent_refs, struct btrfs_extent_item, refs, 64); BTRFS_SETGET_STACK_FUNCS(stack_extent_refs, struct btrfs_extent_item, refs, 64);

View file

@ -69,7 +69,6 @@ static int check_tree_block(struct btrfs_fs_info *fs_info,
btrfs_header_fsid(), btrfs_header_fsid(),
BTRFS_FSID_SIZE); BTRFS_FSID_SIZE);
if (fsid_match) { if (fsid_match) {
ret = 0; ret = 0;
break; break;

View file

@ -115,7 +115,6 @@
#define BTRFS_LAST_FREE_OBJECTID -256ULL #define BTRFS_LAST_FREE_OBJECTID -256ULL
#define BTRFS_FIRST_CHUNK_TREE_OBJECTID 256ULL #define BTRFS_FIRST_CHUNK_TREE_OBJECTID 256ULL
/* /*
* The device items go into the chunk tree. * The device items go into the chunk tree.
* *
@ -333,7 +332,6 @@
*/ */
#define BTRFS_STRING_ITEM_KEY 253 #define BTRFS_STRING_ITEM_KEY 253
/* 32 bytes in various csum fields */ /* 32 bytes in various csum fields */
#define BTRFS_CSUM_SIZE 32 #define BTRFS_CSUM_SIZE 32
@ -508,7 +506,6 @@ struct btrfs_free_space_header {
#define BTRFS_SUPER_FLAG_CHANGING_FSID (1ULL << 35) #define BTRFS_SUPER_FLAG_CHANGING_FSID (1ULL << 35)
#define BTRFS_SUPER_FLAG_CHANGING_FSID_V2 (1ULL << 36) #define BTRFS_SUPER_FLAG_CHANGING_FSID_V2 (1ULL << 36)
/* /*
* Items in the extent tree are used to record the objectid of the * Items in the extent tree are used to record the objectid of the
* owner of the block and the number of references. * owner of the block and the number of references.
@ -523,7 +520,6 @@ struct btrfs_extent_item_v0 {
__le32 refs; __le32 refs;
} __attribute__ ((__packed__)); } __attribute__ ((__packed__));
#define BTRFS_EXTENT_FLAG_DATA (1ULL << 0) #define BTRFS_EXTENT_FLAG_DATA (1ULL << 0)
#define BTRFS_EXTENT_FLAG_TREE_BLOCK (1ULL << 1) #define BTRFS_EXTENT_FLAG_TREE_BLOCK (1ULL << 1)
@ -565,7 +561,6 @@ struct btrfs_extent_ref_v0 {
__le32 count; __le32 count;
} __attribute__ ((__packed__)); } __attribute__ ((__packed__));
/* Dev extents record used space on individual devices. /* Dev extents record used space on individual devices.
* *
* The owner field points back to the chunk allocation mapping tree that * The owner field points back to the chunk allocation mapping tree that

View file

@ -255,7 +255,6 @@ static int device_list_add(struct btrfs_super_block *disk_super,
} }
} }
if (found_transid > fs_devices->latest_trans) { if (found_transid > fs_devices->latest_trans) {
fs_devices->latest_devid = devid; fs_devices->latest_devid = devid;
fs_devices->latest_trans = found_transid; fs_devices->latest_trans = found_transid;

View file

@ -1205,7 +1205,6 @@ fail:
} }
static void alloc_single_indirect_block(struct ext2_inode *file_inode, static void alloc_single_indirect_block(struct ext2_inode *file_inode,
unsigned int *total_remaining_blocks, unsigned int *total_remaining_blocks,
unsigned int *no_blks_reqd) unsigned int *no_blks_reqd)
@ -2380,7 +2379,6 @@ int ext4fs_mount(void)
if (le16_to_cpu(data->sblock.magic) != EXT2_MAGIC) if (le16_to_cpu(data->sblock.magic) != EXT2_MAGIC)
goto fail_noerr; goto fail_noerr;
if (le32_to_cpu(data->sblock.revision_level) == 0) { if (le32_to_cpu(data->sblock.revision_level) == 0) {
fs->inodesz = 128; fs->inodesz = 128;
fs->gdsize = 32; fs->gdsize = 32;

View file

@ -20,7 +20,6 @@
* ext4write : Based on generic ext4 protocol. * ext4write : Based on generic ext4 protocol.
*/ */
#include <blk.h> #include <blk.h>
#include <log.h> #include <log.h>
#include <malloc.h> #include <malloc.h>
@ -746,7 +745,6 @@ void ext4fs_deinit(void)
fs->inode_bmaps = NULL; fs->inode_bmaps = NULL;
} }
free(fs->gdtable); free(fs->gdtable);
fs->gdtable = NULL; fs->gdtable = NULL;
/* /*

View file

@ -65,7 +65,6 @@
*/ */
#include <config.h> #include <config.h>
#include <linux/stddef.h> #include <linux/stddef.h>
#include <jffs2/jffs2.h> #include <jffs2/jffs2.h>

View file

@ -42,7 +42,6 @@
#include <jffs2/jffs2.h> #include <jffs2/jffs2.h>
#include <jffs2/compr_rubin.h> #include <jffs2/compr_rubin.h>
void rubin_do_decompress(unsigned char *bits, unsigned char *in, void rubin_do_decompress(unsigned char *bits, unsigned char *in,
unsigned char *page_out, __u32 destlen) unsigned char *page_out, __u32 destlen)
{ {

View file

@ -110,7 +110,6 @@
* it should probably be dumped and replaced by something like jffs2reader! * it should probably be dumped and replaced by something like jffs2reader!
*/ */
#include <config.h> #include <config.h>
#include <malloc.h> #include <malloc.h>
#include <div64.h> #include <div64.h>
@ -126,7 +125,6 @@
#include "jffs2_private.h" #include "jffs2_private.h"
#define NODE_CHUNK 1024 /* size of memory allocation chunk in b_nodes */ #define NODE_CHUNK 1024 /* size of memory allocation chunk in b_nodes */
#define SPIN_BLKSIZE 18 /* spin after having scanned 1<<BLKSIZE bytes */ #define SPIN_BLKSIZE 18 /* spin after having scanned 1<<BLKSIZE bytes */
@ -135,7 +133,6 @@
#undef DEBUG_FRAGMENTS /* print fragment list after scan */ #undef DEBUG_FRAGMENTS /* print fragment list after scan */
#undef DEBUG /* enable debugging messages */ #undef DEBUG /* enable debugging messages */
#ifdef DEBUG #ifdef DEBUG
# define DEBUGF(fmt,args...) printf(fmt ,##args) # define DEBUGF(fmt,args...) printf(fmt ,##args)
#else #else
@ -370,14 +367,12 @@ static void *get_node_mem_onenand(u32 off, void *ext_buf)
return ret; return ret;
} }
static void put_fl_mem_onenand(void *buf) static void put_fl_mem_onenand(void *buf)
{ {
free(buf); free(buf);
} }
#endif #endif
#if defined(CONFIG_CMD_FLASH) #if defined(CONFIG_CMD_FLASH)
#include <flash.h> #include <flash.h>
@ -414,7 +409,6 @@ static inline void *get_node_mem_nor(u32 off, void *ext_buf)
} }
#endif #endif
/* /*
* Generic jffs2 raw memory and node read routines. * Generic jffs2 raw memory and node read routines.
* *
@ -515,7 +509,6 @@ struct mem_block {
struct b_node nodes[NODE_CHUNK]; struct b_node nodes[NODE_CHUNK];
}; };
static void static void
free_nodes(struct b_list *list) free_nodes(struct b_list *list)
{ {
@ -1854,7 +1847,6 @@ jffs2_1pass_build_lists(struct part_info * part)
return 1; return 1;
} }
static u32 static u32
jffs2_1pass_fill_info(struct b_lists * pL, struct b_jffs2_info * piL) jffs2_1pass_fill_info(struct b_lists * pL, struct b_jffs2_info * piL)
{ {
@ -1883,7 +1875,6 @@ jffs2_1pass_fill_info(struct b_lists * pL, struct b_jffs2_info * piL)
return 0; return 0;
} }
static struct b_lists * static struct b_lists *
jffs2_get_list(struct part_info * part, const char *who) jffs2_get_list(struct part_info * part, const char *who)
{ {
@ -1899,7 +1890,6 @@ jffs2_get_list(struct part_info * part, const char *who)
return (struct b_lists *)part->jffs2_priv; return (struct b_lists *)part->jffs2_priv;
} }
/* Print directory / file contents */ /* Print directory / file contents */
u32 u32
jffs2_1pass_ls(struct part_info * part, const char *fname) jffs2_1pass_ls(struct part_info * part, const char *fname)
@ -1916,7 +1906,6 @@ jffs2_1pass_ls(struct part_info * part, const char *fname)
return 0; return 0;
} }
#if 0 #if 0
putLabeledWord("found file at inode = ", inode); putLabeledWord("found file at inode = ", inode);
putLabeledWord("read_inode returns = ", ret); putLabeledWord("read_inode returns = ", ret);
@ -1925,7 +1914,6 @@ jffs2_1pass_ls(struct part_info * part, const char *fname)
return ret; return ret;
} }
/* Load a file from flash into memory. fname can be a full path */ /* Load a file from flash into memory. fname can be a full path */
u32 u32
jffs2_1pass_load(char *dest, struct part_info * part, const char *fname) jffs2_1pass_load(char *dest, struct part_info * part, const char *fname)

View file

@ -3,7 +3,6 @@
#include <jffs2/jffs2.h> #include <jffs2/jffs2.h>
struct b_node { struct b_node {
u32 offset; u32 offset;
struct b_node *next; struct b_node *next;

View file

@ -336,11 +336,9 @@ static void decompress_fixed(struct bitstream *stream, unsigned char *dest)
cramfs_memset(distance->lengths, 5, 32); cramfs_memset(distance->lengths, 5, 32);
distance->count[5] = 32; distance->count[5] = 32;
fill_code_tables(lengths); fill_code_tables(lengths);
fill_code_tables(distance); fill_code_tables(distance);
decompress_huffman(stream, dest); decompress_huffman(stream, dest);
} }

View file

@ -2452,7 +2452,6 @@ retry:
EXPORT_SYMBOL(sget); EXPORT_SYMBOL(sget);
static struct dentry *ubifs_mount(struct file_system_type *fs_type, int flags, static struct dentry *ubifs_mount(struct file_system_type *fs_type, int flags,
const char *name, void *data) const char *name, void *data)
{ {

View file

@ -110,7 +110,6 @@ static struct ubifs_compressor zstd_compr = {
/* All UBIFS compressors */ /* All UBIFS compressors */
struct ubifs_compressor *ubifs_compressors[UBIFS_COMPR_TYPES_CNT] = {NULL}; struct ubifs_compressor *ubifs_compressors[UBIFS_COMPR_TYPES_CNT] = {NULL};
#ifdef __UBOOT__ #ifdef __UBOOT__
struct crypto_comp { struct crypto_comp {

View file

@ -13,7 +13,6 @@
#include "yaffs_attribs.h" #include "yaffs_attribs.h"
void yaffs_load_attribs(struct yaffs_obj *obj, struct yaffs_obj_hdr *oh) void yaffs_load_attribs(struct yaffs_obj *obj, struct yaffs_obj_hdr *oh)
{ {
obj->yst_uid = oh->yst_uid; obj->yst_uid = oh->yst_uid;
@ -24,7 +23,6 @@ void yaffs_load_attribs(struct yaffs_obj *obj, struct yaffs_obj_hdr *oh)
obj->yst_rdev = oh->yst_rdev; obj->yst_rdev = oh->yst_rdev;
} }
void yaffs_load_attribs_oh(struct yaffs_obj_hdr *oh, struct yaffs_obj *obj) void yaffs_load_attribs_oh(struct yaffs_obj_hdr *oh, struct yaffs_obj *obj)
{ {
#ifdef CONFIG_YAFFS_WINCE #ifdef CONFIG_YAFFS_WINCE

View file

@ -67,7 +67,6 @@ static const unsigned char column_parity_table[] = {
0x69, 0x3c, 0x30, 0x65, 0x0c, 0x59, 0x55, 0x00, 0x69, 0x3c, 0x30, 0x65, 0x0c, 0x59, 0x55, 0x00,
}; };
/* Calculate the ECC for a 256-byte block of data */ /* Calculate the ECC for a 256-byte block of data */
void yaffs_ecc_calc(const unsigned char *data, unsigned char *ecc) void yaffs_ecc_calc(const unsigned char *data, unsigned char *ecc)
{ {

View file

@ -16,7 +16,6 @@
#ifndef __YAFFS_FLASH_H__ #ifndef __YAFFS_FLASH_H__
#define __YAFFS_FLASH_H__ #define __YAFFS_FLASH_H__
#include "yaffs_guts.h" #include "yaffs_guts.h"
int yflash_EraseBlockInNAND(struct yaffs_dev *dev, int blockNumber); int yflash_EraseBlockInNAND(struct yaffs_dev *dev, int blockNumber);
int yflash_WriteChunkToNAND(struct yaffs_dev *dev, int nand_chunk, int yflash_WriteChunkToNAND(struct yaffs_dev *dev, int nand_chunk,

View file

@ -16,7 +16,6 @@
#ifndef __YAFFS_FLASH2_H__ #ifndef __YAFFS_FLASH2_H__
#define __YAFFS_FLASH2_H__ #define __YAFFS_FLASH2_H__
#include "yaffs_guts.h" #include "yaffs_guts.h"
int yflash2_EraseBlockInNAND(struct yaffs_dev *dev, int blockNumber); int yflash2_EraseBlockInNAND(struct yaffs_dev *dev, int blockNumber);
int yflash2_WriteChunkToNAND(struct yaffs_dev *dev, int nand_chunk, int yflash2_WriteChunkToNAND(struct yaffs_dev *dev, int nand_chunk,

View file

@ -41,8 +41,6 @@
static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk, static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
const u8 *buffer, int n_bytes, int use_reserve); const u8 *buffer, int n_bytes, int use_reserve);
/* Function to calculate chunk and offset */ /* Function to calculate chunk and offset */
void yaffs_addr_to_chunk(struct yaffs_dev *dev, loff_t addr, void yaffs_addr_to_chunk(struct yaffs_dev *dev, loff_t addr,
@ -355,7 +353,6 @@ static int yaffs_verify_chunk_written(struct yaffs_dev *dev,
return retval; return retval;
} }
int yaffs_check_alloc_available(struct yaffs_dev *dev, int n_chunks) int yaffs_check_alloc_available(struct yaffs_dev *dev, int n_chunks)
{ {
int reserved_chunks; int reserved_chunks;
@ -1989,7 +1986,6 @@ static struct yaffs_obj *yaffs_create_fake_dir(struct yaffs_dev *dev,
} }
static void yaffs_init_tnodes_and_objs(struct yaffs_dev *dev) static void yaffs_init_tnodes_and_objs(struct yaffs_dev *dev)
{ {
int i; int i;
@ -2233,8 +2229,6 @@ struct yaffs_obj *yaffs_link_obj(struct yaffs_obj *parent, const YCHAR * name,
} }
/*---------------------- Block Management and Page Allocation -------------*/ /*---------------------- Block Management and Page Allocation -------------*/
static void yaffs_deinit_blocks(struct yaffs_dev *dev) static void yaffs_deinit_blocks(struct yaffs_dev *dev)
@ -2292,7 +2286,6 @@ static int yaffs_init_blocks(struct yaffs_dev *dev)
if (!dev->chunk_bits) if (!dev->chunk_bits)
goto alloc_error; goto alloc_error;
memset(dev->block_info, 0, n_blocks * sizeof(struct yaffs_block_info)); memset(dev->block_info, 0, n_blocks * sizeof(struct yaffs_block_info));
memset(dev->chunk_bits, 0, dev->chunk_bit_stride * n_blocks); memset(dev->chunk_bits, 0, dev->chunk_bit_stride * n_blocks);
return YAFFS_OK; return YAFFS_OK;
@ -2302,7 +2295,6 @@ alloc_error:
return YAFFS_FAIL; return YAFFS_FAIL;
} }
void yaffs_block_became_dirty(struct yaffs_dev *dev, int block_no) void yaffs_block_became_dirty(struct yaffs_dev *dev, int block_no)
{ {
struct yaffs_block_info *bi = yaffs_get_block_info(dev, block_no); struct yaffs_block_info *bi = yaffs_get_block_info(dev, block_no);
@ -3036,8 +3028,6 @@ static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
} }
static int yaffs_do_xattrib_mod(struct yaffs_obj *obj, int set, static int yaffs_do_xattrib_mod(struct yaffs_obj *obj, int set,
const YCHAR *name, const void *value, int size, const YCHAR *name, const void *value, int size,
int flags) int flags)
@ -3396,7 +3386,6 @@ int yaffs_update_oh(struct yaffs_obj *in, const YCHAR *name, int force,
bi->has_shrink_hdr = 1; bi->has_shrink_hdr = 1;
} }
return new_chunk_id; return new_chunk_id;
} }
@ -3804,7 +3793,6 @@ int yaffs_flush_file(struct yaffs_obj *in, int update_time, int data_sync)
YAFFS_OK : YAFFS_FAIL; YAFFS_OK : YAFFS_FAIL;
} }
/* yaffs_del_file deletes the whole file data /* yaffs_del_file deletes the whole file data
* and the inode associated with the file. * and the inode associated with the file.
* It does not delete the links associated with the file. * It does not delete the links associated with the file.
@ -4306,7 +4294,6 @@ static void yaffs_empty_l_n_f(struct yaffs_dev *dev)
yaffs_del_dir_contents(dev->lost_n_found); yaffs_del_dir_contents(dev->lost_n_found);
} }
struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory, struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
const YCHAR *name) const YCHAR *name)
{ {

View file

@ -64,8 +64,6 @@
#define YAFFS_MIN_YAFFS2_CHUNK_SIZE 1024 #define YAFFS_MIN_YAFFS2_CHUNK_SIZE 1024
#define YAFFS_MIN_YAFFS2_SPARE_SIZE 32 #define YAFFS_MIN_YAFFS2_SPARE_SIZE 32
#define YAFFS_ALLOCATION_NOBJECTS 100 #define YAFFS_ALLOCATION_NOBJECTS 100
#define YAFFS_ALLOCATION_NTNODES 100 #define YAFFS_ALLOCATION_NTNODES 100
#define YAFFS_ALLOCATION_NLINKS 100 #define YAFFS_ALLOCATION_NLINKS 100
@ -155,7 +153,6 @@ union yaffs_tags_union {
u8 as_bytes[8]; u8 as_bytes[8];
}; };
/* Stuff used for extended tags in YAFFS2 */ /* Stuff used for extended tags in YAFFS2 */
enum yaffs_ecc_result { enum yaffs_ecc_result {
@ -969,5 +966,4 @@ void yaffs_oh_size_load(struct yaffs_obj_hdr *oh, loff_t fsize);
loff_t yaffs_oh_to_size(struct yaffs_obj_hdr *oh); loff_t yaffs_oh_to_size(struct yaffs_obj_hdr *oh);
loff_t yaffs_max_file_size(struct yaffs_dev *dev); loff_t yaffs_max_file_size(struct yaffs_dev *dev);
#endif #endif

View file

@ -15,7 +15,6 @@
#include "yportenv.h" #include "yportenv.h"
#include "yaffs_mtdif.h" #include "yaffs_mtdif.h"
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
@ -23,7 +22,6 @@
#include <linux/time.h> #include <linux/time.h>
#include <linux/mtd/rawnand.h> #include <linux/mtd/rawnand.h>
static inline void translate_spare2oob(const struct yaffs_spare *spare, u8 *oob) static inline void translate_spare2oob(const struct yaffs_spare *spare, u8 *oob)
{ {
oob[0] = spare->tb0; oob[0] = spare->tb0;
@ -57,7 +55,6 @@ static inline void translate_oob2spare(struct yaffs_spare *spare, u8 *oob)
nspare->eccres1 = nspare->eccres2 = 0; /* FIXME */ nspare->eccres1 = nspare->eccres2 = 0; /* FIXME */
} }
int nandmtd_WriteChunkToNAND(struct yaffs_dev *dev, int chunkInNAND, int nandmtd_WriteChunkToNAND(struct yaffs_dev *dev, int chunkInNAND,
const u8 *data, const struct yaffs_spare *spare) const u8 *data, const struct yaffs_spare *spare)
{ {
@ -148,7 +145,6 @@ int nandmtd_EraseBlockInNAND(struct yaffs_dev *dev, int blockNumber)
/* Todo finish off the ei if required */ /* Todo finish off the ei if required */
retval = mtd_erase(mtd, &ei); retval = mtd_erase(mtd, &ei);
if (retval == 0) if (retval == 0)

View file

@ -32,7 +32,6 @@
#define yaffs_dev_to_mtd(dev) ((struct mtd_info *)((dev)->driver_context)) #define yaffs_dev_to_mtd(dev) ((struct mtd_info *)((dev)->driver_context))
#define yaffs_dev_to_lc(dev) ((struct yaffs_linux_context *)((dev)->os_context)) #define yaffs_dev_to_lc(dev) ((struct yaffs_linux_context *)((dev)->os_context))
/* NB For use with inband tags.... /* NB For use with inband tags....
* We assume that the data buffer is of size total_bytes_per_chunk so * We assume that the data buffer is of size total_bytes_per_chunk so
* that we can also use it to load the tags. * that we can also use it to load the tags.
@ -169,7 +168,6 @@ int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
return YAFFS_FAIL; return YAFFS_FAIL;
} }
int nandmtd2_MarkNANDBlockBad(struct yaffs_dev *dev, int blockNo) int nandmtd2_MarkNANDBlockBad(struct yaffs_dev *dev, int blockNo)
{ {
struct mtd_info *mtd = (struct mtd_info *)(dev->driver_context); struct mtd_info *mtd = (struct mtd_info *)(dev->driver_context);

View file

@ -15,7 +15,6 @@
#include "yaffs_guts.h" #include "yaffs_guts.h"
#include <malloc.h> #include <malloc.h>
#include "yaffs_nandif.h" #include "yaffs_nandif.h"
#include "yaffs_packedtags2.h" #include "yaffs_packedtags2.h"
@ -24,7 +23,6 @@
#include "yaffs_trace.h" #include "yaffs_trace.h"
#include "yaffsfs.h" #include "yaffsfs.h"
/* NB For use with inband tags.... /* NB For use with inband tags....
* We assume that the data buffer is of size totalBytersPerChunk so that * We assume that the data buffer is of size totalBytersPerChunk so that
* we can also use it to load the tags. * we can also use it to load the tags.
@ -44,7 +42,6 @@ int ynandif_WriteChunkWithTagsToNAND(struct yaffs_dev *dev, int nand_chunk,
"nandmtd2_WriteChunkWithTagsToNAND chunk %d data %p tags %p", "nandmtd2_WriteChunkWithTagsToNAND chunk %d data %p tags %p",
nand_chunk, data, tags); nand_chunk, data, tags);
/* For yaffs2 writing there must be both data and tags. /* For yaffs2 writing there must be both data and tags.
* If we're using inband tags, then the tags are stuffed into * If we're using inband tags, then the tags are stuffed into
* the end of the data buffer. * the end of the data buffer.
@ -152,7 +149,6 @@ int ynandif_EraseBlockInNAND(struct yaffs_dev *dev, int blockId)
} }
static int ynandif_IsBlockOk(struct yaffs_dev *dev, int blockId) static int ynandif_IsBlockOk(struct yaffs_dev *dev, int blockId)
{ {
struct ynandif_Geometry *geometry = (struct ynandif_Geometry *)(dev->driver_context); struct ynandif_Geometry *geometry = (struct ynandif_Geometry *)(dev->driver_context);
@ -186,7 +182,6 @@ int ynandif_QueryNANDBlock(struct yaffs_dev *dev, int blockId,
return YAFFS_OK; return YAFFS_OK;
} }
int ynandif_InitialiseNAND(struct yaffs_dev *dev) int ynandif_InitialiseNAND(struct yaffs_dev *dev)
{ {
struct ynandif_Geometry *geometry = (struct ynandif_Geometry *)(dev->driver_context); struct ynandif_Geometry *geometry = (struct ynandif_Geometry *)(dev->driver_context);
@ -205,7 +200,6 @@ int ynandif_Deinitialise_flash_fn(struct yaffs_dev *dev)
return YAFFS_OK; return YAFFS_OK;
} }
struct yaffs_dev * struct yaffs_dev *
yaffs_add_dev_from_geometry(const YCHAR *name, yaffs_add_dev_from_geometry(const YCHAR *name,
const struct ynandif_Geometry *geometry) const struct ynandif_Geometry *geometry)

View file

@ -13,7 +13,6 @@
* Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL. * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
*/ */
#ifndef __YNANDIF_H__ #ifndef __YNANDIF_H__
#define __YNANDIF_H__ #define __YNANDIF_H__
@ -61,5 +60,4 @@ struct yaffs_dev *
yaffs_add_dev_from_geometry(const YCHAR *name, yaffs_add_dev_from_geometry(const YCHAR *name,
const struct ynandif_Geometry *geometry); const struct ynandif_Geometry *geometry);
#endif #endif

View file

@ -18,11 +18,9 @@
* a direct interface. * a direct interface.
*/ */
#ifndef __YAFFS_OSGLUE_H__ #ifndef __YAFFS_OSGLUE_H__
#define __YAFFS_OSGLUE_H__ #define __YAFFS_OSGLUE_H__
#include "yportenv.h" #include "yportenv.h"
void yaffsfs_Lock(void); void yaffsfs_Lock(void);
@ -37,5 +35,4 @@ void yaffsfs_free(void *ptr);
void yaffsfs_OSInitialisation(void); void yaffsfs_OSInitialisation(void);
#endif #endif

View file

@ -52,7 +52,6 @@ struct yaffs_summary_header {
unsigned sum; /* Just add up all the bytes in the tags */ unsigned sum; /* Just add up all the bytes in the tags */
}; };
static void yaffs_summary_clear(struct yaffs_dev *dev) static void yaffs_summary_clear(struct yaffs_dev *dev)
{ {
if (!dev->sum_tags) if (!dev->sum_tags)
@ -61,7 +60,6 @@ static void yaffs_summary_clear(struct yaffs_dev *dev)
sizeof(struct yaffs_summary_tags)); sizeof(struct yaffs_summary_tags));
} }
void yaffs_summary_deinit(struct yaffs_dev *dev) void yaffs_summary_deinit(struct yaffs_dev *dev)
{ {
kfree(dev->sum_tags); kfree(dev->sum_tags);
@ -168,11 +166,9 @@ static int yaffs_summary_write(struct yaffs_dev *dev, int blk)
} while (result == YAFFS_OK && n_bytes > 0); } while (result == YAFFS_OK && n_bytes > 0);
yaffs_release_temp_buffer(dev, buffer); yaffs_release_temp_buffer(dev, buffer);
if (result == YAFFS_OK) if (result == YAFFS_OK)
bi->has_summary = 1; bi->has_summary = 1;
return result; return result;
} }

View file

@ -18,7 +18,6 @@
#include "yaffs_packedtags2.h" #include "yaffs_packedtags2.h"
int yaffs_summary_init(struct yaffs_dev *dev); int yaffs_summary_init(struct yaffs_dev *dev);
void yaffs_summary_deinit(struct yaffs_dev *dev); void yaffs_summary_deinit(struct yaffs_dev *dev);
@ -33,5 +32,4 @@ int yaffs_summary_read(struct yaffs_dev *dev,
int blk); int blk);
void yaffs_summary_gc(struct yaffs_dev *dev, int blk); void yaffs_summary_gc(struct yaffs_dev *dev, int blk);
#endif #endif

View file

@ -19,7 +19,6 @@
static void yaffs_handle_rd_data_error(struct yaffs_dev *dev, int nand_chunk); static void yaffs_handle_rd_data_error(struct yaffs_dev *dev, int nand_chunk);
/********** Tags ECC calculations *********/ /********** Tags ECC calculations *********/
void yaffs_calc_ecc(const u8 *data, struct yaffs_spare *spare) void yaffs_calc_ecc(const u8 *data, struct yaffs_spare *spare)

View file

@ -40,7 +40,6 @@
unsigned yaffs_trace_mask = 0x0; /* Disable logging */ unsigned yaffs_trace_mask = 0x0; /* Disable logging */
static int yaffs_errno; static int yaffs_errno;
void yaffs_bug_fn(const char *fn, int n) void yaffs_bug_fn(const char *fn, int n)
{ {
printf("yaffs bug at %s:%d\n", fn, n); printf("yaffs bug at %s:%d\n", fn, n);
@ -66,7 +65,6 @@ int yaffsfs_GetLastError(void)
return yaffs_errno; return yaffs_errno;
} }
int yaffsfs_GetError(void) int yaffsfs_GetError(void)
{ {
return yaffs_errno; return yaffs_errno;
@ -100,7 +98,6 @@ void yaffsfs_LocalInitialisation(void)
/* No locking used */ /* No locking used */
} }
static const char *yaffs_file_type_str(struct yaffs_stat *stat) static const char *yaffs_file_type_str(struct yaffs_stat *stat)
{ {
switch (stat->st_mode & S_IFMT) { switch (stat->st_mode & S_IFMT) {
@ -305,7 +302,6 @@ void make_a_file(char *yaffsName, char bval, int sizeOfFile)
} while (sizeOfFile > 0); } while (sizeOfFile > 0);
yaffs_close(outh); yaffs_close(outh);
} }
@ -341,7 +337,6 @@ void cmd_yaffs_mount(char *mp)
yaffsfs_GetError(), yaffs_error_str()); yaffsfs_GetError(), yaffs_error_str());
} }
void cmd_yaffs_umount(char *mp) void cmd_yaffs_umount(char *mp)
{ {
if (yaffs_unmount(mp) == -1) if (yaffs_unmount(mp) == -1)
@ -354,13 +349,11 @@ void cmd_yaffs_write_file(char *yaffsName, char bval, int sizeOfFile)
make_a_file(yaffsName, bval, sizeOfFile); make_a_file(yaffsName, bval, sizeOfFile);
} }
void cmd_yaffs_read_file(char *fn) void cmd_yaffs_read_file(char *fn)
{ {
read_a_file(fn); read_a_file(fn);
} }
void cmd_yaffs_mread_file(char *fn, char *addr) void cmd_yaffs_mread_file(char *fn, char *addr)
{ {
int h; int h;
@ -381,7 +374,6 @@ void cmd_yaffs_mread_file(char *fn, char *addr)
yaffs_close(h); yaffs_close(h);
} }
void cmd_yaffs_mwrite_file(char *fn, char *addr, int size) void cmd_yaffs_mwrite_file(char *fn, char *addr, int size)
{ {
int outh; int outh;
@ -395,7 +387,6 @@ void cmd_yaffs_mwrite_file(char *fn, char *addr, int size)
yaffs_close(outh); yaffs_close(outh);
} }
void cmd_yaffs_ls(const char *mountpt, int longlist) void cmd_yaffs_ls(const char *mountpt, int longlist)
{ {
int i; int i;
@ -429,7 +420,6 @@ void cmd_yaffs_ls(const char *mountpt, int longlist)
yaffs_closedir(d); yaffs_closedir(d);
} }
void cmd_yaffs_mkdir(const char *dir) void cmd_yaffs_mkdir(const char *dir)
{ {
int retval = yaffs_mkdir(dir, 0); int retval = yaffs_mkdir(dir, 0);

View file

@ -240,7 +240,6 @@ void yaffs_verify_file(struct yaffs_obj *obj)
dev = obj->my_dev; dev = obj->my_dev;
obj_id = obj->obj_id; obj_id = obj->obj_id;
/* Check file size is consistent with tnode depth */ /* Check file size is consistent with tnode depth */
yaffs_addr_to_chunk(dev, obj->variant.file_variant.file_size, yaffs_addr_to_chunk(dev, obj->variant.file_variant.file_size,
&last_chunk, &offset_in_chunk); &last_chunk, &offset_in_chunk);

View file

@ -592,7 +592,6 @@ static int yaffs2_rd_checkpt_objs(struct yaffs_dev *dev)
int done = 0; int done = 0;
LIST_HEAD(hard_list); LIST_HEAD(hard_list);
while (ok && !done) { while (ok && !done) {
ok = (yaffs2_checkpt_rd(dev, &cp, sizeof(cp)) == sizeof(cp)); ok = (yaffs2_checkpt_rd(dev, &cp, sizeof(cp)) == sizeof(cp));
if (cp.struct_type != sizeof(cp)) { if (cp.struct_type != sizeof(cp)) {

View file

@ -18,21 +18,17 @@
* a direct interface. * a direct interface.
*/ */
#ifndef __YAFFSCFG_H__ #ifndef __YAFFSCFG_H__
#define __YAFFSCFG_H__ #define __YAFFSCFG_H__
#include "yportenv.h" #include "yportenv.h"
#define YAFFSFS_N_HANDLES 100 #define YAFFSFS_N_HANDLES 100
#define YAFFSFS_N_DSC 20 #define YAFFSFS_N_DSC 20
struct yaffsfs_DeviceConfiguration { struct yaffsfs_DeviceConfiguration {
const YCHAR *prefix; const YCHAR *prefix;
struct yaffs_dev *dev; struct yaffs_dev *dev;
}; };
#endif #endif

View file

@ -82,7 +82,6 @@ struct yaffsfs_Handle {
short int useCount; short int useCount;
}; };
struct yaffsfs_DirSearchContxt { struct yaffsfs_DirSearchContxt {
struct yaffs_dirent de; /* directory entry */ struct yaffs_dirent de; /* directory entry */
YCHAR name[NAME_MAX + 1]; /* name of directory being searched */ YCHAR name[NAME_MAX + 1]; /* name of directory being searched */

View file

@ -18,21 +18,18 @@
* a direct interface. * a direct interface.
*/ */
#ifndef __YAFFSFS_H__ #ifndef __YAFFSFS_H__
#define __YAFFSFS_H__ #define __YAFFSFS_H__
#include "yaffscfg.h" #include "yaffscfg.h"
#include "yportenv.h" #include "yportenv.h"
#ifndef NAME_MAX #ifndef NAME_MAX
#define NAME_MAX 256 #define NAME_MAX 256
#endif #endif
#define YAFFS_MAX_FILE_SIZE (0x800000000LL - 1) #define YAFFS_MAX_FILE_SIZE (0x800000000LL - 1)
struct yaffs_dirent { struct yaffs_dirent {
long d_ino; /* inode number */ long d_ino; /* inode number */
off_t d_off; /* offset to this dirent */ off_t d_off; /* offset to this dirent */
@ -44,8 +41,6 @@ struct yaffs_dirent {
typedef struct opaque_structure yaffs_DIR; typedef struct opaque_structure yaffs_DIR;
struct yaffs_stat { struct yaffs_stat {
int st_dev; /* device */ int st_dev; /* device */
int st_ino; /* inode */ int st_ino; /* inode */
@ -69,13 +64,11 @@ struct yaffs_stat {
#endif #endif
}; };
struct yaffs_utimbuf { struct yaffs_utimbuf {
unsigned long actime; unsigned long actime;
unsigned long modtime; unsigned long modtime;
}; };
int yaffs_open(const YCHAR *path, int oflag, int mode) ; int yaffs_open(const YCHAR *path, int oflag, int mode) ;
int yaffs_close(int fd) ; int yaffs_close(int fd) ;
@ -108,7 +101,6 @@ int yaffs_fstat(int fd, struct yaffs_stat *buf) ;
int yaffs_utime(const YCHAR *path, const struct yaffs_utimbuf *buf); int yaffs_utime(const YCHAR *path, const struct yaffs_utimbuf *buf);
int yaffs_futime(int fd, const struct yaffs_utimbuf *buf); int yaffs_futime(int fd, const struct yaffs_utimbuf *buf);
int yaffs_setxattr(const char *path, const char *name, int yaffs_setxattr(const char *path, const char *name,
const void *data, int size, int flags); const void *data, int size, int flags);
int yaffs_lsetxattr(const char *path, const char *name, int yaffs_lsetxattr(const char *path, const char *name,
@ -131,7 +123,6 @@ int yaffs_listxattr(const char *path, char *list, int size);
int yaffs_llistxattr(const char *path, char *list, int size); int yaffs_llistxattr(const char *path, char *list, int size);
int yaffs_flistxattr(int fd, char *list, int size); int yaffs_flistxattr(int fd, char *list, int size);
#ifdef CONFIG_YAFFS_WINCE #ifdef CONFIG_YAFFS_WINCE
int yaffs_set_wince_times(int fd, int yaffs_set_wince_times(int fd,
@ -164,7 +155,6 @@ int yaffs_unmount(const YCHAR *path) ;
int yaffs_unmount2(const YCHAR *path, int force); int yaffs_unmount2(const YCHAR *path, int force);
int yaffs_remount(const YCHAR *path, int force, int read_only); int yaffs_remount(const YCHAR *path, int force, int read_only);
int yaffs_sync(const YCHAR *path) ; int yaffs_sync(const YCHAR *path) ;
int yaffs_symlink(const YCHAR *oldpath, const YCHAR *newpath); int yaffs_symlink(const YCHAR *oldpath, const YCHAR *newpath);

View file

@ -27,8 +27,6 @@
void yaffs_bug_fn(const char *file_name, int line_no); void yaffs_bug_fn(const char *file_name, int line_no);
#define YCHAR char #define YCHAR char
#define YUCHAR unsigned char #define YUCHAR unsigned char
#define _Y(x) x #define _Y(x) x
@ -45,7 +43,6 @@ void yaffs_bug_fn(const char *file_name, int line_no);
#define yaffs_strncmp(a, b, c) strncmp(a, b, c) #define yaffs_strncmp(a, b, c) strncmp(a, b, c)
#endif #endif
void yaffs_qsort(void *aa, size_t n, size_t es, void yaffs_qsort(void *aa, size_t n, size_t es,
int (*cmp)(const void *, const void *)); int (*cmp)(const void *, const void *));
@ -62,7 +59,6 @@ void yaffs_qsort(void *aa, size_t n, size_t es,
printf("yaffs: " fmt "\n", ##__VA_ARGS__); \ printf("yaffs: " fmt "\n", ##__VA_ARGS__); \
} while (0) } while (0)
#define YAFFS_LOSTNFOUND_NAME "lost+found" #define YAFFS_LOSTNFOUND_NAME "lost+found"
#define YAFFS_LOSTNFOUND_PREFIX "obj" #define YAFFS_LOSTNFOUND_PREFIX "obj"

View file

@ -13,7 +13,6 @@
* Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL. * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
*/ */
#ifndef __YPORTENV_H__ #ifndef __YPORTENV_H__
#define __YPORTENV_H__ #define __YPORTENV_H__
@ -27,11 +26,9 @@ typedef unsigned short u16;
typedef unsigned u32; typedef unsigned u32;
#endif #endif
#ifdef CONFIG_YAFFS_PROVIDE_DEFS #ifdef CONFIG_YAFFS_PROVIDE_DEFS
/* File types */ /* File types */
#define DT_UNKNOWN 0 #define DT_UNKNOWN 0
#define DT_FIFO 1 #define DT_FIFO 1
#define DT_CHR 2 #define DT_CHR 2
@ -42,7 +39,6 @@ typedef unsigned u32;
#define DT_SOCK 12 #define DT_SOCK 12
#define DT_WHT 14 #define DT_WHT 14
/* /*
* Attribute flags. * Attribute flags.
* These are or-ed together to select what has been changed. * These are or-ed together to select what has been changed.
@ -69,13 +65,10 @@ struct iattr {
#endif #endif
#if defined CONFIG_YAFFS_WINCE #if defined CONFIG_YAFFS_WINCE
#include "ywinceenv.h" #include "ywinceenv.h"
#elif defined CONFIG_YAFFS_DIRECT #elif defined CONFIG_YAFFS_DIRECT
/* Direct interface */ /* Direct interface */
@ -215,7 +208,6 @@ struct iattr {
#define ELOOP 40 #define ELOOP 40
#endif #endif
/* Mode flags */ /* Mode flags */
#ifndef S_IFMT #ifndef S_IFMT
@ -258,7 +250,6 @@ struct iattr {
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
#ifndef S_IREAD #ifndef S_IREAD
#define S_IREAD 0000400 #define S_IREAD 0000400
#endif #endif

View file

@ -7,7 +7,6 @@
* Sysgo AG, <www.elinos.com>, Pavel Bartusek <pba@sysgo.com> * Sysgo AG, <www.elinos.com>, Pavel Bartusek <pba@sysgo.com>
*/ */
#include <config.h> #include <config.h>
#include <fs_internal.h> #include <fs_internal.h>
#include <zfs_common.h> #include <zfs_common.h>

View file

@ -50,10 +50,8 @@ struct blk_desc *zfs_dev_desc;
#include <zfs/dsl_dir.h> #include <zfs/dsl_dir.h>
#include <zfs/dsl_dataset.h> #include <zfs/dsl_dataset.h>
#define ZPOOL_PROP_BOOTFS "bootfs" #define ZPOOL_PROP_BOOTFS "bootfs"
/* /*
* For nvlist manipulation. (from nvpair.h) * For nvlist manipulation. (from nvpair.h)
*/ */
@ -66,7 +64,6 @@ struct blk_desc *zfs_dev_desc;
#define DATA_TYPE_NVLIST 19 #define DATA_TYPE_NVLIST 19
#define DATA_TYPE_NVLIST_ARRAY 20 #define DATA_TYPE_NVLIST_ARRAY 20
/* /*
* Macros to get fields in a bp or DVA. * Macros to get fields in a bp or DVA.
*/ */
@ -120,7 +117,6 @@ struct blk_desc *zfs_dev_desc;
((zap_leaf_chunk_t *)(l->l_hash + ZAP_LEAF_HASH_NUMENTRIES(bs)))[idx] ((zap_leaf_chunk_t *)(l->l_hash + ZAP_LEAF_HASH_NUMENTRIES(bs)))[idx]
#define ZAP_LEAF_ENTRY(l, bs, idx) (&ZAP_LEAF_CHUNK(l, bs, idx).l_entry) #define ZAP_LEAF_ENTRY(l, bs, idx) (&ZAP_LEAF_CHUNK(l, bs, idx).l_entry)
/* /*
* Decompression Entry - lzjb * Decompression Entry - lzjb
*/ */
@ -128,8 +124,6 @@ struct blk_desc *zfs_dev_desc;
#define NBBY 8 #define NBBY 8
#endif #endif
typedef int zfs_decomp_func_t(void *s_start, void *d_start, typedef int zfs_decomp_func_t(void *s_start, void *d_start,
uint32_t s_len, uint32_t d_len); uint32_t s_len, uint32_t d_len);
typedef struct decomp_entry { typedef struct decomp_entry {
@ -176,9 +170,6 @@ struct zfs_data {
}; };
static int static int
zlib_decompress(void *s, void *d, zlib_decompress(void *s, void *d,
uint32_t slen, uint32_t dlen) uint32_t slen, uint32_t dlen)
@ -206,8 +197,6 @@ static decomp_entry_t decomp_table[ZIO_COMPRESS_FUNCTIONS] = {
{"gzip-9", zlib_decompress}, /* ZIO_COMPRESS_GZIP9 */ {"gzip-9", zlib_decompress}, /* ZIO_COMPRESS_GZIP9 */
}; };
static int zio_read_data(blkptr_t *bp, zfs_endian_t endian, static int zio_read_data(blkptr_t *bp, zfs_endian_t endian,
void *buf, struct zfs_data *data); void *buf, struct zfs_data *data);
@ -231,7 +220,6 @@ zfs_log2(uint64_t num)
return i; return i;
} }
/* Checksum Functions */ /* Checksum Functions */
static void static void
zio_checksum_off(const void *buf __attribute__ ((unused)), zio_checksum_off(const void *buf __attribute__ ((unused)),
@ -812,7 +800,6 @@ zap_leaf_array_get(zap_leaf_phys_t *l, zfs_endian_t endian, int blksft,
return ZFS_ERR_NONE; return ZFS_ERR_NONE;
} }
/* /*
* Given a zap_leaf_phys_t, walk thru the zap leaf chunks to get the * Given a zap_leaf_phys_t, walk thru the zap leaf chunks to get the
* value for the property "name". * value for the property "name".
@ -879,7 +866,6 @@ zap_leaf_lookup(zap_leaf_phys_t *l, zfs_endian_t endian,
return ZFS_ERR_FILE_NOT_FOUND; return ZFS_ERR_FILE_NOT_FOUND;
} }
/* Verify if this is a fat zap header block */ /* Verify if this is a fat zap header block */
static int static int
zap_verify(zap_phys_t *zap) zap_verify(zap_phys_t *zap)
@ -1029,7 +1015,6 @@ fzap_iterate(dnode_end_t *zap_dnode, zap_phys_t *zap,
return 0; return 0;
} }
/* /*
* Read in the data of a zap object and find the value for a matching * Read in the data of a zap object and find the value for a matching
* property name. * property name.
@ -1104,7 +1089,6 @@ zap_iterate(dnode_end_t *zap_dnode,
return 0; return 0;
} }
/* /*
* Get the dnode of an object number from the metadnode of an object set. * Get the dnode of an object number from the metadnode of an object set.
* *
@ -1299,7 +1283,6 @@ dnode_get_path(dnode_end_t *mdn, const char *path_in, dnode_end_t *dn,
return err; return err;
} }
/* /*
* Given a MOS metadnode, get the metadnode of a given filesystem name (fsname), * Given a MOS metadnode, get the metadnode of a given filesystem name (fsname),
* e.g. pool/rootfs, or a given object number (obj), e.g. the object number * e.g. pool/rootfs, or a given object number (obj), e.g. the object number
@ -1434,7 +1417,6 @@ dnode_get_fullpath(const char *fullpath, dnode_end_t *mdn,
fsname, snapname, filename); fsname, snapname, filename);
} }
err = get_filesystem_dnode(&(data->mos), fsname, dn, data); err = get_filesystem_dnode(&(data->mos), fsname, dn, data);
if (err) { if (err) {
@ -2336,7 +2318,6 @@ zfs_ls(device_t device, const char *path,
return err; return err;
} }
zap_iterate(&dn, iterate_zap_fs, data); zap_iterate(&dn, iterate_zap_fs, data);
err = dnode_get(&(data->mos), headobj, DMU_OT_DSL_DATASET, &dn, data); err = dnode_get(&(data->mos), headobj, DMU_OT_DSL_DATASET, &dn, data);