Re: [PATCH 5/7] zram/xvmalloc: wrap debug code in #ifdef DEBUG

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

 



* Pekka Enberg (penberg@xxxxxxxxxx) wrote:
> On Wed, Jan 26, 2011 at 7:26 PM, Robert Jennings <rcj@xxxxxxxxxxxxxxxxxx> wrote:
> > This wraps the code, noted by comments as being debug code, with
> > #ifdef DEBUG so that it is removed from running in non-debug kernels.
> >
> > Signed-off-by: Robert Jennings <rcj@xxxxxxxxxxxxxxxxxx>
> > ---
> >  drivers/staging/zram/xvmalloc.c |    4 +++-
> >  1 files changed, 3 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/staging/zram/xvmalloc.c b/drivers/staging/zram/xvmalloc.c
> > index b3622f1..172514e 100644
> > --- a/drivers/staging/zram/xvmalloc.c
> > +++ b/drivers/staging/zram/xvmalloc.c
> > @@ -219,7 +219,6 @@ static void insert_block(struct xv_pool *pool, struct page *page, u32 offset,
> >  static void remove_block_head(struct xv_pool *pool,
> >                        struct block_header *block, u32 slindex)
> >  {
> > -       struct block_header *tmpblock;
> >        u32 flindex = slindex / BITS_PER_LONG;
> >
> >        pool->freelist[slindex].page = block->link.next_page;
> > @@ -232,6 +231,8 @@ static void remove_block_head(struct xv_pool *pool,
> >                if (!pool->slbitmap[flindex])
> >                        __clear_bit(flindex, &pool->flbitmap);
> >        } else {
> > +#ifdef DEBUG
> 
> Shouldn't that be something people can enable from Kconfig?

It should be, I'll correct this and re-post.

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux