/* got to the end of the string */
return dir;
else{
- if(strcmp(str,_Y(".")) == 0)
- {
+ if(strcmp(str,_Y(".")) == 0){
/* Do nothing */
- }
- else if(strcmp(str,_Y("..")) == 0)
+ } else if(strcmp(str,_Y("..")) == 0) {
dir = dir->parent;
- else{
+ } else{
dir = yaffs_find_by_name(dir,str);
dir = yaffsfs_FollowLink(dir,symDepth,loop);
deleted = !pt1.deleted;
pt1.deleted = 1;
#else
- deleted = (yaffs_count_bits(((u8 *) & pt1)[8]) < 7);
+ deleted = (hweight8(((u8 *) & pt1)[8]) < 7);
#endif
/* Check the packed tags mini-ECC and correct if necessary/possible.
deleted = !pt1.deleted;
pt1.deleted = 1;
#else
- deleted = (yaffs_count_bits(((u8 *) & pt1)[8]) < 7);
+ deleted = (hweight8(((u8 *) & pt1)[8]) < 7);
#endif
/* Check the packed tags mini-ECC and correct if necessary/possible.
yaffs_trace(YAFFS_TRACE_OS,
"yaffs_evict_inode: ino %d, count %d %s",
(int)inode->i_ino, atomic_read(&inode->i_count),
- obj ? "object exists" : "null object"));
+ obj ? "object exists" : "null object");
if (!inode->i_nlink && !is_bad_inode(inode))
deleteme = 1;
#include <linux/statfs.h>
-#define UnlockPage(p) unlock_page(p)
-#define Page_Uptodate(page) test_bit(PG_uptodate, &(page)->flags)
-
#define yaffs_devname(sb, buf) bdevname(sb->s_bdev, buf)
#define YPROC_ROOT NULL
static int yaffs_readpage_unlock(struct file *f, struct page *pg)
{
int ret = yaffs_readpage_nolock(f, pg);
- UnlockPage(pg);
+ unlock_page(pg);
return ret;
}
}
yaffs_trace(YAFFS_TRACE_OS,
"start yaffs_write_begin index %d(%x) uptodate %d",
- (int)index, (int)index, Page_Uptodate(pg) ? 1 : 0);
+ (int)index, (int)index, PageUptodate(pg) ? 1 : 0);
/* Get fs space */
space_held = yaffs_hold_space(filp);
/* Update page if required */
- if (!Page_Uptodate(pg))
+ if (!PageUptodate(pg))
ret = yaffs_readpage_nolock(filp, pg);
if (ret)
*/
deleted++;
dev->n_free_chunks++;
- /*T((" %d %d deleted\n",blk,c)); */
} else if (!tags.chunk_used) {
/* An unassigned chunk in the block
* This means that either the block is empty or
}
}
- /* T((" %d %d data %d %d\n",blk,c,tags.obj_id,tags.chunk_id)); */
} else {
/* chunk_id == 0, so it is an ObjectHeader.
* Thus, we read in the object header and make the object
#define MTD_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
+#ifdef YAFFS_OUT_OF_TREE
#include "moduleconfig.h"
+#endif
#include <linux/version.h>
#define MTD_VERSION_CODE LINUX_VERSION_CODE
#endif
#define yaffs_trace(msk, fmt, ...) do { \
- if(yaffs_trace_mask & ((msk) | YAFFS_TRACE_ALWAYS)) \
+ if(yaffs_trace_mask & (msk)) \
printk(KERN_DEBUG "yaffs: " fmt "\n", ##__VA_ARGS__); \
} while(0)
#endif
#define yaffs_trace(msk, fmt, ...) do { \
- if(yaffs_trace_mask & ((msk) | YAFFS_TRACE_ALWAYS)) \
+ if(yaffs_trace_mask & (msk)) \
printk(KERN_DEBUG "yaffs: " fmt "\n", ##__VA_ARGS__); \
} while(0)