From: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
To: Alexey Orishko <alexey.orishko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: gregkh-l3A5Bk7waGM@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org,
yauheni.kaliuta-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org,
balbi-l0cyMroinI0@public.gmane.org,
sjur.brandeland-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org,
Alexey Orishko
<alexey.orishko-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
Subject: Re: [PATCHv2 2/2] USB CDC NCM host driver
Date: Thu, 25 Nov 2010 21:59:51 -0800 [thread overview]
Message-ID: <20101125215951.5a77e811@nehalam> (raw)
In-Reply-To: <1290694472-2680-2-git-send-email-alexey.orishko-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
On Thu, 25 Nov 2010 15:14:32 +0100
Alexey Orishko <alexey.orishko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2010-11-26 5:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-25 14:14 [PATCHv2 1/2] usbnet: changes for upcoming cdc_ncm driver Alexey Orishko
2010-11-25 14:14 ` [PATCHv2 2/2] USB CDC NCM host driver Alexey Orishko
[not found] ` <1290694472-2680-2-git-send-email-alexey.orishko-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
2010-11-26 5:59 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101125215951.5a77e811@nehalam \
--to=shemminger-ztmgi6mnkb3qt0dzr+alfa@public.gmane.org \
--cc=alexey.orishko-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org \
--cc=alexey.orishko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=gregkh-l3A5Bk7waGM@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org \
--cc=sjur.brandeland-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org \
--cc=yauheni.kaliuta-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).