Re: [PATCH] staging: sm750fb: use tabs for indentation

2015-06-24 Thread Dan Carpenter
On Mon, Jun 22, 2015 at 11:30:30AM -0700, Juston Li wrote:
> On Mon, Jun 22, 2015 at 10:46 AM, Dan Carpenter
>  wrote:
> > On Fri, Jun 19, 2015 at 05:50:50PM -0700, Juston Li wrote:
> >>  void sii164ClearInterrupt(void)
> >>  {
> >> -unsigned char detectReg;
> >> + unsigned char detectReg;
> >>
> >> -/* Clear the MDI interrupt */
> >> -detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT);
> >> -i2cWriteReg(SII164_I2C_ADDRESS, SII164_DETECT, detectReg | 
> >> SII164_DETECT_MONITOR_STATE_CLEAR);
> >
> > The patch accidentally deletes this write.
> >
> >> + /* Clear the MDI interrupt */
> >> + detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT);
> >>  }
> >
> > regards,
> > dan carpenter
> 
> This was fixed and patch is now included in the patchset:
> [PATCH v2 00/19] staging: sm750fb: checkpatch.pl fixes

Have you sent this patchset to the list?  I don't see it in my inbox.

regards,
dan carpenter

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


Re: [PATCH 1/1] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-06-24 Thread Vitaly Kuznetsov
Peter Zijlstra  writes:

> On Tue, Jun 23, 2015 at 04:57:05PM +, KY Srinivasan wrote:
>
>> > diff --git a/kernel/cpu.c b/kernel/cpu.c
>> > index 94bbe46..8f35ee6 100644
>> > --- a/kernel/cpu.c
>> > +++ b/kernel/cpu.c
>> > @@ -190,17 +190,19 @@ void cpu_hotplug_done(void)
>> >  void cpu_hotplug_disable(void)
>> >  {
>> >cpu_maps_update_begin();
>> > -  cpu_hotplug_disabled = 1;
>> > +  cpu_hotplug_disabled++;
>> >cpu_maps_update_done();
>> >  }
>> > +EXPORT_SYMBOL_GPL(cpu_hotplug_disable);
>> > 
>> >  void cpu_hotplug_enable(void)
>> >  {
>> >cpu_maps_update_begin();
>> > -  cpu_hotplug_disabled = 0;
>> > +  if (cpu_hotplug_disabled)
>> > +  cpu_hotplug_disabled--;
>
> No that just papers over bugs.
>

Yes, but these bugs are not in Linux. I don't see any other way for a
platform to enable/disable cpu hotplug in runtime.

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


[PATCH v2] staging: rtl8192u: remove bool comparisons

2015-06-24 Thread Luis de Bethencourt
Remove explicit true/false comparisons to bool variables.

Signed-off-by: Luis de Bethencourt 
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c  |  4 ++--
 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c |  2 +-
 drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c  |  4 ++--
 drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c| 12 ++--
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c| 14 +++---
 drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c|  2 +-
 drivers/staging/rtl8192u/r8192U_core.c |  5 +++--
 drivers/staging/rtl8192u/r8192U_dm.c   |  8 
 8 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c 
b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
index b374088..0aa9021 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
@@ -1014,7 +1014,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct 
sk_buff *skb,
goto rx_dropped;
 
// if QoS enabled, should check the sequence for each of the AC
-   if( (ieee->pHTInfo->bCurRxReorderEnable == false) || 
!ieee->current_network.qos_data.active|| !IsDataFrame(skb->data) || 
IsLegacyDataFrame(skb->data)){
+   if ((!ieee->pHTInfo->bCurRxReorderEnable) || 
!ieee->current_network.qos_data.active|| !IsDataFrame(skb->data) || 
IsLegacyDataFrame(skb->data)) {
if (is_duplicate_packet(ieee, hdr))
goto rx_dropped;
 
@@ -1307,7 +1307,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct 
sk_buff *skb,
}
 
 //added by amy for reorder
-   if(ieee->pHTInfo->bCurRxReorderEnable == false ||pTS == NULL){
+   if (!ieee->pHTInfo->bCurRxReorderEnable || pTS == NULL){
 //added by amy for reorder
for(i = 0; inr_subframes; i++) {
struct sk_buff *sub_skb = rxb->subframes[i];
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c 
b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index 1b11acb..810ba71 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -1964,7 +1964,7 @@ static void ieee80211_check_auth_response(struct 
ieee80211_device *ieee,
}
 
if (ieee->current_network.mode == IEEE_N_24G &&
-   bHalfSupportNmode == true) {
+   bHalfSupportNmode) {
netdev_dbg(ieee->dev, "enter half N mode\n");
ieee->bHalfWirelessN24GMode = true;
} else
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c 
b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
index 5353a45..fff8d58 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
@@ -336,12 +336,12 @@ static void ieee80211_tx_query_agg_cap(struct 
ieee80211_device *ieee,
printk("===>can't get TS\n");
return;
}
-   if (pTxTs->TxAdmittedBARecord.bValid == false)
+   if (!pTxTs->TxAdmittedBARecord.bValid)
{
TsStartAddBaProcess(ieee, pTxTs);
goto FORCED_AGG_SETTING;
}
-   else if (pTxTs->bUsingBa == false)
+   else if (!pTxTs->bUsingBa)
{
if 
(SN_LESS(pTxTs->TxAdmittedBARecord.BaStartSeqCtrl.field.SeqNum, 
(pTxTs->TxCurSeq+1)%4096))
pTxTs->bUsingBa = true;
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c 
b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
index 9ff8e05..4fb77e5 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
@@ -364,8 +364,8 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, 
struct sk_buff *skb)
printk(">rx ADDBAREQ from :%pM\n", dst);
 //some other capability is not ready now.
if ((ieee->current_network.qos_data.active == 0) ||
-   (ieee->pHTInfo->bCurrentHTSupport == false)) //||
-   //  (ieee->pStaQos->bEnableRxImmBA == false))
+   (!ieee->pHTInfo->bCurrentHTSupport)) //||
+   //  (!ieee->pStaQos->bEnableRxImmBA))
{
rc = ADDBA_STATUS_REFUSED;
IEEE80211_DEBUG(IEEE80211_DL_ERR, "Failed to reply on ADDBA_REQ 
as some capability is not ready(%d, %d)\n", 
ieee->current_network.qos_data.active, ieee->pHTInfo->bCurrentHTSupport);
@@ -462,8 +462,8 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, 
struct sk_buff *skb)
// Check the capability
// Since we can always receive A-MPDU, we just check if it is u

Re: [PATCH v2] staging: rtl8192u: bool tests don't need comparisons

2015-06-24 Thread Luis de Bethencourt
On Wed, Jun 24, 2015 at 11:05:16AM +0530, Sudip Mukherjee wrote:
> On Tue, Jun 23, 2015 at 03:10:56PM +0200, Luis de Bethencourt wrote:
> > Remove explicit true/false comparations to bool variables.
> > 
> > Signed-off-by: Luis de Bethencourt 
> > ---
> 
> > diff --git a/drivers/staging/rtl8192u/r8192U_dm.c 
> > b/drivers/staging/rtl8192u/r8192U_dm.c
> > index 12dd19e..9946615 100644
> > --- a/drivers/staging/rtl8192u/r8192U_dm.c
> > +++ b/drivers/staging/rtl8192u/r8192U_dm.c
> > @@ -438,7 +438,7 @@ static void dm_bandwidth_autoswitch(struct net_device 
> > *dev)
> >  
> > if (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 || 
> > !priv->ieee80211->bandwidth_auto_switch.bautoswitch_enable)
> > return;
> > -   if (priv->ieee80211->bandwidth_auto_switch.bforced_tx20Mhz == false) { 
> > /* If send packets in 40 Mhz in 20/40 */
> > +   if (!priv->ieee80211->bandwidth_auto_switch.bforced_tx20Mhz) { /* If 
> > send packets in 40 Mhz in 20/40 */
> > if (priv->undecorated_smoothed_pwdb <= 
> > priv->ieee80211->bandwidth_auto_switch.threshold_40Mhzto20Mhz)
> > priv->ieee80211->bandwidth_auto_switch.bforced_tx20Mhz 
> > = true;
> > } else { /* in force send packets in 20 Mhz in 20/40 */
> > @@ -563,7 +563,7 @@ static void dm_TXPowerTrackingCallback_TSSI(struct 
> > net_device *dev)
> > break;
> > }
> > }
> > -   if (viviflag == true) {
> > +   if (viviflag) {
> I think you need to refresh your tree. This change has already been done by:
> c40753b5c7ee ("staging: rtl8192u: Removed redundant bool comparisons in 
> r8192U_dm.c")
> 
> regards
> sudip

True. My bad.

I based the patch on staging's master and not on the staging-next branch.

Commit c40753b5c7ee from Harisangam Sharvari doesn't fix all the redundant bool
comparisons in the module. So I have fixed the patch and sent a second version.

I see you are very active reviewing. Thank you very much for your work,
Luis
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: speakup: replace simple_strtoul() with kstrtoint()

2015-06-24 Thread Luis de Bethencourt
On Wed, Jun 24, 2015 at 10:53:30AM +0530, Sudip Mukherjee wrote:
> On Wed, Jun 24, 2015 at 12:15:52AM +0100, Luis de Bethencourt wrote:
> > On Wed, Jun 24, 2015 at 01:53:33AM +0300, Dan Carpenter wrote:
> > > Nope.  Your patch is totally wrong (buggy).  Please be more careful in
> > > the future.
> > > 
> > > regards,
> > > dan carpenter
> > > 
> > 
> > I saw other commits replace the obsolete simple_strtoul() this way and the
> > documentation makes it look like it is a 1 to 1 replacement.
> > 
> > Sorry about this. I will investigate further to understand why this is buggy
> > and be more careful in the future.
> simple_strtoul returns unsigned long and kstrtoint gives int.
> documentation says to use kstrtoul.
> 
> regards
> sudip

Hello again Sudip :)

simple_strtoul returns an unsigned long, but in this case this is downcasted to
int val. If we use kstrtoul there would be a type warning since the function
expects the reference to an unsigned long. Which is why I used the related
kstrtoint.

Dan has said this is buggy. I have an idea why this might be. I am isolating
the code and playing with it before submitting a second version.

Thanks for the review.

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


Re: [PATCH 1/1] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-06-24 Thread Peter Zijlstra
On Wed, Jun 24, 2015 at 11:43:33AM +0200, Vitaly Kuznetsov wrote:
> Peter Zijlstra  writes:
> > On Tue, Jun 23, 2015 at 04:57:05PM +, KY Srinivasan wrote:
> >
> >> > diff --git a/kernel/cpu.c b/kernel/cpu.c
> >> > index 94bbe46..8f35ee6 100644
> >> > --- a/kernel/cpu.c
> >> > +++ b/kernel/cpu.c
> >> > @@ -190,17 +190,19 @@ void cpu_hotplug_done(void)
> >> >  void cpu_hotplug_disable(void)
> >> >  {
> >> >  cpu_maps_update_begin();
> >> > -cpu_hotplug_disabled = 1;
> >> > +cpu_hotplug_disabled++;
> >> >  cpu_maps_update_done();
> >> >  }
> >> > +EXPORT_SYMBOL_GPL(cpu_hotplug_disable);
> >> > 
> >> >  void cpu_hotplug_enable(void)
> >> >  {
> >> >  cpu_maps_update_begin();
> >> > -cpu_hotplug_disabled = 0;
> >> > +if (cpu_hotplug_disabled)
> >> > +cpu_hotplug_disabled--;
> >
> > No that just papers over bugs.
> 
> Yes, but these bugs are not in Linux. I don't see any other way for a
> platform to enable/disable cpu hotplug in runtime.

Any code using this had better be open source, if not I really don't
care anyway.

That really ought to be:

WARN_ON(--cpu_hotplug_disabled < 0);

You do not make underflows go away.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/1] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-06-24 Thread Thomas Gleixner
On Wed, 24 Jun 2015, Vitaly Kuznetsov wrote:

> Peter Zijlstra  writes:
> 
> > On Tue, Jun 23, 2015 at 04:57:05PM +, KY Srinivasan wrote:
> >
> >> > diff --git a/kernel/cpu.c b/kernel/cpu.c
> >> > index 94bbe46..8f35ee6 100644
> >> > --- a/kernel/cpu.c
> >> > +++ b/kernel/cpu.c
> >> > @@ -190,17 +190,19 @@ void cpu_hotplug_done(void)
> >> >  void cpu_hotplug_disable(void)
> >> >  {
> >> >  cpu_maps_update_begin();
> >> > -cpu_hotplug_disabled = 1;
> >> > +cpu_hotplug_disabled++;
> >> >  cpu_maps_update_done();
> >> >  }
> >> > +EXPORT_SYMBOL_GPL(cpu_hotplug_disable);
> >> > 
> >> >  void cpu_hotplug_enable(void)
> >> >  {
> >> >  cpu_maps_update_begin();
> >> > -cpu_hotplug_disabled = 0;
> >> > +if (cpu_hotplug_disabled)
> >> > +cpu_hotplug_disabled--;
> >
> > No that just papers over bugs.
> >
> 
> Yes, but these bugs are not in Linux. I don't see any other way for a
> platform to enable/disable cpu hotplug in runtime.

What? cpu_hotplug_disable()/enable() do that today. They just do not
support recursion and we have not yet seen any argument WHY that's
required at all.

Thanks,

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


Re: [PATCH 1/1] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-06-24 Thread Vitaly Kuznetsov
Thomas Gleixner  writes:

> On Wed, 24 Jun 2015, Vitaly Kuznetsov wrote:
>
>> Peter Zijlstra  writes:
>> 
>> > On Tue, Jun 23, 2015 at 04:57:05PM +, KY Srinivasan wrote:
>> >
>> >> > diff --git a/kernel/cpu.c b/kernel/cpu.c
>> >> > index 94bbe46..8f35ee6 100644
>> >> > --- a/kernel/cpu.c
>> >> > +++ b/kernel/cpu.c
>> >> > @@ -190,17 +190,19 @@ void cpu_hotplug_done(void)
>> >> >  void cpu_hotplug_disable(void)
>> >> >  {
>> >> > cpu_maps_update_begin();
>> >> > -   cpu_hotplug_disabled = 1;
>> >> > +   cpu_hotplug_disabled++;
>> >> > cpu_maps_update_done();
>> >> >  }
>> >> > +EXPORT_SYMBOL_GPL(cpu_hotplug_disable);
>> >> > 
>> >> >  void cpu_hotplug_enable(void)
>> >> >  {
>> >> > cpu_maps_update_begin();
>> >> > -   cpu_hotplug_disabled = 0;
>> >> > +   if (cpu_hotplug_disabled)
>> >> > +   cpu_hotplug_disabled--;
>> >
>> > No that just papers over bugs.
>> >
>> 
>> Yes, but these bugs are not in Linux. I don't see any other way for a
>> platform to enable/disable cpu hotplug in runtime.
>
> What? cpu_hotplug_disable()/enable() do that today. They just do not
> support recursion and we have not yet seen any argument WHY that's
> required at all.

They do, my patch just exports them. Despite the fact that I have no
specific usecase in my mind at this time I still see a theoretical
possibility of this being useful - when two pieces of code are trying to
enable/disable cpu hotplug simultaneously. Without making
cpu_hotplug_disabled a counter disable->disable->enable sequence will
lead to cpu hotplug being enabled.

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


Re: [PATCH 1/1] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-06-24 Thread Vitaly Kuznetsov
Peter Zijlstra  writes:

> On Wed, Jun 24, 2015 at 11:43:33AM +0200, Vitaly Kuznetsov wrote:
>> Peter Zijlstra  writes:
>> > On Tue, Jun 23, 2015 at 04:57:05PM +, KY Srinivasan wrote:
>> >
>> >> > diff --git a/kernel/cpu.c b/kernel/cpu.c
>> >> > index 94bbe46..8f35ee6 100644
>> >> > --- a/kernel/cpu.c
>> >> > +++ b/kernel/cpu.c
>> >> > @@ -190,17 +190,19 @@ void cpu_hotplug_done(void)
>> >> >  void cpu_hotplug_disable(void)
>> >> >  {
>> >> > cpu_maps_update_begin();
>> >> > -   cpu_hotplug_disabled = 1;
>> >> > +   cpu_hotplug_disabled++;
>> >> > cpu_maps_update_done();
>> >> >  }
>> >> > +EXPORT_SYMBOL_GPL(cpu_hotplug_disable);
>> >> > 
>> >> >  void cpu_hotplug_enable(void)
>> >> >  {
>> >> > cpu_maps_update_begin();
>> >> > -   cpu_hotplug_disabled = 0;
>> >> > +   if (cpu_hotplug_disabled)
>> >> > +   cpu_hotplug_disabled--;
>> >
>> > No that just papers over bugs.
>> 
>> Yes, but these bugs are not in Linux. I don't see any other way for a
>> platform to enable/disable cpu hotplug in runtime.
>
> Any code using this had better be open source, if not I really don't
> care anyway.
>
> That really ought to be:
>
>   WARN_ON(--cpu_hotplug_disabled < 0);
>
> You do not make underflows go away.

Sorry, I was under an impression you were referring to the patch as a
whole :-) Yes, I agree, let's add this WARN_ON().

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


Do It Yourself, Clear, No Slip floor Treatment

2015-06-24 Thread Jason

Do It Yourself, Clear, No Slip floor Treatment

Our Anti-Slip Floor Treatment Makes all types of hard mineral
surface floors slip resistant and safe for a minimum of 4 Years-Guaranteed
Indoors or outdoors

Walk on immediately after a treatment.

Use on ceramic, porcelain and quarry tiles, marble, granite, concrete,
etc.
Typical Applications - Restaurant Kitchen Floors, Hotels, Hospitals,
Office Buildings, etc.

Some of our satisfied customers include: McDonald's, Kroger, Holiday Inn,
Miami Children's Hospital, Pfizer, etc.

Please contact us for additional information.
Jason
Email: york...@sina.com

If you are located outside the U.S., there may be a
Distributorship available in your country. Send for details.

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


Re: [PATCH v4 4/9] staging:lustre: merge socklnd_lib-linux.h into socklnd.h

2015-06-24 Thread Geert Uytterhoeven
Hi James,

On Thu, Jun 11, 2015 at 9:18 PM, James Simmons  wrote:
> From: John L. Hammond 
>
> Originally socklnd_lib-linux.h contained linux specific
> wrappers and defines but since the linux kernel is the
> only supported platform now we can merge what little
> remains in the header into socklnd.h. This is broken
> out of the original patch 12932 that was merged to the
> Intel/OpenSFS branch.
>
> Signed-off-by: John L. Hammond 
> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
> Reviewed-on: http://review.whamcloud.com/12932
> Reviewed-by: Isaac Huang 
> Reviewed-by: James Simmons 
> Reviewed-by: Oleg Drokin 
> Signed-off-by: James Simmons 
> ---
>  .../staging/lustre/lnet/klnds/socklnd/socklnd.h|   39 +-
>  .../lustre/lnet/klnds/socklnd/socklnd_lib-linux.h  |   86 
> 
>  .../lustre/lnet/klnds/socklnd/socklnd_lib.c|4 +-
>  3 files changed, 40 insertions(+), 89 deletions(-)
>  delete mode 100644 
> drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib-linux.h
>
> diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h 
> b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
> index 53275f9..7125eb9 100644
> --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
> +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
> @@ -25,16 +25,40 @@
>   *
>   */
>
> +#ifndef _SOCKLND_SOCKLND_H_
> +#define _SOCKLND_SOCKLND_H_
> +
>  #define DEBUG_PORTAL_ALLOC
>  #define DEBUG_SUBSYSTEM S_LND
>
> -#include "socklnd_lib-linux.h"
> +#include 
> +#include 
> +#include 

Including  first causes a build failure for m68k/allmodconfig:

arch/m68k/include/asm/irq.h:77:12: error: expected '=', ',', ';',
'asm' or '__attribute__' before 'void'
arch/m68k/include/asm/irq.h:78:1: error: unknown type name 'atomic_t'
arch/m68k/include/asm/irq.h:77:12: error: expected '=', ',', ';',
'asm' or '__attribute__' before 'void'
arch/m68k/include/asm/irq.h:78:1: error: unknown type name 'atomic_t'

http://kisskb.ellerman.id.au/kisskb/buildresult/12448922/

Fixing it inside arch/m68k/include/asm/irq.h might cause Include Hell,
so perhaps you can just move the  include below all 
includes?

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 v4 0/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable for CPU offlining prevention

2015-06-24 Thread Vitaly Kuznetsov
Changes since v3:
- add WARN_ON when decreasing cpu_hotplug_disabled [Peter Zijlstra]

Changes since v2:
- Rebase on top of current Greg's char-misc-next tree [K. Y. Srinivasan]

Changes since v1:
- Make cpu_hotplug_disabled a counter [Radim Krčmář]

Export cpu_hotplug_enable/cpu_hotplug_disable functions from cpu.c and use
them instead of altering smp_ops.cpu_disable in Hyper-V vmbus module.

Vitaly Kuznetsov (2):
  cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable
  Drivers: hv: vmbus: use cpu_hotplug_enable/disable

 Documentation/power/suspend-and-cpuhotplug.txt |  6 ++--
 drivers/hv/vmbus_drv.c | 38 +++---
 kernel/cpu.c   | 11 
 3 files changed, 13 insertions(+), 42 deletions(-)

-- 
2.4.2

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


[PATCH v4 2/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable

2015-06-24 Thread Vitaly Kuznetsov
Commit e513229b4c38 ("Drivers: hv: vmbus: prevent cpu offlining on newer
hypervisors") was altering smp_ops.cpu_disable to prevent CPU offlining.
We can bo better by using cpu_hotplug_enable/disable functions instead of
such hard-coding.

Reported-by: Radim Krčmář 
Signed-off-by: Vitaly Kuznetsov 
Signed-off-by: K. Y. Srinivasan 
---
 drivers/hv/vmbus_drv.c | 38 --
 1 file changed, 4 insertions(+), 34 deletions(-)

diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index cf20400..6de65fb 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -763,38 +763,6 @@ static void vmbus_isr(void)
}
 }
 
-#ifdef CONFIG_HOTPLUG_CPU
-static int hyperv_cpu_disable(void)
-{
-   return -ENOSYS;
-}
-
-static void hv_cpu_hotplug_quirk(bool vmbus_loaded)
-{
-   static void *previous_cpu_disable;
-
-   /*
-* Offlining a CPU when running on newer hypervisors (WS2012R2, Win8,
-* ...) is not supported at this moment as channel interrupts are
-* distributed across all of them.
-*/
-
-   if ((vmbus_proto_version == VERSION_WS2008) ||
-   (vmbus_proto_version == VERSION_WIN7))
-   return;
-
-   if (vmbus_loaded) {
-   previous_cpu_disable = smp_ops.cpu_disable;
-   smp_ops.cpu_disable = hyperv_cpu_disable;
-   pr_notice("CPU offlining is not supported by hypervisor\n");
-   } else if (previous_cpu_disable)
-   smp_ops.cpu_disable = previous_cpu_disable;
-}
-#else
-static void hv_cpu_hotplug_quirk(bool vmbus_loaded)
-{
-}
-#endif
 
 /*
  * vmbus_bus_init -Main vmbus driver initialization routine.
@@ -836,7 +804,8 @@ static int vmbus_bus_init(int irq)
if (ret)
goto err_alloc;
 
-   hv_cpu_hotplug_quirk(true);
+   if (vmbus_proto_version > VERSION_WIN7)
+   cpu_hotplug_disable();
 
/*
 * Only register if the crash MSRs are available
@@ -1121,7 +1090,8 @@ static void __exit vmbus_exit(void)
smp_call_function_single(cpu, hv_synic_cleanup, NULL, 1);
}
acpi_bus_unregister_driver(&vmbus_acpi_driver);
-   hv_cpu_hotplug_quirk(false);
+   if (vmbus_proto_version > VERSION_WIN7)
+   cpu_hotplug_enable();
 }
 
 
-- 
2.4.2

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


[PATCH v4 1/2] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable

2015-06-24 Thread Vitaly Kuznetsov
Loaded Hyper-V module will use these functions to disable CPU hotplug
under certain circumstances. Convert cpu_hotplug_disabled to a counter
(protected by cpu_add_remove_lock) to support e.g. disable -> disable ->
enable call sequences.

Signed-off-by: Vitaly Kuznetsov 
---
 Documentation/power/suspend-and-cpuhotplug.txt |  6 +++---
 kernel/cpu.c   | 11 ++-
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/Documentation/power/suspend-and-cpuhotplug.txt 
b/Documentation/power/suspend-and-cpuhotplug.txt
index 2850df3..2fc9095 100644
--- a/Documentation/power/suspend-and-cpuhotplug.txt
+++ b/Documentation/power/suspend-and-cpuhotplug.txt
@@ -72,7 +72,7 @@ More details follow:
 |
 v
Disable regular cpu hotplug
-by setting cpu_hotplug_disabled=1
+by increasing cpu_hotplug_disabled
 |
 v
 Release cpu_add_remove_lock
@@ -89,7 +89,7 @@ Resuming back is likewise, with the counterparts being (in 
the order of
 execution during resume):
 * enable_nonboot_cpus() which involves:
|  Acquire cpu_add_remove_lock
-   |  Reset cpu_hotplug_disabled to 0, thereby enabling regular cpu hotplug
+   |  Decrease cpu_hotplug_disabled, thereby enabling regular cpu hotplug
|  Call _cpu_up() [for all those cpus in the frozen_cpus mask, in a loop]
|  Release cpu_add_remove_lock
v
@@ -120,7 +120,7 @@ after the entire cycle is complete (i.e., suspend + resume).
Acquire cpu_add_remove_lock
 |
 v
-  If cpu_hotplug_disabled is 1
+  If cpu_hotplug_disabled > 0
 return gracefully
 |
 |
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 94bbe46..b6e42d2 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -190,17 +190,18 @@ void cpu_hotplug_done(void)
 void cpu_hotplug_disable(void)
 {
cpu_maps_update_begin();
-   cpu_hotplug_disabled = 1;
+   cpu_hotplug_disabled++;
cpu_maps_update_done();
 }
+EXPORT_SYMBOL_GPL(cpu_hotplug_disable);
 
 void cpu_hotplug_enable(void)
 {
cpu_maps_update_begin();
-   cpu_hotplug_disabled = 0;
+   WARN_ON(--cpu_hotplug_disabled < 0);
cpu_maps_update_done();
 }
-
+EXPORT_SYMBOL_GPL(cpu_hotplug_enable);
 #endif /* CONFIG_HOTPLUG_CPU */
 
 /* Need to know about CPUs going up/down? */
@@ -600,7 +601,7 @@ int disable_nonboot_cpus(void)
if (!error) {
BUG_ON(num_online_cpus() > 1);
/* Make sure the CPUs won't be enabled by someone else */
-   cpu_hotplug_disabled = 1;
+   cpu_hotplug_disabled++;
} else {
pr_err("Non-boot CPUs are not disabled\n");
}
@@ -622,7 +623,7 @@ void __ref enable_nonboot_cpus(void)
 
/* Allow everyone to use the CPU hotplug again */
cpu_maps_update_begin();
-   cpu_hotplug_disabled = 0;
+   WARN_ON(--cpu_hotplug_disabled < 0);
if (cpumask_empty(frozen_cpus))
goto out;
 
-- 
2.4.2

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


[PATCH] staging/lustre/lov: Move target sysfs symlink removal to LOV freeing

2015-06-24 Thread green
From: Oleg Drokin 

This helps to avoid use after free on unmount.

Signed-off-by: Oleg Drokin 
---
 drivers/staging/lustre/lustre/lov/lov_obd.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c 
b/drivers/staging/lustre/lustre/lov/lov_obd.c
index 96c55ac..134b663 100644
--- a/drivers/staging/lustre/lustre/lov/lov_obd.c
+++ b/drivers/staging/lustre/lustre/lov/lov_obd.c
@@ -107,6 +107,10 @@ static void lov_putref(struct obd_device *obd)
/* Disconnect */
__lov_del_obd(obd, tgt);
}
+
+   if (lov->lov_tgts_kobj)
+   kobject_put(lov->lov_tgts_kobj);
+
} else {
mutex_unlock(&lov->lov_lock);
}
@@ -322,9 +326,6 @@ static int lov_disconnect(struct obd_export *exp)
}
}
 
-   if (lov->lov_tgts_kobj)
-   kobject_put(lov->lov_tgts_kobj);
-
obd_putref(obd);
 
 out:
-- 
2.1.0

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


[PATCH] staging/lustre/lnet: Move asm/irq.h include after linux includes

2015-06-24 Thread green
From: Oleg Drokin 

Apparently m86k cannot build if you include asm/irq.h before
linux/* includes and fixing it there is hard.
So just move asm/irq.h include to where it does not cause any problems.

Thanks to Geert Uytterhoeven for getting to the root of it.

Signed-off-by: Oleg Drokin 
---
Geert, it would be great if you can make sure it actually builds with this too.
Thanks!

 drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h 
b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
index 7125eb9..cb91e68 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
@@ -31,7 +31,6 @@
 #define DEBUG_PORTAL_ALLOC
 #define DEBUG_SUBSYSTEM S_LND
 
-#include 
 #include 
 #include 
 #include 
@@ -47,6 +46,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
-- 
2.1.0

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


from david chen

2015-06-24 Thread David Chen
hey. how are you? http://bigappleeventav.com/health/ 
___

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


from david chen

2015-06-24 Thread David Chen
hey. how are you? http://shotznaturalenergy.com/health/ 
___

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


Patch Proof for Greg

2015-06-24 Thread nick
Greetings Greg and others,
I am sending a two part patch fix to prove to Greg I have changed. 
Below this message are the patches for a bug fix in the gma500 driver
code. Unfortunately I haven't gotten a maintainer acknowledge and
therefore it's not in the merge for the 4.1 release.
Nick
Patch 1
  1 From 2d2ddb5d9a2c4fcbae45339d4f775fcde49f36e1 Mon Sep 17 00:00:00 2001
  2 From: Nicholas Krause 
  3 Date: Wed, 13 May 2015 21:36:44 -0400
  4 Subject: [PATCH 1/2] gma500:Add proper use of the variable ret for the
  5  function, psb_mmu_inset_pfn_sequence
  6 
  7 This adds proper use of the variable ret by returning it
  8 at the end of the function, psb_mmu_inset_pfn_sequence for
  9 indicating to callers when an error has occurred. Further
 10 more remove the unneeded double setting of ret to the error
 11 code, -ENOMEM after checking if a call to the function,
 12 psb_mmu_pt_alloc_map_lock is successful.
 13 
 14 Signed-off-by: Nicholas Krause 
 15 ---
 16  drivers/gpu/drm/gma500/mmu.c | 7 +++
 17  1 file changed, 3 insertions(+), 4 deletions(-)
 18 
 19 diff --git a/drivers/gpu/drm/gma500/mmu.c b/drivers/gpu/drm/gma500/mmu.c
 20 index 0eaf11c..d2c4bac 100644
 21 --- a/drivers/gpu/drm/gma500/mmu.c
 22 +++ b/drivers/gpu/drm/gma500/mmu.c
 23 @@ -677,10 +677,9 @@ int psb_mmu_insert_pfn_sequence(struct psb_mmu_pd *pd, 
uint32_t start_pfn,
 24 do {
 25 next = psb_pd_addr_end(addr, end);
 26 pt = psb_mmu_pt_alloc_map_lock(pd, addr);
 27 -   if (!pt) {
 28 -   ret = -ENOMEM;
 29 +   if (!pt)
 30 goto out;
 31 -   }
 32 +
 33 do {
 34 pte = psb_mmu_mask_pte(start_pfn++, type);
 35 psb_mmu_set_pte(pt, addr, pte);
 36 @@ -700,7 +699,7 @@ out:
 37 if (pd->hw_context != -1)
 38 psb_mmu_flush(pd->driver);
 39 
 40 -   return 0;
 41 +   return ret;
 42  }
 43 
 44  int psb_mmu_insert_pages(struct psb_mmu_pd *pd, struct page **pages,
 45 -- 
 46 2.1.4
 47 
Patch 2
  1 From f1802ff61ef69ff9ecaaeadb941d4ed725a0255a Mon Sep 17 00:00:00 2001
  2 From: Nicholas Krause 
  3 Date: Fri, 22 May 2015 23:10:49 -0400
  4 Subject: [PATCH 2/2] gma500: Add new error checking for the function, 
psb_driver_load
  5 
  6 This adds new error checking to the function, psb_driver_load
  7 for when the function, psb_mmu_inset_pfn_sequence fails to grab
  8 memory for the internal function call to psb_pd_addr_end. In
  9 addition we now implement this by checking for a error code
 10 return  value from the internal call to the function,
 11 psb_mmu_inset_pfn_sequence for the function, psb_driver_load.
 12 If a error code is returned we must jump to a new label,
 13 unlock_err in order to deallocate our usage count by
 14 one for the usage of the semaphore, sem before unloading
 15 the drm_device structure and returning a error code.
 16 
 17 Signed-off-by: Nicholas Krause 
 18 ---
 19  drivers/gpu/drm/gma500/psb_drv.c | 4 
 20  1 file changed, 4 insertions(+)
 21 
 22 diff --git a/drivers/gpu/drm/gma500/psb_drv.c 
b/drivers/gpu/drm/gma500/psb_drv.c
 23 index 92e7e57..4cef2c9 100644
 24 --- a/drivers/gpu/drm/gma500/psb_drv.c
 25 +++ b/drivers/gpu/drm/gma500/psb_drv.c
 26 @@ -343,6 +343,8 @@ static int psb_driver_load(struct drm_device *dev, 
unsigned long flags)
 27   dev_priv->stolen_base >> 
PAGE_SHIFT,
 28   pg->gatt_start,
 29   pg->stolen_size >> PAGE_SHIFT, 0);
 30 +   if (ret)
 31 +   goto unlock_err;
 32 up_read(&pg->sem);
 33 
 34 psb_mmu_set_pd_context(psb_mmu_get_default_pd(dev_priv->mmu), 0);
 35 @@ -405,6 +407,8 @@ static int psb_driver_load(struct drm_device *dev, 
unsigned long flags)
 36  #endif
 37 /* Intel drm driver load is done, continue doing pvr load */
 38 return 0;
 39 +unlock_err:
 40 +   up_read(&pg->sem);
 41  out_err:
 42 psb_driver_unload(dev);
 43 return ret;
 44 -- 
 45 2.1.4
 46 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 00/19] staging: sm750fb: checkpatch.pl fixes

2015-06-24 Thread Juston Li
This patch set includes 19 patches fixing indentation, spacing, brace placement
and missing blank lines from checkpatch.pl warnings/errors in staging/sm750fb.

Regards
Juston

-
Changes since v2:

 * Fix Subject
 * Don't rearrange lines in PATCH 01
 * Split up spacing fixes patch by checkpatch errors into 14 patches
 * Split up brace fixes patch by checkpatch errors in 3 patches

-
Diffstat
 drivers/staging/sm750fb/ddk750_chip.c|  15 +-
 drivers/staging/sm750fb/ddk750_chip.h|  12 +-
 drivers/staging/sm750fb/ddk750_display.c | 168 +
 drivers/staging/sm750fb/ddk750_display.h |  11 +-
 drivers/staging/sm750fb/ddk750_dvi.c |  75 ++--
 drivers/staging/sm750fb/ddk750_dvi.h |   3 +-
 drivers/staging/sm750fb/ddk750_help.c|   2 +-
 drivers/staging/sm750fb/ddk750_help.h|   4 +-
 drivers/staging/sm750fb/ddk750_hwi2c.c   | 244 ++---
 drivers/staging/sm750fb/ddk750_mode.c| 164 -
 drivers/staging/sm750fb/ddk750_mode.h|  52 +--
 drivers/staging/sm750fb/ddk750_power.c   | 254 +++---
 drivers/staging/sm750fb/ddk750_power.h   |  11 +-
 drivers/staging/sm750fb/ddk750_reg.h |  18 +-
 drivers/staging/sm750fb/ddk750_sii164.c  | 389 +++--
 drivers/staging/sm750fb/ddk750_sii164.h  |  31 +-
 drivers/staging/sm750fb/sm750.c  |   2 +-
 drivers/staging/sm750fb/sm750.h  |  56 +--
 drivers/staging/sm750fb/sm750_accel.c| 379 ++--
 drivers/staging/sm750fb/sm750_accel.h|   4 +-
 drivers/staging/sm750fb/sm750_cursor.c   |  51 +--
 drivers/staging/sm750fb/sm750_help.h |  28 +-
 drivers/staging/sm750fb/sm750_hw.c   | 218 ++--
 drivers/staging/sm750fb/sm750_hw.h   |  42 +--
 24 files changed, 1154 insertions(+), 1079 deletions(-)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging/lustre/lnet: Move asm/irq.h include after linux includes

2015-06-24 Thread Geert Uytterhoeven
Hi Oleg,

On Wed, Jun 24, 2015 at 4:07 PM,   wrote:
> From: Oleg Drokin 
>
> Apparently m86k cannot build if you include asm/irq.h before
> linux/* includes and fixing it there is hard.
> So just move asm/irq.h include to where it does not cause any problems.
>
> Thanks to Geert Uytterhoeven for getting to the root of it.
>
> Signed-off-by: Oleg Drokin 

Compile-Tested-by: Geert Uytterhoeven 

> ---
> Geert, it would be great if you can make sure it actually builds with this 
> too.
> Thanks!

Thanks, builds fine!

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


Re: [PATCH v2 07/10] staging: wilc1000: remove ununsed variable

2015-06-24 Thread Gujulan Elango, Hari Prasath (H.)
On Tue, Jun 23, 2015 at 11:49:24AM +0300, Dan Carpenter wrote:
> On Mon, Jun 22, 2015 at 01:13:58PM +, Gujulan Elango, Hari Prasath (H.) 
> wrote:
> > From: Hari Prasath Gujulan Elango 
> > 
> > This patch removes ununsed variable 'len'
> > 
> > Signed-off-by: Hari Prasath Gujulan Elango 
> 
> This doesn't work because it's not in the same thread as the original
> email.  You need to use the --in-reply-to option or Greg will not be
> able to find it.
> 
> regards,
> dan carpenter
> 

Thanks Dan,Ok I use mutt. I will have to figure out how to get this done
using Mutt.Also,if any one patch is being dropped,should i resend the
entire patch set as the numbers will differ.

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


[PATCH v3 02/19] staging: sm750fb: remove spacing after open parenthesis

2015-06-24 Thread Juston Li
fixes checkpatch.pl warning:
ERROR: space prohibited after that open parenthesis '('

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/ddk750_chip.c  | 6 +++---
 drivers/staging/sm750fb/ddk750_mode.c  | 2 +-
 drivers/staging/sm750fb/ddk750_power.c | 8 
 drivers/staging/sm750fb/sm750_help.h   | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_chip.c 
b/drivers/staging/sm750fb/ddk750_chip.c
index f4975d2..1069a2d 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -599,9 +599,9 @@ unsigned int formatPllReg(pll_value_t *pPLL)
On returning a 32 bit number, the value can be applied to any PLL in 
the calling function.
 */
ulPllReg =
-   FIELD_SET(  0, PANEL_PLL_CTRL, BYPASS, OFF)
-   | FIELD_SET(  0, PANEL_PLL_CTRL, POWER,  ON)
-   | FIELD_SET(  0, PANEL_PLL_CTRL, INPUT,  OSC)
+   FIELD_SET(0, PANEL_PLL_CTRL, BYPASS, OFF)
+   | FIELD_SET(0, PANEL_PLL_CTRL, POWER,  ON)
+   | FIELD_SET(0, PANEL_PLL_CTRL, INPUT,  OSC)
 #ifndef VALIDATION_CHIP
| FIELD_VALUE(0, PANEL_PLL_CTRL, POD,pPLL->POD)
 #endif
diff --git a/drivers/staging/sm750fb/ddk750_mode.c 
b/drivers/staging/sm750fb/ddk750_mode.c
index 1f93d07..31424b2 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -43,7 +43,7 @@ static unsigned long 
displayControlAdjust_SM750LE(mode_parameter_t *pModeParam,
 
/* Set bit 29:27 of display control register for the right clock */
/* Note that SM750LE only need to supported 7 resoluitons. */
-   if ( x == 800 && y == 600 )
+   if (x == 800 && y == 600 )
dispControl = FIELD_SET(dispControl, CRT_DISPLAY_CTRL, CLK, 
PLL41);
else if (x == 1024 && y == 768)
dispControl = FIELD_SET(dispControl, CRT_DISPLAY_CTRL, CLK, 
PLL65);
diff --git a/drivers/staging/sm750fb/ddk750_power.c 
b/drivers/staging/sm750fb/ddk750_power.c
index b7a108b..44b8eb1 100644
--- a/drivers/staging/sm750fb/ddk750_power.c
+++ b/drivers/staging/sm750fb/ddk750_power.c
@@ -59,17 +59,17 @@ void setPowerMode(unsigned int powerMode)
{
control_value =
 #ifdef VALIDATION_CHIP
-   FIELD_SET(  control_value, POWER_MODE_CTRL, 336CLK, OFF) |
+   FIELD_SET(control_value, POWER_MODE_CTRL, 336CLK, OFF) |
 #endif
-   FIELD_SET(  control_value, POWER_MODE_CTRL, OSC_INPUT,  OFF);
+   FIELD_SET(control_value, POWER_MODE_CTRL, OSC_INPUT,  OFF);
}
else
{
control_value =
 #ifdef VALIDATION_CHIP
-   FIELD_SET(  control_value, POWER_MODE_CTRL, 336CLK, ON) |
+   FIELD_SET(control_value, POWER_MODE_CTRL, 336CLK, ON) |
 #endif
-   FIELD_SET(  control_value, POWER_MODE_CTRL, OSC_INPUT,  ON);
+   FIELD_SET(control_value, POWER_MODE_CTRL, OSC_INPUT,  ON);
}
 
/* Program new power mode. */
diff --git a/drivers/staging/sm750fb/sm750_help.h 
b/drivers/staging/sm750fb/sm750_help.h
index 8ba4f8d..ac0744e 100644
--- a/drivers/staging/sm750fb/sm750_help.h
+++ b/drivers/staging/sm750fb/sm750_help.h
@@ -43,7 +43,7 @@
 
 #define FIELD_CLEAR(reg, field) \
 ( \
-   ~ _F_MASK(reg ## _ ## field) \
+   ~_F_MASK(reg ## _ ## field) \
 )
 
 /* Field Macros */
-- 
2.4.4

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


[PATCH v3 01/19] staging: sm750fb: use tabs for indentation

2015-06-24 Thread Juston Li
Replace spaces with tabs for indentation to fix the checkpatch.pl error
ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/ddk750_display.c | 100 
 drivers/staging/sm750fb/ddk750_display.h |   2 +-
 drivers/staging/sm750fb/ddk750_dvi.c |  66 +++---
 drivers/staging/sm750fb/ddk750_help.h|   4 +-
 drivers/staging/sm750fb/ddk750_hwi2c.c   | 246 +--
 drivers/staging/sm750fb/ddk750_mode.c| 142 +--
 drivers/staging/sm750fb/ddk750_mode.h|  46 ++--
 drivers/staging/sm750fb/ddk750_power.c   | 254 ++--
 drivers/staging/sm750fb/ddk750_power.h   |   8 +-
 drivers/staging/sm750fb/ddk750_reg.h |  18 +-
 drivers/staging/sm750fb/ddk750_sii164.c  | 394 +++
 drivers/staging/sm750fb/ddk750_sii164.h  |  28 +--
 drivers/staging/sm750fb/sm750.h  |  24 +-
 drivers/staging/sm750fb/sm750_accel.c| 370 ++---
 drivers/staging/sm750fb/sm750_accel.h|   4 +-
 drivers/staging/sm750fb/sm750_help.h |  26 +-
 drivers/staging/sm750fb/sm750_hw.c   |  70 +++---
 drivers/staging/sm750fb/sm750_hw.h   |  28 +--
 18 files changed, 915 insertions(+), 915 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.c 
b/drivers/staging/sm750fb/ddk750_display.c
index a3e6720..1c4049f 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -24,7 +24,7 @@ static void setDisplayControl(int ctrl, int dispState)
/* Timing should be enabled first before enabling the 
plane
 * because changing at the same time does not guarantee 
that
 * the plane will also enabled or disabled.
-*/
+*/
ulDisplayCtrlReg = FIELD_SET(ulDisplayCtrlReg,

PANEL_DISPLAY_CTRL, TIMING, ENABLE);
POKE32(PANEL_DISPLAY_CTRL, ulDisplayCtrlReg);
@@ -135,8 +135,8 @@ static void waitNextVerticalSync(int ctrl, int delay)
if(!ctrl){
/* primary controller */
 
-/* Do not wait when the Primary PLL is off or display control is 
already off.
-  This will prevent the software to wait forever. */
+   /* Do not wait when the Primary PLL is off or display control 
is already off.
+  This will prevent the software to wait forever. */
if ((FIELD_GET(PEEK32(PANEL_PLL_CTRL), PANEL_PLL_CTRL, POWER) ==
 PANEL_PLL_CTRL_POWER_OFF) ||
(FIELD_GET(PEEK32(PANEL_DISPLAY_CTRL), 
PANEL_DISPLAY_CTRL, TIMING) ==
@@ -145,26 +145,26 @@ static void waitNextVerticalSync(int ctrl, int delay)
return;
}
 
-while (delay-- > 0)
-{
-/* Wait for end of vsync. */
-do
-{
-status = FIELD_GET(PEEK32(SYSTEM_CTRL),
-   SYSTEM_CTRL,
-   PANEL_VSYNC);
-}
-while (status == SYSTEM_CTRL_PANEL_VSYNC_ACTIVE);
-
-/* Wait for start of vsync. */
-do
-{
-status = FIELD_GET(PEEK32(SYSTEM_CTRL),
-   SYSTEM_CTRL,
-   PANEL_VSYNC);
-}
-while (status == SYSTEM_CTRL_PANEL_VSYNC_INACTIVE);
-}
+   while (delay-- > 0)
+   {
+   /* Wait for end of vsync. */
+   do
+   {
+   status = FIELD_GET(PEEK32(SYSTEM_CTRL),
+  SYSTEM_CTRL,
+  PANEL_VSYNC);
+   }
+   while (status == SYSTEM_CTRL_PANEL_VSYNC_ACTIVE);
+
+   /* Wait for start of vsync. */
+   do
+   {
+   status = FIELD_GET(PEEK32(SYSTEM_CTRL),
+  SYSTEM_CTRL,
+  PANEL_VSYNC);
+   }
+   while (status == SYSTEM_CTRL_PANEL_VSYNC_INACTIVE);
+   }
 
}else{
 
@@ -275,33 +275,33 @@ void ddk750_setLogicalDispOut(disp_output_t output)
 
 int ddk750_initDVIDisp(void)
 {
-/* Initialize DVI. If the dviInit fail and the VendorID or the DeviceID are
-   not zeroed, then set the failure flag. If it is zeroe, it might mean
-   that the system is in Dual CRT Monitor configuration. */
-
-/* De-skew enabled with default 111b value.
-   This will fix some artifacts problem in some mode on board 2.2.
-   Somehow this fix does

[PATCH v3 05/19] staging: sm750fb: remove space between function name and parenthesis

2015-06-24 Thread Juston Li
fixes checkpatch.pl warning:
WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/sm750_accel.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_accel.c 
b/drivers/staging/sm750fb/sm750_accel.c
index 3c61103..bb96ea5 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -278,11 +278,11 @@ unsigned int rop2)   /* ROP value */
{
 
write_dpr(accel, DE_SOURCE,
- FIELD_SET  (0, DE_SOURCE, WRAP, DISABLE) |
+ FIELD_SET(0, DE_SOURCE, WRAP, DISABLE) |
  FIELD_VALUE(0, DE_SOURCE, X_K1, sx)   |
  FIELD_VALUE(0, DE_SOURCE, Y_K2, sy)); /* dpr0 */
write_dpr(accel, DE_DESTINATION,
- FIELD_SET  (0, DE_DESTINATION, WRAP, DISABLE) |
+ FIELD_SET(0, DE_DESTINATION, WRAP, DISABLE) |
  FIELD_VALUE(0, DE_DESTINATION, X,dx)  |
  FIELD_VALUE(0, DE_DESTINATION, Y,dy)); /* dpr04 */
write_dpr(accel, DE_DIMENSION,
@@ -390,11 +390,11 @@ int hw_imageblit(struct lynx_accel *accel,
 /* Note: For 2D Source in Host Write, only X_K1_MONO field is needed, 
and Y_K2 field is not used.
For mono bitmap, use startBit for X_K1. */
write_dpr(accel, DE_SOURCE,
- FIELD_SET  (0, DE_SOURCE, WRAP, DISABLE)   |
+ FIELD_SET(0, DE_SOURCE, WRAP, DISABLE)   |
  FIELD_VALUE(0, DE_SOURCE, X_K1_MONO, startBit)); /* dpr00 */
 
write_dpr(accel, DE_DESTINATION,
- FIELD_SET  (0, DE_DESTINATION, WRAP, DISABLE) |
+ FIELD_SET(0, DE_DESTINATION, WRAP, DISABLE) |
  FIELD_VALUE(0, DE_DESTINATION, X,dx)|
  FIELD_VALUE(0, DE_DESTINATION, Y,dy)); /* dpr04 */
 
-- 
2.4.4

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


[PATCH v3 04/19] staging: sm750fb: add space before open parenthesis

2015-06-24 Thread Juston Li
fixes checkpatch.pl error:
ERROR: space required before the open parenthesis '('

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/ddk750_display.c | 20 +--
 drivers/staging/sm750fb/ddk750_dvi.c |  2 +-
 drivers/staging/sm750fb/ddk750_help.c|  2 +-
 drivers/staging/sm750fb/ddk750_mode.c| 12 +++
 drivers/staging/sm750fb/ddk750_power.c   |  6 ++--
 drivers/staging/sm750fb/sm750_accel.c|  8 ++---
 drivers/staging/sm750fb/sm750_cursor.c   | 32 -
 drivers/staging/sm750fb/sm750_help.h |  2 +-
 drivers/staging/sm750fb/sm750_hw.c   | 62 
 9 files changed, 73 insertions(+), 73 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.c 
b/drivers/staging/sm750fb/ddk750_display.c
index 1c4049f..973dec3 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -49,7 +49,7 @@ static void setDisplayControl(int ctrl, int dispState)
{
cnt++;
POKE32(PANEL_DISPLAY_CTRL, ulDisplayCtrlReg);
-   } while((PEEK32(PANEL_DISPLAY_CTRL) & ~ulReservedBits) 
!=
+   } while ((PEEK32(PANEL_DISPLAY_CTRL) & ~ulReservedBits) 
!=
(ulDisplayCtrlReg & ~ulReservedBits));
printk("Set Panel Plane enbit:after tried %d times\n", 
cnt);
}
@@ -104,7 +104,7 @@ static void setDisplayControl(int ctrl, int dispState)
{
cnt++;
POKE32(CRT_DISPLAY_CTRL, ulDisplayCtrlReg);
-   } while((PEEK32(CRT_DISPLAY_CTRL) & ~ulReservedBits) !=
+   } while ((PEEK32(CRT_DISPLAY_CTRL) & ~ulReservedBits) !=
(ulDisplayCtrlReg & ~ulReservedBits));
printk("Set Crt Plane enbit:after tried %d 
times\n", cnt);
}
@@ -132,7 +132,7 @@ static void setDisplayControl(int ctrl, int dispState)
 static void waitNextVerticalSync(int ctrl, int delay)
 {
unsigned int status;
-   if(!ctrl){
+   if (!ctrl){
/* primary controller */
 
/* Do not wait when the Primary PLL is off or display control 
is already off.
@@ -233,14 +233,14 @@ static void swPanelPowerSequence(int disp, int delay)
 void ddk750_setLogicalDispOut(disp_output_t output)
 {
unsigned int reg;
-   if(output & PNL_2_USAGE){
+   if (output & PNL_2_USAGE){
/* set panel path controller select */
reg = PEEK32(PANEL_DISPLAY_CTRL);
reg = FIELD_VALUE(reg, PANEL_DISPLAY_CTRL, SELECT, (output & 
PNL_2_MASK)>>PNL_2_OFFSET);
POKE32(PANEL_DISPLAY_CTRL, reg);
}
 
-   if(output & CRT_2_USAGE){
+   if (output & CRT_2_USAGE){
/* set crt path controller select */
reg = PEEK32(CRT_DISPLAY_CTRL);
reg = FIELD_VALUE(reg, CRT_DISPLAY_CTRL, SELECT, (output & 
CRT_2_MASK)>>CRT_2_OFFSET);
@@ -250,25 +250,25 @@ void ddk750_setLogicalDispOut(disp_output_t output)
 
}
 
-   if(output & PRI_TP_USAGE){
+   if (output & PRI_TP_USAGE){
/* set primary timing and plane en_bit */
setDisplayControl(0, (output&PRI_TP_MASK)>>PRI_TP_OFFSET);
}
 
-   if(output & SEC_TP_USAGE){
+   if (output & SEC_TP_USAGE){
/* set secondary timing and plane en_bit*/
setDisplayControl(1, (output&SEC_TP_MASK)>>SEC_TP_OFFSET);
}
 
-   if(output & PNL_SEQ_USAGE){
+   if (output & PNL_SEQ_USAGE){
/* set  panel sequence */
swPanelPowerSequence((output&PNL_SEQ_MASK)>>PNL_SEQ_OFFSET, 4);
}
 
-   if(output & DAC_USAGE)
+   if (output & DAC_USAGE)
setDAC((output & DAC_MASK)>>DAC_OFFSET);
 
-   if(output & DPMS_USAGE)
+   if (output & DPMS_USAGE)
ddk750_setDPMS((output & DPMS_MASK) >> DPMS_OFFSET);
 }
 
diff --git a/drivers/staging/sm750fb/ddk750_dvi.c 
b/drivers/staging/sm750fb/ddk750_dvi.c
index 35866fa..4c64436 100644
--- a/drivers/staging/sm750fb/ddk750_dvi.c
+++ b/drivers/staging/sm750fb/ddk750_dvi.c
@@ -45,7 +45,7 @@ int dviInit(
 {
dvi_ctrl_device_t *pCurrentDviCtrl;
pCurrentDviCtrl = g_dcftSupportedDviController;
-   if(pCurrentDviCtrl->pfnInit != NULL)
+   if (pCurrentDviCtrl->pfnInit != NULL)
{
return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, 
dualEdgeClkSelect, hsyncEnable,
vsyncEnable, deskewEnable, 
deskewSetting, continuousSyncEnable,
diff --git a/drivers/staging/sm750fb/ddk750_help.c 
b/drivers/staging/sm750fb/ddk750_help.c
index 1adcafc..93ed958 100644
--- a/drivers/staging/sm750fb/ddk750_help.c
+++ b/drivers/staging/sm750fb/ddk750_help

[PATCH v3 03/19] staging: sm750fb: remove space before close parenthesis

2015-06-24 Thread Juston Li
fixes checkpatch.pl error:
ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/ddk750_chip.c | 2 +-
 drivers/staging/sm750fb/ddk750_mode.c | 2 +-
 drivers/staging/sm750fb/sm750_accel.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_chip.c 
b/drivers/staging/sm750fb/ddk750_chip.c
index 1069a2d..fb1c533 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -268,7 +268,7 @@ int ddk750_initHw(initchip_param_t *pInitParam)
 #endif
 
 
-   if (pInitParam->powerMode != 0 )
+   if (pInitParam->powerMode != 0)
pInitParam->powerMode = 0;
setPowerMode(pInitParam->powerMode);
 
diff --git a/drivers/staging/sm750fb/ddk750_mode.c 
b/drivers/staging/sm750fb/ddk750_mode.c
index 31424b2..4ee9ceb 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -43,7 +43,7 @@ static unsigned long 
displayControlAdjust_SM750LE(mode_parameter_t *pModeParam,
 
/* Set bit 29:27 of display control register for the right clock */
/* Note that SM750LE only need to supported 7 resoluitons. */
-   if (x == 800 && y == 600 )
+   if (x == 800 && y == 600)
dispControl = FIELD_SET(dispControl, CRT_DISPLAY_CTRL, CLK, 
PLL41);
else if (x == 1024 && y == 768)
dispControl = FIELD_SET(dispControl, CRT_DISPLAY_CTRL, CLK, 
PLL65);
diff --git a/drivers/staging/sm750fb/sm750_accel.c 
b/drivers/staging/sm750fb/sm750_accel.c
index 668258c..ed82813 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -363,7 +363,7 @@ int hw_imageblit(struct lynx_accel *accel,
Note that input pitch is BYTE value, but the 2D Pitch register uses
pixel values. Need Byte to pixel conversion.
 */
-   if(bytePerPixel == 3 ){
+   if(bytePerPixel == 3){
dx *= 3;
width *= 3;
startBit *= 3;
-- 
2.4.4

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


[PATCH v3 07/19] staging: sm750fb: add space after close brace

2015-06-24 Thread Juston Li
fixes checkpatch.pl error:
ERROR: space required after that close brace '}'

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/ddk750_display.c |  2 +-
 drivers/staging/sm750fb/ddk750_mode.c|  2 +-
 drivers/staging/sm750fb/ddk750_power.c   |  2 +-
 drivers/staging/sm750fb/sm750.h  |  2 +-
 drivers/staging/sm750fb/sm750_cursor.c   |  8 
 drivers/staging/sm750fb/sm750_hw.c   | 16 
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.c 
b/drivers/staging/sm750fb/ddk750_display.c
index c7171a4..4a3cb86 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -166,7 +166,7 @@ static void waitNextVerticalSync(int ctrl, int delay)
while (status == SYSTEM_CTRL_PANEL_VSYNC_INACTIVE);
}
 
-   }else {
+   } else {
 
/* Do not wait when the Primary PLL is off or display control 
is already off.
   This will prevent the software to wait forever. */
diff --git a/drivers/staging/sm750fb/ddk750_mode.c 
b/drivers/staging/sm750fb/ddk750_mode.c
index efc1fab..3d8b06d 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -109,7 +109,7 @@ static int programModeRegisters(mode_parameter_t 
*pModeParam, pll_value_t *pll)
 
if (getChipType() == SM750LE) {
displayControlAdjust_SM750LE(pModeParam, ulTmpValue);
-   }else {
+   } else {
ulReg = PEEK32(CRT_DISPLAY_CTRL)
& FIELD_CLEAR(CRT_DISPLAY_CTRL, 
VSYNC_PHASE)
& FIELD_CLEAR(CRT_DISPLAY_CTRL, 
HSYNC_PHASE)
diff --git a/drivers/staging/sm750fb/ddk750_power.c 
b/drivers/staging/sm750fb/ddk750_power.c
index e2c0bb3..5f697b8 100644
--- a/drivers/staging/sm750fb/ddk750_power.c
+++ b/drivers/staging/sm750fb/ddk750_power.c
@@ -8,7 +8,7 @@ void ddk750_setDPMS(DPMS_t state)
if (getChipType() == SM750LE) {
value = PEEK32(CRT_DISPLAY_CTRL);
POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, 
DPMS, state));
-   }else {
+   } else {
value = PEEK32(SYSTEM_CTRL);
value= FIELD_VALUE(value, SYSTEM_CTRL, DPMS, state);
POKE32(SYSTEM_CTRL, value);
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index bf894cc..3785afc 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -53,7 +53,7 @@ struct lynx_share{
int mtrr_off;
struct{
int vram;
-   }mtrr;
+   } mtrr;
/* all smi graphic adaptor got below attributes */
unsigned long vidmem_start;
unsigned long vidreg_start;
diff --git a/drivers/staging/sm750fb/sm750_cursor.c 
b/drivers/staging/sm750fb/sm750_cursor.c
index 3a21af9..2fcec32 100644
--- a/drivers/staging/sm750fb/sm750_cursor.c
+++ b/drivers/staging/sm750fb/sm750_cursor.c
@@ -143,7 +143,7 @@ void hw_cursor_setData(struct lynx_cursor *cursor,
if (opr & (0x80 >> j))
{   /* use fg color,id = 2 */
data |= 2 << (j*2);
-   }else {
+   } else {
/* use bg color,id = 1 */
data |= 1 << (j*2);
}
@@ -173,7 +173,7 @@ void hw_cursor_setData(struct lynx_cursor *cursor,
/* need a return */
pstart += offset;
pbuffer = pstart;
-   }else {
+   } else {
pbuffer += sizeof(u16);
}
 
@@ -223,7 +223,7 @@ void hw_cursor_setData2(struct lynx_cursor *cursor,
if (opr & (0x80 >> j))
{   /* use fg color,id = 2 */
data |= 2 << (j*2);
-   }else {
+   } else {
/* use bg color,id = 1 */
data |= 1 << (j*2);
}
@@ -242,7 +242,7 @@ void hw_cursor_setData2(struct lynx_cursor *cursor,
/* need a return */
pstart += offset;
pbuffer = pstart;
-   }else {
+   } else {
pbuffer += sizeof(u16);
}
 
diff --git a/drivers/staging/sm750fb/sm750_hw.c 
b/drivers/staging/sm750fb/sm750_hw.c
index 4dfc6e6..a43f936 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -56,7 +56,7 @@ int hw_sm750_map(struct lynx_share* share, struct pci_dev* 
pdev)
pr_err("mmio failed\n");
ret = -EFAULT;
   

[PATCH v3 06/19] staging: sm750fb: add space before open brace

2015-06-24 Thread Juston Li
fixes checkpatch.pl error:
ERROR: space required before the open brace '{'

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/ddk750_display.c | 14 
 drivers/staging/sm750fb/ddk750_mode.c|  8 ++---
 drivers/staging/sm750fb/ddk750_power.c   |  4 +--
 drivers/staging/sm750fb/sm750_accel.c|  6 ++--
 drivers/staging/sm750fb/sm750_cursor.c   | 14 
 drivers/staging/sm750fb/sm750_hw.c   | 56 
 6 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.c 
b/drivers/staging/sm750fb/ddk750_display.c
index 973dec3..c7171a4 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -132,7 +132,7 @@ static void setDisplayControl(int ctrl, int dispState)
 static void waitNextVerticalSync(int ctrl, int delay)
 {
unsigned int status;
-   if (!ctrl){
+   if (!ctrl) {
/* primary controller */
 
/* Do not wait when the Primary PLL is off or display control 
is already off.
@@ -166,7 +166,7 @@ static void waitNextVerticalSync(int ctrl, int delay)
while (status == SYSTEM_CTRL_PANEL_VSYNC_INACTIVE);
}
 
-   }else{
+   }else {
 
/* Do not wait when the Primary PLL is off or display control 
is already off.
   This will prevent the software to wait forever. */
@@ -233,14 +233,14 @@ static void swPanelPowerSequence(int disp, int delay)
 void ddk750_setLogicalDispOut(disp_output_t output)
 {
unsigned int reg;
-   if (output & PNL_2_USAGE){
+   if (output & PNL_2_USAGE) {
/* set panel path controller select */
reg = PEEK32(PANEL_DISPLAY_CTRL);
reg = FIELD_VALUE(reg, PANEL_DISPLAY_CTRL, SELECT, (output & 
PNL_2_MASK)>>PNL_2_OFFSET);
POKE32(PANEL_DISPLAY_CTRL, reg);
}
 
-   if (output & CRT_2_USAGE){
+   if (output & CRT_2_USAGE) {
/* set crt path controller select */
reg = PEEK32(CRT_DISPLAY_CTRL);
reg = FIELD_VALUE(reg, CRT_DISPLAY_CTRL, SELECT, (output & 
CRT_2_MASK)>>CRT_2_OFFSET);
@@ -250,17 +250,17 @@ void ddk750_setLogicalDispOut(disp_output_t output)
 
}
 
-   if (output & PRI_TP_USAGE){
+   if (output & PRI_TP_USAGE) {
/* set primary timing and plane en_bit */
setDisplayControl(0, (output&PRI_TP_MASK)>>PRI_TP_OFFSET);
}
 
-   if (output & SEC_TP_USAGE){
+   if (output & SEC_TP_USAGE) {
/* set secondary timing and plane en_bit*/
setDisplayControl(1, (output&SEC_TP_MASK)>>SEC_TP_OFFSET);
}
 
-   if (output & PNL_SEQ_USAGE){
+   if (output & PNL_SEQ_USAGE) {
/* set  panel sequence */
swPanelPowerSequence((output&PNL_SEQ_MASK)>>PNL_SEQ_OFFSET, 4);
}
diff --git a/drivers/staging/sm750fb/ddk750_mode.c 
b/drivers/staging/sm750fb/ddk750_mode.c
index cfe528c..efc1fab 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -107,9 +107,9 @@ static int programModeRegisters(mode_parameter_t 
*pModeParam, pll_value_t *pll)
  FIELD_SET(0, CRT_DISPLAY_CTRL, PLANE, 
ENABLE);
 
 
-   if (getChipType() == SM750LE){
+   if (getChipType() == SM750LE) {
displayControlAdjust_SM750LE(pModeParam, ulTmpValue);
-   }else{
+   }else {
ulReg = PEEK32(CRT_DISPLAY_CTRL)
& FIELD_CLEAR(CRT_DISPLAY_CTRL, 
VSYNC_PHASE)
& FIELD_CLEAR(CRT_DISPLAY_CTRL, 
HSYNC_PHASE)
@@ -179,7 +179,7 @@ static int programModeRegisters(mode_parameter_t 
*pModeParam, pll_value_t *pll)
}
 #endif
}
-   else{
+   else {
ret = -1;
}
return ret;
@@ -193,7 +193,7 @@ int ddk750_setModeTiming(mode_parameter_t *parm, 
clock_type_t clock)
pll.clockType = clock;
 
uiActualPixelClk = calcPllValue(parm->pixel_clock, &pll);
-   if (getChipType() == SM750LE){
+   if (getChipType() == SM750LE) {
/* set graphic mode via IO method */
outb_p(0x88, 0x3d4);
outb_p(0x06, 0x3d5);
diff --git a/drivers/staging/sm750fb/ddk750_power.c 
b/drivers/staging/sm750fb/ddk750_power.c
index a2d9ee6..e2c0bb3 100644
--- a/drivers/staging/sm750fb/ddk750_power.c
+++ b/drivers/staging/sm750fb/ddk750_power.c
@@ -5,10 +5,10 @@
 void ddk750_setDPMS(DPMS_t state)
 {
unsigned int value;
-   if (getChipType() == SM750LE){
+   if (getChipType() == SM750LE) {
value = PEEK32(CRT_DISPLAY_CTRL);
POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, 
DPMS, state));
-   }else{
+   }else {
value

[PATCH v3 17/19] staging: sm750fb: move while statement to follow do close brace

2015-06-24 Thread Juston Li
fixes checkpatch.pl error:
ERROR: while should follow close brace '}'

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/ddk750_display.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.c 
b/drivers/staging/sm750fb/ddk750_display.c
index bd2be7f..90c5c9e 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -139,16 +139,14 @@ static void waitNextVerticalSync(int ctrl, int delay)
status = FIELD_GET(PEEK32(SYSTEM_CTRL),
   SYSTEM_CTRL,
   PANEL_VSYNC);
-   }
-   while (status == SYSTEM_CTRL_PANEL_VSYNC_ACTIVE);
+   } while (status == SYSTEM_CTRL_PANEL_VSYNC_ACTIVE);
 
/* Wait for start of vsync. */
do {
status = FIELD_GET(PEEK32(SYSTEM_CTRL),
   SYSTEM_CTRL,
   PANEL_VSYNC);
-   }
-   while (status == SYSTEM_CTRL_PANEL_VSYNC_INACTIVE);
+   } while (status == SYSTEM_CTRL_PANEL_VSYNC_INACTIVE);
}
 
} else {
@@ -168,16 +166,14 @@ static void waitNextVerticalSync(int ctrl, int delay)
status = FIELD_GET(PEEK32(SYSTEM_CTRL),
   SYSTEM_CTRL,
   CRT_VSYNC);
-   }
-   while (status == SYSTEM_CTRL_CRT_VSYNC_ACTIVE);
+   } while (status == SYSTEM_CTRL_CRT_VSYNC_ACTIVE);
 
/* Wait for start of vsync. */
do {
status = FIELD_GET(PEEK32(SYSTEM_CTRL),
   SYSTEM_CTRL,
   CRT_VSYNC);
-   }
-   while (status == SYSTEM_CTRL_CRT_VSYNC_INACTIVE);
+   } while (status == SYSTEM_CTRL_CRT_VSYNC_INACTIVE);
}
}
 }
-- 
2.4.4

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


[PATCH v3 10/19] staging: sm750fb: add space after return type

2015-06-24 Thread Juston Li
fixes checkpatch.pl warning:
WARNING: missing space after return type

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/sm750.h | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index 124921e..320908bc 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -108,12 +108,12 @@ struct lynxfb_crtc {
 
void *priv;
 
-   int(*proc_setMode)(struct lynxfb_crtc*,
+   int (*proc_setMode)(struct lynxfb_crtc*,
struct fb_var_screeninfo*,
struct fb_fix_screeninfo*);
 
-   int(*proc_checkMode)(struct lynxfb_crtc*, struct fb_var_screeninfo*);
-   int(*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort, 
ushort);
+   int (*proc_checkMode)(struct lynxfb_crtc*, struct fb_var_screeninfo*);
+   int (*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort, 
ushort);
void (*clear)(struct lynxfb_crtc*);
 /* pan display */
int (*proc_panDisplay)(struct lynxfb_crtc *,
@@ -140,12 +140,12 @@ struct lynxfb_output {
*/
void *priv;
 
-   int(*proc_setMode)(struct lynxfb_output*,
+   int (*proc_setMode)(struct lynxfb_output*,
struct fb_var_screeninfo*,
struct fb_fix_screeninfo*);
 
-   int(*proc_checkMode)(struct lynxfb_output*, struct fb_var_screeninfo*);
-   int(*proc_setBLANK)(struct lynxfb_output*, int);
+   int (*proc_checkMode)(struct lynxfb_output*, struct fb_var_screeninfo*);
+   int (*proc_setBLANK)(struct lynxfb_output*, int);
void  (*clear)(struct lynxfb_output*);
 };
 
-- 
2.4.4

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


[PATCH v3 08/19] staging: sm750fb: add space after enum definition

2015-06-24 Thread Juston Li
fixes checkpatch.pl warning:
WARNING: missing space after enum definition

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/ddk750_display.h | 2 +-
 drivers/staging/sm750fb/sm750_hw.h   | 8 
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.h 
b/drivers/staging/sm750fb/ddk750_display.h
index 018a661..a7f50cc 100644
--- a/drivers/staging/sm750fb/ddk750_display.h
+++ b/drivers/staging/sm750fb/ddk750_display.h
@@ -129,7 +129,7 @@ typedef enum _disp_output_t
 }
 disp_output_t;
 #else
-typedef enum _disp_output_t{
+typedef enum _disp_output_t {
do_LCD1_PRI = PNL_2_PRI|PRI_TP_ON|PNL_SEQ_ON|DAC_ON,
do_LCD1_SEC = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|DAC_ON,
 #if 0
diff --git a/drivers/staging/sm750fb/sm750_hw.h 
b/drivers/staging/sm750fb/sm750_hw.h
index adc61edf..af2db7c 100644
--- a/drivers/staging/sm750fb/sm750_hw.h
+++ b/drivers/staging/sm750fb/sm750_hw.h
@@ -9,7 +9,7 @@
 #endif
 
 
-enum sm750_pnltype{
+enum sm750_pnltype {
 
sm750_24TFT = 0,/* 24bit tft */
 
@@ -19,7 +19,7 @@ enum sm750_pnltype{
 };
 
 /* vga channel is not concerned  */
-enum sm750_dataflow{
+enum sm750_dataflow {
sm750_simul_pri,/* primary => all head */
 
sm750_simul_sec,/* secondary => all head */
@@ -30,13 +30,13 @@ enum sm750_dataflow{
 };
 
 
-enum sm750_channel{
+enum sm750_channel {
sm750_primary = 0,
/* enum value equal to the register filed data */
sm750_secondary = 1,
 };
 
-enum sm750_path{
+enum sm750_path {
sm750_panel = 1,
sm750_crt = 2,
sm750_pnc = 3,/* panel and crt */
-- 
2.4.4

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


[PATCH v3 11/19] staging: sm750fb: consistent spacing around operators

2015-06-24 Thread Juston Li
fixes checkpatch.pl error:
ERROR: need consistent spacing around ''

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/ddk750_chip.c| 4 ++--
 drivers/staging/sm750fb/ddk750_display.h | 4 ++--
 drivers/staging/sm750fb/sm750.h  | 2 +-
 drivers/staging/sm750fb/sm750_hw.c   | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_chip.c 
b/drivers/staging/sm750fb/ddk750_chip.c
index fb1c533..633201e 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -464,7 +464,7 @@ unsigned int calcPllValue(unsigned int request_orig, 
pll_value_t *pll)
RN = N * request;
quo = RN / input;
rem = RN % input;/* rem always small than 14318181 */
-   fl_quo = (rem * 1 /input);
+   fl_quo = (rem * 1 / input);
 
for (d = xcnt - 1; d >= 0; d--) {
X = xparm[d].value;
@@ -474,7 +474,7 @@ unsigned int calcPllValue(unsigned int request_orig, 
pll_value_t *pll)
M += (fl_quo*X % 1)>5000?1:0;
if (M < 256 && M > 0) {
unsigned int diff;
-   tmpClock = pll->inputFreq *M / N / X;
+   tmpClock = pll->inputFreq * M / N / X;
diff = absDiff(tmpClock, request_orig);
if (diff < miniDiff) {
pll->M = M;
diff --git a/drivers/staging/sm750fb/ddk750_display.h 
b/drivers/staging/sm750fb/ddk750_display.h
index a7f50cc..afdf201 100644
--- a/drivers/staging/sm750fb/ddk750_display.h
+++ b/drivers/staging/sm750fb/ddk750_display.h
@@ -46,7 +46,7 @@
0: both off
 */
 #define SEC_TP_OFFSET 5
-#define SEC_TP_MASK (1<< SEC_TP_OFFSET)
+#define SEC_TP_MASK (1 << SEC_TP_OFFSET)
 #define SEC_TP_USAGE (SEC_TP_MASK << 16)
 #define SEC_TP_ON  ((0x1 << SEC_TP_OFFSET)|SEC_TP_USAGE)
 #define SEC_TP_OFF ((0x0 << SEC_TP_OFFSET)|SEC_TP_USAGE)
@@ -67,7 +67,7 @@
 #define DAC_OFFSET 7
 #define DAC_MASK (1 << DAC_OFFSET)
 #define DAC_USAGE (DAC_MASK << 16)
-#define DAC_ON ((0x0<< DAC_OFFSET)|DAC_USAGE)
+#define DAC_ON ((0x0 << DAC_OFFSET)|DAC_USAGE)
 #define DAC_OFF ((0x1 << DAC_OFFSET)|DAC_USAGE)
 
 /* DPMS only affect D-SUB head
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index 320908bc..b0ff0b5 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -10,7 +10,7 @@
 #define MB(x) ((x)<<20)
 #define MHZ(x) ((x) * 100)
 /* align should be 2,4,8,16 */
-#define PADDING(align, data) (((data)+(align)-1)&(~((align) -1)))
+#define PADDING(align, data) (((data)+(align)-1)&(~((align) - 1)))
 extern int smi_indent;
 
 
diff --git a/drivers/staging/sm750fb/sm750_hw.c 
b/drivers/staging/sm750fb/sm750_hw.c
index a43f936..7a5d522 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -330,7 +330,7 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc* crtc,
modparm.pixel_clock = ps_to_hz(var->pixclock);
modparm.vertical_sync_polarity = (var->sync & FB_SYNC_HOR_HIGH_ACT) ? 
POS:NEG;
modparm.horizontal_sync_polarity = (var->sync & FB_SYNC_VERT_HIGH_ACT) 
? POS:NEG;
-   modparm.clock_phase_polarity = (var->sync& FB_SYNC_COMP_HIGH_ACT) ? 
POS:NEG;
+   modparm.clock_phase_polarity = (var->sync & FB_SYNC_COMP_HIGH_ACT) ? 
POS:NEG;
modparm.horizontal_display_end = var->xres;
modparm.horizontal_sync_width = var->hsync_len;
modparm.horizontal_sync_start = var->xres + var->right_margin;
@@ -369,7 +369,7 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc* crtc,
FIELD_VALUE(0, PANEL_FB_WIDTH, OFFSET, 
fix->line_length));
 
POKE32(PANEL_WINDOW_WIDTH,
-   FIELD_VALUE(0, PANEL_WINDOW_WIDTH, WIDTH, var->xres -1)|
+   FIELD_VALUE(0, PANEL_WINDOW_WIDTH, WIDTH, var->xres - 
1)|
FIELD_VALUE(0, PANEL_WINDOW_WIDTH, X, var->xoffset));
 
POKE32(PANEL_WINDOW_HEIGHT,
-- 
2.4.4

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


[PATCH v3 18/19] staging: sm750fb: remove unnecessary braces

2015-06-24 Thread Juston Li
fixes checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/sm750_accel.c | 9 +++--
 drivers/staging/sm750fb/sm750_hw.c| 6 ++
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_accel.c 
b/drivers/staging/sm750fb/sm750_accel.c
index f7a617e..291a47b 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -259,9 +259,8 @@ unsigned int rop2)   /* ROP value */
FIELD_VALUE(0, DE_WINDOW_WIDTH, DESTINATION, (dPitch/Bpp)) |
FIELD_VALUE(0, DE_WINDOW_WIDTH, SOURCE,  (sPitch/Bpp))); /* dpr3c */
 
-   if (accel->de_wait() != 0) {
+   if (accel->de_wait() != 0)
return -1;
-   }
 
{
 
@@ -332,9 +331,8 @@ int hw_imageblit(struct lynx_accel *accel,
ul4BytesPerScan = ulBytesPerScan & ~3;
ulBytesRemain = ulBytesPerScan & 3;
 
-   if (accel->de_wait() != 0) {
+   if (accel->de_wait() != 0)
return -1;
-   }
 
/* 2D Source Base.
 Use 0 for HOST Blt.
@@ -402,9 +400,8 @@ int hw_imageblit(struct lynx_accel *accel,
/* Write MONO data (line by line) to 2D Engine data port */
for (i = 0; i < height; i++) {
/* For each line, send the data in chunks of 4 bytes */
-   for (j = 0; j < (ul4BytesPerScan/4); j++) {
+   for (j = 0; j < (ul4BytesPerScan/4); j++)
write_dpPort(accel, *(unsigned int *)(pSrcbuf + (j * 
4)));
-   }
 
if (ulBytesRemain) {
memcpy(ajRemain, pSrcbuf+ul4BytesPerScan, 
ulBytesRemain);
diff --git a/drivers/staging/sm750fb/sm750_hw.c 
b/drivers/staging/sm750fb/sm750_hw.c
index 20a8d3b..97a0f63 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -187,9 +187,8 @@ int hw_sm750_inithw(struct lynx_share *share, struct 
pci_dev *pdev)
}
 
/* init 2d engine */
-   if (!share->accel_off) {
+   if (!share->accel_off)
hw_sm750_initAccel(share);
-   }
 
return 0;
 }
@@ -536,9 +535,8 @@ int hw_sm750_setBLANK(struct lynxfb_output* output, int 
blank)
POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(PEEK32(CRT_DISPLAY_CTRL), 
CRT_DISPLAY_CTRL, BLANK, crtdb));
}
 
-   if (output->paths & sm750_panel) {
+   if (output->paths & sm750_panel)
POKE32(PANEL_DISPLAY_CTRL, 
FIELD_VALUE(PEEK32(PANEL_DISPLAY_CTRL), PANEL_DISPLAY_CTRL, DATA, pps));
-   }
 
return 0;
 }
-- 
2.4.4

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


[PATCH v3 15/19] staging: sm750fb: remove unnecessary whitespace

2015-06-24 Thread Juston Li
fixes checkpatch.pl warning:
WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/sm750.c| 2 +-
 drivers/staging/sm750fb/sm750_hw.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 8e201f1..1ff14b2 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -967,7 +967,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int 
index)
var->accel_flags = 0;
var->vmode = FB_VMODE_NONINTERLACED;
 
-   pr_debug("#1 show info->cmap : 
\nstart=%d,len=%d,red=%p,green=%p,blue=%p,transp=%p\n",
+   pr_debug("#1 show info->cmap 
:\nstart=%d,len=%d,red=%p,green=%p,blue=%p,transp=%p\n",
 info->cmap.start, info->cmap.len,
 info->cmap.red, info->cmap.green, info->cmap.blue,
 info->cmap.transp);
diff --git a/drivers/staging/sm750fb/sm750_hw.c 
b/drivers/staging/sm750fb/sm750_hw.c
index 3b8107c..d397382 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -253,7 +253,7 @@ int hw_sm750_output_setMode(struct lynxfb_output* output,
POKE32(DISPLAY_CONTROL_750LE, reg);
}
 
-   pr_info("ddk setlogicdispout done \n");
+   pr_info("ddk setlogicdispout done\n");
return ret;
 }
 
@@ -493,14 +493,14 @@ int hw_sm750_setBLANK(struct lynxfb_output* output, int 
blank)
 #else
case VESA_NO_BLANKING:
 #endif
-   pr_info("flag = FB_BLANK_UNBLANK \n");
+   pr_info("flag = FB_BLANK_UNBLANK\n");
dpms = SYSTEM_CTRL_DPMS_VPHP;
pps = PANEL_DISPLAY_CTRL_DATA_ENABLE;
crtdb = CRT_DISPLAY_CTRL_BLANK_OFF;
break;
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10)
case FB_BLANK_NORMAL:
-   pr_info("flag = FB_BLANK_NORMAL \n");
+   pr_info("flag = FB_BLANK_NORMAL\n");
dpms = SYSTEM_CTRL_DPMS_VPHP;
pps = PANEL_DISPLAY_CTRL_DATA_DISABLE;
crtdb = CRT_DISPLAY_CTRL_BLANK_ON;
-- 
2.4.4

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


[PATCH v3 13/19] staging: sm750fb: add space after semicolon

2015-06-24 Thread Juston Li
fixes checkpatch.pl error:
ERROR: space required after that ';'

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/sm750.h|  2 +-
 drivers/staging/sm750fb/sm750_cursor.c | 12 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index 4f56dcb..2bcd65d 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -168,7 +168,7 @@ struct lynxfb_par {
({ \
unsigned long long hz = 1000*1000*1000*1000ULL; \
do_div(hz, ps); \
-   (unsigned long)hz;})
+   (unsigned long)hz; })
 
 static inline unsigned long ps_to_hz(unsigned int psvalue)
 {
diff --git a/drivers/staging/sm750fb/sm750_cursor.c 
b/drivers/staging/sm750fb/sm750_cursor.c
index 9dabac1..4ed7ca2 100644
--- a/drivers/staging/sm750fb/sm750_cursor.c
+++ b/drivers/staging/sm750fb/sm750_cursor.c
@@ -122,7 +122,7 @@ void hw_cursor_setData(struct lynx_cursor *cursor,
odd=0;
 */
 
-   for (i = 0;i < count;i++)
+   for (i = 0; i < count; i++)
{
color = *pcol++;
mask = *pmsk++;
@@ -137,7 +137,7 @@ void hw_cursor_setData(struct lynx_cursor *cursor,
else
opr = mask & color;
 
-   for (j = 0;j < 8;j++)
+   for (j = 0; j < 8; j++)
{
 
if (opr & (0x80 >> j))
@@ -149,7 +149,7 @@ void hw_cursor_setData(struct lynx_cursor *cursor,
}
}
 #else
-   for (j = 0;j < 8;j++) {
+   for (j = 0; j < 8; j++) {
if (mask & (0x80>>j)) {
if (rop == ROP_XOR)
opr = mask ^ color;
@@ -204,7 +204,7 @@ void hw_cursor_setData2(struct lynx_cursor *cursor,
pstart = cursor->vstart;
pbuffer = pstart;
 
-   for (i = 0;i < count;i++)
+   for (i = 0; i < count; i++)
{
color = *pcol++;
mask = *pmsk++;
@@ -217,7 +217,7 @@ void hw_cursor_setData2(struct lynx_cursor *cursor,
else
opr = mask & color;
 
-   for (j = 0;j < 8;j++)
+   for (j = 0; j < 8; j++)
{
 
if (opr & (0x80 >> j))
@@ -229,7 +229,7 @@ void hw_cursor_setData2(struct lynx_cursor *cursor,
}
}
 #else
-   for (j = 0;j < 8;j++) {
+   for (j = 0; j < 8; j++) {
if (mask & (1

[PATCH v3 12/19] staging: sm750fb: add spaces around operators

2015-06-24 Thread Juston Li
fixes checkpath.pl error:
ERROR: spaces required around that ''

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/ddk750_chip.c  |  2 +-
 drivers/staging/sm750fb/ddk750_power.c |  2 +-
 drivers/staging/sm750fb/sm750.h|  2 +-
 drivers/staging/sm750fb/sm750_accel.c  |  4 ++--
 drivers/staging/sm750fb/sm750_cursor.c | 12 ++--
 drivers/staging/sm750fb/sm750_help.h   |  2 +-
 drivers/staging/sm750fb/sm750_hw.c |  8 
 7 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_chip.c 
b/drivers/staging/sm750fb/ddk750_chip.c
index 633201e..d7435d7 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -471,7 +471,7 @@ unsigned int calcPllValue(unsigned int request_orig, 
pll_value_t *pll)
M = quo*X;
M += fl_quo * X / 1;
/* round step */
-   M += (fl_quo*X % 1)>5000?1:0;
+   M += (fl_quo*X % 1) > 5000?1:0;
if (M < 256 && M > 0) {
unsigned int diff;
tmpClock = pll->inputFreq * M / N / X;
diff --git a/drivers/staging/sm750fb/ddk750_power.c 
b/drivers/staging/sm750fb/ddk750_power.c
index 5f697b8..28d4402 100644
--- a/drivers/staging/sm750fb/ddk750_power.c
+++ b/drivers/staging/sm750fb/ddk750_power.c
@@ -10,7 +10,7 @@ void ddk750_setDPMS(DPMS_t state)
POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, 
DPMS, state));
} else {
value = PEEK32(SYSTEM_CTRL);
-   value= FIELD_VALUE(value, SYSTEM_CTRL, DPMS, state);
+   value = FIELD_VALUE(value, SYSTEM_CTRL, DPMS, state);
POKE32(SYSTEM_CTRL, value);
}
 }
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index b0ff0b5..4f56dcb 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -172,7 +172,7 @@ struct lynxfb_par {
 
 static inline unsigned long ps_to_hz(unsigned int psvalue)
 {
-   unsigned long long numerator=1000*1000*1000*1000ULL;
+   unsigned long long numerator = 1000*1000*1000*1000ULL;
/* 10^12 / picosecond period gives frequency in Hz */
do_div(numerator, psvalue);
return (unsigned long)numerator;
diff --git a/drivers/staging/sm750fb/sm750_accel.c 
b/drivers/staging/sm750fb/sm750_accel.c
index 25dc15b..2ea447e 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -414,10 +414,10 @@ int hw_imageblit(struct lynx_accel *accel,
write_dpr(accel, DE_CONTROL, de_ctrl | deGetTransparency(accel));
 
/* Write MONO data (line by line) to 2D Engine data port */
-   for (i=0; i> j))
@@ -149,7 +149,7 @@ void hw_cursor_setData(struct lynx_cursor *cursor,
}
}
 #else
-   for (j=0;j<8;j++) {
+   for (j = 0;j < 8;j++) {
if (mask & (0x80>>j)) {
if (rop == ROP_XOR)
opr = mask ^ color;
@@ -204,7 +204,7 @@ void hw_cursor_setData2(struct lynx_cursor *cursor,
pstart = cursor->vstart;
pbuffer = pstart;
 
-   for (i=0;i> j))
@@ -229,7 +229,7 @@ void hw_cursor_setData2(struct lynx_cursor *cursor,
}
}
 #else
-   for (j=0;j<8;j++) {
+   for (j = 0;j < 8;j++) {
if (mask & (1chip_clk == 0)
-   parm->chip_clk = (getChipType() == SM750LE)?
+   parm->chip_clk = (getChipType() == SM750LE) ?
DEFAULT_SM750LE_CHIP_CLOCK :
DEFAULT_SM750_CHIP_CLOCK;
 
@@ -421,7 +421,7 @@ void hw_sm750_crtc_clear(struct lynxfb_crtc* crtc)
 int hw_sm750_setColReg(struct lynxfb_crtc* crtc, ushort index,
ushort red, 
ushort green, ushort blue)
 {
-   static unsigned int add[]={PANEL_PALETTE_RAM, CRT_PALETTE_RAM};
+   static unsigned int add[] = {PANEL_PALETTE_RAM, CRT_PALETTE_RAM};
POKE32(add[crtc->channel] + index*4, (red<<16)|(green<<8)|blue);
return 0;
 }
@@ -580,7 +580,7 @@ void hw_sm750_initAccel(struct lynx_share *share)
 
 int hw_sm750le_deWait(void)
 {
-   int i=0x1000;
+   int i = 0x1000;
while (i--) {
unsigned int dwVal = PEEK32(DE_STATE2);
if ((FIELD_GET(dwVal, DE_STATE2, DE_STATUS) == 
DE_STATE2_DE_STATUS_IDLE) &&
@@ -597,7 +597,7 @@ int hw_sm750le_deWait(void)
 
 int hw_sm750_deWait(void)
 {
-   int i=0x1000;
+   int i = 0x1000;
while (i--) {
unsigned int dwVal = PEEK32(SYSTEM_CTRL);
if ((FIELD_GET(dwVal, SYSTEM_CTRL, DE_STATUS) == 

[PATCH v3 16/19] staging: sm750fb: fix brace placement

2015-06-24 Thread Juston Li
Fix brace placement errors caught by checkpatch.pl
ERROR: that open brace { should be on the previous line

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/ddk750_chip.h| 12 +++
 drivers/staging/sm750fb/ddk750_display.c | 54 ++--
 drivers/staging/sm750fb/ddk750_display.h |  3 +-
 drivers/staging/sm750fb/ddk750_dvi.c |  6 ++--
 drivers/staging/sm750fb/ddk750_dvi.h |  3 +-
 drivers/staging/sm750fb/ddk750_hwi2c.c   |  6 ++--
 drivers/staging/sm750fb/ddk750_mode.c| 13 +++-
 drivers/staging/sm750fb/ddk750_mode.h|  6 ++--
 drivers/staging/sm750fb/ddk750_power.c   | 27 +---
 drivers/staging/sm750fb/ddk750_power.h   |  3 +-
 drivers/staging/sm750fb/ddk750_sii164.c  | 16 +++---
 drivers/staging/sm750fb/ddk750_sii164.h  |  3 +-
 drivers/staging/sm750fb/sm750_accel.c| 45 +-
 drivers/staging/sm750fb/sm750_cursor.c   | 23 ++
 drivers/staging/sm750fb/sm750_hw.c   | 27 ++--
 15 files changed, 81 insertions(+), 166 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_chip.h 
b/drivers/staging/sm750fb/ddk750_chip.h
index 4e030e8..6ff0436 100644
--- a/drivers/staging/sm750fb/ddk750_chip.h
+++ b/drivers/staging/sm750fb/ddk750_chip.h
@@ -8,8 +8,7 @@
 #include 
 
 /* This is all the chips recognized by this library */
-typedef enum _logical_chip_type_t
-{
+typedef enum _logical_chip_type_t {
SM_UNKNOWN,
SM718,
SM750,
@@ -18,8 +17,7 @@ typedef enum _logical_chip_type_t
 logical_chip_type_t;
 
 
-typedef enum _clock_type_t
-{
+typedef enum _clock_type_t {
MXCLK_PLL,
PRIMARY_PLL,
SECONDARY_PLL,
@@ -28,8 +26,7 @@ typedef enum _clock_type_t
 }
 clock_type_t;
 
-typedef struct _pll_value_t
-{
+typedef struct _pll_value_t {
clock_type_t clockType;
unsigned long inputFreq; /* Input clock frequency to the PLL */
 
@@ -42,8 +39,7 @@ typedef struct _pll_value_t
 pll_value_t;
 
 /* input struct to initChipParam() function */
-typedef struct _initchip_param_t
-{
+typedef struct _initchip_param_t {
unsigned short powerMode;/* Use power mode 0 or 1 */
unsigned short chipClock;/**
  * Speed of main chip clock in MHz unit
diff --git a/drivers/staging/sm750fb/ddk750_display.c 
b/drivers/staging/sm750fb/ddk750_display.c
index 4a3cb86..bd2be7f 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -15,12 +15,10 @@ static void setDisplayControl(int ctrl, int dispState)
cnt = 0;
 
/* Set the primary display control */
-   if (!ctrl)
-   {
+   if (!ctrl) {
ulDisplayCtrlReg = PEEK32(PANEL_DISPLAY_CTRL);
/* Turn on/off the Panel display control */
-   if (dispState)
-   {
+   if (dispState) {
/* Timing should be enabled first before enabling the 
plane
 * because changing at the same time does not guarantee 
that
 * the plane will also enabled or disabled.
@@ -45,16 +43,13 @@ static void setDisplayControl(int ctrl, int dispState)
 * until a few delay. Need to write
 * and read it a couple times
 */
-   do
-   {
+   do {
cnt++;
POKE32(PANEL_DISPLAY_CTRL, ulDisplayCtrlReg);
} while ((PEEK32(PANEL_DISPLAY_CTRL) & ~ulReservedBits) 
!=
(ulDisplayCtrlReg & ~ulReservedBits));
printk("Set Panel Plane enbit:after tried %d times\n", 
cnt);
-   }
-   else
-   {
+   } else {
/* When turning off, there is no rule on the programming
 * sequence since whenever the clock is off, then it 
does not
 * matter whether the plane is enabled or disabled.
@@ -71,14 +66,11 @@ static void setDisplayControl(int ctrl, int dispState)
POKE32(PANEL_DISPLAY_CTRL, ulDisplayCtrlReg);
}
 
-   }
/* Set the secondary display control */
-   else
-   {
+   } else {
ulDisplayCtrlReg = PEEK32(CRT_DISPLAY_CTRL);
 
-   if (dispState)
-   {
+   if (dispState) {
/* Timing should be enabled first before enabling the 
plane because changing at the
   same time does not guarantee that the plane will 
also enabled or disabled.
   */
@@ -100,16 +92,13 @@ static void setDisplayControl(int ctrl, int dispState)
FIELD_SET(0, CRT_DISPLAY_CTRL, RESERVED_3_MASK, 
ENABLE) |
FIELD_SET(0, CRT_DI

[PATCH v3 14/19] staging: sm750fb: remove trailing whitespace

2015-06-24 Thread Juston Li
fixes checkpatch.pl error:
ERROR: trailing whitespace

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/ddk750_dvi.c  |  2 +-
 drivers/staging/sm750fb/sm750_accel.c |  4 ++--
 drivers/staging/sm750fb/sm750_hw.c| 24 
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_dvi.c 
b/drivers/staging/sm750fb/ddk750_dvi.c
index 4c64436..c42db85 100644
--- a/drivers/staging/sm750fb/ddk750_dvi.c
+++ b/drivers/staging/sm750fb/ddk750_dvi.c
@@ -1,4 +1,4 @@
-#define USE_DVICHIP 
+#define USE_DVICHIP
 #ifdef USE_DVICHIP
 #include "ddk750_help.h"
 #include "ddk750_reg.h"
diff --git a/drivers/staging/sm750fb/sm750_accel.c 
b/drivers/staging/sm750fb/sm750_accel.c
index 2ea447e..866bb99 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -37,7 +37,7 @@ void hw_de_init(struct lynx_accel *accel)
 {
/* setup 2d engine registers */
u32 reg, clr;
-   
+
write_dpr(accel, DE_MASKS, 0x);
 
/* dpr1c */
@@ -82,7 +82,7 @@ void hw_de_init(struct lynx_accel *accel)
 void hw_set2dformat(struct lynx_accel *accel, int fmt)
 {
u32 reg;
-   
+
/* fmt=0,1,2 for 8,16,32,bpp on sm718/750/502 */
reg = read_dpr(accel, DE_STRETCH_FORMAT);
reg = FIELD_VALUE(reg, DE_STRETCH_FORMAT, PIXEL_FORMAT, fmt);
diff --git a/drivers/staging/sm750fb/sm750_hw.c 
b/drivers/staging/sm750fb/sm750_hw.c
index 4941e2a..3b8107c 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -28,7 +28,7 @@ int hw_sm750_map(struct lynx_share* share, struct pci_dev* 
pdev)
 {
int ret;
struct sm750_share *spec_share;
-   
+
 
spec_share = container_of(share, struct sm750_share, share);
ret = 0;
@@ -60,7 +60,7 @@ int hw_sm750_map(struct lynx_share* share, struct pci_dev* 
pdev)
pr_info("mmio virtual addr = %p\n", share->pvReg);
}
 
-   
+
share->accel.dprBase = share->pvReg + DE_BASE_ADDR_TYPE1;
share->accel.dpPortBase = share->pvReg + DE_PORT_ADDR_TYPE1;
 
@@ -104,7 +104,7 @@ int hw_sm750_inithw(struct lynx_share *share, struct 
pci_dev *pdev)
 {
struct sm750_share *spec_share;
struct init_status *parm;
-   
+
spec_share = container_of(share, struct sm750_share, share);
parm = &spec_share->state.initParm;
if (parm->chip_clk == 0)
@@ -202,7 +202,7 @@ int hw_sm750_inithw(struct lynx_share *share, struct 
pci_dev *pdev)
 resource_size_t hw_sm750_getVMSize(struct lynx_share *share)
 {
resource_size_t ret;
-   
+
ret = ddk750_getVMSize();
return ret;
 }
@@ -211,7 +211,7 @@ resource_size_t hw_sm750_getVMSize(struct lynx_share *share)
 
 int hw_sm750_output_checkMode(struct lynxfb_output* output, struct 
fb_var_screeninfo* var)
 {
-   
+
return 0;
 }
 
@@ -222,7 +222,7 @@ int hw_sm750_output_setMode(struct lynxfb_output* output,
int ret;
disp_output_t dispSet;
int channel;
-   
+
ret = 0;
dispSet = 0;
channel = *output->channel;
@@ -259,14 +259,14 @@ int hw_sm750_output_setMode(struct lynxfb_output* output,
 
 void hw_sm750_output_clear(struct lynxfb_output* output)
 {
-   
+
return;
 }
 
 int hw_sm750_crtc_checkMode(struct lynxfb_crtc* crtc, struct 
fb_var_screeninfo* var)
 {
struct lynx_share *share;
-   
+
 
share = container_of(crtc, struct lynxfb_par, crtc)->share;
 
@@ -303,7 +303,7 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc* crtc,
struct lynx_share *share;
struct lynxfb_par *par;
 
-   
+
ret = 0;
par = container_of(crtc, struct lynxfb_par, crtc);
share = par->share;
@@ -414,7 +414,7 @@ exit:
 
 void hw_sm750_crtc_clear(struct lynxfb_crtc* crtc)
 {
-   
+
return;
 }
 
@@ -428,7 +428,7 @@ int hw_sm750_setColReg(struct lynxfb_crtc* crtc, ushort 
index,
 
 int hw_sm750le_setBLANK(struct lynxfb_output * output, int blank) {
int dpms, crtdb;
-   
+
switch (blank)
{
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10)
@@ -483,7 +483,7 @@ int hw_sm750le_setBLANK(struct lynxfb_output * output, int 
blank) {
 int hw_sm750_setBLANK(struct lynxfb_output* output, int blank)
 {
unsigned int dpms, pps, crtdb;
-   
+
dpms = pps = crtdb = 0;
 
switch (blank)
-- 
2.4.4

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


[PATCH v3 09/19] staging: sm750fb: add space after struct definition

2015-06-24 Thread Juston Li
fixes checkpatch.pl warning:
WARNING: missing space after struct definition

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/sm750.h| 12 ++--
 drivers/staging/sm750fb/sm750_hw.h |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index 3785afc..124921e 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -14,7 +14,7 @@
 extern int smi_indent;
 
 
-struct lynx_accel{
+struct lynx_accel {
/* base virtual address of DPR registers */
volatile unsigned char __iomem * dprBase;
/* base virtual address of de data port */
@@ -41,7 +41,7 @@ struct lynx_accel{
 /* lynx_share stands for a presentation of two frame buffer
that use one smi adaptor , it is similar to a basic class of C++
 */
-struct lynx_share{
+struct lynx_share {
/* common members */
u16 devid;
u8 revid;
@@ -68,7 +68,7 @@ struct lynx_share{
void (*resume)(struct lynx_share*);
 };
 
-struct lynx_cursor{
+struct lynx_cursor {
/* cursor width ,height and size */
int w;
int h;
@@ -92,7 +92,7 @@ struct lynx_cursor{
void (*setData)(struct lynx_cursor *, u16, const u8*, const u8*);
 };
 
-struct lynxfb_crtc{
+struct lynxfb_crtc {
unsigned char __iomem *vCursor; /* virtual address of cursor */
unsigned char __iomem *vScreen; /* virtual address of on_screen */
int oCursor; /* cursor address offset in vidmem */
@@ -123,7 +123,7 @@ struct lynxfb_crtc{
struct lynx_cursor cursor;
 };
 
-struct lynxfb_output{
+struct lynxfb_output {
int dpms;
int paths;
/* which paths(s) this output stands for,for sm750:
@@ -149,7 +149,7 @@ struct lynxfb_output{
void  (*clear)(struct lynxfb_output*);
 };
 
-struct lynxfb_par{
+struct lynxfb_par {
/* either 0 or 1 for dual head adaptor,0 is the older one registered */
int index;
unsigned int pseudo_palette[256];
diff --git a/drivers/staging/sm750fb/sm750_hw.h 
b/drivers/staging/sm750fb/sm750_hw.h
index af2db7c..ef0a16f 100644
--- a/drivers/staging/sm750fb/sm750_hw.h
+++ b/drivers/staging/sm750fb/sm750_hw.h
@@ -42,7 +42,7 @@ enum sm750_path {
sm750_pnc = 3,/* panel and crt */
 };
 
-struct init_status{
+struct init_status {
ushort powerMode;
/* below three clocks are in unit of MHZ*/
ushort chip_clk;
@@ -52,7 +52,7 @@ struct init_status{
ushort resetMemory;
 };
 
-struct sm750_state{
+struct sm750_state {
struct init_status initParm;
enum sm750_pnltype pnltype;
enum sm750_dataflow dataflow;
@@ -66,7 +66,7 @@ struct sm750_state{
in C++
  */
 
-struct sm750_share{
+struct sm750_share {
/* it's better to put lynx_share struct to the first place of 
sm750_share */
struct lynx_share share;
struct sm750_state state;
-- 
2.4.4

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


[PATCH v3 19/19] staging: sm750fb: add missing blank line after declarations

2015-06-24 Thread Juston Li
fixes checkpatch.pl:
WARNING: Missing a blank line after declarations

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/ddk750_chip.c| 1 +
 drivers/staging/sm750fb/ddk750_display.c | 2 ++
 drivers/staging/sm750fb/ddk750_dvi.c | 1 +
 drivers/staging/sm750fb/ddk750_mode.c| 3 +++
 drivers/staging/sm750fb/ddk750_power.c   | 1 +
 drivers/staging/sm750fb/ddk750_sii164.c  | 1 +
 drivers/staging/sm750fb/sm750_accel.c| 1 +
 drivers/staging/sm750fb/sm750_cursor.c   | 2 ++
 drivers/staging/sm750fb/sm750_hw.c   | 7 +++
 9 files changed, 19 insertions(+)

diff --git a/drivers/staging/sm750fb/ddk750_chip.c 
b/drivers/staging/sm750fb/ddk750_chip.c
index d7435d7..5e6798e 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -474,6 +474,7 @@ unsigned int calcPllValue(unsigned int request_orig, 
pll_value_t *pll)
M += (fl_quo*X % 1) > 5000?1:0;
if (M < 256 && M > 0) {
unsigned int diff;
+
tmpClock = pll->inputFreq * M / N / X;
diff = absDiff(tmpClock, request_orig);
if (diff < miniDiff) {
diff --git a/drivers/staging/sm750fb/ddk750_display.c 
b/drivers/staging/sm750fb/ddk750_display.c
index 90c5c9e..70e7f10 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -121,6 +121,7 @@ static void setDisplayControl(int ctrl, int dispState)
 static void waitNextVerticalSync(int ctrl, int delay)
 {
unsigned int status;
+
if (!ctrl) {
/* primary controller */
 
@@ -210,6 +211,7 @@ static void swPanelPowerSequence(int disp, int delay)
 void ddk750_setLogicalDispOut(disp_output_t output)
 {
unsigned int reg;
+
if (output & PNL_2_USAGE) {
/* set panel path controller select */
reg = PEEK32(PANEL_DISPLAY_CTRL);
diff --git a/drivers/staging/sm750fb/ddk750_dvi.c 
b/drivers/staging/sm750fb/ddk750_dvi.c
index a18bb4c..a7a2351 100644
--- a/drivers/staging/sm750fb/ddk750_dvi.c
+++ b/drivers/staging/sm750fb/ddk750_dvi.c
@@ -43,6 +43,7 @@ int dviInit(
)
 {
dvi_ctrl_device_t *pCurrentDviCtrl;
+
pCurrentDviCtrl = g_dcftSupportedDviController;
if (pCurrentDviCtrl->pfnInit != NULL) {
return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, 
dualEdgeClkSelect, hsyncEnable,
diff --git a/drivers/staging/sm750fb/ddk750_mode.c 
b/drivers/staging/sm750fb/ddk750_mode.c
index 9d10446..2399b17 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -80,6 +80,7 @@ static int programModeRegisters(mode_parameter_t *pModeParam, 
pll_value_t *pll)
int ret = 0;
int cnt = 0;
unsigned int ulTmpValue, ulReg;
+
if (pll->clockType == SECONDARY_PLL) {
/* programe secondary pixel clock */
POKE32(CRT_PLL_CTRL, formatPllReg(pll));
@@ -120,6 +121,7 @@ static int programModeRegisters(mode_parameter_t 
*pModeParam, pll_value_t *pll)
 
} else if (pll->clockType == PRIMARY_PLL) {
unsigned int ulReservedBits;
+
POKE32(PANEL_PLL_CTRL, formatPllReg(pll));
 
POKE32(PANEL_HORIZONTAL_TOTAL,
@@ -184,6 +186,7 @@ int ddk750_setModeTiming(mode_parameter_t *parm, 
clock_type_t clock)
 {
pll_value_t pll;
unsigned int uiActualPixelClk;
+
pll.inputFreq = DEFAULT_INPUT_CLOCK;
pll.clockType = clock;
 
diff --git a/drivers/staging/sm750fb/ddk750_power.c 
b/drivers/staging/sm750fb/ddk750_power.c
index c545c2d..c8c51be 100644
--- a/drivers/staging/sm750fb/ddk750_power.c
+++ b/drivers/staging/sm750fb/ddk750_power.c
@@ -5,6 +5,7 @@
 void ddk750_setDPMS(DPMS_t state)
 {
unsigned int value;
+
if (getChipType() == SM750LE) {
value = PEEK32(CRT_DISPLAY_CTRL);
POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, 
DPMS, state));
diff --git a/drivers/staging/sm750fb/ddk750_sii164.c 
b/drivers/staging/sm750fb/ddk750_sii164.c
index a5153be..0bdf3db 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.c
+++ b/drivers/staging/sm750fb/ddk750_sii164.c
@@ -340,6 +340,7 @@ void sii164EnableHotPlugDetection(
 )
 {
unsigned char detectReg;
+
detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT);
 
/* Depending on each DVI controller, need to enable the hot plug based 
on each
diff --git a/drivers/staging/sm750fb/sm750_accel.c 
b/drivers/staging/sm750fb/sm750_accel.c
index 291a47b..b75ffbd 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -152,6 +152,7 @@ unsigned int rop2)   /* ROP value */
 {
unsigned int nDirection, de_ctrl;
int opSign;
+
nDirection = LEFT_TO_RIGHT;
/* Direction of ROP2 operation: 1 = Left to Right, (-1) = Righ

Re: [PATCH] staging: sm750fb: use tabs for indentation

2015-06-24 Thread Juston Li
On Wed, Jun 24, 2015 at 2:28 AM, Dan Carpenter  wrote:
> Have you sent this patchset to the list?  I don't see it in my inbox.
>
> regards,
> dan carpenter

Odd, I sent it on Saturday.
Anyways made a change to it and just sent in v3.

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


Re: [PATCH] staging: rtl8192u: ieee80211_rx: Fix incorrect type in assignments

2015-06-24 Thread Gaston Gonzalez
On Tue, Jun 23, 2015 at 12:13:47PM +0200, Arnd Bergmann wrote:
> On Sunday 21 June 2015 19:12:09 Gaston Gonzalez wrote:
> > /* WMM spec P.11: The minimum value for AIFSN shall be 2 */
> > qos_param->aifs[aci] = (qos_param->aifs[aci] < 2) ? 
> > 2:qos_param->aifs[aci];
> >  
> > -   qos_param->cw_min[aci] = ac_params->ecw_min_max & 0x0F;
> > +   qos_param->cw_min[aci] =
> > +   cpu_to_le16(ac_params->ecw_min_max & 0x0F);
> >  
> > -   qos_param->cw_max[aci] = (ac_params->ecw_min_max & 0xF0) >> 
> > 4;
> > +   qos_param->cw_max[aci] =
> > +   cpu_to_le16((ac_params->ecw_min_max & 0xF0) >> 4);
> >  
> > qos_param->flag[aci] =
> > (ac_params->aci_aifsn & 0x10) ? 0x01 : 0x00;
> > -   qos_param->tx_op_limit[aci] = 
> > le16_to_cpu(ac_params->tx_op_limit);
> > +   qos_param->tx_op_limit[aci] = ac_params->tx_op_limit;
> > }
> > return 0;
> 
> This certainly needs a more thorough description of how you determined that
> the byte swaps that you add are in fact required. Did you test it on
> a big-endian machine?
> 
>   Arnd

Hello Arnd,

Thank you for reviewing this.
After your email and reviwing this again I'm getting a bit suspicious
myself, but this is what I saw:

-- First warning:

qos_param->cw_min[aci] is defined as __le16() in ieee80211.h
(ieee80211_qos_parameters structure)

ac_params-> ecw_min_max is defined as u8 in ieee80211.h
(ieee80211_qos_ac_parameter structure)

So the assignment is: __le16 = u8 & 0x0F;

-- Second warning:

qos_param->cw_max[aci] is __le16()
ac_params-> ecw_min_max is u8

The assignment is: __le16 = (u8 & 0xF0) >> 4;

Thus, for the warning 1 and 2, I understand that the result won't be the
same if the machine is big-endian or little-endian, and that's why we
need a cpu_to_le16. Am I missing something?

-- Third warning:

In this case both sides of the assignment are already defined as __le16:

qos_param->tx_op_limit[aci] (ieee80211_qos_parameters structure defined
in ieee80211.h))

ac_params->tx_op_limit (ieee80211_qos_ac_parameter structure defined in
ieee80211.h)

So the assignment is: __le16() = le16_to_cpu(__le16)

Im getting suspicious now, but it sounded wrong to me.
In the case the right part is correct, I guess the left part should be
u16 type?

Regarding the test: I tested it on my machine, but is of course little-
endian :( I could built a qemu virtual machine to test it on a
big-endian emulated platform. Should that work?

Regards,

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


Re: [PATCH] staging: sm750fb: convert pr_err to pr_info

2015-06-24 Thread Gujulan Elango, Hari Prasath (H.)
On Mon, Jun 22, 2015 at 06:15:06PM +0300, Dan Carpenter wrote:
> On Thu, Jun 18, 2015 at 12:56:54PM +, Gujulan Elango, Hari Prasath (H.) 
> wrote:
> > From: Hari Prasath Gujulan Elango 
> > 
> > This patch modifies few debug prints from pr_err() to pr_info() as they
> > fall under that category.
> > 
> 
> They should be dbg or removed.
> 
> regards,
> dan carpenter
> 

Dan,Greg has already merged this patch.Should I now send another patch
to convert this from pr_info() to pr_dbg() ?

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


[PATCHv2] staging: sm750fb: remove redundant __func__ in debug statement

2015-06-24 Thread Gujulan Elango, Hari Prasath (H.)
From: Hari Prasath Gujulan Elango 

This patch removes the redundant __func__ from dynamic debug prints as
the pr_xxx set of functions can be dynamically controlled to include
function name.Also fix a typo in debug statement.

Signed-off-by: Hari Prasath Gujulan Elango 
---
v2:Address Dan Carpenter's review comments to fold them as a
singl patch rather than sending these two changes as separate patches.
---
 drivers/staging/sm750fb/sm750_accel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/sm750fb/sm750_accel.c 
b/drivers/staging/sm750fb/sm750_accel.c
index 6eee4cd..8ea3a61 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -100,7 +100,7 @@ int hw_fillrect(struct lynx_accel *accel,
{
/* int time wait and always busy,seems hardware
 * got something error */
-   pr_debug("%s:De engine always bussy\n", __func__);
+   pr_debug("De engine always busy\n");
return -1;
}
 
-- 
1.9.1
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: speakup: replace simple_strtoul() with kstrtoint()

2015-06-24 Thread Luis de Bethencourt
On Wed, Jun 24, 2015 at 12:19:27PM +0200, Luis de Bethencourt wrote:
> On Wed, Jun 24, 2015 at 10:53:30AM +0530, Sudip Mukherjee wrote:
> > On Wed, Jun 24, 2015 at 12:15:52AM +0100, Luis de Bethencourt wrote:
> > > On Wed, Jun 24, 2015 at 01:53:33AM +0300, Dan Carpenter wrote:
> > > > Nope.  Your patch is totally wrong (buggy).  Please be more careful in
> > > > the future.
> > > > 
> > > > regards,
> > > > dan carpenter
> > > > 
> > > 
> > > I saw other commits replace the obsolete simple_strtoul() this way and the
> > > documentation makes it look like it is a 1 to 1 replacement.
> > > 
> > > Sorry about this. I will investigate further to understand why this is 
> > > buggy
> > > and be more careful in the future.
> > simple_strtoul returns unsigned long and kstrtoint gives int.
> > documentation says to use kstrtoul.
> > 
> > regards
> > sudip
> 
> Hello again Sudip :)
> 
> simple_strtoul returns an unsigned long, but in this case this is downcasted 
> to
> int val. If we use kstrtoul there would be a type warning since the function
> expects the reference to an unsigned long. Which is why I used the related
> kstrtoint.
> 
> Dan has said this is buggy. I have an idea why this might be. I am isolating
> the code and playing with it before submitting a second version.
> 
> Thanks for the review.
> 
> Luis

Hi,

I've investigated the issue and found the two differences between
simple_stroull() and kstrtoull().

The prototypes for reference:
unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int 
base);
int kstrtoul(const char *s, unsigned int base, unsigned long *res);

The first issue is that simple_strtoull() moves the endp pointer to right after
the character where the last digit used is. [0] kstrtoull() doesn't move any
pointers or tell us how many characters of the string it read.

Speakup uses this to convert a string including 3 numbers into 3 ascii codes.
For example "97 98 99", to get 'a', 'b', and 'c'. It loops 3 times using this
function moving the start (cp) to the endp of the previous iteration. [1]

The second issue is that kstrtoull() checks for the number to be alone in the
string. [2] Where rv equals the number of characters read.
s += rv;
if (*s == '\n')
s++;
if (*s) {
return -EINVAL;
}

So in our case before in speakup, after reading the first number s points to
the empty character between 97 and 98 and it returns -EINVAL.

IMHO there are 3 things I could do:
  - Split the initial string into 3, and use simple_strtoull()
  - Implement speakup's 3 number string into 3 chars differently.
  - Remain using simple_strtoull() and ignore the deprecated warnings.

What do you guys think?
I'm inclined towards the first if there is interest.

Thanks,
Luis


[0] 
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/x86/boot/string.c?id=b953c0d234bc72e8489d3bf51a276c5c4ec85345#n118
[1] 
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/staging/speakup/kobjects.c?id=b953c0d234bc72e8489d3bf51a276c5c4ec85345#n284
[2] 
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/lib/kstrtox.c?id=b953c0d234bc72e8489d3bf51a276c5c4ec85345#n91
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] staging : Comedi : comedi_fops : Fixed the return error code

2015-06-24 Thread Santosh
  try_module_get fails when the reference count of the module is not
  allowed to be incremented ,and hence -ENXIO is returned indicating
  no device or address.

Signed-off-by: santhosh pai 
---
 drivers/staging/comedi/comedi_fops.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index d6a37e9..1ab443c 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2606,7 +2606,7 @@ static int comedi_open(struct inode *inode, struct file 
*file)
}
if (dev->attached && dev->use_count == 0) {
if (!try_module_get(dev->driver->module)) {
-   rc = -EPERM;
+   rc = -ENXIO;
goto out;
}
if (dev->open) {
-- 
1.7.9.5

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


[PATCH] Staging:rtl8192u: fixed coding style issues

2015-06-24 Thread Aldo Iljazi
Fixed the following coding style issues:
r819xU_firmware.c:72: ERROR: space required after that ',' (ctx:VxO)
r819xU_firmware.c:72: ERROR: space required before that '&' (ctx:OxV)
r819xU_firmware.c:72: ERROR: space required after that ',' (ctx:VxV)
r819xU_firmware.c:97: ERROR: space required after that ',' (ctx:VxV)
r819xU_firmware.c:248: ERROR: space required after that ',' (ctx:VxO)
r819xU_firmware.c:248: ERROR: space required before that '&' (ctx:OxV)
r819xU_firmware.c:260: ERROR: space required after that ',' (ctx:VxV)
r819xU_firmware.c:260: ERROR: space required after that ',' (ctx:VxV)
r819xU_firmware.c:265: ERROR: space required after that ',' (ctx:VxV)
r819xU_firmware.c:265: ERROR: space required after that ',' (ctx:VxV)
r819xU_firmware.c:325: ERROR: space required after that ',' (ctx:VxV)

Signed-off-by: Aldo Iljazi 
---
 drivers/staging/rtl8192u/r819xU_firmware.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c 
b/drivers/staging/rtl8192u/r819xU_firmware.c
index d27b1e2..a7d3033 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.c
+++ b/drivers/staging/rtl8192u/r819xU_firmware.c
@@ -66,7 +66,7 @@ static bool fw_download_code(struct net_device *dev, u8 
*code_virtual_address,
skb  = dev_alloc_skb(USB_HWDESC_HEADER_LEN + frag_length + 4);
if (!skb)
return false;
-   memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev));
+   memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev));
tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
tcb_desc->queue_index = TXCMD_QUEUE;
tcb_desc->bCmdOrInit = DESC_PACKET_TYPE_INIT;
@@ -91,7 +91,7 @@ static bool fw_download_code(struct net_device *dev, u8 
*code_virtual_address,
if (!priv->ieee80211->check_nic_enough_desc(dev, index) ||
   (!skb_queue_empty(&priv->ieee80211->skb_waitQ[index])) ||
   (priv->ieee80211->queue_stop)) {
-   
RT_TRACE(COMP_FIRMWARE,"=> 
tx full!\n");
+   RT_TRACE(COMP_FIRMWARE, 
"=> tx full!\n");

skb_queue_tail(&priv->ieee80211->skb_waitQ[tcb_desc->queue_index], skb);
} else {
priv->ieee80211->softmac_hard_start_xmit(skb, dev);
@@ -242,7 +242,7 @@ bool init_firmware(struct net_device *dev)
 * or read image file from array. Default load from IMG file
 */
if (rst_opt == OPT_SYSTEM_RESET) {
-   rc = request_firmware(&fw_entry, 
fw_name[init_step],&priv->udev->dev);
+   rc = request_firmware(&fw_entry, fw_name[init_step], 
&priv->udev->dev);
if (rc < 0) {
RT_TRACE(COMP_ERR, "request firmware fail!\n");
goto download_firmware_fail;
@@ -254,12 +254,12 @@ bool init_firmware(struct net_device *dev)
}
 
if (init_step != FW_INIT_STEP1_MAIN) {
-   
memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size);
+   memcpy(pfirmware->firmware_buf, fw_entry->data, 
fw_entry->size);
mapped_file = pfirmware->firmware_buf;
file_length = fw_entry->size;
} else {
memset(pfirmware->firmware_buf, 0, 128);
-   
memcpy(&pfirmware->firmware_buf[128],fw_entry->data,fw_entry->size);
+   memcpy(&pfirmware->firmware_buf[128], 
fw_entry->data, fw_entry->size);
mapped_file = pfirmware->firmware_buf;
file_length = fw_entry->size + 128;
}
@@ -319,7 +319,7 @@ bool init_firmware(struct net_device *dev)
 
rt_status = CPUcheck_firmware_ready(dev);
if (!rt_status) {
-   RT_TRACE(COMP_ERR, "CPUcheck_firmware_ready 
fail(%d)!\n",rt_status);
+   RT_TRACE(COMP_ERR, "CPUcheck_firmware_ready 
fail(%d)!\n", rt_status);
goto download_firmware_fail;
}
 
-- 
1.9.1

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


RE: [lustre-devel] [PATCH 01/12] staging: lustre: fid: Use !x to check for kzalloc failure

2015-06-24 Thread Simmons, James A.
>> Yes.  I know Al's thoughts and kernel style.
>>
>> But Alan Cox and Andreas have both said they think (x == NULL) can help
>> you avoid some kind of boolean vs pointer bugs.  I've had co-workers who
>> did massive seds changing !foo to foo == NULL on our code base.  But
>> I've never seen a real life example of a bug this fixes.
>>
>> To be honest, I've never seen a real life proof that (!foo) code is less
>> buggy.  I should look through the kbuild mailbox...  Hm...  But my other
>> idea of setting up code style readability testing website is also a good
>> one.
>>
>> Linux kernel style is based on Joe Perches finding that 80% of the code
>> prefers one way or the other.  That's a valid method for determining
>> code style.  I bet it normally picks the more readable style but it
>> would be interesting to measure it more formally.
>
>On today's linux-next, I find 3218 tests on the result of kmalloc etc
>using NULL and 14429 without, making 82% without.  The complete semantic
>patch is shown below.

Most people doing something a certain way is not a technical argument. Usually
people do what they are taught. From most people's comments their seems to 
be no technical reason to us one over another. I do have one technical reason 
not
to accept these patches. It is too easy to make a mistake and break things very 
badly.
I don't think it is worth the risk for a non-hard requirement.

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


Re: [PATCH v4 4/9] staging:lustre: merge socklnd_lib-linux.h into socklnd.h

2015-06-24 Thread Guenter Roeck
On Wed, Jun 24, 2015 at 02:37:51PM +0200, Geert Uytterhoeven wrote:
> Hi James,
> 
> On Thu, Jun 11, 2015 at 9:18 PM, James Simmons  wrote:
> > From: John L. Hammond 
> >
> > Originally socklnd_lib-linux.h contained linux specific
> > wrappers and defines but since the linux kernel is the
> > only supported platform now we can merge what little
> > remains in the header into socklnd.h. This is broken
> > out of the original patch 12932 that was merged to the
> > Intel/OpenSFS branch.
> >
> > Signed-off-by: John L. Hammond 
> > Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
> > Reviewed-on: http://review.whamcloud.com/12932
> > Reviewed-by: Isaac Huang 
> > Reviewed-by: James Simmons 
> > Reviewed-by: Oleg Drokin 
> > Signed-off-by: James Simmons 
> > ---
> >  .../staging/lustre/lnet/klnds/socklnd/socklnd.h|   39 +-
> >  .../lustre/lnet/klnds/socklnd/socklnd_lib-linux.h  |   86 
> > 
> >  .../lustre/lnet/klnds/socklnd/socklnd_lib.c|4 +-
> >  3 files changed, 40 insertions(+), 89 deletions(-)
> >  delete mode 100644 
> > drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib-linux.h
> >
> > diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h 
> > b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
> > index 53275f9..7125eb9 100644
> > --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
> > +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
> > @@ -25,16 +25,40 @@
> >   *
> >   */
> >
> > +#ifndef _SOCKLND_SOCKLND_H_
> > +#define _SOCKLND_SOCKLND_H_
> > +
> >  #define DEBUG_PORTAL_ALLOC
> >  #define DEBUG_SUBSYSTEM S_LND
> >
> > -#include "socklnd_lib-linux.h"
> > +#include 
> > +#include 
> > +#include 
> 
> Including  first causes a build failure for m68k/allmodconfig:
> 
> arch/m68k/include/asm/irq.h:77:12: error: expected '=', ',', ';',
> 'asm' or '__attribute__' before 'void'
> arch/m68k/include/asm/irq.h:78:1: error: unknown type name 'atomic_t'
> arch/m68k/include/asm/irq.h:77:12: error: expected '=', ',', ';',
> 'asm' or '__attribute__' before 'void'
> arch/m68k/include/asm/irq.h:78:1: error: unknown type name 'atomic_t'
> 
> http://kisskb.ellerman.id.au/kisskb/buildresult/12448922/
> 
> Fixing it inside arch/m68k/include/asm/irq.h might cause Include Hell,
> so perhaps you can just move the  include below all 
> includes?
> 
Hi Geert,

I have not tested it, but I think the following may fix the problem
while avoiding any include problems. Since pt_regs is used in the file,
one could argue that it should be declared. 

Thanks,
Guenter

--
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 81ca118d58af..28ffa8d59cf0 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -74,6 +74,8 @@ extern unsigned int irq_canonicalize(unsigned int irq);
 #define irq_canonicalize(irq)  (irq)
 #endif /* !(CONFIG_M68020 || CONFIG_M68030 || CONFIG_M68040 || CONFIG_M68060) 
*/
 
+struct pt_regs;
+
 asmlinkage void do_IRQ(int irq, struct pt_regs *regs);
 extern atomic_t irq_err_count;
 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 07/10] staging: wilc1000: remove ununsed variable

2015-06-24 Thread Sudip Mukherjee
On Wed, Jun 24, 2015 at 04:23:23PM +, Gujulan Elango, Hari Prasath (H.) 
wrote:
> On Tue, Jun 23, 2015 at 11:49:24AM +0300, Dan Carpenter wrote:
> > On Mon, Jun 22, 2015 at 01:13:58PM +, Gujulan Elango, Hari Prasath (H.) 
> > wrote:
> > > From: Hari Prasath Gujulan Elango 
> > > 
> > > This patch removes ununsed variable 'len'
> > > 
> > > Signed-off-by: Hari Prasath Gujulan Elango 
> > 
> > This doesn't work because it's not in the same thread as the original
> > email.  You need to use the --in-reply-to option or Greg will not be
> > able to find it.
> > 
> > regards,
> > dan carpenter
> > 
> 
> Thanks Dan,Ok I use mutt. I will have to figure out how to get this done
> using Mutt.
in mutt you will have an option "in-reply-to", you need to use that.
just for example, see https://lkml.org/lkml/2015/6/23/265
this v3 i sent at a later date using reference of the previous patch,
and it went as a reply to the previous patch.

>Also,if any one patch is being dropped,should i resend the
> entire patch set as the numbers will differ.
I think no need to send the entire series, you can just reply to that
patch requesting that particular patch to be dropped. But you should
test properly that dropping that patch will not affect the remaining
patches of the series.

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


Re: [PATCH v2] staging: rtl8192u: bool tests don't need comparisons

2015-06-24 Thread Sudip Mukherjee
On Wed, Jun 24, 2015 at 12:12:01PM +0200, Luis de Bethencourt wrote:
> On Wed, Jun 24, 2015 at 11:05:16AM +0530, Sudip Mukherjee wrote:
> > On Tue, Jun 23, 2015 at 03:10:56PM +0200, Luis de Bethencourt wrote:
> 
> I based the patch on staging's master and not on the staging-next branch.
use staging-testing branch.

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


Re: [PATCH 2/2] staging : Comedi : comedi_fops : Fixed the return error code

2015-06-24 Thread Sudip Mukherjee
On Wed, Jun 24, 2015 at 11:22:24PM +0530, Santosh wrote:
>   try_module_get fails when the reference count of the module is not
>   allowed to be incremented ,and hence -ENXIO is returned indicating
>   no device or address.
1) this patch is 2/2, but then where is your 1/2 patch?
2) You have used "santosh" in your email From: header.
   use "santosh pai" there. It should be same as what you use in your
   Signed-off-by:

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


Re: [PATCH v4 4/9] staging:lustre: merge socklnd_lib-linux.h into socklnd.h

2015-06-24 Thread Geert Uytterhoeven
On Thu, Jun 25, 2015 at 3:33 AM, Guenter Roeck  wrote:
> I have not tested it, but I think the following may fix the problem
> while avoiding any include problems. Since pt_regs is used in the file,
> one could argue that it should be declared.

Indeed. I tried that, but...

> --
> diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
> index 81ca118d58af..28ffa8d59cf0 100644
> --- a/arch/m68k/include/asm/irq.h
> +++ b/arch/m68k/include/asm/irq.h
> @@ -74,6 +74,8 @@ extern unsigned int irq_canonicalize(unsigned int irq);
>  #define irq_canonicalize(irq)  (irq)
>  #endif /* !(CONFIG_M68020 || CONFIG_M68030 || CONFIG_M68040 || 
> CONFIG_M68060) */
>
> +struct pt_regs;
> +
>  asmlinkage void do_IRQ(int irq, struct pt_regs *regs);
>  extern atomic_t irq_err_count;

... asmlinkage and atomic_t are also needed.

I didn't want to risk introducing more breakage by adding (at least) three
more includes.

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