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]
Date:	Sun, 12 Apr 2009 18:44:53 +0200
From:	Bart Van Assche <bart.vanassche@...il.com>
To:	Philipp Reisner <philipp.reisner@...bit.com>
Cc:	linux-kernel@...r.kernel.org, Jens Axboe <jens.axboe@...cle.com>,
	Greg KH <gregkh@...e.de>, Neil Brown <neilb@...e.de>,
	James Bottomley <James.Bottomley@...senpartnership.com>,
	Andi Kleen <andi@...stfloor.org>,
	Sam Ravnborg <sam@...nborg.org>, Dave Jones <davej@...hat.com>,
	Nikanth Karthikesan <knikanth@...e.de>,
	Lars Marowsky-Bree <lmb@...e.de>,
	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>,
	Lars Ellenberg <lars.ellenberg@...bit.com>
Subject: Re: [PATCH 07/14] DRBD: internal_data_structures

On Fri, Apr 10, 2009 at 2:12 PM, Philipp Reisner
<philipp.reisner@...bit.com> wrote:
> diff -uNrp linux-2.6.30-rc1/drivers/block/drbd/drbd_int.h linux-2.6.30-rc1-drbd/drivers/block/drbd/drbd_int.h

...

> +#define PRINTK(level, fmt, args...) \
> +       printk(level "drbd%d: " fmt, \
> +               mdev->minor , ##args)

The above looks similar to dev_printk() from <linux/device.h>. It
would be great if some of the DRBD-specific macro's could be replaced
by existing Linux macro's. This would improve the readability of the
DRBD source code.

...

> +#define D_ASSERT(exp)  if (!(exp)) \
> +        ERR("ASSERT( " #exp " ) in %s:%d\n", __FILE__, __LINE__)
> +
> +#define ERR_IF(exp) if (({                             \
> +       int _b = (exp) != 0;                            \
> +       if (_b) ERR("%s: (%s) in %s:%d\n",              \
> +               __func__, #exp, __FILE__, __LINE__);    \
> +        _b;                                            \
> +       }))

How about replacing invocations of D_ASSERT() and/or ERR_IF() by WARN_ON() ?

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ