From: Kalle Valo <kvalo@codeaurora.org>
To: Himanshu Jha <himanshujha199640@gmail.com>
Cc: Brian Norris <briannorris@chromium.org>,
amitkarwar@gmail.com, nishants@marvell.com, gbhat@marvell.com,
huxm@marvell.com, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mwifiex: Use put_unaligned_le32
Date: Fri, 06 Oct 2017 16:31:58 +0300 [thread overview]
Message-ID: <87vajs4d2p.fsf@codeaurora.org> (raw)
In-Reply-To: <20171005190730.GA8043@himanshu-Vostro-3559> (Himanshu Jha's message of "Fri, 6 Oct 2017 00:37:30 +0530")
Himanshu Jha <himanshujha199640@gmail.com> writes:
> On Thu, Oct 05, 2017 at 11:02:50AM -0700, Brian Norris wrote:
>> On Thu, Oct 05, 2017 at 08:52:33PM +0530, Himanshu Jha wrote:
>> > There are various instances where a function used in file say for eg
>> > int func_align (void* a)
>> > is used and it is defined in align.h
>> > But many files don't *directly* include align.h and rather include
>> > any other header which includes align.h
>>
>> I believe the general rule is that you should included headers for all
>> symbols you use, and not rely on implicit includes.
>>
>> The modification to the general rule is that not all headers are
>> intended to be included directly, and in such cases there's likely a
>> parent header that is the more appropriate target.
>>
>> In this case, the key is CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS. It
>> seems that asm-generic/unaligned.h is set up to include different
>> headers, based on the expected architecture behavior.
>>
> Yes, asm-generic/unaligned.h looks more appopriate and is most generic
> implementation of unaligned accesses and arc specific.
>
> Let's see what Kalle Valo recommends! And then I will send v2 of the
> patch.
Not sure what you are asking from me. But if you are asking should it
be:
#include <asm/unaligned.h>
or:
#include <asm-generic/unaligned.h>
I think it should be the former.
--
Kalle Valo
next prev parent reply other threads:[~2017-10-06 13:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-04 18:28 [PATCH] mwifiex: Use put_unaligned_le32 Himanshu Jha
2017-10-05 7:23 ` Kalle Valo
2017-10-05 8:34 ` Himanshu Jha
2017-10-05 8:41 ` Kalle Valo
2017-10-05 15:22 ` Himanshu Jha
2017-10-05 18:02 ` Brian Norris
2017-10-05 19:07 ` Himanshu Jha
2017-10-05 21:54 ` Igor Mitsyanko
2017-10-06 13:31 ` Kalle Valo [this message]
2017-10-07 3:31 ` kbuild test robot
2017-10-07 5:17 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vajs4d2p.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=amitkarwar@gmail.com \
--cc=briannorris@chromium.org \
--cc=gbhat@marvell.com \
--cc=himanshujha199640@gmail.com \
--cc=huxm@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nishants@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).