[U-Boot] [PATCH 03/13] compat: Remove is_power_of_2() definition

Fabio Estevam festevam at gmail.com
Mon Oct 26 11:22:08 CET 2015


Hi Heiko,

On Mon, Oct 26, 2015 at 3:11 AM, Heiko Schocher <hs at denx.de> wrote:

>> diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
>> index 41763a1..eaae5fb 100644
>> --- a/fs/ubifs/super.c
>> +++ b/fs/ubifs/super.c
>> @@ -31,7 +31,7 @@
>>   #include <common.h>
>>   #include <malloc.h>
>>   #include <memalign.h>
>> -#include <linux/compat.h>
>> +#include <linux/log2.h>
>>   #include <linux/stat.h>
>>   #include <linux/err.h>
>>   #include "ubifs.h"

> It would be nice to ge rid of linux/compat.h at all in ubi/ubifs
> code ... but does this really compile for all boards?

I haven't seen a board failure because of this change on the several
arch's/boards I have built.

Could you please provide a failure case?

> I think you should add here linux/log2.h, without deleting linux/compat.h

My understanding is that linux/compat.h is currently used only for
providing is_power_of_2() in this file.

Now that we have log2.h (which provides is_power_of_2()), we can
simply use it instead.

Am I missing anything here?

Thanks


More information about the U-Boot mailing list