linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Rachel Kim <rachel.kim@atmel.com>, Dean Lee <dean.lee@atmel.com>,
	Chris Park <chris.park@atmel.com>,
	devel@driverdev.osuosl.org, nicolas.ferre@atmel.com,
	Johnny Kim <johnny.kim@atmel.com>,
	linux-kernel@vger.kernel.org,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH v2 03/12] staging: wilc1000: simplify msgqueue code
Date: Mon,  1 Jun 2015 21:06:36 +0200	[thread overview]
Message-ID: <1433185605-2492600-4-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1433185605-2492600-1-git-send-email-arnd@arndb.de>

The driver contains an abstraction for message queues, with
optional unused features, while the driver requires the main
feature.

This makes the msgqueue code unconditional as it's required
but removes the unused parts.

A later cleanup should remove the entire msgqueue code
and replace it with some normal kernel API.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/wilc1000/wilc_msgqueue.c  |  9 ---------
 drivers/staging/wilc1000/wilc_msgqueue.h  | 30 ------------------------------
 drivers/staging/wilc1000/wilc_osconfig.h  |  3 ---
 drivers/staging/wilc1000/wilc_oswrapper.h |  2 --
 drivers/staging/wilc1000/wilc_platform.h  | 12 ------------
 5 files changed, 56 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index c1d0dabed479..1113092398d1 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -1,8 +1,6 @@
 
 #include "wilc_oswrapper.h"
 #include <linux/spinlock.h>
-#ifdef CONFIG_WILC_MSG_QUEUE_FEATURE
-
 
 /*!
  *  @author		syounan
@@ -154,11 +152,6 @@ WILC_ErrNo WILC_MsgQueueRecv(WILC_MsgQueueHandle *pHandle,
 	spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
 
 	WILC_SemaphoreFillDefault(&strSemAttrs);
-	#ifdef CONFIG_WILC_MSG_QUEUE_TIMEOUT
-	if (pstrAttrs != WILC_NULL) {
-		strSemAttrs.u32TimeOut = pstrAttrs->u32Timeout;
-	}
-	#endif
 	s32RetStatus = WILC_SemaphoreAcquire(&(pHandle->hSem), &strSemAttrs);
 	if (s32RetStatus == WILC_TIMEOUT) {
 		/* timed out, just exit without consumeing the message */
@@ -207,5 +200,3 @@ WILC_ErrNo WILC_MsgQueueRecv(WILC_MsgQueueHandle *pHandle,
 
 	return s32RetStatus;
 }
-
-#endif
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
index a48be533aad9..84157368335d 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.h
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -10,10 +10,6 @@
  *  @version	1.0
  */
 
-#ifndef CONFIG_WILC_MSG_QUEUE_FEATURE
-#error the feature CONFIG_WILC_MSG_QUEUE_FEATURE must be supported to include this file
-#endif
-
 /*!
  *  @struct             tstrWILC_MsgQueueAttrs
  *  @brief		Message Queue API options
@@ -22,38 +18,12 @@
  *  @version		1.0
  */
 typedef struct {
-	#ifdef CONFIG_WILC_MSG_QUEUE_IPC_NAME
-	WILC_Char *pcName;
-	#endif
-
-	#ifdef CONFIG_WILC_MSG_QUEUE_TIMEOUT
-	WILC_Uint32 u32Timeout;
-	#endif
-
 	/* a dummy member to avoid compiler errors*/
 	WILC_Uint8 dummy;
 
 } tstrWILC_MsgQueueAttrs;
 
 /*!
- *  @brief		Fills the MsgQueueAttrs with default parameters
- *  @param[out]	pstrAttrs structure to be filled
- *  @sa			WILC_TimerAttrs
- *  @author		syounan
- *  @date		30 Aug 2010
- *  @version		1.0
- */
-static void WILC_MsgQueueFillDefault(tstrWILC_MsgQueueAttrs *pstrAttrs)
-{
-	#ifdef CONFIG_WILC_MSG_QUEUE_IPC_NAME
-	pstrAttrs->pcName = WILC_NULL;
-	#endif
-
-	#ifdef CONFIG_WILC_MSG_QUEUE_TIMEOUT
-	pstrAttrs->u32Timeout = WILC_OS_INFINITY;
-	#endif
-}
-/*!
  *  @brief		Creates a new Message queue
  *  @details		Creates a new Message queue, if the feature
  *                              CONFIG_WILC_MSG_QUEUE_IPC_NAME is enabled and pstrAttrs->pcName
diff --git a/drivers/staging/wilc1000/wilc_osconfig.h b/drivers/staging/wilc1000/wilc_osconfig.h
index f18615e09400..d89864c7697c 100644
--- a/drivers/staging/wilc1000/wilc_osconfig.h
+++ b/drivers/staging/wilc1000/wilc_osconfig.h
@@ -20,9 +20,6 @@
 /* #define CONFIG_WILC_MEMORY_POOLS 1 */
 /* #define CONFIG_WILC_MEMORY_DEBUG 1 */
 /* #define CONFIG_WILC_ASSERTION_SUPPORT 1 */
-#define CONFIG_WILC_MSG_QUEUE_FEATURE
-/* #define CONFIG_WILC_MSG_QUEUE_IPC_NAME */
-/* #define CONFIG_WILC_MSG_QUEUE_TIMEOUT */
 /* #define CONFIG_WILC_FILE_OPERATIONS_FEATURE */
 /* #define CONFIG_WILC_FILE_OPERATIONS_STRING_API */
 /* #define CONFIG_WILC_FILE_OPERATIONS_PATH_API */
diff --git a/drivers/staging/wilc1000/wilc_oswrapper.h b/drivers/staging/wilc1000/wilc_oswrapper.h
index c4e97ae03ae0..8b4c3dced981 100644
--- a/drivers/staging/wilc1000/wilc_oswrapper.h
+++ b/drivers/staging/wilc1000/wilc_oswrapper.h
@@ -78,9 +78,7 @@ typedef WILC_Uint16 WILC_WideChar;
 #include "wilc_strutils.h"
 
 /* Message Queue */
-#ifdef CONFIG_WILC_MSG_QUEUE_FEATURE
 #include "wilc_msgqueue.h"
-#endif
 
 /* File operations */
 #ifdef CONFIG_WILC_FILE_OPERATIONS_FEATURE
diff --git a/drivers/staging/wilc1000/wilc_platform.h b/drivers/staging/wilc1000/wilc_platform.h
index b20bbb839e5a..2f6484989565 100644
--- a/drivers/staging/wilc1000/wilc_platform.h
+++ b/drivers/staging/wilc1000/wilc_platform.h
@@ -50,18 +50,6 @@
 #error This feature is not supported by this OS
 #endif
 
-/* CONFIG_WILC_MSG_QUEUE_FEATURE is implemented */
-
-/* remove the following block when implementing its feature */
-#ifdef CONFIG_WILC_MSG_QUEUE_IPC_NAME
-#error This feature is not supported by this OS
-#endif
-
-/* remove the following block when implementing its feature */
-/*#ifdef CONFIG_WILC_MSG_QUEUE_TIMEOUT
- * #error This feature is not supported by this OS
- #endif*/
-
 /* CONFIG_WILC_FILE_OPERATIONS_FEATURE is implemented */
 
 /* CONFIG_WILC_FILE_OPERATIONS_STRING_API is implemented */
-- 
2.1.0.rc2


  parent reply	other threads:[~2015-06-01 19:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01 19:06 [PATCH v3 00/12] wilc1000: dead code removal and other cleanup Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 01/12] staging: wilc1000: remove time wrapper Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 02/12] staging: wilc1000: remove unused string functions Arnd Bergmann
2015-06-01 19:06 ` Arnd Bergmann [this message]
2015-06-01 19:06 ` [PATCH v2 04/12] staging: wilc1000: remove unused memory handling code Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 05/12] staging: wilc1000: simplify semaphore wrapper Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 06/12] staging: wilc1000: clean up sleep wrapper Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 07/12] staging: wilc1000: clean up timer feature Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 08/12] staging: wilc1000: remove unused OS abstraction features Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 09/12] staging: wilc1000: remove EXPORT_SYMTAB Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 10/12] staging: wilc1000: remove semaphore wrapper Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 11/12] staging: wilc1000: fix const cast warnings Arnd Bergmann
2015-06-01 19:06 ` [PATCH v2 12/12] staging: wilc1000: fix compiler warnings Arnd Bergmann
2015-06-02  4:53 ` [PATCH v3 00/12] wilc1000: dead code removal and other cleanup Greg KH
2015-06-02  5:20   ` Greg KH
2015-06-02  6:23     ` Johnny Kim

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=1433185605-2492600-4-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=chris.park@atmel.com \
    --cc=dean.lee@atmel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=johnny.kim@atmel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=rachel.kim@atmel.com \
    --cc=sudipm.mukherjee@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;
as well as URLs for NNTP newsgroup(s).