Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1287072

Re: [PATCH v3] bus: uniphier-system-bus: add UniPhier System Bus driver

From Masahiro Yamada <yamada.masahiro@socionext.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3] bus: uniphier-system-bus: add UniPhier System Bus driver
Date 2015-12-09 05:00 +0100
Message-ID <qDE54-314-5@gated-at.bofh.it> (permalink)
References <qDtjj-4FX-11@gated-at.bofh.it> <qDtW1-59U-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Arnd,

2015-12-09 1:59 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
>
> Just a little thought about one thing I found odd:
>
>> +static int uniphier_system_bus_check_overlap(
>> +                                     struct uniphier_system_bus_priv tmp)
>> +{
>
> Did you intentionally pass this by value?

Yes, I did not want to disturb the original one.

It is copied to a temporary storage, and sorted by the base address,
and discarded after the overlap checking.

But, you are right.   It is possible (and simpler)
to check the region overlap without sorting.


> Maybe do it explicitly using a pointer
> and memcpy to a local variable, which has a similar effect. Alternatively
> just check each newly probed child node for conflicts with any of the
> previous children. That is slightly more expensive at O(n^2) instead of O(n)
> but n is always small here and you can avoid sorting first.

Good idea.  I simplified this function in v4.



-- 
Best Regards
Masahiro Yamada
--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v3] bus: uniphier-system-bus: add UniPhier System Bus driver Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-08 17:30 +0100
  Re: [PATCH v3] bus: uniphier-system-bus: add UniPhier System Bus driver Arnd Bergmann <arnd@arndb.de> - 2015-12-08 18:10 +0100
    Re: [PATCH v3] bus: uniphier-system-bus: add UniPhier System Bus driver Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-09 05:00 +0100

csiph-web