Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1421292 > unrolled thread
| Started by | Sasha Levin <sasha.levin@oracle.com> |
|---|---|
| First post | 2016-06-13 22:40 +0200 |
| Last post | 2016-06-14 12:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 1/2] liblockdep: Fix compile errors Sasha Levin <sasha.levin@oracle.com> - 2016-06-13 22:40 +0200
Re: [PATCH 1/2] liblockdep: Fix compile errors Vishal Thanki <vishalthanki@gmail.com> - 2016-06-14 12:30 +0200
| From | Sasha Levin <sasha.levin@oracle.com> |
|---|---|
| Date | 2016-06-13 22:40 +0200 |
| Subject | Re: [PATCH 1/2] liblockdep: Fix compile errors |
| Message-ID | <rJGOl-2R5-11@gated-at.bofh.it> |
On 06/11/2016 04:36 AM, Vishal Thanki wrote: > On Sat, Jun 11, 2016 at 5:53 AM, Sasha Levin <sasha.levin@oracle.com> wrote: >> On 06/09/2016 09:34 AM, Vishal Thanki wrote: >>> dfaaf3fa0: (Use __jhash_mix() for iterate_chain_key()) >>> Fixed by adding jhash.h with minimal stuff required >> >> Can we, instead of copying it over, include jhash.h directly >> (just like we do for hash.h)? >> >> > That was the first thing I tried, but then it caused more compilation > errors due to nested header dependencies and I ended up taking the > only required stuff. Better ideas are welcome. I just gave it a quick go and didn't see anything beyond needing to take in linux/unaligned/packed_struct.h as well. What sort of errors did you hit? Thanks, Sasha
[toc] | [next] | [standalone]
| From | Vishal Thanki <vishalthanki@gmail.com> |
|---|---|
| Date | 2016-06-14 12:30 +0200 |
| Message-ID | <rJTLz-3z3-5@gated-at.bofh.it> |
| In reply to | #1421292 |
On Mon, Jun 13, 2016 at 04:38:01PM -0400, Sasha Levin wrote:
> On 06/11/2016 04:36 AM, Vishal Thanki wrote:
> > On Sat, Jun 11, 2016 at 5:53 AM, Sasha Levin <sasha.levin@oracle.com> wrote:
> >> On 06/09/2016 09:34 AM, Vishal Thanki wrote:
> >>> dfaaf3fa0: (Use __jhash_mix() for iterate_chain_key())
> >>> Fixed by adding jhash.h with minimal stuff required
> >>
> >> Can we, instead of copying it over, include jhash.h directly
> >> (just like we do for hash.h)?
> >>
> >>
> > That was the first thing I tried, but then it caused more compilation
> > errors due to nested header dependencies and I ended up taking the
> > only required stuff. Better ideas are welcome.
>
> I just gave it a quick go and didn't see anything beyond needing to take
> in linux/unaligned/packed_struct.h as well. What sort of errors did you
> hit?
>
Yes, you are right about just adding the linux/unaligned/packed_struct.h should
work. However I hit the following errors when I did that:
CC lockdep.o
In file included from ./uinclude/linux/jhash.h:27:0,
from ../../../kernel/locking/lockdep.c:49,
from lockdep.c:8:
./uinclude/linux/unaligned/packed_struct.h:7:29: error: conflicting types for
‘__packed’
struct __una_u32 { u32 x; } __packed;
^
./uinclude/linux/unaligned/packed_struct.h:6:29: note: previous declaration of
‘__packed’ was here
struct __una_u16 { u16 x; } __packed;
^
./uinclude/linux/unaligned/packed_struct.h:8:29: error: conflicting types for
‘__packed’
struct __una_u64 { u64 x; } __packed;
^
./uinclude/linux/unaligned/packed_struct.h:6:29: note: previous declaration of
‘__packed’ was here
struct __una_u16 { u16 x; } __packed;
^
which I overlooked and had nothing to do with header dependencies, pardon my
ignorance.
I think gcc on my machine (version 5.3.1 on Fedora 22) throws the above error
which I think can be fixed by adding a define in uinclude/linux/compile.h like
following:
#define __packed __attribute__((__packed__))
After fixing, I hit following warning:
In file included from ../../../kernel/locking/lockdep.c:49:0,
from lockdep.c:8:
./uinclude/linux/jhash.h: In function ‘jhash’:
./uinclude/linux/jhash.h:37:16: warning: implicit declaration of function
‘rol32’ [-Wimplicit-function-declaration]
a -= c; a ^= rol32(c, 4); c += b; \
which can be fixed by adding the inline definition of rol32 from kernel's
biopts.h file to uinclude/linux/bitops.h file (which is empty as of now).
I will rework the patch with the fixes and send again.
Thanks,
Vishal
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web