qcacmn: Fix kernel module check patch warnings

Fix kernel module check patch warnings in Host Target Communication
module files

Change-Id: I151f597142d93a26e5e037cf7fce944f86fba72a
CRs-fixed: 2033001
This commit is contained in:
Manikandan Mohan
2017-04-13 20:19:26 -07:00
committad av snandini
förälder e03493ddfb
incheckning e3e209e1fd
9 ändrade filer med 1095 tillägg och 1013 borttagningar

Visa fil

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2014, 2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -25,17 +25,18 @@
* to the Linux Foundation.
*/
/* ============================================================================== */
/*=========================================================================== */
/* Double-link list definitions (adapted from Atheros SDIO stack) */
/* */
/* Author(s): ="Atheros" */
/* ============================================================================== */
/*=========================================================================== */
#ifndef __DL_LIST_H___
#define __DL_LIST_H___
#define A_CONTAINING_STRUCT(address, struct_type, field_name) \
((struct_type *)((char *)(address) - (char *)(&((struct_type *)0)->field_name)))
((struct_type *)((char *)(address) - \
(char *)(&((struct_type *)0)->field_name)))
/* list functions */
/* pointers for the list */
@@ -50,14 +51,15 @@ typedef struct _DL_LIST {
{(pList)->pPrev = pList; (pList)->pNext = pList; }
/* faster macro to init list and add a single item */
#define DL_LIST_INIT_AND_ADD(pList,pItem) \
#define DL_LIST_INIT_AND_ADD(pList, pItem) \
{ (pList)->pPrev = (pItem); \
(pList)->pNext = (pItem); \
(pItem)->pNext = (pList); \
(pItem)->pPrev = (pList); \
}
#define DL_LIST_IS_EMPTY(pList) (((pList)->pPrev == (pList)) && ((pList)->pNext == (pList)))
#define DL_LIST_IS_EMPTY(pList) (((pList)->pPrev == (pList)) && \
((pList)->pNext == (pList)))
#define DL_LIST_GET_ITEM_AT_HEAD(pList) (pList)->pNext
#define DL_LIST_GET_ITEM_AT_TAIL(pList) (pList)->pPrev
/*
@@ -66,9 +68,10 @@ typedef struct _DL_LIST {
* iteration loop
*/
#define ITERATE_OVER_LIST(pStart, pTemp) \
for((pTemp) =(pStart)->pNext; pTemp != (pStart); (pTemp) = (pTemp)->pNext)
for ((pTemp) = (pStart)->pNext; pTemp != (pStart); \
(pTemp) = (pTemp)->pNext)
static __inline bool dl_list_is_entry_in_list(const DL_LIST *pList,
static inline bool dl_list_is_entry_in_list(const DL_LIST *pList,
const DL_LIST *pEntry)
{
const DL_LIST *pTmp;
@@ -77,9 +80,8 @@ static __inline bool dl_list_is_entry_in_list(const DL_LIST *pList,
return true;
ITERATE_OVER_LIST(pList, pTmp) {
if (pTmp == pEntry) {
if (pTmp == pEntry)
return true;
}
}
return false;
@@ -88,30 +90,29 @@ static __inline bool dl_list_is_entry_in_list(const DL_LIST *pList,
/* safe iterate macro that allows the item to be removed from the list
* the iteration continues to the next item in the list
*/
#define ITERATE_OVER_LIST_ALLOW_REMOVE(pStart,pItem,st,offset) \
#define ITERATE_OVER_LIST_ALLOW_REMOVE(pStart, pItem, st, offset) \
{ \
PDL_LIST pTemp; \
pTemp = (pStart)->pNext; \
{ pTemp = (pStart)->pNext; } \
while (pTemp != (pStart)) { \
(pItem) = A_CONTAINING_STRUCT(pTemp,st,offset); \
pTemp = pTemp->pNext; \
{ (pItem) = A_CONTAINING_STRUCT(pTemp, st, offset); } \
{ pTemp = pTemp->pNext; } \
#define ITERATE_IS_VALID(pStart) dl_list_is_entry_in_list(pStart, pTemp)
#define ITERATE_RESET(pStart) pTemp=(pStart)->pNext
#define ITERATE_RESET(pStart) { pTemp = (pStart)->pNext; }
#define ITERATE_END }}
/*
* dl_list_insert_tail - insert pAdd to the end of the list
*/
static __inline PDL_LIST dl_list_insert_tail(PDL_LIST pList, PDL_LIST pAdd)
static inline PDL_LIST dl_list_insert_tail(PDL_LIST pList, PDL_LIST pAdd)
{
/* insert at tail */
pAdd->pPrev = pList->pPrev;
pAdd->pNext = pList;
if (pList->pPrev) {
if (pList->pPrev)
pList->pPrev->pNext = pAdd;
}
pList->pPrev = pAdd;
return pAdd;
}
@@ -119,7 +120,7 @@ static __inline PDL_LIST dl_list_insert_tail(PDL_LIST pList, PDL_LIST pAdd)
/*
* dl_list_insert_head - insert pAdd into the head of the list
*/
static __inline PDL_LIST dl_list_insert_head(PDL_LIST pList, PDL_LIST pAdd)
static inline PDL_LIST dl_list_insert_head(PDL_LIST pList, PDL_LIST pAdd)
{
/* insert at head */
pAdd->pPrev = pList;
@@ -129,20 +130,17 @@ static __inline PDL_LIST dl_list_insert_head(PDL_LIST pList, PDL_LIST pAdd)
return pAdd;
}
#define DL_ListAdd(pList,pItem) dl_list_insert_head((pList),(pItem))
#define DL_ListAdd(pList, pItem) dl_list_insert_head((pList), (pItem))
/*
* dl_list_remove - remove pDel from list
*/
static __inline PDL_LIST dl_list_remove(PDL_LIST pDel)
static inline PDL_LIST dl_list_remove(PDL_LIST pDel)
{
if (pDel->pNext != NULL) {
if (pDel->pNext != NULL)
pDel->pNext->pPrev = pDel->pPrev;
}
if (pDel->pPrev != NULL) {
if (pDel->pPrev != NULL)
pDel->pPrev->pNext = pDel->pNext;
}
/* point back to itself just to be safe, incase remove is called again */
/* point back to itself just to be safe, if remove is called again */
pDel->pNext = pDel;
pDel->pPrev = pDel;
return pDel;
@@ -151,9 +149,10 @@ static __inline PDL_LIST dl_list_remove(PDL_LIST pDel)
/*
* dl_list_remove_item_from_head - get a list item from the head
*/
static __inline PDL_LIST dl_list_remove_item_from_head(PDL_LIST pList)
static inline PDL_LIST dl_list_remove_item_from_head(PDL_LIST pList)
{
PDL_LIST pItem = NULL;
if (pList->pNext != pList) {
pItem = pList->pNext;
/* remove the first item from head */
@@ -162,9 +161,10 @@ static __inline PDL_LIST dl_list_remove_item_from_head(PDL_LIST pList)
return pItem;
}
static __inline PDL_LIST dl_list_remove_item_from_tail(PDL_LIST pList)
static inline PDL_LIST dl_list_remove_item_from_tail(PDL_LIST pList)
{
PDL_LIST pItem = NULL;
if (pList->pPrev != pList) {
pItem = pList->pPrev;
/* remove the item from tail */
@@ -174,7 +174,7 @@ static __inline PDL_LIST dl_list_remove_item_from_tail(PDL_LIST pList)
}
/* transfer src list items to the tail of the destination list */
static __inline void dl_list_transfer_items_to_tail(PDL_LIST pDest, PDL_LIST pSrc)
static inline void dl_list_transfer_items_to_tail(PDL_LIST pDest, PDL_LIST pSrc)
{
/* only concatenate if src is not empty */
if (!DL_LIST_IS_EMPTY(pSrc)) {
@@ -190,11 +190,11 @@ static __inline void dl_list_transfer_items_to_tail(PDL_LIST pDest, PDL_LIST pSr
}
/* transfer src list items to the head of the destination list */
static __inline void dl_list_transfer_items_to_head(PDL_LIST pDest, PDL_LIST pSrc)
static inline void dl_list_transfer_items_to_head(PDL_LIST pDest, PDL_LIST pSrc)
{
/* only concatenate if src is not empty */
if (!DL_LIST_IS_EMPTY(pSrc)) {
/* cut out circular list in src and re-attach to start of dest */
/* cut out circular list in src and reattach to start of dest */
pSrc->pNext->pPrev = pDest;
pDest->pNext->pPrev = pSrc->pPrev;
pSrc->pPrev->pNext = pDest->pNext;