This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH v2 2/2] Add MicroBlaze Port
- From: Andreas Schwab <schwab at suse dot de>
- To: David Holsgrove <david dot holsgrove at xilinx dot com>
- Cc: "libc-ports at sourceware dot org" <libc-ports at sourceware dot org>, Roland McGrath <roland at hack dot frob dot com>, Joseph Myers <joseph at codesourcery dot com>, John Williams <jwilliams at xilinx dot com>, Edgar Iglesias <edgari at xilinx dot com>, Vinod Kathail <vinodk at xilinx dot com>, Vidhumouli Hunsigida <vidhum at xilinx dot com>, Nagaraju Mekala <nmekala at xilinx dot com>, Tom Shui <tshui at xilinx dot com>
- Date: Tue, 09 Apr 2013 10:32:24 +0200
- Subject: Re: [PATCH v2 2/2] Add MicroBlaze Port
- References: <1364652885-28535-1-git-send-email-david dot holsgrove at xilinx dot com> <e57570bc-a47e-4918-8dc7-a12548f571f2 at CO1EHSMHS028 dot ehs dot local> <Pine dot LNX dot 4 dot 64 dot 1304022325380 dot 24069 at digraph dot polyomino dot org dot uk> <07006b79-5868-4bde-ba30-5739c3e3857f at CH1EHSMHS018 dot ehs dot local>
David Holsgrove <david.holsgrove@xilinx.com> writes:
> +inline long
> +get_frame_size (unsigned long instr)
> +{
> + return abs ((short signed) (instr & 0xFFFF));
> +}
> +
> +static unsigned long *
> +find_frame_creation (unsigned long *pc)
> +{
> + int i;
Two spaces indent.
> +
> + /* NOTE: Distance to search is arbitrary
> + * 250 works well for most things,
> + * 750 picks up things like tcp_recvmsg(),
> + * 1000 needed for fat_fill_super(). */
No initial * in comments. No () when referring to functions, instead of
actual calls.
> + if ((!(*pprev_pc) || ((*pprev_pc) & 3)))
The innermost parens are confusing and redundant, likewise for the outer
pair.
> + array[0]=(void *)pc;
Space around operators and after the cast.
> +#define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
> + ({ \
> + __typeof (*(mem)) __result; \
> + if (sizeof (*mem) == 4) \
> + __result = __arch_compare_and_exchange_val_32_acq(mem, newval, oldval); \
Space before open paren.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."