Message ID | f53e945837f78c042bee5337352e2fa216d71a5a.1655715329.git.ritesh.list@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | submit_bh: Drop unnecessary return values and API users | expand |
+ linux-ntfs-dev@lists.sourceforge.net (sorry about not cc'ing this in the first place) On 22/06/20 02:34PM, Ritesh Harjani wrote: > submit_bh always returns 0. This patch drops the useless return value of > submit_bh from ntfs_submit_bh_for_read(). Once all of submit_bh callers are > cleaned up, we can make it's return type as void. > > Reported-by: kernel test robot <lkp@intel.com> > Signed-off-by: Ritesh Harjani <ritesh.list@gmail.com> > --- > fs/ntfs/file.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c > index a8abe2296514..2389bfa654a2 100644 > --- a/fs/ntfs/file.c > +++ b/fs/ntfs/file.c > @@ -532,12 +532,12 @@ static inline int __ntfs_grab_cache_pages(struct address_space *mapping, > goto out; > } > > -static inline int ntfs_submit_bh_for_read(struct buffer_head *bh) > +static inline void ntfs_submit_bh_for_read(struct buffer_head *bh) > { > lock_buffer(bh); > get_bh(bh); > bh->b_end_io = end_buffer_read_sync; > - return submit_bh(REQ_OP_READ, 0, bh); > + submit_bh(REQ_OP_READ, 0, bh); > } > > /** > -- > 2.35.3 >
On Mon 20-06-22 14:34:35, Ritesh Harjani wrote: > submit_bh always returns 0. This patch drops the useless return value of > submit_bh from ntfs_submit_bh_for_read(). Once all of submit_bh callers are > cleaned up, we can make it's return type as void. > > Reported-by: kernel test robot <lkp@intel.com> > Signed-off-by: Ritesh Harjani <ritesh.list@gmail.com> Looks good. Feel free to add: Reviewed-by: Jan Kara <jack@suse.cz> Honza > --- > fs/ntfs/file.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c > index a8abe2296514..2389bfa654a2 100644 > --- a/fs/ntfs/file.c > +++ b/fs/ntfs/file.c > @@ -532,12 +532,12 @@ static inline int __ntfs_grab_cache_pages(struct address_space *mapping, > goto out; > } > > -static inline int ntfs_submit_bh_for_read(struct buffer_head *bh) > +static inline void ntfs_submit_bh_for_read(struct buffer_head *bh) > { > lock_buffer(bh); > get_bh(bh); > bh->b_end_io = end_buffer_read_sync; > - return submit_bh(REQ_OP_READ, 0, bh); > + submit_bh(REQ_OP_READ, 0, bh); > } > > /** > -- > 2.35.3 >
On Mon, Jun 20, 2022 at 02:34:35PM +0530, Ritesh Harjani wrote: > submit_bh always returns 0. This patch drops the useless return value of > submit_bh from ntfs_submit_bh_for_read(). Once all of submit_bh callers are > cleaned up, we can make it's return type as void. Looks good: Reviewed-by: Christoph Hellwig <hch@lst.de> and so sad that a newly merged file systems still does all this buffer head crap :(
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index a8abe2296514..2389bfa654a2 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c @@ -532,12 +532,12 @@ static inline int __ntfs_grab_cache_pages(struct address_space *mapping, goto out; } -static inline int ntfs_submit_bh_for_read(struct buffer_head *bh) +static inline void ntfs_submit_bh_for_read(struct buffer_head *bh) { lock_buffer(bh); get_bh(bh); bh->b_end_io = end_buffer_read_sync; - return submit_bh(REQ_OP_READ, 0, bh); + submit_bh(REQ_OP_READ, 0, bh); } /**
submit_bh always returns 0. This patch drops the useless return value of submit_bh from ntfs_submit_bh_for_read(). Once all of submit_bh callers are cleaned up, we can make it's return type as void. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Ritesh Harjani <ritesh.list@gmail.com> --- fs/ntfs/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.35.3