Re: [PATCH v2] Removes OF_SELFTEST dependency on OF_DYNAMIC config symbol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 29 Sep 2014 10:50:52 +0300
, Pantelis Antoniou <panto@xxxxxxxxxxxxxxxxxxxxxxx>
 wrote:
> Hi Grant,
> 
> On Sep 28, 2014, at 1:23 AM, Grant Likely <grant.likely@xxxxxxxxxx> wrote:
> 
> > On Mon, Sep 15, 2014 at 10:34 AM, Pantelis Antoniou
> > <panto@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> >> Hi Gaurav,
> >> 
> >> 
> >> On Sep 13, 2014, at 3:35 PM, Gaurav Minocha wrote:
> >> 
> >>> This patch is used to remove the selftests dependency on
> >>> OF_DYNAMIC config flag. Now, it selectively builds only
> >>> the functions required by the selftests.
> >>> 
> >>> Tested with and without OF_DYNAMIC enabled.
> >>> 
> >>> Signed-off-by: Gaurav Minocha <gaurav.minocha.os@xxxxxxxxx>
> >>> ---
> >> 
> >> [snip]
> >> 
> >> I'm not happy with this patch.
> >> 
> >> It duplicates core functionality already present in drivers/of/dynamic.c and those
> >> two implementations are for sure going to get out of sync.
> >> 
> >> If you require the self-tests to work without OF_DYNAMIC you can do that by including the
> >> tests in your dts. If you want to insert them dynamically then use OF_DYNAMIC.
> > 
> > I asked Gaurav to make this work. The selftest code should always be
> > usable, without requiring the testcase data to be directly included
> > into the dtb. It is important to be able to still test the code paths
> > on any platform when OF_DYNAMIC is not selected.
> > 
> 
> OK, I can understand that. However the way it goes about it is wrong IMO.

Agreed.

> If we need the dynamic node attachment/detachment code to work even when
> OF_DYNAMIC is not enabled, we should keep the same implementation but
> use a new hidden config option that is CONFIG_OF_DYNAMIC | CONFIG_OF_TESTCASES
> and put the code there.

I'm thinking that we just drop node detachment in the selftest code when
running without CONFIG_OF_DYNAMIC. It doesn't hurt anything to leave the
data in-tree.

g.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux