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] [day] [month] [year] [list]
Date:	Thu, 25 Nov 2010 21:59:51 -0800
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Alexey Orishko <alexey.orishko@...il.com>
Cc:	gregkh@...e.de, linux-usb@...r.kernel.org, netdev@...r.kernel.org,
	oliver@...kum.org, yauheni.kaliuta@...ia.com, balbi@...com,
	sjur.brandeland@...ricsson.com,
	Alexey Orishko <alexey.orishko@...ricsson.com>
Subject: Re: [PATCHv2 2/2] USB CDC NCM host driver

On Thu, 25 Nov 2010 15:14:32 +0100
Alexey Orishko <alexey.orishko@...il.com> wrote:

> +/*
> + * We need to align the beginning of the IP packet (not the Ethernet framing).
> + * The following macro aligns the given offset to the given remainder
> + * and modulus, which must be power of two.
> + */
> +#define	CDC_NCM_ALIGN(rem, offset, mod)	\
> +	((long)(((long)(rem)) - ((long)((-(long)(offset)) & (-(long)(mod))))))

Isn't existing PTR_ALIGN macro sufficient?

-- 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists