lkml.org 
[lkml]   [2008]   [Mar]   [27]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
DateThu, 27 Mar 2008 15:34:41 -0700 (PDT)
FromLinus Torvalds <>
SubjectRe: [patch] pci: revert "PCI: remove transparent bridge sizing"

On Fri, 28 Mar 2008, Ivan Kokshaysky wrote:
> 
> Sounds good to me. So here we go (completely untested, just for review).
[...]
> -	/* The bridge resources are special, as their
> -	   size != alignment. Sizing routines return
> -	   required alignment in the "start" field. */
> -	align = (resno < PCI_BRIDGE_RESOURCES) ? size : res->start;
> +
> +	align = resource_alignment(res);
> +	BUG_ON(!align);

Don't do the BUG_ON(). That would just cause a broken machine, and makes 
it much harder to report this issue. BUG_ON() should be used only for 
totally unfixable things.

In this case, the easy thing to do is to just return an error, possibly 
with a printk() about bogus resources (ignoring it as a resource, the way 
we do it in pdev_sort_resource()).

But other than that, the thing doesn't look horrible.

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

\
 
 \ /
  Last update: 2008-03-27 22:39    [W:0.282 / U:0.090 seconds]
©2003-2008 Jasper Spaans