Re: [PATCH] printk/console: Check consistent sequence number when handling race in console_unlock()

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

 



On 2021-06-30, kernel test robot <lkp@xxxxxxxxx> wrote:
>>> kernel/printk/printk.c:2548:6: warning: variable 'next_seq' set but not used [-Wunused-but-set-variable]

I suppose the correct fix for this warning would be to change the NOP
macros. Currently they are:

#define prb_read_valid(rb, seq, r)      false
#define prb_first_valid_seq(rb)         0

They should probably be something like (untested):

#define prb_read_valid(rb, seq, r)     \
({                                     \
        (void)(rb);                    \
        (void)(seq);                   \
        (void)(r);                     \
        false;                         \
})

#define prb_first_valid_seq(rb)        \
({                                     \
        (void)(rb);                    \
        0;                             \
})

John Ogness



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux