Re: [PATCH] v9fs: print 9p messages

From: Andrew Morton
Date: Mon Mar 06 2006 - 01:36:07 EST


Latchesar Ionkov <lucho@xxxxxxxxxx> wrote:
>
> Print 9p messages.
>
> ...
>
> +#define DEBUG_FCALL (1<<8)
>
> ..
>
> + if ((v9fs_debug_level&DEBUG_FCALL) == DEBUG_FCALL) {

There's no point in the rhs of this comparison. Given that DEBUG_FCALL is
a single bit and that won't be changing, one may as well do

if (v9fs_debug_level & DEBUG_FCALL) {

Also, those macro names:

#define DEBUG_ERROR (1<<0)
#define DEBUG_CURRENT (1<<1)
#define DEBUG_9P (1<<2)
#define DEBUG_VFS (1<<3)
#define DEBUG_CONV (1<<4)
#define DEBUG_MUX (1<<5)
#define DEBUG_TRANS (1<<6)
#define DEBUG_SLABS (1<<7)
#define DEBUG_FCALL (1<<8)

are quite poorly chosen. If someone else were to make a similarly poor
naming choice there would be collisions.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/