Re: [RFC] staging: r8188eu: Fix sparse warnings in core/rtw_br_ext.c

2013-12-21 Thread Greg KH
On Sat, Dec 21, 2013 at 07:31:08PM -0600, Larry Finger wrote:
> Please tell me if the following fixes are appropriate. In particular, I am 
> uncertain of
> the __force attributes.
> 
> Thanks,
> 
> Larry
> 
> 
> Sparse lists the following:
> 
>   CHECK   drivers/staging/rtl8188eu/core/rtw_br_ext.c
> drivers/staging/rtl8188eu/core/rtw_br_ext.c:1156:63: warning: restricted 
> __sum16 degrades to integer
> drivers/staging/rtl8188eu/core/rtw_br_ext.c:1160:69: warning: incorrect type 
> in assignment (different base types)
> drivers/staging/rtl8188eu/core/rtw_br_ext.c:1160:69:expected restricted 
> __sum16 [usertype] check
> drivers/staging/rtl8188eu/core/rtw_br_ext.c:1160:69:got int
> 
> ---
>  drivers/staging/rtl8188eu/core/rtw_br_ext.c | 47 
> +++--
>  1 file changed, 24 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/core/rtw_br_ext.c 
> b/drivers/staging/rtl8188eu/core/rtw_br_ext.c
> index 5425bc5..54a706f 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_br_ext.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_br_ext.c
> 
> @@ -1153,11 +1154,11 @@ void dhcp_flag_bcast(struct adapter *priv, struct 
> sk_buff *skb)
>   /*  or BROADCAST flag */
>   dhcph->flags |= 
> htons(BROADCAST_FLAG);
>   /*  recalculate 
> checksum */
> - sum = ~(udph->check) & 
> 0x;
> + sum = (__force 
> int)(~(udph->check)) & 0x;
>   sum += 
> be16_to_cpu(dhcph->flags);
>   while (sum >> 16)
>   sum = (sum & 
> 0x) + (sum >> 16);
> - udph->check = ~sum;
> + udph->check = (__force 
> __sum16)(~sum);

I thought __force was only "needed" when trying to move between user and
kernel pointer types, I didn't think it was needed for stuff like this.

But I really don't know what __sum16 is, so I can't say for sure, sorry.

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: imx-drm: imx-tve: Fix a sparse warning

2013-12-21 Thread Liu Ying
This patch declares the function of_get_tve_mode
as a static one to fix this sparse warning:
drivers/staging/imx-drm/imx-tve.c:563:11: warning: \
symbol 'of_get_tve_mode' was not declared. \
Should it be static?

Signed-off-by: Liu Ying 
---
 drivers/staging/imx-drm/imx-tve.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/imx-drm/imx-tve.c 
b/drivers/staging/imx-drm/imx-tve.c
index 2c44fef..9abc7ca 100644
--- a/drivers/staging/imx-drm/imx-tve.c
+++ b/drivers/staging/imx-drm/imx-tve.c
@@ -560,7 +560,7 @@ static const char *imx_tve_modes[] = {
[TVE_MODE_VGA] = "vga",
 };
 
-const int of_get_tve_mode(struct device_node *np)
+static const int of_get_tve_mode(struct device_node *np)
 {
const char *bm;
int ret, i;
-- 
1.7.9.5


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH net] hyperv: Fix race between probe and open calls

2013-12-21 Thread David Miller
From: Haiyang Zhang 
Date: Fri, 20 Dec 2013 16:52:31 -0800

> Moving the register_netdev to the end of probe to prevent
> possible open call happens before NetVSP is connected.
> 
> Signed-off-by: Haiyang Zhang 
> Reviewed-by: K. Y. Srinivasan 

Applied, thanks.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RFC] staging: r8188eu: Fix sparse warnings in core/rtw_br_ext.c

2013-12-21 Thread Larry Finger
Please tell me if the following fixes are appropriate. In particular, I am 
uncertain of
the __force attributes.

Thanks,

Larry


Sparse lists the following:

  CHECK   drivers/staging/rtl8188eu/core/rtw_br_ext.c
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1156:63: warning: restricted 
__sum16 degrades to integer
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1160:69: warning: incorrect type in 
assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1160:69:expected restricted 
__sum16 [usertype] check
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1160:69:got int

---
 drivers/staging/rtl8188eu/core/rtw_br_ext.c | 47 +++--
 1 file changed, 24 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_br_ext.c 
b/drivers/staging/rtl8188eu/core/rtw_br_ext.c
index 5425bc5..54a706f 100644
--- a/drivers/staging/rtl8188eu/core/rtw_br_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_br_ext.c

@@ -1153,11 +1154,11 @@ void dhcp_flag_bcast(struct adapter *priv, struct 
sk_buff *skb)
/*  or BROADCAST flag */
dhcph->flags |= 
htons(BROADCAST_FLAG);
/*  recalculate 
checksum */
-   sum = ~(udph->check) & 
0x;
+   sum = (__force 
int)(~(udph->check)) & 0x;
sum += 
be16_to_cpu(dhcph->flags);
while (sum >> 16)
sum = (sum & 
0x) + (sum >> 16);
-   udph->check = ~sum;
+   udph->check = (__force 
__sum16)(~sum);
}
}
}
-- 
1.8.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RFC PATCH 1/5] gpu: ipu-v3: Move i.MX IPUv3 core driver out of staging

2013-12-21 Thread Geert Uytterhoeven
On Fri, Dec 20, 2013 at 6:52 PM, Philipp Zabel  wrote:
> The i.MX Image Processing Unit (IPU) contains a number of image processing
> blocks that sit right in the middle between DRM and V4L2. Some of the modules,
> such as Display Controller, Processor, and Interface (DC, DP, DI) or CMOS
> Sensor Interface (CSI) and their FIFOs could be assigned to either framework,
> but others, such as the dma controller (IDMAC) and image converter (IC) can
> be used by both.
> The IPUv3 core driver provides an internal API to access the modules, to be
> used by both DRM and V4L2 IPUv3 drivers.
>
> Signed-off-by: Lucas Stach 
> Signed-off-by: Philipp Zabel 
> ---
>  drivers/gpu/Makefile  |  1 +
>  drivers/gpu/ipu-v3/Kconfig|  7 +++
>  drivers/{staging/imx-drm => gpu}/ipu-v3/Makefile  |  2 +-
>  drivers/{staging/imx-drm => gpu}/ipu-v3/ipu-common.c  |  3 ++-
>  drivers/{staging/imx-drm => gpu}/ipu-v3/ipu-dc.c  |  3 +--
>  drivers/{staging/imx-drm => gpu}/ipu-v3/ipu-di.c  |  2 +-
>  drivers/{staging/imx-drm => gpu}/ipu-v3/ipu-dmfc.c|  2 +-
>  drivers/{staging/imx-drm => gpu}/ipu-v3/ipu-dp.c  |  2 +-
>  drivers/{staging/imx-drm => gpu}/ipu-v3/ipu-prv.h |  2 +-

The posted diff only shows the changes made during the move.

Has the actual code been reviewed here?
If not, please post it here (e.g. diff against /dev/null).
If yes, please ignore my comments.

Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: lustre: Fix typo in lustre/ldlm

2013-12-21 Thread Masanari Iida
Correct spelling typo in lustre/ldlm

Signed-off-by: Masanari Iida 
---
 drivers/staging/lustre/lustre/ldlm/ldlm_lock.c |  8 
 drivers/staging/lustre/lustre/ldlm/ldlm_pool.c |  2 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c  | 10 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c |  4 ++--
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c 
b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
index 95eff79..09526e6 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
@@ -801,7 +801,7 @@ void ldlm_lock_addref_internal(struct ldlm_lock *lock, 
__u32 mode)
  * Removes reader/writer reference for LDLM lock \a lock.
  * Assumes LDLM lock is already locked.
  * only called in ldlm_flock_destroy and for local locks.
- * Does NOT add lock to LRU if no r/w references left to accomodate flock locks
+ * Does NOT add lock to LRU if no r/w references left to accommodate flock 
locks
  * that cannot be placed in LRU.
  */
 void ldlm_lock_decref_internal_nolock(struct ldlm_lock *lock, __u32 mode)
@@ -1254,7 +1254,7 @@ EXPORT_SYMBOL(ldlm_lock_allow_match);
  * list will be considered
  * If 'flags' contains LDLM_FL_CBPENDING, then locks that have been marked
  * to be canceled can still be matched as long as they still have reader
- * or writer refernces
+ * or writer references
  * If 'flags' contains LDLM_FL_TEST_LOCK, then don't actually reference a lock,
  * just tell us if we would have matched.
  *
@@ -2097,8 +2097,8 @@ void ldlm_cancel_locks_for_export(struct obd_export *exp)
 /**
  * Downgrade an exclusive lock.
  *
- * A fast variant of ldlm_lock_convert for convertion of exclusive
- * locks. The convertion is always successful.
+ * A fast variant of ldlm_lock_convert for conversion of exclusive
+ * locks. The conversion is always successful.
  * Used by Commit on Sharing (COS) code.
  *
  * \param lock A lock to convert
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c 
b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
index 6758646..7283994 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
@@ -1322,7 +1322,7 @@ static int ldlm_pools_thread_main(void *arg)
struct l_wait_info lwi;
 
/*
-* Recal all pools on this tick.
+* Recalc all pools on this tick.
 */
s_time = ldlm_pools_recalc(LDLM_NAMESPACE_SERVER);
c_time = ldlm_pools_recalc(LDLM_NAMESPACE_CLIENT);
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c 
b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
index a8f8c1c..ab73467 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
@@ -299,7 +299,7 @@ EXPORT_SYMBOL(ldlm_completion_ast);
  * A helper to build a blocking AST function
  *
  * Perform a common operation for blocking ASTs:
- * defferred lock cancellation.
+ * deferred lock cancellation.
  *
  * \param lock the lock blocking or canceling AST was called on
  * \retval 0
@@ -781,7 +781,7 @@ int ldlm_prep_elc_req(struct obd_export *exp, struct 
ptlrpc_request *req,
dlm = req_capsule_client_get(pill, &RMF_DLM_REQ);
LASSERT(dlm);
/* Skip first lock handler in ldlm_request_pack(),
-* this method will incrment @lock_count according
+* this method will increment @lock_count according
 * to the lock handle amount actually written to
 * the buffer. */
dlm->lock_count = canceloff;
@@ -1329,7 +1329,7 @@ int ldlm_cli_cancel(struct lustre_handle *lockh,
return 0;
}
/* Even if the lock is marked as LDLM_FL_BL_AST, this is a LDLM_CANCEL
-* RPC which goes to canceld portal, so we can cancel other LRU locks
+* RPC which goes to canceled portal, so we can cancel other LRU locks
 * here and send them all as one LDLM_CANCEL RPC. */
LASSERT(list_empty(&lock->l_bl_ast));
list_add(&lock->l_bl_ast, &cancels);
@@ -1584,7 +1584,7 @@ ldlm_cancel_lru_policy(struct ldlm_namespace *ns, int 
flags)
  *   the beginning of LRU list);
  *
  * flags & LDLM_CANCEL_SHRINK - cancel not more than \a count locks according 
to
- *   memory pressre policy function;
+ *   memory pressure policy function;
  *
  * flags & LDLM_CANCEL_AGED - cancel \a count locks according to "aged policy".
  *
@@ -2076,7 +2076,7 @@ static int ldlm_chain_lock_for_replay(struct ldlm_lock 
*lock, void *closure)
 lock, &lock->l_pending_chain.next,&lock->l_pending_chain.prev);
/* bug 9573: don't replay locks left after eviction, or
 

Re: [PATCH] drivers: sm7xxfb: Mark function as static in sm7xxfb.c

2013-12-21 Thread Javier Muñoz
On 12/21/2013 11:14 AM, Rashika Kheria wrote:
> Mark function smtcfb_setmode() as static in sm7xxfb.c because it is not
> used outside this file.
> 
> This eliminates the following warning in sm7xxfb.c:
> drivers/staging/sm7xxfb/sm7xxfb.c:588:6: warning: no previous prototype for 
> ‘smtcfb_setmode’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria 

Acked-by: Javier M. Mellid 

> ---
>  drivers/staging/sm7xxfb/sm7xxfb.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c 
> b/drivers/staging/sm7xxfb/sm7xxfb.c
> index ba199ff..f08b216 100644
> --- a/drivers/staging/sm7xxfb/sm7xxfb.c
> +++ b/drivers/staging/sm7xxfb/sm7xxfb.c
> @@ -585,7 +585,7 @@ static void smtc_set_timing(struct smtcfb_info *sfb)
>   }
>  }
>  
> -void smtcfb_setmode(struct smtcfb_info *sfb)
> +static void smtcfb_setmode(struct smtcfb_info *sfb)
>  {
>   switch (sfb->fb.var.bits_per_pixel) {
>   case 32:
> 

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/2] drivers: bcm: Mark functions as static in Qos.c

2013-12-21 Thread Josh Triplett
On Sat, Dec 21, 2013 at 04:01:16PM +0530, Rashika Kheria wrote:
> Mark functions MatchSrcIpAddress(), MatchDestIpAddress() and MatchTos()
> as static in Qos.c because they are not used outside this file.
> 
> This eliminates the following warnings in Qos.c:
> drivers/staging/bcm/Qos.c:27:6: warning: no previous prototype for 
> ‘MatchSrcIpAddress’ [-Wmissing-prototypes]
> drivers/staging/bcm/Qos.c:61:6: warning: no previous prototype for 
> ‘MatchDestIpAddress’ [-Wmissing-prototypes]
> drivers/staging/bcm/Qos.c:94:6: warning: no previous prototype for ‘MatchTos’ 
> [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria 

Reviewed-by: Josh Triplett 

>  drivers/staging/bcm/Qos.c |6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/bcm/Qos.c b/drivers/staging/bcm/Qos.c
> index 1609a2b..0727599 100644
> --- a/drivers/staging/bcm/Qos.c
> +++ b/drivers/staging/bcm/Qos.c
> @@ -24,7 +24,7 @@ static VOID PruneQueue(struct bcm_mini_adapter *Adapter, 
> INT iIndex);
>  *
>  * Returns - TRUE(If address matches) else FAIL .
>  */
> -bool MatchSrcIpAddress(struct bcm_classifier_rule *pstClassifierRule, ULONG 
> ulSrcIP)
> +static bool MatchSrcIpAddress(struct bcm_classifier_rule *pstClassifierRule, 
> ULONG ulSrcIP)
>  {
>   UCHAR ucLoopIndex = 0;
>  
> @@ -58,7 +58,7 @@ bool MatchSrcIpAddress(struct bcm_classifier_rule 
> *pstClassifierRule, ULONG ulSr
>  *
>  * Returns - TRUE(If address matches) else FAIL .
>  */
> -bool MatchDestIpAddress(struct bcm_classifier_rule *pstClassifierRule, ULONG 
> ulDestIP)
> +static bool MatchDestIpAddress(struct bcm_classifier_rule 
> *pstClassifierRule, ULONG ulDestIP)
>  {
>   UCHAR ucLoopIndex = 0;
>   struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
> @@ -91,7 +91,7 @@ bool MatchDestIpAddress(struct bcm_classifier_rule 
> *pstClassifierRule, ULONG ulD
>  *
>  * Returns - TRUE(If address matches) else FAIL.
>  **/
> -bool MatchTos(struct bcm_classifier_rule *pstClassifierRule, UCHAR 
> ucTypeOfService)
> +static bool MatchTos(struct bcm_classifier_rule *pstClassifierRule, UCHAR 
> ucTypeOfService)
>  {
>  
>   struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
> -- 
> 1.7.9.5
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: dgnc: Include appropriate header file in dgnc_trace.c

2013-12-21 Thread Josh Triplett
On Sat, Dec 21, 2013 at 03:52:38PM +0530, Rashika Kheria wrote:
> Include appropriate header file dgnc/dgnc_trace.h in dgnc_trace.c
> because function dgnc_tracer_free() has its prototype declaration in the
> header file.
> 
> This eliminates the following warning in dgnc_trace.c:
> drivers/staging/dgnc/dgnc_trace.c:180:6: warning: no previous prototype for 
> ‘dgnc_tracer_free’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria 

Reviewed-by: Josh Triplett 

>  drivers/staging/dgnc/dgnc_trace.c |1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/dgnc/dgnc_trace.c 
> b/drivers/staging/dgnc/dgnc_trace.c
> index a98b7d4..e2164e4 100644
> --- a/drivers/staging/dgnc/dgnc_trace.c
> +++ b/drivers/staging/dgnc/dgnc_trace.c
> @@ -35,6 +35,7 @@
>  #include 
>  
>  #include "dgnc_driver.h"
> +#include "dgnc_trace.h"
>  
>  #define TRC_TO_CONSOLE 1
>  
> -- 
> 1.7.9.5
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] drivers: bcm: Remove unused function in nvm.c

2013-12-21 Thread Josh Triplett
On Sat, Dec 21, 2013 at 04:03:22PM +0530, Rashika Kheria wrote:
> Remove unused function PropagateCalParamsFromEEPROMToMemory() in nvm.c.
> 
> This eliminates the following warning in nvm.c:
> drivers/staging/bcm/nvm.c:1369:5: warning: no previous prototype for 
> ‘PropagateCalParamsFromEEPROMToMemory’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria 

Reviewed-by: Josh Triplett 

>  drivers/staging/bcm/nvm.c |   61 
> -
>  1 file changed, 61 deletions(-)
> 
> diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c
> index 9e5f955..6f40f17 100644
> --- a/drivers/staging/bcm/nvm.c
> +++ b/drivers/staging/bcm/nvm.c
> @@ -1355,67 +1355,6 @@ BeceemFlashBulkWriteStatus_EXIT:
>  }
>  
>  /*
> - * Procedure:PropagateCalParamsFromEEPROMToMemory
> - *
> - * Description: Dumps the calibration section of EEPROM to DDR.
> - *
> - * Arguments:
> - *   Adapter- ptr to Adapter object instance
> - * Returns:
> - *   OSAL_STATUS_CODE
> - *
> - */
> -
> -int PropagateCalParamsFromEEPROMToMemory(struct bcm_mini_adapter *Adapter)
> -{
> - PCHAR pBuff = kmalloc(BUFFER_4K, GFP_KERNEL);
> - unsigned int uiEepromSize = 0;
> - unsigned int uiIndex = 0;
> - unsigned int uiBytesToCopy = 0;
> - unsigned int uiCalStartAddr = EEPROM_CALPARAM_START;
> - unsigned int uiMemoryLoc = EEPROM_CAL_DATA_INTERNAL_LOC;
> - unsigned int value;
> - int Status = 0;
> -
> - if (!pBuff)
> - return -ENOMEM;
> -
> - if (0 != BeceemEEPROMBulkRead(Adapter, &uiEepromSize, 
> EEPROM_SIZE_OFFSET, 4)) {
> - kfree(pBuff);
> - return -1;
> - }
> -
> - uiEepromSize >>= 16;
> - if (uiEepromSize > 1024 * 1024) {
> - kfree(pBuff);
> - return -1;
> - }
> -
> - uiBytesToCopy = MIN(BUFFER_4K, uiEepromSize);
> -
> - while (uiBytesToCopy) {
> - if (0 != BeceemEEPROMBulkRead(Adapter, (PUINT)pBuff, 
> uiCalStartAddr, uiBytesToCopy)) {
> - Status = -1;
> - break;
> - }
> - wrm(Adapter, uiMemoryLoc, (PCHAR)(((PULONG)pBuff) + uiIndex), 
> uiBytesToCopy);
> - uiMemoryLoc += uiBytesToCopy;
> - uiEepromSize -= uiBytesToCopy;
> - uiCalStartAddr += uiBytesToCopy;
> - uiIndex += uiBytesToCopy / 4;
> - uiBytesToCopy = MIN(BUFFER_4K, uiEepromSize);
> -
> - }
> - value = 0xbeadbead;
> - wrmalt(Adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 4, &value, 
> sizeof(value));
> - value = 0xbeadbead;
> - wrmalt(Adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 8, &value, 
> sizeof(value));
> - kfree(pBuff);
> -
> - return Status;
> -}
> -
> -/*
>   * Procedure:PropagateCalParamsFromFlashToMemory
>   *
>   * Description: Dumps the calibration section of EEPROM to DDR.
> -- 
> 1.7.9.5
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] drivers: dgap: Include appropriate header file in dgap_trace.c

2013-12-21 Thread Josh Triplett
On Sat, Dec 21, 2013 at 03:58:25PM +0530, Rashika Kheria wrote:
> Include appropriate header file dgap/dgap_trace.h in dgap_trace.c
> because function dgap_tracer_free() have its prototype declaration in
> the header file.
> 
> This eliminates the following warning in dgap_trace.c:
> drivers/staging/dgap/dgap_trace.c:181:6: warning: no previous prototype for 
> ‘dgap_tracer_free’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria 

Reviewed-by: Josh Triplett 

>  drivers/staging/dgap/dgap_trace.c |1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/dgap/dgap_trace.c 
> b/drivers/staging/dgap/dgap_trace.c
> index 0f9a956..6c8b510 100644
> --- a/drivers/staging/dgap/dgap_trace.c
> +++ b/drivers/staging/dgap/dgap_trace.c
> @@ -37,6 +37,7 @@
>  #include 
>  
>  #include "dgap_driver.h"
> +#include "dgap_trace.h"
>  
>  #define TRC_TO_CONSOLE 1
>  
> -- 
> 1.7.9.5
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: sbe-2t3e3: Mark functions as static in ctrl.c

2013-12-21 Thread Josh Triplett
On Sat, Dec 21, 2013 at 03:47:13PM +0530, Rashika Kheria wrote:
> Mark functions t3e3_set_loopback(), t3e3_reg_read(), t3e3_reg_write(),
> t3e3_port_get(), t3e3_port_set(), t3e3_port_get_stats() and
> t3e3_port_del_stats() as static in ctrl.c because they are not used
> outside this file.
> 
> This eliminates the following warnings in ctrl.c:
> drivers/staging/sbe-2t3e3/ctrl.c:34:6: warning: no previous prototype for 
> ‘t3e3_set_loopback’ [-Wmissing-prototypes]
> drivers/staging/sbe-2t3e3/ctrl.c:98:6: warning: no previous prototype for 
> ‘t3e3_reg_read’ [-Wmissing-prototypes]
> drivers/staging/sbe-2t3e3/ctrl.c:135:6: warning: no previous prototype for 
> ‘t3e3_reg_write’ [-Wmissing-prototypes]
> drivers/staging/sbe-2t3e3/ctrl.c:167:6: warning: no previous prototype for 
> ‘t3e3_port_get’ [-Wmissing-prototypes]
> drivers/staging/sbe-2t3e3/ctrl.c:172:6: warning: no previous prototype for 
> ‘t3e3_port_set’ [-Wmissing-prototypes]
> drivers/staging/sbe-2t3e3/ctrl.c:219:6: warning: no previous prototype for 
> ‘t3e3_port_get_stats’ [-Wmissing-prototypes]
> drivers/staging/sbe-2t3e3/ctrl.c:285:6: warning: no previous prototype for 
> ‘t3e3_port_del_stats’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria 

Reviewed-by: Josh Triplett 

>  drivers/staging/sbe-2t3e3/ctrl.c |   14 +++---
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/sbe-2t3e3/ctrl.c 
> b/drivers/staging/sbe-2t3e3/ctrl.c
> index a5825d7..d280bcf 100644
> --- a/drivers/staging/sbe-2t3e3/ctrl.c
> +++ b/drivers/staging/sbe-2t3e3/ctrl.c
> @@ -31,7 +31,7 @@ void t3e3_set_frame_type(struct channel *sc, u32 mode)
>   sc->p.frame_type = mode;
>  }
>  
> -void t3e3_set_loopback(struct channel *sc, u32 mode)
> +static void t3e3_set_loopback(struct channel *sc, u32 mode)
>  {
>   u32 tx, rx;
>  
> @@ -95,7 +95,7 @@ void t3e3_set_loopback(struct channel *sc, u32 mode)
>  }
>  
>  
> -void t3e3_reg_read(struct channel *sc, u32 *reg, u32 *val)
> +static void t3e3_reg_read(struct channel *sc, u32 *reg, u32 *val)
>  {
>   u32 i;
>  
> @@ -132,7 +132,7 @@ void t3e3_reg_read(struct channel *sc, u32 *reg, u32 *val)
>   }
>  }
>  
> -void t3e3_reg_write(struct channel *sc, u32 *reg)
> +static void t3e3_reg_write(struct channel *sc, u32 *reg)
>  {
>   u32 i;
>  
> @@ -164,12 +164,12 @@ void t3e3_reg_write(struct channel *sc, u32 *reg)
>   }
>  }
>  
> -void t3e3_port_get(struct channel *sc, t3e3_param_t *param)
> +static void t3e3_port_get(struct channel *sc, t3e3_param_t *param)
>  {
>   memcpy(param, &(sc->p), sizeof(t3e3_param_t));
>  }
>  
> -void t3e3_port_set(struct channel *sc, t3e3_param_t *param)
> +static void t3e3_port_set(struct channel *sc, t3e3_param_t *param)
>  {
>   if (param->frame_mode != 0xff)
>   cpld_set_frame_mode(sc, param->frame_mode);
> @@ -216,7 +216,7 @@ void t3e3_port_set(struct channel *sc, t3e3_param_t 
> *param)
>   cpld_set_scrambler(sc, param->scrambler);
>  }
>  
> -void t3e3_port_get_stats(struct channel *sc,
> +static void t3e3_port_get_stats(struct channel *sc,
>t3e3_stats_t *stats)
>  {
>   u32 result;
> @@ -282,7 +282,7 @@ void t3e3_port_get_stats(struct channel *sc,
>   memcpy(stats, &(sc->s), sizeof(t3e3_stats_t));
>  }
>  
> -void t3e3_port_del_stats(struct channel *sc)
> +static void t3e3_port_del_stats(struct channel *sc)
>  {
>   memset(&(sc->s), 0, sizeof(t3e3_stats_t));
>  }
> -- 
> 1.7.9.5
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/2] drivers: dgap: Include appropriate header file in dgap_parse.c

2013-12-21 Thread Josh Triplett
On Sat, Dec 21, 2013 at 03:55:50PM +0530, Rashika Kheria wrote:
> Include appropriate header file in dgap/dgap_parse.h in dgap_parse.c
> because functions dgap_parsefile(), dgap_config_get_useintr(),
> dgap_config_get_altpin(), dgap_find_config(),
> dgap_config_get_number_of_ports(), dgap_create_config_string() and
> dgap_get_config_letters() have their prototype declarations in the
> header file.
> 
> This eliminates the following warnings in dgap_parse.c:
> drivers/staging/dgap/dgap_parse.c:125:5: warning: no previous prototype for 
> ‘dgap_parsefile’ [-Wmissing-prototypes]
> drivers/staging/dgap/dgap_parse.c:1101:6: warning: no previous prototype for 
> ‘dgap_config_get_useintr’ [-Wmissing-prototypes]
> drivers/staging/dgap/dgap_parse.c:1128:6: warning: no previous prototype for 
> ‘dgap_config_get_altpin’ [-Wmissing-prototypes]
> drivers/staging/dgap/dgap_parse.c:1157:15: warning: no previous prototype for 
> ‘dgap_find_config’ [-Wmissing-prototypes]
> drivers/staging/dgap/dgap_parse.c:1223:6: warning: no previous prototype for 
> ‘dgap_config_get_number_of_ports’ [-Wmissing-prototypes]
> drivers/staging/dgap/dgap_parse.c:1252:7: warning: no previous prototype for 
> ‘dgap_create_config_string’ [-Wmissing-prototypes]
> drivers/staging/dgap/dgap_parse.c:1311:7: warning: no previous prototype for 
> ‘dgap_get_config_letters’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria 

Reviewed-by: Josh Triplett 

>  drivers/staging/dgap/dgap_parse.c |1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/dgap/dgap_parse.c 
> b/drivers/staging/dgap/dgap_parse.c
> index ff9d194..36fd93d 100644
> --- a/drivers/staging/dgap/dgap_parse.c
> +++ b/drivers/staging/dgap/dgap_parse.c
> @@ -42,6 +42,7 @@
>  #include "dgap_types.h"
>  #include "dgap_fep5.h"
>  #include "dgap_driver.h"
> +#include "dgap_parse.h"
>  #include "dgap_conf.h"
>  
>  
> -- 
> 1.7.9.5
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: dwc2: Mark function as static in core.c

2013-12-21 Thread Josh Triplett
On Sat, Dec 21, 2013 at 03:50:29PM +0530, Rashika Kheria wrote:
> Mark function dwc2_set_param_uframe_sched() as static in core.c because
> it is not used outside this file.
> 
> This eliminates the following warning in core.c:
> drivers/staging/dwc2/core.c:2739:5: warning: no previous prototype for 
> ‘dwc2_set_param_uframe_sched’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria 

Reviewed-by: Josh Triplett 

>  drivers/staging/dwc2/core.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c
> index 6d001b5..c029cb6 100644
> --- a/drivers/staging/dwc2/core.c
> +++ b/drivers/staging/dwc2/core.c
> @@ -2736,7 +2736,7 @@ int dwc2_get_hwparams(struct dwc2_hsotg *hsotg)
>   return 0;
>  }
>  
> -int dwc2_set_param_uframe_sched(struct dwc2_hsotg *hsotg, int val)
> +static int dwc2_set_param_uframe_sched(struct dwc2_hsotg *hsotg, int val)
>  {
>   int retval = 0;
>  
> -- 
> 1.7.9.5
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] drivers: bcm: Mark functions as static in Qos.c

2013-12-21 Thread Rashika Kheria
Mark functions MatchSrcIpAddress(), MatchDestIpAddress() and MatchTos()
as static in Qos.c because they are not used outside this file.

This eliminates the following warnings in Qos.c:
drivers/staging/bcm/Qos.c:27:6: warning: no previous prototype for 
‘MatchSrcIpAddress’ [-Wmissing-prototypes]
drivers/staging/bcm/Qos.c:61:6: warning: no previous prototype for 
‘MatchDestIpAddress’ [-Wmissing-prototypes]
drivers/staging/bcm/Qos.c:94:6: warning: no previous prototype for ‘MatchTos’ 
[-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
---
 drivers/staging/bcm/Qos.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/bcm/Qos.c b/drivers/staging/bcm/Qos.c
index 1609a2b..0727599 100644
--- a/drivers/staging/bcm/Qos.c
+++ b/drivers/staging/bcm/Qos.c
@@ -24,7 +24,7 @@ static VOID PruneQueue(struct bcm_mini_adapter *Adapter, INT 
iIndex);
 *
 * Returns - TRUE(If address matches) else FAIL .
 */
-bool MatchSrcIpAddress(struct bcm_classifier_rule *pstClassifierRule, ULONG 
ulSrcIP)
+static bool MatchSrcIpAddress(struct bcm_classifier_rule *pstClassifierRule, 
ULONG ulSrcIP)
 {
UCHAR ucLoopIndex = 0;
 
@@ -58,7 +58,7 @@ bool MatchSrcIpAddress(struct bcm_classifier_rule 
*pstClassifierRule, ULONG ulSr
 *
 * Returns - TRUE(If address matches) else FAIL .
 */
-bool MatchDestIpAddress(struct bcm_classifier_rule *pstClassifierRule, ULONG 
ulDestIP)
+static bool MatchDestIpAddress(struct bcm_classifier_rule *pstClassifierRule, 
ULONG ulDestIP)
 {
UCHAR ucLoopIndex = 0;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
@@ -91,7 +91,7 @@ bool MatchDestIpAddress(struct bcm_classifier_rule 
*pstClassifierRule, ULONG ulD
 *
 * Returns - TRUE(If address matches) else FAIL.
 **/
-bool MatchTos(struct bcm_classifier_rule *pstClassifierRule, UCHAR 
ucTypeOfService)
+static bool MatchTos(struct bcm_classifier_rule *pstClassifierRule, UCHAR 
ucTypeOfService)
 {
 
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] drivers: bcm: Remove unused function in nvm.c

2013-12-21 Thread Rashika Kheria
Remove unused function PropagateCalParamsFromEEPROMToMemory() in nvm.c.

This eliminates the following warning in nvm.c:
drivers/staging/bcm/nvm.c:1369:5: warning: no previous prototype for 
‘PropagateCalParamsFromEEPROMToMemory’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
---
 drivers/staging/bcm/nvm.c |   61 -
 1 file changed, 61 deletions(-)

diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c
index 9e5f955..6f40f17 100644
--- a/drivers/staging/bcm/nvm.c
+++ b/drivers/staging/bcm/nvm.c
@@ -1355,67 +1355,6 @@ BeceemFlashBulkWriteStatus_EXIT:
 }
 
 /*
- * Procedure:  PropagateCalParamsFromEEPROMToMemory
- *
- * Description: Dumps the calibration section of EEPROM to DDR.
- *
- * Arguments:
- * Adapter- ptr to Adapter object instance
- * Returns:
- * OSAL_STATUS_CODE
- *
- */
-
-int PropagateCalParamsFromEEPROMToMemory(struct bcm_mini_adapter *Adapter)
-{
-   PCHAR pBuff = kmalloc(BUFFER_4K, GFP_KERNEL);
-   unsigned int uiEepromSize = 0;
-   unsigned int uiIndex = 0;
-   unsigned int uiBytesToCopy = 0;
-   unsigned int uiCalStartAddr = EEPROM_CALPARAM_START;
-   unsigned int uiMemoryLoc = EEPROM_CAL_DATA_INTERNAL_LOC;
-   unsigned int value;
-   int Status = 0;
-
-   if (!pBuff)
-   return -ENOMEM;
-
-   if (0 != BeceemEEPROMBulkRead(Adapter, &uiEepromSize, 
EEPROM_SIZE_OFFSET, 4)) {
-   kfree(pBuff);
-   return -1;
-   }
-
-   uiEepromSize >>= 16;
-   if (uiEepromSize > 1024 * 1024) {
-   kfree(pBuff);
-   return -1;
-   }
-
-   uiBytesToCopy = MIN(BUFFER_4K, uiEepromSize);
-
-   while (uiBytesToCopy) {
-   if (0 != BeceemEEPROMBulkRead(Adapter, (PUINT)pBuff, 
uiCalStartAddr, uiBytesToCopy)) {
-   Status = -1;
-   break;
-   }
-   wrm(Adapter, uiMemoryLoc, (PCHAR)(((PULONG)pBuff) + uiIndex), 
uiBytesToCopy);
-   uiMemoryLoc += uiBytesToCopy;
-   uiEepromSize -= uiBytesToCopy;
-   uiCalStartAddr += uiBytesToCopy;
-   uiIndex += uiBytesToCopy / 4;
-   uiBytesToCopy = MIN(BUFFER_4K, uiEepromSize);
-
-   }
-   value = 0xbeadbead;
-   wrmalt(Adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 4, &value, 
sizeof(value));
-   value = 0xbeadbead;
-   wrmalt(Adapter, EEPROM_CAL_DATA_INTERNAL_LOC - 8, &value, 
sizeof(value));
-   kfree(pBuff);
-
-   return Status;
-}
-
-/*
  * Procedure:  PropagateCalParamsFromFlashToMemory
  *
  * Description: Dumps the calibration section of EEPROM to DDR.
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] drivers: dgap: Include appropriate header file in dgap_trace.c

2013-12-21 Thread Rashika Kheria
Include appropriate header file dgap/dgap_trace.h in dgap_trace.c
because function dgap_tracer_free() have its prototype declaration in
the header file.

This eliminates the following warning in dgap_trace.c:
drivers/staging/dgap/dgap_trace.c:181:6: warning: no previous prototype for 
‘dgap_tracer_free’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
---
 drivers/staging/dgap/dgap_trace.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/dgap/dgap_trace.c 
b/drivers/staging/dgap/dgap_trace.c
index 0f9a956..6c8b510 100644
--- a/drivers/staging/dgap/dgap_trace.c
+++ b/drivers/staging/dgap/dgap_trace.c
@@ -37,6 +37,7 @@
 #include 
 
 #include "dgap_driver.h"
+#include "dgap_trace.h"
 
 #define TRC_TO_CONSOLE 1
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] drivers: dgap: Include appropriate header file in dgap_parse.c

2013-12-21 Thread Rashika Kheria
Include appropriate header file in dgap/dgap_parse.h in dgap_parse.c
because functions dgap_parsefile(), dgap_config_get_useintr(),
dgap_config_get_altpin(), dgap_find_config(),
dgap_config_get_number_of_ports(), dgap_create_config_string() and
dgap_get_config_letters() have their prototype declarations in the
header file.

This eliminates the following warnings in dgap_parse.c:
drivers/staging/dgap/dgap_parse.c:125:5: warning: no previous prototype for 
‘dgap_parsefile’ [-Wmissing-prototypes]
drivers/staging/dgap/dgap_parse.c:1101:6: warning: no previous prototype for 
‘dgap_config_get_useintr’ [-Wmissing-prototypes]
drivers/staging/dgap/dgap_parse.c:1128:6: warning: no previous prototype for 
‘dgap_config_get_altpin’ [-Wmissing-prototypes]
drivers/staging/dgap/dgap_parse.c:1157:15: warning: no previous prototype for 
‘dgap_find_config’ [-Wmissing-prototypes]
drivers/staging/dgap/dgap_parse.c:1223:6: warning: no previous prototype for 
‘dgap_config_get_number_of_ports’ [-Wmissing-prototypes]
drivers/staging/dgap/dgap_parse.c:1252:7: warning: no previous prototype for 
‘dgap_create_config_string’ [-Wmissing-prototypes]
drivers/staging/dgap/dgap_parse.c:1311:7: warning: no previous prototype for 
‘dgap_get_config_letters’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
---
 drivers/staging/dgap/dgap_parse.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/dgap/dgap_parse.c 
b/drivers/staging/dgap/dgap_parse.c
index ff9d194..36fd93d 100644
--- a/drivers/staging/dgap/dgap_parse.c
+++ b/drivers/staging/dgap/dgap_parse.c
@@ -42,6 +42,7 @@
 #include "dgap_types.h"
 #include "dgap_fep5.h"
 #include "dgap_driver.h"
+#include "dgap_parse.h"
 #include "dgap_conf.h"
 
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: sm7xxfb: Mark function as static in sm7xxfb.c

2013-12-21 Thread Josh Triplett
On Sat, Dec 21, 2013 at 03:44:13PM +0530, Rashika Kheria wrote:
> Mark function smtcfb_setmode() as static in sm7xxfb.c because it is not
> used outside this file.
> 
> This eliminates the following warning in sm7xxfb.c:
> drivers/staging/sm7xxfb/sm7xxfb.c:588:6: warning: no previous prototype for 
> ‘smtcfb_setmode’ [-Wmissing-prototypes]
> 
> Signed-off-by: Rashika Kheria 

Reviewed-by: Josh Triplett 

>  drivers/staging/sm7xxfb/sm7xxfb.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c 
> b/drivers/staging/sm7xxfb/sm7xxfb.c
> index ba199ff..f08b216 100644
> --- a/drivers/staging/sm7xxfb/sm7xxfb.c
> +++ b/drivers/staging/sm7xxfb/sm7xxfb.c
> @@ -585,7 +585,7 @@ static void smtc_set_timing(struct smtcfb_info *sfb)
>   }
>  }
>  
> -void smtcfb_setmode(struct smtcfb_info *sfb)
> +static void smtcfb_setmode(struct smtcfb_info *sfb)
>  {
>   switch (sfb->fb.var.bits_per_pixel) {
>   case 32:
> -- 
> 1.7.9.5
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] drivers: dgnc: Include appropriate header file in dgnc_trace.c

2013-12-21 Thread Rashika Kheria
Include appropriate header file dgnc/dgnc_trace.h in dgnc_trace.c
because function dgnc_tracer_free() has its prototype declaration in the
header file.

This eliminates the following warning in dgnc_trace.c:
drivers/staging/dgnc/dgnc_trace.c:180:6: warning: no previous prototype for 
‘dgnc_tracer_free’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
---
 drivers/staging/dgnc/dgnc_trace.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/dgnc/dgnc_trace.c 
b/drivers/staging/dgnc/dgnc_trace.c
index a98b7d4..e2164e4 100644
--- a/drivers/staging/dgnc/dgnc_trace.c
+++ b/drivers/staging/dgnc/dgnc_trace.c
@@ -35,6 +35,7 @@
 #include 
 
 #include "dgnc_driver.h"
+#include "dgnc_trace.h"
 
 #define TRC_TO_CONSOLE 1
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] drivers: dwc2: Mark function as static in core.c

2013-12-21 Thread Rashika Kheria
Mark function dwc2_set_param_uframe_sched() as static in core.c because
it is not used outside this file.

This eliminates the following warning in core.c:
drivers/staging/dwc2/core.c:2739:5: warning: no previous prototype for 
‘dwc2_set_param_uframe_sched’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
---
 drivers/staging/dwc2/core.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c
index 6d001b5..c029cb6 100644
--- a/drivers/staging/dwc2/core.c
+++ b/drivers/staging/dwc2/core.c
@@ -2736,7 +2736,7 @@ int dwc2_get_hwparams(struct dwc2_hsotg *hsotg)
return 0;
 }
 
-int dwc2_set_param_uframe_sched(struct dwc2_hsotg *hsotg, int val)
+static int dwc2_set_param_uframe_sched(struct dwc2_hsotg *hsotg, int val)
 {
int retval = 0;
 
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 2/4] staging: bcm: line over 80 characters in InterfaceIdleMode.c

2013-12-21 Thread Gokulnath A
Hi Dan,

On Sat, Dec 21, 2013 at 2:00 PM, Dan Carpenter  wrote:
> On Fri, Dec 20, 2013 at 08:54:30PM +0530, Gokulnath A wrote:
>> From: Gokulnath Avanashilingam 
>
> No need.  This should come from your email.
>
>>
>> Fixed all the line over 80 characters warning found by
>> checkpatch.pl script.
>>
>> Signed-off-by: Gokulnath Avanashilingam 
>> 
>
Sorry, I used gmail to send patch because of firewall settings.
I will change it in the next patch.

> This doesn't match the email you are using so we can't verify it.
>
>> - if (Adapter->ulPowerSaveMode == 
>> DEVICE_POWERSAVE_MODE_AS_MANUAL_CLOCK_GATING) {
>> + if (Adapter->ulPowerSaveMode ==
>> + DEVICE_POWERSAVE_MODE_AS_MANUAL_CLOCK_GATING) {
>>   uiRegRead = 0x ;
>
> The alignment here should be:
>
> if (Adapter->ulPowerSaveMode ==
> DEVICE_POWERSAVE_MODE_AS_MANUAL_CLOCK_GATING) {
> uiRegRead = 0x;
>
> Notice how the 'A' and the 'D' are aligned?  I used space characters to
> make that work.  Btw, hopefully this will fit on one line after we clean
> up the variable names.
>
Ok, I will modify and take care of it the next series.

>>
>> - bytes = rdmalt(Adapter, DEVICE_INT_OUT_EP_REG1, &uiRegVal, 
>> sizeof(uiRegVal));
>> + bytes = rdmalt(Adapter,
>> + DEVICE_INT_OUT_EP_REG1,
>> + &uiRegVal, sizeof(uiRegVal));
>>   if (bytes < 0) {
>
> The alignment here should be:
>
> bytes = rdmalt(Adapter, DEVICE_INT_OUT_EP_REG1, &uiRegVal,
>sizeof(uiRegVal));
> if (bytes < 0) {
>
> The 'A' and the 's' character are lined up.

Thanks for the review comments. I will modify all these
and send a new patch.
>
> regards,
> dan carpenter
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] drivers: sbe-2t3e3: Mark functions as static in ctrl.c

2013-12-21 Thread Rashika Kheria
Mark functions t3e3_set_loopback(), t3e3_reg_read(), t3e3_reg_write(),
t3e3_port_get(), t3e3_port_set(), t3e3_port_get_stats() and
t3e3_port_del_stats() as static in ctrl.c because they are not used
outside this file.

This eliminates the following warnings in ctrl.c:
drivers/staging/sbe-2t3e3/ctrl.c:34:6: warning: no previous prototype for 
‘t3e3_set_loopback’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:98:6: warning: no previous prototype for 
‘t3e3_reg_read’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:135:6: warning: no previous prototype for 
‘t3e3_reg_write’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:167:6: warning: no previous prototype for 
‘t3e3_port_get’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:172:6: warning: no previous prototype for 
‘t3e3_port_set’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:219:6: warning: no previous prototype for 
‘t3e3_port_get_stats’ [-Wmissing-prototypes]
drivers/staging/sbe-2t3e3/ctrl.c:285:6: warning: no previous prototype for 
‘t3e3_port_del_stats’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
---
 drivers/staging/sbe-2t3e3/ctrl.c |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/sbe-2t3e3/ctrl.c b/drivers/staging/sbe-2t3e3/ctrl.c
index a5825d7..d280bcf 100644
--- a/drivers/staging/sbe-2t3e3/ctrl.c
+++ b/drivers/staging/sbe-2t3e3/ctrl.c
@@ -31,7 +31,7 @@ void t3e3_set_frame_type(struct channel *sc, u32 mode)
sc->p.frame_type = mode;
 }
 
-void t3e3_set_loopback(struct channel *sc, u32 mode)
+static void t3e3_set_loopback(struct channel *sc, u32 mode)
 {
u32 tx, rx;
 
@@ -95,7 +95,7 @@ void t3e3_set_loopback(struct channel *sc, u32 mode)
 }
 
 
-void t3e3_reg_read(struct channel *sc, u32 *reg, u32 *val)
+static void t3e3_reg_read(struct channel *sc, u32 *reg, u32 *val)
 {
u32 i;
 
@@ -132,7 +132,7 @@ void t3e3_reg_read(struct channel *sc, u32 *reg, u32 *val)
}
 }
 
-void t3e3_reg_write(struct channel *sc, u32 *reg)
+static void t3e3_reg_write(struct channel *sc, u32 *reg)
 {
u32 i;
 
@@ -164,12 +164,12 @@ void t3e3_reg_write(struct channel *sc, u32 *reg)
}
 }
 
-void t3e3_port_get(struct channel *sc, t3e3_param_t *param)
+static void t3e3_port_get(struct channel *sc, t3e3_param_t *param)
 {
memcpy(param, &(sc->p), sizeof(t3e3_param_t));
 }
 
-void t3e3_port_set(struct channel *sc, t3e3_param_t *param)
+static void t3e3_port_set(struct channel *sc, t3e3_param_t *param)
 {
if (param->frame_mode != 0xff)
cpld_set_frame_mode(sc, param->frame_mode);
@@ -216,7 +216,7 @@ void t3e3_port_set(struct channel *sc, t3e3_param_t *param)
cpld_set_scrambler(sc, param->scrambler);
 }
 
-void t3e3_port_get_stats(struct channel *sc,
+static void t3e3_port_get_stats(struct channel *sc,
 t3e3_stats_t *stats)
 {
u32 result;
@@ -282,7 +282,7 @@ void t3e3_port_get_stats(struct channel *sc,
memcpy(stats, &(sc->s), sizeof(t3e3_stats_t));
 }
 
-void t3e3_port_del_stats(struct channel *sc)
+static void t3e3_port_del_stats(struct channel *sc)
 {
memset(&(sc->s), 0, sizeof(t3e3_stats_t));
 }
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] drivers: sm7xxfb: Mark function as static in sm7xxfb.c

2013-12-21 Thread Rashika Kheria
Mark function smtcfb_setmode() as static in sm7xxfb.c because it is not
used outside this file.

This eliminates the following warning in sm7xxfb.c:
drivers/staging/sm7xxfb/sm7xxfb.c:588:6: warning: no previous prototype for 
‘smtcfb_setmode’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria 
---
 drivers/staging/sm7xxfb/sm7xxfb.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c 
b/drivers/staging/sm7xxfb/sm7xxfb.c
index ba199ff..f08b216 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -585,7 +585,7 @@ static void smtc_set_timing(struct smtcfb_info *sfb)
}
 }
 
-void smtcfb_setmode(struct smtcfb_info *sfb)
+static void smtcfb_setmode(struct smtcfb_info *sfb)
 {
switch (sfb->fb.var.bits_per_pixel) {
case 32:
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/3] staging: dgnc: fix checkpatch.pl usage of volatile.

2013-12-21 Thread Dan Carpenter
On Fri, Dec 20, 2013 at 10:03:26PM +0530, Stalin Srinivasan wrote:
> From: stalinsrinivasan.s 
> 
> This is a patch to the dgnc_cls.c file that fixes up volatile usage
> warning found by the checkpatch.pl tool
> 

When you're writing a changelog please mention that you fixed the
locking a little.  We normally expect checkpatch.pl fixes will not
change how the program works.

"Checkpatch.pl complained about the use of 'volatile' here.  The locking
was a bit messed up and access to the 'ch' struct should be protected
using the 'ch->ch_lock' lock.  This patch adds proper locking and
removes the bogus 'volatile'."

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/3] staging: dgnc: fix 80 characters per line limitation and code indent warnings.

2013-12-21 Thread Dan Carpenter
On Fri, Dec 20, 2013 at 10:03:25PM +0530, Stalin Srinivasan wrote:
> From: stalinsrinivasan.s 
> 

We get your name from the email header.

> This is a patch to the dgnc_cls.c file that 
> fixes up 80 characters per line and code indent
> warnings found by the checkpatch.pl tool.

And a bunch of other things as well...  Really too many things to review
comfortably.  Split this up into a series of patches.

> @@ -572,7 +588,8 @@ static void cls_param(struct tty_struct *tty)
>  
>   jindex = baud;
>  
> - if ((iindex >= 0) && (iindex < 4) && (jindex >= 0) && (jindex < 
> 16)) {
> + if ((iindex >= 0) && (iindex < 4) && (jindex >= 0) &&
> + (jindex < 16)) {
>   baud = bauds[iindex][jindex];

Do it like this:

if ((iindex >= 0) && (iindex < 4) &&
(jindex >= 0) && (jindex < 16)) {

In other words don't "right align" the code squashed over on the right
hand side of the screen.

> @@ -1350,7 +1382,9 @@ static void cls_send_break(struct channel_t *ch, int 
> msecs)
>   uchar temp = readb(&ch->ch_cls_uart->lcr);
>   writeb((temp | UART_LCR_SBC), &ch->ch_cls_uart->lcr);
>   ch->ch_flags |= (CH_BREAK_SENDING);
> - DPR_IOCTL(("Port %d. Starting UART_LCR_SBC! start: %lx should 
> end: %lx\n",
> + DPR_IOCTL((
> + "Port %d. Starting UART_LCR_SBC! start: %lx "
> + "should end: %lx\n",
>   ch->ch_portnum, jiffies, ch->ch_stop_sending_break));

Don't break up string literals like that.  Do it like:

DPR_IOCTL((Port %d. Starting UART_LCR_SBC! start: %lx should 
end: %lx\n",
  ch->ch_portnum, jiffies, ch->ch_stop_sending_break));

I haven't looked at why this macro needs extra parenthesis in the
caller but I suspect it is something gross...

> @@ -1389,12 +1423,12 @@ static void cls_vpd(struct dgnc_board *brd)
>   if (!re_map_vpdbase)
>   return;
>  
> -/* Store the VPD into our buffer */
> -for (i = 0; i < 0x40; i++) {
> + /* Store the VPD into our buffer */
> + for (i = 0; i < 0x40; i++) {
>   brd->vpd[i] = readb(re_map_vpdbase + i);
> - printk("%x ", brd->vpd[i]);
> -}
> - printk("\n");
> + pr_info("%x ", brd->vpd[i]);
> + }
> + pr_info("\n");
>  

This doesn't work.  pr_info() will put some extra characters at the
start of every call.  You could use pr_cont()...  Officially, pr_cont()
doesn't work either since we have already booted and this has to be
re-written to print one line at a time.

regards,
dan carpenter
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/3] staging: drm/imx: handle framebuffer offsets correctly

2013-12-21 Thread Dan Carpenter
On Fri, Dec 20, 2013 at 05:28:33PM +0100, Philipp Zabel wrote:
> From: Lucas Stach 
> 

Sucky changelog.  Doesn't say what the user visible effects are.

> Signed-off-by: Lucas Stach 
> Signed-off-by: Philipp Zabel 

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 2/4] staging: bcm: line over 80 characters in InterfaceIdleMode.c

2013-12-21 Thread Dan Carpenter
On Fri, Dec 20, 2013 at 08:54:30PM +0530, Gokulnath A wrote:
> From: Gokulnath Avanashilingam 

No need.  This should come from your email.

> 
> Fixed all the line over 80 characters warning found by
> checkpatch.pl script.
> 
> Signed-off-by: Gokulnath Avanashilingam 
> 

This doesn't match the email you are using so we can't verify it.

> - if (Adapter->ulPowerSaveMode == 
> DEVICE_POWERSAVE_MODE_AS_MANUAL_CLOCK_GATING) {
> + if (Adapter->ulPowerSaveMode ==
> + DEVICE_POWERSAVE_MODE_AS_MANUAL_CLOCK_GATING) {
>   uiRegRead = 0x ;

The alignment here should be:

if (Adapter->ulPowerSaveMode ==
DEVICE_POWERSAVE_MODE_AS_MANUAL_CLOCK_GATING) {
uiRegRead = 0x;

Notice how the 'A' and the 'D' are aligned?  I used space characters to
make that work.  Btw, hopefully this will fit on one line after we clean
up the variable names.

>  
> - bytes = rdmalt(Adapter, DEVICE_INT_OUT_EP_REG1, &uiRegVal, 
> sizeof(uiRegVal));
> + bytes = rdmalt(Adapter,
> + DEVICE_INT_OUT_EP_REG1,
> + &uiRegVal, sizeof(uiRegVal));
>   if (bytes < 0) {

The alignment here should be:

bytes = rdmalt(Adapter, DEVICE_INT_OUT_EP_REG1, &uiRegVal,
   sizeof(uiRegVal));
if (bytes < 0) {

The 'A' and the 's' character are lined up.

regards,
dan carpenter
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel