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]
Message-ID: <84144f020705180342j4ff44d96iea5b73c23a69df0f@mail.gmail.com>
Date:	Fri, 18 May 2007 13:42:20 +0300
From:	"Pekka Enberg" <penberg@...helsinki.fi>
To:	"Nitin Gupta" <nitingupta910@...il.com>
Cc:	linux-kernel@...r.kernel.org,
	"Richard Purdie" <richard@...nedhand.com>
Subject: Re: [RFC] LZO1X de/compression support

On 5/18/07, Nitin Gupta <nitingupta910@...il.com> wrote:
> +   Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
> +   Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer

[snip]

So how about making that a little less verbose. Say like:

Copyright (c) 1996-2005 Markus Franz Xaver and Johannes Oberhumer

> +#define DX2(p,s1,s2) \
> +       (((((size_t)((p)[2]) << (s2)) ^ (p)[1]) << (s1)) ^ (p)[0])
> +#define DX3(p,s1,s2,s3) ((DX2((p)+1,s2,s3) << (s1)) ^ (p)[0])
> +#define DMUL(a,b)      ((size_t) ((a) * (b)))
> +#define DMS(v,s)       ((size_t) (((v) & (D_MASK >> (s))) << (s)))
> +#define DM(v)          DMS(v,0)
> +
> +#define D_BITS         14
> +#define DINDEX1(d,p)   d = DM(DMUL(0x21,DX3(p,5,5,6)) >> 5)
> +#define DINDEX2(d,p)   d = (d & (D_MASK & 0x7ff)) ^ (D_HIGH | 0x1f)
> +#define DENTRY(p,in)   (p)

Please make these static inline functions.

> +#define PTR(a)         ((unsigned long) (a))
> +#define PTR_LT(a,b)    (PTR(a) < PTR(b))
> +#define PTR_GE(a,b)    (PTR(a) >= PTR(b))
> +#define PTR_DIFF(a,b)  (PTR(a) - PTR(b))
> +#define pd(a,b)                ((size_t) ((a)-(b)))

[snip]

> +#define COPY4(dst,src) *(uint32_t *)(dst) = *(uint32_t *)(src)

Please drop these.
-
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