Re: [PATCH 07/29] Staging: yaffs2: yaffs_checkptrw: Add files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 1 Nov 2010, Jesper Juhl wrote:

> On Mon, 1 Nov 2010, Tracey Dent wrote:
> 
[snip]
> 
> > +int yaffs2_get_checkpt_sum(yaffs_dev_t *dev, __u32 *sum)
> > +{
> > +	__u32 composite_sum;
> > +	composite_sum =  (dev->checkpt_sum << 8) | (dev->checkpt_xor & 0xFF);
> > +	*sum = composite_sum;
> > +	return 1;
> > +}
> 
> Why not
> 
> int yaffs2_get_checkpt_sum(yaffs_dev_t *dev, __u32 *sum)
> {
>      *sum  = (dev->checkpt_sum << 8) | (dev->checkpt_xor & 0xFF);
>      return 1;
> }
> 

And by the way, why is this function not returning 'void' so it just 
becomes:

void yaffs2_get_checkpt_sum(yaffs_dev_t *dev, __u32 *sum)
{
     *sum  = (dev->checkpt_sum << 8) | (dev->checkpt_xor & 0xFF);
}

Since it's always returning '1' I fail to see the point of the 'int' 
return value.

-- 
Jesper Juhl <jj@xxxxxxxxxxxxx>             http://www.chaosbits.net/
Plain text mails only, please      http://www.expita.com/nomime.html
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux