lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231107204405.GP1205143@frogsfrogsfrogs>
Date:   Tue, 7 Nov 2023 12:44:05 -0800
From:   "Darrick J. Wong" <djwong@...nel.org>
To:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Cc:     Bill O'Donnell <bodonnel@...hat.com>, chandan.babu@...cle.com,
        linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: Re: [PATCH] xfs: Remove unused function

On Tue, Nov 07, 2023 at 01:26:46PM -0600, Bill O'Donnell wrote:
> On Fri, Nov 03, 2023 at 03:30:40PM +0800, Jiapeng Chong wrote:
> > The function are defined in the bitmap.c file, but not called
> > elsewhere, so delete the unused function.
> > 
> > fs/xfs/scrub/bitmap.c:55:1: warning: unused function 'xbitmap_tree_iter_next'.
> > 
> > Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7137
> > Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> 
> Makes sense.
> Reviewed-by: Bill O'Donnell <bodonnel@...hat.com>

I disagree -- I added redundant forward declarations here so I wouldn't
have to go digging through the 150LOC definition of INTERVAL_TREE_DEFINE
to figure out what helper functions were actually being defined by the
macro.  They'll trigger compiler errors if the definition of
INTERVAL_TREE_DEFINE ever drifts away from my understanding of it at the
time I wrote the code.

--D

> 
> 
> > ---
> >  fs/xfs/scrub/bitmap.c | 4 ----
> >  1 file changed, 4 deletions(-)
> > 
> > diff --git a/fs/xfs/scrub/bitmap.c b/fs/xfs/scrub/bitmap.c
> > index e0c89a9a0ca0..ba4b18e40faa 100644
> > --- a/fs/xfs/scrub/bitmap.c
> > +++ b/fs/xfs/scrub/bitmap.c
> > @@ -48,10 +48,6 @@ static inline struct xbitmap_node *
> >  xbitmap_tree_iter_first(struct rb_root_cached *root, uint64_t start,
> >  			uint64_t last);
> >  
> > -static inline struct xbitmap_node *
> > -xbitmap_tree_iter_next(struct xbitmap_node *node, uint64_t start,
> > -		       uint64_t last);
> > -
> >  INTERVAL_TREE_DEFINE(struct xbitmap_node, bn_rbnode, uint64_t,
> >  		__bn_subtree_last, START, LAST, static inline, xbitmap_tree)
> >  
> > -- 
> > 2.20.1.7.g153144c
> > 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ