Re: [PATCH 5/5] serial/8250_fintek: Support for any io address.

From: Alan Cox
Date: Mon Jun 15 2015 - 10:26:17 EST


On Mon, 2015-06-15 at 16:18 +0200, Ricardo Ribalda Delgado wrote:
> Fintek chip can be configured for io addresses different than the standard.
>
> Query the chip for the configured addresses and try to match it with the
> pnp address.

Looks ok to me. I am a little concerned about false positives but it
does everything right in terms of resource management so I guess it
should be ok - and if not we are only going to find the corner case that
blows up by shipping it 8)

Please however fix the dynamic on stack arrays you've got. Doing

blah foo[] = { 1,2,3,4 };

might well be valid gcc but it generates horrible code when in fact your
arrays should be static/const, not dynamically constructed on stack from
a static copy each call.

Reviewed-by: Alan Cox <alan@xxxxxxxxxxxxxxx>

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