Commit ddd39a53 authored by David Woodhouse's avatar David Woodhouse

Trivia: use JFFS2 PAD() macro instead of masking manually.

parent 25883336
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* For licensing information, see the file 'LICENCE' in this directory. * For licensing information, see the file 'LICENCE' in this directory.
* *
* $Id: dir.c,v 1.76 2003/05/26 09:50:38 dwmw2 Exp $ * $Id: dir.c,v 1.77 2003/06/05 14:42:24 dwmw2 Exp $
* *
*/ */
...@@ -356,7 +356,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char ...@@ -356,7 +356,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
up(&f->sem); up(&f->sem);
/* Work out where to put the dirent node now. */ /* Work out where to put the dirent node now. */
writtenlen = (writtenlen+3)&~3; writtenlen = PAD(writtenlen);
phys_ofs += writtenlen; phys_ofs += writtenlen;
alloclen -= writtenlen; alloclen -= writtenlen;
...@@ -653,7 +653,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, mk ...@@ -653,7 +653,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, mk
up(&f->sem); up(&f->sem);
/* Work out where to put the dirent node now. */ /* Work out where to put the dirent node now. */
writtenlen = (writtenlen+3)&~3; writtenlen = PAD(writtenlen);
phys_ofs += writtenlen; phys_ofs += writtenlen;
alloclen -= writtenlen; alloclen -= writtenlen;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* For licensing information, see the file 'LICENCE' in this directory. * For licensing information, see the file 'LICENCE' in this directory.
* *
* $Id: scan.c,v 1.99 2003/04/28 10:17:17 dwmw2 Exp $ * $Id: scan.c,v 1.100 2003/06/05 14:42:24 dwmw2 Exp $
* *
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -354,7 +354,7 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo ...@@ -354,7 +354,7 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo
if (ofs & 3) { if (ofs & 3) {
printk(KERN_WARNING "Eep. ofs 0x%08x not word-aligned!\n", ofs); printk(KERN_WARNING "Eep. ofs 0x%08x not word-aligned!\n", ofs);
ofs = (ofs+3)&~3; ofs = PAD(ofs);
continue; continue;
} }
if (ofs == prevofs) { if (ofs == prevofs) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment