On Thu, Sep 14, 2023 at 01:13:05PM +0300, Dan Carpenter wrote:
> Hello Kent Overstreet,
> 
> The patch 6489d817f5e2: "bcachefs: Fix
> bch2_check_discard_freespace_key()" from Jun 18, 2023 (linux-next),
> leads to the following Smatch static checker warning:
> 
>       fs/bcachefs/alloc_background.c:1295 bch2_check_discard_freespace_key()
>       error: uninitialized symbol 'ret'.
> 
> fs/bcachefs/alloc_background.c
>     1281 static int bch2_check_discard_freespace_key(struct btree_trans 
> *trans,
>     1282                                             struct btree_iter *iter,
>     1283                                             struct bpos end)
>     1284 {
>     1285         if (!btree_id_is_extents(iter->btree_id)) {
>     1286                 return __bch2_check_discard_freespace_key(trans, 
> iter);
>     1287         } else {
>     1288                 int ret;
>     1289 
>     1290                 while (!bkey_eq(iter->pos, end) &&
> 
> What about if bkey_eq() is at the end on the first iteration through the
> loop?

yup, just applied a fix - thanks

Reply via email to