mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: navin patidar <navin.patidar@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org,
	navin patidar <navin.patidar@gmail.com>
Subject: [PATCH 27/42] staging: rtl8188eu: Use cpu_to_be32() instead of RTW_PUT_BE32()
Date: Sun, 22 Jun 2014 14:06:33 +0530	[thread overview]
Message-ID: <1403426208-12413-11-git-send-email-navin.patidar@gmail.com> (raw)
In-Reply-To: <1403426208-12413-1-git-send-email-navin.patidar@gmail.com>

Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_p2p.c          |    8 +++-----
 drivers/staging/rtl8188eu/include/osdep_service.h |   10 ----------
 2 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_p2p.c b/drivers/staging/rtl8188eu/core/rtw_p2p.c
index 0840470..5bc1937 100644
--- a/drivers/staging/rtl8188eu/core/rtw_p2p.c
+++ b/drivers/staging/rtl8188eu/core/rtw_p2p.c
@@ -310,7 +310,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
 
 	wpsielen = 0;
 	/*	WPS OUI */
-	RTW_PUT_BE32(wpsie, WPSOUI);
+	*((u32 *)(wpsie+wpsielen)) = cpu_to_be32(WPSOUI);
 	wpsielen += 4;
 
 	/*	Config Method */
@@ -569,8 +569,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
 	p2pielen += 2;
 
 	/*	OUI */
-	/* u32*) (p2pie + p2pielen) = cpu_to_be32(WPSOUI); */
-	RTW_PUT_BE32(p2pie + p2pielen, WPSOUI);
+	*((u32 *)(p2pie + p2pielen)) = cpu_to_be32(WPSOUI);
 	p2pielen += 4;
 
 	/*	Sub Category ID */
@@ -683,8 +682,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
 	p2pielen += 2;
 
 	/*	OUI */
-	/* u32*) (p2pie + p2pielen) = cpu_to_be32(WPSOUI); */
-	RTW_PUT_BE32(p2pie + p2pielen, WPSOUI);
+	*((u32 *)(p2pie + p2pielen)) = cpu_to_be32(WPSOUI);
 	p2pielen += 4;
 
 	/*	Sub Category ID */
diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h
index 64ef9bd..30613fc 100644
--- a/drivers/staging/rtl8188eu/include/osdep_service.h
+++ b/drivers/staging/rtl8188eu/include/osdep_service.h
@@ -155,9 +155,7 @@ extern int RTW_STATUS_CODE(int error_code);
 
 #define rtw_update_mem_stat(flag, sz) do {} while (0)
 u8 *_rtw_malloc(u32 sz);
-void _rtw_mfree(u8 *pbuf, u32 sz);
 #define rtw_malloc(sz)			_rtw_malloc((sz))
-#define rtw_mfree(pbuf, sz)		_rtw_mfree((pbuf), (sz))
 
 void *rtw_malloc2d(int h, int w, int size);
 
@@ -271,14 +269,6 @@ u64 rtw_modular64(u64 x, u64 y);
 #define RTW_GET_BE24(a) ((((u32) (a)[0]) << 16) | (((u32) (a)[1]) << 8) | \
 			 ((u32) (a)[2]))
 
-#define RTW_PUT_BE32(a, val)					\
-	do {							\
-		(a)[0] = (u8) ((((u32) (val)) >> 24) & 0xff);	\
-		(a)[1] = (u8) ((((u32) (val)) >> 16) & 0xff);	\
-		(a)[2] = (u8) ((((u32) (val)) >> 8) & 0xff);	\
-		(a)[3] = (u8) (((u32) (val)) & 0xff);		\
-	} while (0)
-
 void rtw_buf_free(u8 **buf, u32 *buf_len);
 void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len);
 
-- 
1.7.10.4


  parent reply	other threads:[~2014-06-22  8:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-22  8:36 [PATCH 17/42] staging: rtl8188eu:Remove rtw_zmalloc(), wrapper for kzalloc() navin patidar
2014-06-22  8:36 ` [PATCH 18/42] staging: rtl8188eu: Remove unused function rtw_division64() navin patidar
2014-06-22  8:36 ` [PATCH 19/42] staging: rtl8188eu: Remove unused function rtw_get_time_interval_ms() navin patidar
2014-06-22  8:36 ` [PATCH 20/42] staging: rtl8188eu: osdep_service.h: Remove unused macro, enum and variables navin patidar
2014-06-22  8:36 ` [PATCH 21/42] staging: rtl8188eu: Replace rtw_list_delete() with list_del_init() navin patidar
2014-06-22  8:36 ` [PATCH 22/42] staging: rtl8188eu: osdep_service.c: Remove unused macro navin patidar
2014-06-22  8:36 ` [PATCH 23/42] staging: rtl8188eu: Replace _rtw_queue_empty() with list_empty() navin patidar
2014-06-22  8:36 ` [PATCH 24/42] staging: rtl8188eu: Replace _cancel_workitem_sync() with cancel_work_sync() navin patidar
2014-06-22  8:36 ` [PATCH 25/42] staging: rtl8188eu: Remove unused inline function _RND512() navin patidar
2014-06-22  8:36 ` [PATCH 26/42] staging: rtl8188eu: Replace _cancel_timer_ex() with del_timer_sync() navin patidar
2014-06-22  8:36 ` navin patidar [this message]
2014-06-22  8:36 ` [PATCH 28/42] staging: rtl8188eu: Use cpu_to_be16() instead of RTW_PUT_BE16() navin patidar

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=1403426208-12413-11-git-send-email-navin.patidar@gmail.com \
    --to=navin.patidar@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®