From: Chen Gang <gang.chen.5i5j@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
vthakkar1994@gmail.com, mahati.chamarthy@gmail.com,
mdcasey@chabloom.com, standby24x7@gmail.com,
paulmcquad@gmail.com
Cc: devel@driverdev.osuosl.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] drivers: staging: rtl8192e: Include "asm/unaligned.h" instead of "access_ok.h" in "rtl819x_BAProc.c"
Date: Wed, 03 Dec 2014 06:29:12 +0800 [thread overview]
Message-ID: <547E3D38.6070406@gmail.com> (raw)
"asm/unaligned.h" is more generic than "access_ok.h", and it may include
"access_ok.h", so need use it instead of "access_ok.h".
During building, "rtllib.h" has already include "asm/unaligned.h", so
will cause building issue. The related error (with allmodconfig under
parisc):
CC [M] drivers/staging/rtl8192e/rtl819x_BAProc.o
In file included from ./arch/parisc/include/asm/unaligned.h:4:0,
from include/linux/ieee80211.h:22,
from include/net/lib80211.h:31,
from drivers/staging/rtl8192e/rtllib.h:45,
from drivers/staging/rtl8192e/rtl819x_BAProc.c:20:
include/linux/unaligned/be_struct.h:6:19: error: redefinition of 'get_unaligned_be16'
static inline u16 get_unaligned_be16(const void *p)
^
In file included from drivers/staging/rtl8192e/rtl819x_BAProc.c:19:0:
include/linux/unaligned/access_ok.h:22:19: note: previous definition of 'get_unaligned_be16' was here
static inline u16 get_unaligned_be16(const void *p)
^
...
For independent from other include files, still suggest it includes
"asm/unaligned.h" too. And also include "asm/byteorder.h" since it is
the first include file".
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
drivers/staging/rtl8192e/rtl819x_BAProc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index 66ea791..0415e02 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -16,7 +16,8 @@
* Contact Information:
* wlanfae <wlanfae@realtek.com>
******************************************************************************/
-#include <linux/unaligned/access_ok.h>
+#include <asm/byteorder.h>
+#include <asm/unaligned.h>
#include "rtllib.h"
#include "rtl819x_BA.h"
--
1.9.3
reply other threads:[~2014-12-02 22:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=547E3D38.6070406@gmail.com \
--to=gang.chen.5i5j@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mahati.chamarthy@gmail.com \
--cc=mdcasey@chabloom.com \
--cc=paulmcquad@gmail.com \
--cc=standby24x7@gmail.com \
--cc=vthakkar1994@gmail.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