[PATCH 03/10] staging: rtl8723au: Eliminate wrapper ODM_ConfigRFWithHeaderFile23a()

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen jes.soren...@redhat.com

Signed-off-by: Jes Sorensen jes.soren...@redhat.com
---
 drivers/staging/rtl8723au/hal/odm_HWConfig.c   | 15 ---
 drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c |  6 ++
 drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c|  8 ++--
 drivers/staging/rtl8723au/include/odm_HWConfig.h   |  4 
 4 files changed, 4 insertions(+), 29 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/odm_HWConfig.c 
b/drivers/staging/rtl8723au/hal/odm_HWConfig.c
index 388654d..4fc0b06 100644
--- a/drivers/staging/rtl8723au/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723au/hal/odm_HWConfig.c
@@ -423,21 +423,6 @@ void ODM_MacStatusQuery23a(struct dm_odm_t *pDM_Odm, u8 
*pMacStatus, u8 MacID,
 
 }
 
-int ODM_ConfigRFWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
- enum RF_RADIO_PATH Content,
- enum RF_RADIO_PATH eRFPath)
-{
-   ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
-(===ODM_ConfigRFWithHeaderFile23a\n));
-   if (pDM_Odm-SupportICType == ODM_RTL8723A) {
-   if (eRFPath == RF_PATH_A)
-   ODM_ReadAndConfig_RadioA_1T_8723A(pDM_Odm);
-   }
-   ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_TRACE,
-(ODM_ConfigRFWithHeaderFile23a: Radio No %x\n, eRFPath));
-   return _SUCCESS;
-}
-
 int ODM_ConfigBBWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
  enum odm_bb_config_type ConfigType)
 {
diff --git a/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c 
b/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
index d076e14..8f883d9 100644
--- a/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
+++ b/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
@@ -54,8 +54,7 @@ void odm_ConfigRF_RadioA_8723A(struct dm_odm_t *pDM_Odm,
odm_ConfigRFReg_8723A(pDM_Odm, Addr, Data, RF_PATH_A,
  Addr|maskforPhySet);
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
-(=== ODM_ConfigRFWithHeaderFile23a: [RadioA] %08X 
%08X\n,
-Addr, Data));
+(=== %s: [RadioA] %08X %08X\n, __func__, Addr, Data));
 }
 
 void odm_ConfigRF_RadioB_8723A(struct dm_odm_t *pDM_Odm,
@@ -69,8 +68,7 @@ void odm_ConfigRF_RadioB_8723A(struct dm_odm_t *pDM_Odm,
odm_ConfigRFReg_8723A(pDM_Odm, Addr, Data, RF_PATH_B,
  Addr|maskforPhySet);
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
-(=== ODM_ConfigRFWithHeaderFile23a: [RadioB] %08X 
%08X\n,
-Addr, Data));
+(=== %s: [RadioB] %08X %08X\n, __func__, Addr, Data));
 }
 
 void odm_ConfigMAC_8723A(struct dm_odm_t *pDM_Odm,
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c 
b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c
index 6686a29..2dc0886 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c
@@ -455,13 +455,9 @@ static int phy_RF6052_Config_ParaFile(struct rtw_adapter 
*Adapter)
/*Initialize RF fom connfiguration file*/
switch (eRFPath) {
case RF_PATH_A:
+   ODM_ReadAndConfig_RadioA_1T_8723A(pHalData-odmpriv);
+   break;
case RF_PATH_B:
-   if (ODM_ConfigRFWithHeaderFile23a(pHalData-odmpriv,
- (enum RF_RADIO_PATH)
- eRFPath,
- (enum RF_RADIO_PATH)
- eRFPath) == _FAIL)
-   rtStatus = _FAIL;
break;
}
 
diff --git a/drivers/staging/rtl8723au/include/odm_HWConfig.h 
b/drivers/staging/rtl8723au/include/odm_HWConfig.h
index 6b98e05..f8236ca 100644
--- a/drivers/staging/rtl8723au/include/odm_HWConfig.h
+++ b/drivers/staging/rtl8723au/include/odm_HWConfig.h
@@ -160,10 +160,6 @@ void ODM_MacStatusQuery23a(struct dm_odm_t *pDM_Odm,
bool bPacketBeacon
 );
 
-int ODM_ConfigRFWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
- enum RF_RADIO_PATH Content,
- enum RF_RADIO_PATH eRFPath);
-
 int ODM_ConfigBBWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
  enum odm_bb_config_type ConfigType);
 
-- 
1.9.3

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


[PATCH 01/10] staging: rtl8723au: Remove horrendous code obfuscation READ_AND_CONFIG*()

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen jes.soren...@redhat.com

Signed-off-by: Jes Sorensen jes.soren...@redhat.com
---
 drivers/staging/rtl8723au/hal/odm_HWConfig.c | 18 --
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/odm_HWConfig.c 
b/drivers/staging/rtl8723au/hal/odm_HWConfig.c
index 82b1b83..388654d 100644
--- a/drivers/staging/rtl8723au/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723au/hal/odm_HWConfig.c
@@ -19,11 +19,6 @@
 
 #include odm_precomp.h
 
-#define READ_AND_CONFIG READ_AND_CONFIG_MP
-
-#define READ_AND_CONFIG_MP(ic, txt) (ODM_ReadAndConfig##txt##ic(pDM_Odm))
-#define READ_AND_CONFIG_TC(ic, txt) (ODM_ReadAndConfig_TC##txt##ic(pDM_Odm))
-
 static u8 odm_QueryRxPwrPercentage(s8 AntPower)
 {
if ((AntPower = -100) || (AntPower = 20))
@@ -436,12 +431,7 @@ int ODM_ConfigRFWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
 (===ODM_ConfigRFWithHeaderFile23a\n));
if (pDM_Odm-SupportICType == ODM_RTL8723A) {
if (eRFPath == RF_PATH_A)
-   READ_AND_CONFIG_MP(8723A, _RadioA_1T_);
-
-   ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
-( === ODM_ConfigRFWithHeaderFile23a() 
Radio_A:Rtl8723RadioA_1TArray\n));
-   ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
-( === ODM_ConfigRFWithHeaderFile23a() 
Radio_B:Rtl8723RadioB_1TArray\n));
+   ODM_ReadAndConfig_RadioA_1T_8723A(pDM_Odm);
}
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_TRACE,
 (ODM_ConfigRFWithHeaderFile23a: Radio No %x\n, eRFPath));
@@ -453,9 +443,9 @@ int ODM_ConfigBBWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
 {
if (pDM_Odm-SupportICType == ODM_RTL8723A) {
if (ConfigType == CONFIG_BB_PHY_REG)
-   READ_AND_CONFIG_MP(8723A, _PHY_REG_1T_);
+   ODM_ReadAndConfig_PHY_REG_1T_8723A(pDM_Odm);
else if (ConfigType == CONFIG_BB_AGC_TAB)
-   READ_AND_CONFIG_MP(8723A, _AGC_TAB_1T_);
+   ODM_ReadAndConfig_AGC_TAB_1T_8723A(pDM_Odm);
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
 ( === phy_ConfigBBWithHeaderFile() 
phy:Rtl8723AGCTAB_1TArray\n));
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
@@ -467,6 +457,6 @@ int ODM_ConfigBBWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
 int ODM_ConfigMACWithHeaderFile23a(struct dm_odm_t *pDM_Odm)
 {
if (pDM_Odm-SupportICType == ODM_RTL8723A)
-   READ_AND_CONFIG_MP(8723A, _MAC_REG_);
+   ODM_ReadAndConfig_MAC_REG_8723A(pDM_Odm);
return _SUCCESS;
 }
-- 
1.9.3

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


[PATCH 10/10] staging: rtl8723au: Remove unncessary wrapper PHY_RFConfig8723A()

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen jes.soren...@redhat.com

Signed-off-by: Jes Sorensen jes.soren...@redhat.com
---
 drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c| 12 
 drivers/staging/rtl8723au/hal/usb_halinit.c|  4 ++--
 drivers/staging/rtl8723au/include/Hal8723APhyCfg.h |  1 -
 3 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c 
b/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c
index bd01c10..3d4d7ec 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c
@@ -839,18 +839,6 @@ PHY_BBConfig8723A(struct rtw_adapter *Adapter)
return rtStatus;
 }
 
-int
-PHY_RFConfig8723A(struct rtw_adapter *Adapter)
-{
-   int rtStatus = _SUCCESS;
-
-   /*  */
-   /*  RF config */
-   /*  */
-   rtStatus = PHY_RF6052_Config8723A(Adapter);
-   return rtStatus;
-}
-
 static void getTxPowerIndex(struct rtw_adapter *Adapter,
u8 channel, u8 *cckPowerLevel,  u8 *ofdmPowerLevel)
 {
diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c 
b/drivers/staging/rtl8723au/hal/usb_halinit.c
index d3d7289..8a7e644 100644
--- a/drivers/staging/rtl8723au/hal/usb_halinit.c
+++ b/drivers/staging/rtl8723au/hal/usb_halinit.c
@@ -718,9 +718,9 @@ static int rtl8723au_hal_init(struct rtw_adapter *Adapter)
/*  Add for tx power by rate fine tune. We need to call the function 
after BB config. */
/*  Because the tx power by rate table is inited in BB config. */
 
-   status = PHY_RFConfig8723A(Adapter);
+   status = PHY_RF6052_Config8723A(Adapter);
if (status == _FAIL) {
-   DBG_8723A(PHY_RFConfig8723A fault !!\n);
+   DBG_8723A(PHY_RF6052_Config8723A failed!!\n);
goto exit;
}
 
diff --git a/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h 
b/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h
index 299598b..688f204 100644
--- a/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h
+++ b/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h
@@ -224,7 +224,6 @@ SetAntennaConfig92C(struct rtw_adapter *Adapter, u8 
DefaultAnt);
 
 /* MAC/BB/RF HAL config */
 int PHY_BBConfig8723A(struct rtw_adapter *Adapter);
-int PHY_RFConfig8723A(struct rtw_adapter *Adapter);
 s32 PHY_MACConfig8723A(struct rtw_adapter *padapter);
 
 #endif
-- 
1.9.3

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


[PATCH 04/10] staging: rtl8723au: Remove zero value calculation added to address

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen jes.soren...@redhat.com

Signed-off-by: Jes Sorensen jes.soren...@redhat.com
---
 drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c | 22 --
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c 
b/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
index 8f883d9..70b7168 100644
--- a/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
+++ b/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
@@ -43,30 +43,16 @@ odm_ConfigRFReg_8723A(
}
 }
 
-void odm_ConfigRF_RadioA_8723A(struct dm_odm_t *pDM_Odm,
-   u32 Addr,
-   u32 Data
-   )
+void odm_ConfigRF_RadioA_8723A(struct dm_odm_t *pDM_Odm, u32 Addr, u32 Data)
 {
-   u32  content = 0x1000; /*  RF_Content: radioa_txt */
-   u32 maskforPhySet = (u32)(content0xE000);
-
-   odm_ConfigRFReg_8723A(pDM_Odm, Addr, Data, RF_PATH_A,
- Addr|maskforPhySet);
+   odm_ConfigRFReg_8723A(pDM_Odm, Addr, Data, RF_PATH_A, Addr);
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
 (=== %s: [RadioA] %08X %08X\n, __func__, Addr, Data));
 }
 
-void odm_ConfigRF_RadioB_8723A(struct dm_odm_t *pDM_Odm,
-   u32 Addr,
-   u32 Data
-   )
+void odm_ConfigRF_RadioB_8723A(struct dm_odm_t *pDM_Odm, u32 Addr, u32 Data)
 {
-   u32  content = 0x1001; /*  RF_Content: radiob_txt */
-   u32 maskforPhySet = (u32)(content0xE000);
-
-   odm_ConfigRFReg_8723A(pDM_Odm, Addr, Data, RF_PATH_B,
- Addr|maskforPhySet);
+   odm_ConfigRFReg_8723A(pDM_Odm, Addr, Data, RF_PATH_B, Addr);
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
 (=== %s: [RadioB] %08X %08X\n, __func__, Addr, Data));
 }
-- 
1.9.3

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


[PATCH 02/10] staging: rtl8723au: Call to ODM_ConfigRFWithHeaderFile23a path is identical for RF_PATH_[AB]

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen jes.soren...@redhat.com

Signed-off-by: Jes Sorensen jes.soren...@redhat.com
---
 drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c 
b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c
index c30bd23..6686a29 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c
@@ -455,13 +455,6 @@ static int phy_RF6052_Config_ParaFile(struct rtw_adapter 
*Adapter)
/*Initialize RF fom connfiguration file*/
switch (eRFPath) {
case RF_PATH_A:
-   if (ODM_ConfigRFWithHeaderFile23a(pHalData-odmpriv,
- (enum RF_RADIO_PATH)
- eRFPath,
- (enum RF_RADIO_PATH)
- eRFPath) == _FAIL)
-   rtStatus = _FAIL;
-   break;
case RF_PATH_B:
if (ODM_ConfigRFWithHeaderFile23a(pHalData-odmpriv,
  (enum RF_RADIO_PATH)
-- 
1.9.3

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


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Richard Weinberger
Am 13.07.2014 11:27, schrieb Lennox Wu:
 As I said before, some configurations don't make sense.

If such a configuration can be achieved using allmod/yesconfig it has to be 
fixed.
Chen's fixes seem reasonable as not all architectures support iomem.

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


Re: [PATCH V3 0/7] Drivers: scsi: storvsc: Bug fixes and improvements

2014-07-13 Thread Christoph Hellwig
The series looks good to me, although I'll probably put the commit
message for the timer patch into the comment for the eh_timed_out
handler.

Can I get another set of reviews?  I've seen Olaf has put them into the
SLES tree, so I'd expect he's done a review already?

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


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Chen Gang
On 07/13/2014 05:45 PM, Richard Weinberger wrote:
 Am 13.07.2014 11:27, schrieb Lennox Wu:
 As I said before, some configurations don't make sense.
 
 If such a configuration can be achieved using allmod/yesconfig it has to be 
 fixed.
 Chen's fixes seem reasonable as not all architectures support iomem.


OK, thanks. And I shall split them into several patches, although we can
understand that score may not need them.


Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


PLEASE HELP THEM WITH THE MONEY

2014-07-13 Thread Mrs.Isabella Caromel
Good day
Private Message to you,

Greetings to you in the name of our heavenly God. This mail might come to you 
as a surprise and the temptation to ignore it could come into your mind, but 
please, consider it as a Divine Wish of God and accept it with a deep sense of 
humility. My Name is Isabella Caromel; I escaped tsunami disaster some time ago 
which affected my spinal cord, my ear drum and claim my entire family, my 
husband and two sons. It might shock you to know, I was eventually disabled as 
a result of catastrophe that struck me. Perhaps I’m now on a wheelchair after 
all form of treatment and to no avail. Because of my present condition I 
finally decided to give a better life to the poor in the society, since it has 
determine medically that I have only about a few months to live, according to 
medical experts.

It is my legacy to build charity organizations for the less privilege since my 
health has finally confirmed deteriorated. In my present condition this project 
cannot be executed by me alone due to my ailment, so therefore I need your 
candid voluntarily support to execute the project to make this dream a reality. 
I have decided to invest my $10.6M USD to help the less privileged, therefore 
you are chosen from my heart to help receive the funds from where it was kept 
secretly to build charity organizations for the less privilege to have some 
better life.

Please I will appreciate if you can indicate interest to help actualize this 
last dream. Therefore also include your contact telephone/fax numbers, 
including personal details to be forward to the deposited firm for onward 
communication on how to transfer the funds to you. I will also provide you the 
legal documents that will enable you claim the funds, and if you are willing 
and ready to assist, please e-mail me at mrs.isabellacaro...@yahoo.com.hk 
without delay as I need to hear from you soon.

Remain blessed,
Mrs. Isabella Caromel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] drivers/staging/iio/adc/Kconfig: Let MXS_LRADC depend on HAS_IOMEM

2014-07-13 Thread Chen Gang
MXS_LRADC need HAS_IOMEM, so let it depend on HAS_IOMEM

The related error (with allmodconfig under score):

MODPOST 1365 modules
  ERROR: devm_ioremap_resource [drivers/staging/iio/adc/mxs-lradc.ko] 
undefined!


Signed-off-by: Chen Gang gang.chen.5...@gmail.com
---
 drivers/staging/iio/adc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/adc/Kconfig b/drivers/staging/iio/adc/Kconfig
index b87e382..4e927d2 100644
--- a/drivers/staging/iio/adc/Kconfig
+++ b/drivers/staging/iio/adc/Kconfig
@@ -94,7 +94,7 @@ config LPC32XX_ADC
 
 config MXS_LRADC
tristate Freescale i.MX23/i.MX28 LRADC
-   depends on ARCH_MXS || COMPILE_TEST
+   depends on (ARCH_MXS || COMPILE_TEST)  HAS_IOMEM
depends on INPUT
select STMP_DEVICE
select IIO_BUFFER
-- 
1.7.11.7
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16

2014-07-13 Thread Martin K. Petersen
 KY == KY Srinivasan k...@microsoft.com writes:

KY Windows hosts do support UNMAP and set the field in the
KY EVPD. However, since the host advertises SPC-2 compliance, Linux
KY does not even query the VPD page.
 
 If we want to enable UNMAP in this case I'd prefer a blacklist entry
 than trying UNMAP despite the device not advertising it.

I agree with that. We could do something like the patch below.

However, I do think it's a good idea that you guys are looking into
reporting SPC-3.


SCSI: Add a blacklist flag which enables VPD page inquiries

Despite supporting modern SCSI features some storage devices continue to
claim conformance to an older version of the SPC spec. This is done for
compatibility with legacy operating systems.

Linux by default will not attempt to read VPD pages on devices that
claim SPC-2 or older. Introduce a blacklist flag that can be used to
trigger VPD page inquiries on devices that are known to support them.

Reported-by: KY Srinivasan k...@microsoft.com
Signed-off-by: Martin K. Petersen martin.peter...@oracle.com

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 4a6e4ba5a400..a5b1a224628a 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -949,7 +949,9 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned 
char *inq_result,
 
sdev-eh_timeout = SCSI_DEFAULT_EH_TIMEOUT;
 
-   if (*bflags  BLIST_SKIP_VPD_PAGES)
+   if (*bflags  BLIST_TRY_VPD_PAGES)
+   sdev-try_vpd_pages = 1;
+   else if (*bflags  BLIST_SKIP_VPD_PAGES)
sdev-skip_vpd_pages = 1;
 
transport_configure_device(sdev-sdev_gendev);
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 87566b51fcf7..31d32b9077ca 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2701,6 +2701,11 @@ static void sd_read_write_same(struct scsi_disk *sdkp, 
unsigned char *buffer)
 
 static int sd_try_extended_inquiry(struct scsi_device *sdp)
 {
+   /* Attempt VPD inquiry if the device blacklist explicitly calls
+* for it.
+*/
+   if (sdp-try_vpd_pages)
+   return 1;
/*
 * Although VPD inquiries can go to SCSI-2 type devices,
 * some USB ones crash on receiving them, and the pages
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 9aa38f7b303b..f579408620f0 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -155,6 +155,7 @@ struct scsi_device {
unsigned skip_ms_page_8:1;  /* do not use MODE SENSE page 0x08 */
unsigned skip_ms_page_3f:1; /* do not use MODE SENSE page 0x3f */
unsigned skip_vpd_pages:1;  /* do not read VPD pages */
+   unsigned try_vpd_pages:1;   /* attempt to read VPD pages */
unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page 0x3f */
unsigned no_start_on_add:1; /* do not issue start on add */
unsigned allow_restart:1; /* issue START_UNIT in error handler */
diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h
index 8670c04e199e..1fdd6fc5492b 100644
--- a/include/scsi/scsi_devinfo.h
+++ b/include/scsi/scsi_devinfo.h
@@ -34,4 +34,5 @@
 #define BLIST_SKIP_VPD_PAGES   0x400 /* Ignore SBC-3 VPD pages */
 #define BLIST_SCSI3LUN 0x800 /* Scan more than 256 LUNs
 for sequential scan */
+#define BLIST_TRY_VPD_PAGES0x1000 /* Attempt to read VPD pages */
 #endif
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Lars-Peter Clausen

On 07/13/2014 11:45 AM, Richard Weinberger wrote:

Am 13.07.2014 11:27, schrieb Lennox Wu:

As I said before, some configurations don't make sense.


If such a configuration can be achieved using allmod/yesconfig it has to be 
fixed.
Chen's fixes seem reasonable as not all architectures support iomem.


Maybe we should stub out ioremap() and friends when COMPILE_TEST is enabled to 
avoid these linker errors. That's in my opinion better than turning most of the 
'depends on COMPILE_TEST' into 'depends on COMPILE_TEST  HAS_IOMEM'. The 
issue comes up quite a lot and it is often overlooked when adding a driver that 
can be build when COMPILE_TEST is enabled.


- Lars

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


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Richard Weinberger
Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:
 On 07/13/2014 11:45 AM, Richard Weinberger wrote:
 Am 13.07.2014 11:27, schrieb Lennox Wu:
 As I said before, some configurations don't make sense.

 If such a configuration can be achieved using allmod/yesconfig it has to be 
 fixed.
 Chen's fixes seem reasonable as not all architectures support iomem.
 
 Maybe we should stub out ioremap() and friends when COMPILE_TEST is enabled 
 to avoid these linker errors. That's in my opinion better than turning most 
 of the 'depends on
 COMPILE_TEST' into 'depends on COMPILE_TEST  HAS_IOMEM'. The issue comes up 
 quite a lot and it is often overlooked when adding a driver that can be build 
 when COMPILE_TEST is
 enabled.

And what should this stub do?
Except calling BUG()...

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


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Lars-Peter Clausen

On 07/13/2014 03:40 PM, Richard Weinberger wrote:

Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:

On 07/13/2014 11:45 AM, Richard Weinberger wrote:

Am 13.07.2014 11:27, schrieb Lennox Wu:

As I said before, some configurations don't make sense.


If such a configuration can be achieved using allmod/yesconfig it has to be 
fixed.
Chen's fixes seem reasonable as not all architectures support iomem.


Maybe we should stub out ioremap() and friends when COMPILE_TEST is enabled to 
avoid these linker errors. That's in my opinion better than turning most of the 
'depends on
COMPILE_TEST' into 'depends on COMPILE_TEST  HAS_IOMEM'. The issue comes up 
quite a lot and it is often overlooked when adding a driver that can be build when 
COMPILE_TEST is
enabled.


And what should this stub do?
Except calling BUG()...


return NULL;

It's for compile testing, it's not meant to work at runtime.

- Lars

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


Re: [PATCH] drivers/staging/iio/adc/Kconfig: Let MXS_LRADC depend on HAS_IOMEM

2014-07-13 Thread Marek Vasut
On Sunday, July 13, 2014 at 01:44:38 PM, Chen Gang wrote:
 MXS_LRADC need HAS_IOMEM, so let it depend on HAS_IOMEM
 
 The related error (with allmodconfig under score):
 
 MODPOST 1365 modules
   ERROR: devm_ioremap_resource [drivers/staging/iio/adc/mxs-lradc.ko]
 undefined!
 
 
 Signed-off-by: Chen Gang gang.chen.5...@gmail.com

Acked-by: Marek Vasut ma...@denx.de

Best regards,
Marek Vasut
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Richard Weinberger
Am 13.07.2014 15:56, schrieb Lars-Peter Clausen:
 On 07/13/2014 03:40 PM, Richard Weinberger wrote:
 Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:
 On 07/13/2014 11:45 AM, Richard Weinberger wrote:
 Am 13.07.2014 11:27, schrieb Lennox Wu:
 As I said before, some configurations don't make sense.

 If such a configuration can be achieved using allmod/yesconfig it has to 
 be fixed.
 Chen's fixes seem reasonable as not all architectures support iomem.

 Maybe we should stub out ioremap() and friends when COMPILE_TEST is enabled 
 to avoid these linker errors. That's in my opinion better than turning most 
 of the 'depends on
 COMPILE_TEST' into 'depends on COMPILE_TEST  HAS_IOMEM'. The issue comes 
 up quite a lot and it is often overlooked when adding a driver that can be 
 build when COMPILE_TEST is
 enabled.

 And what should this stub do?
 Except calling BUG()...
 
 return NULL;
 
 It's for compile testing, it's not meant to work at runtime.

Hm, I really don't like the idea of having a non-working kernel.
IMHO either it should build _and_ run and nothing else.
Greg, what do you think?

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


[PATCH] staging: android: Clean up binder_send_failed_reply

2014-07-13 Thread Lucas Tanure
Kernel coding style. Remove useless else statement after return.

Signed-off-by: Lucas Tanure tan...@linux.com
---
 drivers/staging/android/binder.c | 27 +--
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 14714a6..eee80fb 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -1210,24 +1210,23 @@ static void binder_send_failed_reply(struct 
binder_transaction *t,
target_thread-return_error);
}
return;
-   } else {
-   struct binder_transaction *next = t-from_parent;
+   } 
+   struct binder_transaction *next = t-from_parent;
 
-   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
-send failed reply for transaction %d, 
target dead\n,
-t-debug_id);
+   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
+send failed reply for transaction %d, target 
dead\n,
+t-debug_id);
 
-   binder_pop_transaction(target_thread, t);
-   if (next == NULL) {
-   binder_debug(BINDER_DEBUG_DEAD_BINDER,
-reply failed, no target thread at 
root\n);
-   return;
-   }
-   t = next;
+   binder_pop_transaction(target_thread, t);
+   if (next == NULL) {
binder_debug(BINDER_DEBUG_DEAD_BINDER,
-reply failed, no target thread -- retry 
%d\n,
- t-debug_id);
+reply failed, no target thread at 
root\n);
+   return;
}
+   t = next;
+   binder_debug(BINDER_DEBUG_DEAD_BINDER,
+reply failed, no target thread -- retry %d\n,
+ t-debug_id);
}
 }
 
-- 
2.0.1

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


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Chen Gang
On 07/13/2014 11:14 AM, Chen Gang wrote:
[...]
 And also find a compiler issue, I will try to fix it, but shall not notify
 kernel mailing list, again. The related issue is below (it seems a kernel
 issue, but in fact, it is a compiler's issue):
 
 CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
 'sptlrpc_cli_ctx_expire':
   drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
 ptlrpc_ctx_ops' has no member named '__die'
 ctx-cc_ops-die(ctx, 0);
^
   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
 'ctx_refresh_timeout':
   drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
 ptlrpc_ctx_ops' has no member named '__die'
  req-rq_cli_ctx-cc_ops-die(req-rq_cli_ctx, 0);
 ^
   make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
   make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
   make[3]: *** [drivers/staging/lustre/lustre] Error 2
   make[2]: *** [drivers/staging/lustre] Error 2
   make[1]: *** [drivers/staging] Error 2
   make: *** [drivers] Error 2
 

Oh, sorry, after check related details, this is still a kernel issue,
'die' is a macro which defined by most of architectures, so can not
use this common name as a declaration in any other area.

I shall send related patch for it.

Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/16] staging: rtl8188eu: Remove unused function rtw_use_tkipkey_handler()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar navin.pati...@gmail.com
---
 drivers/staging/rtl8188eu/core/rtw_security.c|   25 --
 drivers/staging/rtl8188eu/include/rtw_security.h |1 -
 2 files changed, 26 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c 
b/drivers/staging/rtl8188eu/core/rtw_security.c
index d78def5..f9096a5 100644
--- a/drivers/staging/rtl8188eu/core/rtw_security.c
+++ b/drivers/staging/rtl8188eu/core/rtw_security.c
@@ -1679,28 +1679,3 @@ do { 
\
d##2 = TE0(s##2) ^ TE1(s##3) ^ TE2(s##0) ^ TE3(s##1) ^ rk[4 * i + 2]; \
d##3 = TE0(s##3) ^ TE1(s##0) ^ TE2(s##1) ^ TE3(s##2) ^ rk[4 * i + 3]; \
 } while (0);
-
-/**
- * omac1_aes_128 - One-Key CBC MAC (OMAC1) hash with AES-128 (aka AES-CMAC)
- * @key: 128-bit key for the hash operation
- * @data: Data buffer for which a MAC is determined
- * @data_len: Length of data buffer in bytes
- * @mac: Buffer for MAC (128 bits, i.e., 16 bytes)
- * Returns: 0 on success, -1 on failure
- *
- * This is a mode for using block cipher (AES in this case) for authentication.
- * OMAC1 was standardized with the name CMAC by NIST in a Special Publication
- * (SP) 800-38B.
- */
-void rtw_use_tkipkey_handler(void *FunctionContext)
-{
-   struct adapter *padapter = (struct adapter *)FunctionContext;
-
-
-   RT_TRACE(_module_rtl871x_security_c_, _drv_err_, 
(^^^rtw_use_tkipkey_handler ^^^\n));
-
-   padapter-securitypriv.busetkipkey = true;
-
-   RT_TRACE(_module_rtl871x_security_c_, _drv_err_, 
(^^^rtw_use_tkipkey_handler padapter-securitypriv.busetkipkey=%d^^^\n, 
padapter-securitypriv.busetkipkey));
-
-}
diff --git a/drivers/staging/rtl8188eu/include/rtw_security.h 
b/drivers/staging/rtl8188eu/include/rtw_security.h
index 937cad8..66d60aa 100644
--- a/drivers/staging/rtl8188eu/include/rtw_security.h
+++ b/drivers/staging/rtl8188eu/include/rtw_security.h
@@ -378,6 +378,5 @@ void rtw_wep_encrypt(struct adapter *padapter, u8  
*pxmitframe);
 u32 rtw_aes_decrypt(struct adapter *padapter, u8  *precvframe);
 u32 rtw_tkip_decrypt(struct adapter *padapter, u8  *precvframe);
 void rtw_wep_decrypt(struct adapter *padapter, u8  *precvframe);
-void rtw_use_tkipkey_handler(void *FunctionContext);
 
 #endif /* __RTL871X_SECURITY_H_ */
-- 
1.7.10.4

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


[PATCH 07/16] staging: rtl8188eu: Remove unused function rtw_set_802_11_remove_wep()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar navin.pati...@gmail.com
---
 drivers/staging/rtl8188eu/core/rtw_ioctl_set.c|   25 -
 drivers/staging/rtl8188eu/include/rtw_ioctl_set.h |1 -
 2 files changed, 26 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c 
b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index f4116d1..fc280ce5 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -566,31 +566,6 @@ exit:
return ret;
 }
 
-u8 rtw_set_802_11_remove_wep(struct adapter *padapter, u32 keyindex)
-{
-   u8 ret = _SUCCESS;
-
-   if (keyindex = 0x8000 || padapter == NULL) {
-   ret = false;
-   goto exit;
-   } else {
-   int res;
-   struct security_priv *psecuritypriv = (padapter-securitypriv);
-   if (keyindex  4) {
-   memset(psecuritypriv-dot11DefKey[keyindex], 0, 16);
-   res = rtw_set_key(padapter, psecuritypriv, keyindex, 0);
-   psecuritypriv-dot11DefKeylen[keyindex] = 0;
-   if (res == _FAIL)
-   ret = _FAIL;
-   } else {
-   ret = _FAIL;
-   }
-   }
-exit:
-
-   return ret;
-}
-
 /*
 * rtw_get_cur_max_rate -
 * @adapter: pointer to struct adapter structure
diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h 
b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
index a325326..fa9d655 100644
--- a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
@@ -35,7 +35,6 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter *adapter,
  int ssid_max_num);
 u8 rtw_set_802_11_infrastructure_mode(struct adapter *adapter,
  enum ndis_802_11_network_infra type);
-u8 rtw_set_802_11_remove_wep(struct adapter *adapter, u32 keyindex);
 u8 rtw_set_802_11_ssid(struct adapter *adapt, struct ndis_802_11_ssid *ssid);
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
 int rtw_set_country(struct adapter *adapter, const char *country_code);
-- 
1.7.10.4

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


[PATCH 04/16] staging: rtl8188eu: Remove unused function rtw_validate_ssid()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar navin.pati...@gmail.com
---
 drivers/staging/rtl8188eu/core/rtw_ioctl_set.c|   26 -
 drivers/staging/rtl8188eu/include/rtw_ioctl_set.h |1 -
 2 files changed, 27 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c 
b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index 09d5bf4..95c6539 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -34,32 +34,6 @@ extern void indicate_wx_scan_complete_event(struct adapter 
*padapter);
(addr[4] == 0xff)  (addr[5] == 0xff))  ? true : false \
 )
 
-u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid)
-{
-   u8   i;
-   u8  ret = true;
-
-
-   if (ssid-SsidLength  32) {
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, (ssid length 
32\n));
-   ret = false;
-   goto exit;
-   }
-
-   for (i = 0; i  ssid-SsidLength; i++) {
-   /* wifi, printable ascii code must be supported */
-   if (!((ssid-Ssid[i] = 0x20)  (ssid-Ssid[i] = 0x7e))) {
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, 
(ssid has nonprintabl ascii\n));
-   ret = false;
-   break;
-   }
-   }
-
-exit:
-
-   return ret;
-}
-
 u8 rtw_do_join(struct adapter *padapter)
 {
struct list_head *plist, *phead;
diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h 
b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
index 525abbd..11791cb 100644
--- a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
@@ -40,7 +40,6 @@ u8 rtw_set_802_11_remove_wep(struct adapter *adapter, u32 
keyindex);
 u8 rtw_set_802_11_ssid(struct adapter *adapt, struct ndis_802_11_ssid *ssid);
 u8 rtw_set_802_11_remove_key(struct adapter *adapt,
 struct ndis_802_11_remove_key *key);
-u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
 int rtw_set_country(struct adapter *adapter, const char *country_code);
 
-- 
1.7.10.4

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


[PATCH 06/16] staging: rtl8188eu: Remove unused function rtw_set_802_11_remove_key()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar navin.pati...@gmail.com
---
 drivers/staging/rtl8188eu/core/rtw_ioctl_set.c|   38 -
 drivers/staging/rtl8188eu/include/rtw_ioctl_set.h |2 --
 2 files changed, 40 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c 
b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index 8c107f8..f4116d1 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -591,44 +591,6 @@ exit:
return ret;
 }
 
-u8 rtw_set_802_11_remove_key(struct adapter *padapter, struct 
ndis_802_11_remove_key *key)
-{
-   u8 *pbssid;
-   struct sta_info *stainfo;
-   u8  bgroup = (key-KeyIndex  0x400)  0 ? false : true;
-   u8  keyIndex = (u8)key-KeyIndex  0x03;
-   u8  ret = _SUCCESS;
-
-
-   if ((key-KeyIndex  0xbffc)  0) {
-   ret = _FAIL;
-   goto exit;
-   }
-
-   if (bgroup) {
-   /*  clear group key by index */
-
-   memset(padapter-securitypriv.dot118021XGrpKey[keyIndex], 0, 
16);
-
-   /*  \todo Send a H2C Command to Firmware for removing this Key 
in CAM Entry. */
-   } else {
-   pbssid = get_bssid(padapter-mlmepriv);
-   stainfo = rtw_get_stainfo(padapter-stapriv, pbssid);
-   if (stainfo) {
-   /*  clear key by BSSID */
-   memset(stainfo-dot118021x_UncstKey, 0, 16);
-
-   /*  \todo Send a H2C Command to Firmware for disable 
this Key in CAM Entry. */
-   } else {
-   ret = _FAIL;
-   goto exit;
-   }
-   }
-exit:
-
-   return ret;
-}
-
 /*
 * rtw_get_cur_max_rate -
 * @adapter: pointer to struct adapter structure
diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h 
b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
index 9ec6456..a325326 100644
--- a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
@@ -37,8 +37,6 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter *adapter,
  enum ndis_802_11_network_infra type);
 u8 rtw_set_802_11_remove_wep(struct adapter *adapter, u32 keyindex);
 u8 rtw_set_802_11_ssid(struct adapter *adapt, struct ndis_802_11_ssid *ssid);
-u8 rtw_set_802_11_remove_key(struct adapter *adapt,
-struct ndis_802_11_remove_key *key);
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
 int rtw_set_country(struct adapter *adapter, const char *country_code);
 
-- 
1.7.10.4

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


[PATCH 03/16] staging: rtl8188eu: Remove unused function rtw_set_scan_mode()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar navin.pati...@gmail.com
---
 drivers/staging/rtl8188eu/core/rtw_ioctl_set.c|   17 -
 drivers/staging/rtl8188eu/include/rtw_ioctl_set.h |1 -
 2 files changed, 18 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c 
b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index 5eb21cd..09d5bf4 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -1075,23 +1075,6 @@ u16 rtw_get_cur_max_rate(struct adapter *adapter)
 }
 
 /*
-* rtw_set_scan_mode -
-* @adapter: pointer to struct adapter structure
-* @scan_mode:
-*
-* Return _SUCCESS or _FAIL
-*/
-int rtw_set_scan_mode(struct adapter *adapter, enum rt_scan_type scan_mode)
-{
-   if (scan_mode != SCAN_ACTIVE  scan_mode != SCAN_PASSIVE)
-   return _FAIL;
-
-   adapter-mlmepriv.scan_mode = scan_mode;
-
-   return _SUCCESS;
-}
-
-/*
 * rtw_set_country -
 * @adapter: pointer to struct adapter structure
 * @country_code: string of country code
diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h 
b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
index 7335147..525abbd 100644
--- a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
@@ -42,7 +42,6 @@ u8 rtw_set_802_11_remove_key(struct adapter *adapt,
 struct ndis_802_11_remove_key *key);
 u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
-int rtw_set_scan_mode(struct adapter *adapter, enum rt_scan_type scan_mode);
 int rtw_set_country(struct adapter *adapter, const char *country_code);
 
 #endif
-- 
1.7.10.4

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


[PATCH 05/16] staging: rtl8188eu: Remove unused function rtw_set_802_11_add_key()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar navin.pati...@gmail.com
---
 drivers/staging/rtl8188eu/core/rtw_ioctl_set.c|  352 -
 drivers/staging/rtl8188eu/include/rtw_ioctl_set.h |1 -
 2 files changed, 353 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c 
b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index 95c6539..8c107f8 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -591,358 +591,6 @@ exit:
return ret;
 }
 
-u8 rtw_set_802_11_add_key(struct adapter *padapter, struct ndis_802_11_key 
*key)
-{
-   uintencryptionalgo;
-   u8 *pbssid;
-   struct sta_info *stainfo;
-   u8  bgroup = false;
-   u8  bgrouptkey = false;/* can be removed later */
-   u8  ret = _SUCCESS;
-
-
-   if (((key-KeyIndex  0x8000) == 0)  ((key-KeyIndex  
0x4000)  0)) {
-   /*  It is invalid to clear bit 31 and set bit 30. If the 
miniport driver encounters this combination, */
-   /*  it must fail the request and return 
NDIS_STATUS_INVALID_DATA. */
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
-(rtw_set_802_11_add_key: ((key-KeyIndex  
0x8000)==0)[=%d],
-(int)(key-KeyIndex  0x8000) == 0));
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
-(rtw_set_802_11_add_key:((key-KeyIndex  
0x4000)0)[=%d],
-(int)(key-KeyIndex  0x4000)  0));
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
-(rtw_set_802_11_add_key: key-KeyIndex=%d\n,
-(int)key-KeyIndex));
-   ret = _FAIL;
-   goto exit;
-   }
-
-   if (key-KeyIndex  0x4000) {
-   /*  Pairwise key */
-
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, 
(OID_802_11_ADD_KEY: + Pairwise key +\n));
-
-   pbssid = get_bssid(padapter-mlmepriv);
-   stainfo = rtw_get_stainfo(padapter-stapriv, pbssid);
-
-   if ((stainfo != NULL)  
(padapter-securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)) {
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-
(OID_802_11_ADD_KEY:(stainfo!=NULL)(Adapter-securitypriv.dot11AuthAlgrthm==dot11AuthAlgrthm_8021X)\n));
-   encryptionalgo = stainfo-dot118021XPrivacy;
-   } else {
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, 
(OID_802_11_ADD_KEY: stainfo == 
NULL)||(Adapter-securitypriv.dot11AuthAlgrthm!= dot11AuthAlgrthm_8021X)\n));
-   encryptionalgo = 
padapter-securitypriv.dot11PrivacyAlgrthm;
-   }
-
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-(rtw_set_802_11_add_key: (encryptionalgo==%d)!\n,
-encryptionalgo));
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-(rtw_set_802_11_add_key: 
(Adapter-securitypriv.dot11PrivacyAlgrthm==%d)!\n,
-padapter-securitypriv.dot11PrivacyAlgrthm));
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-(rtw_set_802_11_add_key: 
(Adapter-securitypriv.dot11AuthAlgrthm==%d)!\n,
-padapter-securitypriv.dot11AuthAlgrthm));
-
-   if ((stainfo != NULL))
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-(rtw_set_802_11_add_key: 
(stainfo-dot118021XPrivacy==%d)!\n,
-stainfo-dot118021XPrivacy));
-
-   if (key-KeyIndex  0x00FF) {
-   /*  The key index is specified in the lower 8 bits by 
values of zero to 255. */
-   /*  The key index should be set to zero for a Pairwise 
key, and the driver should fail with */
-   /*  NDIS_STATUS_INVALID_DATA if the lower 8 bits is not 
zero */
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ( 
key-KeyIndex  0x00FF.\n));
-   ret = _FAIL;
-   goto exit;
-   }
-
-   /*  check BSSID */
-   if (IS_MAC_ADDRESS_BROADCAST(key-BSSID) == true) {
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, 
(MacAddr_isBcst(key-BSSID)\n));
-   ret = false;
-   goto exit;
-   }
-
-   /*  Check key length for TKIP. */
-   if ((encryptionalgo == _TKIP_)  (key-KeyLength != 32)) {
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, 
(TKIP KeyLength:0x%x != 32\n, key-KeyLength));
-   ret = _FAIL;
-   goto exit;
-   }
-
-   /*  Check key 

[PATCH 11/16] staging: rtl8188eu: Rename _rtw_find_network() to rtw_find_network()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar navin.pati...@gmail.com
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c|   14 +-
 drivers/staging/rtl8188eu/include/rtw_mlme.h |5 -
 2 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index b1e406e..fcd3f5a 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -239,7 +239,7 @@ void _rtw_free_network_nolock(structmlme_priv 
*pmlmepriv, struct wlan_network *
 
Shall be calle under atomic context... to avoid possible racing 
condition...
 */
-struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 *addr)
+struct wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr)
 {
struct list_head *phead, *plist;
struct  wlan_network *pnetwork = NULL;
@@ -360,18 +360,6 @@ static void rtw_free_network_nolock(struct mlme_priv 
*pmlmepriv,
_rtw_free_network_nolock(pmlmepriv, pnetwork);
 }
 
-/*
-   return the wlan_network with the matching addr
-
-   Shall be calle under atomic context... to avoid possible racing 
condition...
-*/
-struct wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr)
-{
-   struct  wlan_network *pnetwork = _rtw_find_network(scanned_queue, addr);
-
-   return pnetwork;
-}
-
 int rtw_is_same_ibss(struct adapter *adapter, struct wlan_network *pnetwork)
 {
int ret = true;
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index 56ef600..04d3b3d 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -581,16 +581,11 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv,
 void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
  struct wlan_network *pnetwork);
 
-
-struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 
*addr);
-
 int rtw_if_up(struct adapter *padapter);
 
-
 u8 *rtw_get_capability_from_ie(u8 *ie);
 u8 *rtw_get_beacon_interval_from_ie(u8 *ie);
 
-
 void rtw_joinbss_reset(struct adapter *padapter);
 
 unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie,
-- 
1.7.10.4

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


[PATCH 08/16] staging: rtl8188eu: Remove unused function _rtw_IOL_append_WW_cmd()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar navin.pati...@gmail.com
---
 drivers/staging/rtl8188eu/core/rtw_iol.c|   14 --
 drivers/staging/rtl8188eu/include/rtw_iol.h |2 --
 2 files changed, 16 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_iol.c 
b/drivers/staging/rtl8188eu/core/rtw_iol.c
index e6fdd32..7796287 100644
--- a/drivers/staging/rtl8188eu/core/rtw_iol.c
+++ b/drivers/staging/rtl8188eu/core/rtw_iol.c
@@ -113,20 +113,6 @@ int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, 
u16 addr, u8 value, u8
return rtw_IOL_append_cmds(xmit_frame, (u8 *)cmd, cmd.length);
 }
 
-int _rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr, u16 value, 
u16 mask)
-{
-   struct ioreg_cfg cmd = {8, IOREG_CMD_WW_REG, 0x0, 0x0, 0x0};
-
-   cmd.address = cpu_to_le16(addr);
-   cmd.data = cpu_to_le32(value);
-
-   if (mask != 0x) {
-   cmd.length = 12;
-   cmd.mask =  cpu_to_le32(mask);
-   }
-   return rtw_IOL_append_cmds(xmit_frame, (u8 *)cmd, cmd.length);
-}
-
 int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value, 
u32 mask)
 {
struct ioreg_cfg cmd = {8, IOREG_CMD_WD_REG, 0x0, 0x0, 0x0};
diff --git a/drivers/staging/rtl8188eu/include/rtw_iol.h 
b/drivers/staging/rtl8188eu/include/rtw_iol.h
index ec0c6cb..80bfd06 100644
--- a/drivers/staging/rtl8188eu/include/rtw_iol.h
+++ b/drivers/staging/rtl8188eu/include/rtw_iol.h
@@ -63,8 +63,6 @@ void read_efuse_from_txpktbuf(struct adapter *adapter, int 
bcnhead,
 
 int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr,
   u8 value, u8 mask);
-int _rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr,
-  u16 value, u16 mask);
 int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr,
   u32 value, u32 mask);
 int _rtw_IOL_append_WRF_cmd(struct xmit_frame *xmit_frame, u8 rf_path,
-- 
1.7.10.4

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


[PATCH 13/16] staging: rtl8188eu: Remove unused function _rtw_dequeue_network()

2014-07-13 Thread navin patidar

Signed-off-by: navin patidar navin.pati...@gmail.com
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c|   19 ---
 drivers/staging/rtl8188eu/include/rtw_mlme.h |2 --
 2 files changed, 21 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 6cfb729..5ab6752 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -142,25 +142,6 @@ exit:
return _SUCCESS;
 }
 
-struct wlan_network *_rtw_dequeue_network(struct __queue *queue)
-{
-   struct wlan_network *pnetwork;
-
-   spin_lock_bh(queue-lock);
-
-   if (list_empty(queue-queue)) {
-   pnetwork = NULL;
-   } else {
-   pnetwork = container_of((queue-queue)-next, struct 
wlan_network, list);
-
-   list_del_init((pnetwork-list));
-   }
-
-   spin_unlock_bh(queue-lock);
-
-   return pnetwork;
-}
-
 struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue 
*free_queue) */
 {
struct  wlan_network*pnetwork;
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index e727cf0..a234e8d 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -571,8 +571,6 @@ void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
 
 int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork);
 
-struct wlan_network *_rtw_dequeue_network(struct __queue *queue);
-
 struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
 
 void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
-- 
1.7.10.4

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


[PATCH 10/16] staging: rtl8188eu: Rename _rtw_free_network_queue() to rtw_free_network_queue()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar navin.pati...@gmail.com
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c|8 +---
 drivers/staging/rtl8188eu/include/rtw_mlme.h |2 --
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 3314708..b1e406e 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -265,7 +265,7 @@ exit:
 }
 
 
-void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
+void rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
 {
struct list_head *phead, *plist;
struct wlan_network *pnetwork;
@@ -360,12 +360,6 @@ static void rtw_free_network_nolock(struct mlme_priv 
*pmlmepriv,
_rtw_free_network_nolock(pmlmepriv, pnetwork);
 }
 
-
-void rtw_free_network_queue(struct adapter *dev, u8 isfreeall)
-{
-   _rtw_free_network_queue(dev, isfreeall);
-}
-
 /*
return the wlan_network with the matching addr
 
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index 75f8cf5..56ef600 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -584,8 +584,6 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
 
 struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 
*addr);
 
-void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall);
-
 int rtw_if_up(struct adapter *padapter);
 
 
-- 
1.7.10.4

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


[PATCH 14/16] staging: rtl8188eu: Remove unused function _rtw_enqueue_network()

2014-07-13 Thread navin patidar

Signed-off-by: navin patidar navin.pati...@gmail.com
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c|   15 ---
 drivers/staging/rtl8188eu/include/rtw_mlme.h |2 --
 2 files changed, 17 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 5ab6752..2aafac3 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -127,21 +127,6 @@ void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
}
 }
 
-int_rtw_enqueue_network(struct __queue *queue, struct wlan_network 
*pnetwork)
-{
-   if (pnetwork == NULL)
-   goto exit;
-
-   spin_lock_bh(queue-lock);
-
-   list_add_tail(pnetwork-list, queue-queue);
-
-   spin_unlock_bh(queue-lock);
-
-exit:
-   return _SUCCESS;
-}
-
 struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue 
*free_queue) */
 {
struct  wlan_network*pnetwork;
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index a234e8d..13f8702 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -569,8 +569,6 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv 
*pmlmepriv);
 
 void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
 
-int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork);
-
 struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
 
 void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
-- 
1.7.10.4

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


[PATCH 16/16] staging: rtl8188eu: Rename _rtw_init_mlme_priv() to rtw_init_mlme_priv()

2014-07-13 Thread navin patidar

Signed-off-by: navin patidar navin.pati...@gmail.com
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c|9 +
 drivers/staging/rtl8188eu/include/rtw_mlme.h |3 ---
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 7293589..c15fab2 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -35,7 +35,7 @@
 extern unsigned char   MCS_rate_2R[16];
 extern unsigned char   MCS_rate_1R[16];
 
-int _rtw_init_mlme_priv(struct adapter *padapter)
+int rtw_init_mlme_priv(struct adapter *padapter)
 {
int i;
u8  *pbuf;
@@ -302,13 +302,6 @@ u8 *rtw_get_beacon_interval_from_ie(u8 *ie)
return ie + 8;
 }
 
-int rtw_init_mlme_priv(struct adapter *padapter)
-{
-   int res;
-   res = _rtw_init_mlme_priv(padapter);/*  (pmlmepriv); */
-   return res;
-}
-
 static struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
 {
return _rtw_alloc_network(pmlmepriv);
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index 2a828ec..5b1fcd2 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -562,9 +562,6 @@ void rtw_dynamic_check_timer_handlder(struct adapter 
*adapter);
 #define rtw_set_scan_deny_timer_hdl(adapter) do {} while (0)
 #define rtw_set_scan_deny(adapter, ms) do {} while (0)
 
-
-int _rtw_init_mlme_priv(struct adapter *padapter);
-
 void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
 
 struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
-- 
1.7.10.4

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


[PATCH 15/16] staging: rtl8188eu: Rename _rtw_free_mlme_priv() to rtw_free_mlme_priv()

2014-07-13 Thread navin patidar

Signed-off-by: navin patidar navin.pati...@gmail.com
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c|8 +---
 drivers/staging/rtl8188eu/include/rtw_mlme.h |2 --
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 2aafac3..7293589 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -117,7 +117,7 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv)
 }
 #endif
 
-void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
+void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
 {
rtw_free_mlme_priv_ie_data(pmlmepriv);
 
@@ -309,12 +309,6 @@ int rtw_init_mlme_priv(struct adapter *padapter)
return res;
 }
 
-void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
-{
-   RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, (rtw_free_mlme_priv\n));
-   _rtw_free_mlme_priv(pmlmepriv);
-}
-
 static struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
 {
return _rtw_alloc_network(pmlmepriv);
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index 13f8702..2a828ec 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -567,8 +567,6 @@ int _rtw_init_mlme_priv(struct adapter *padapter);
 
 void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
 
-void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
-
 struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
 
 void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
-- 
1.7.10.4

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


[PATCH] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

2014-07-13 Thread Chen Gang
Some of architectures have already defined 'die' as macro, so can not use
this common name as declaration in other modules, or will cause compiling
issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

The related error (with allmodconfig under score):

CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
  drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
'sptlrpc_cli_ctx_expire':
  drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
ptlrpc_ctx_ops' has no member named '__die'
ctx-cc_ops-die(ctx, 0);
   ^
  drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 'ctx_refresh_timeout':
  drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
ptlrpc_ctx_ops' has no member named '__die'
 req-rq_cli_ctx-cc_ops-die(req-rq_cli_ctx, 0);
^
  make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
  make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
  make[3]: *** [drivers/staging/lustre/lustre] Error 2
  make[2]: *** [drivers/staging/lustre] Error 2
  make[1]: *** [drivers/staging] Error 2
  make: *** [drivers] Error 2


Signed-off-by: Chen Gang gang.chen.5...@gmail.com
---
 drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_sec.h 
b/drivers/staging/lustre/lustre/include/lustre_sec.h
index 50d2f01..1b8ec11 100644
--- a/drivers/staging/lustre/lustre/include/lustre_sec.h
+++ b/drivers/staging/lustre/lustre/include/lustre_sec.h
@@ -387,7 +387,7 @@ struct ptlrpc_ctx_ops {
/**
 * Force the \a ctx to die.
 */
-   void(*die)   (struct ptlrpc_cli_ctx *ctx,
+   void(*force_die)   (struct ptlrpc_cli_ctx *ctx,
int grace);
int (*display) (struct ptlrpc_cli_ctx *ctx,
char *buf, int bufsize);
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c 
b/drivers/staging/lustre/lustre/ptlrpc/sec.c
index 28ac824..bb5b4b6 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c
@@ -305,8 +305,8 @@ EXPORT_SYMBOL(sptlrpc_cli_ctx_put);
  */
 void sptlrpc_cli_ctx_expire(struct ptlrpc_cli_ctx *ctx)
 {
-   LASSERT(ctx-cc_ops-die);
-   ctx-cc_ops-die(ctx, 0);
+   LASSERT(ctx-cc_ops-force_die);
+   ctx-cc_ops-force_die(ctx, 0);
 }
 EXPORT_SYMBOL(sptlrpc_cli_ctx_expire);
 
@@ -591,7 +591,7 @@ int ctx_refresh_timeout(void *data)
 * later than the context refresh expire time.
 */
if (rc == 0)
-   req-rq_cli_ctx-cc_ops-die(req-rq_cli_ctx, 0);
+   req-rq_cli_ctx-cc_ops-force_die(req-rq_cli_ctx, 0);
return rc;
 }
 
-- 
1.7.11.7
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RESEND PATCH] staging: android: Clean up binder_send_failed_reply

2014-07-13 Thread Lucas Tanure
Kernel coding style. Remove useless else statement after return.

Signed-off-by: Lucas Tanure tan...@linux.com
---
 drivers/staging/android/binder.c | 27 +--
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 14714a6..67c9847 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -1210,24 +1210,23 @@ static void binder_send_failed_reply(struct 
binder_transaction *t,
target_thread-return_error);
}
return;
-   } else {
-   struct binder_transaction *next = t-from_parent;
+   }
+   struct binder_transaction *next = t-from_parent;
 
-   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
-send failed reply for transaction %d, 
target dead\n,
-t-debug_id);
+   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
+   send failed reply for transaction %d, target dead\n,
+   t-debug_id);
 
-   binder_pop_transaction(target_thread, t);
-   if (next == NULL) {
-   binder_debug(BINDER_DEBUG_DEAD_BINDER,
-reply failed, no target thread at 
root\n);
-   return;
-   }
-   t = next;
+   binder_pop_transaction(target_thread, t);
+   if (next == NULL) {
binder_debug(BINDER_DEBUG_DEAD_BINDER,
-reply failed, no target thread -- retry 
%d\n,
- t-debug_id);
+reply failed, no target thread at 
root\n);
+   return;
}
+   t = next;
+   binder_debug(BINDER_DEBUG_DEAD_BINDER,
+reply failed, no target thread -- retry %d\n,
+ t-debug_id);
}
 }
 
-- 
2.0.1

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


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Chen Gang
On 07/13/2014 10:25 PM, Lars-Peter Clausen wrote:
 On 07/13/2014 04:03 PM, Richard Weinberger wrote:
 Am 13.07.2014 15:56, schrieb Lars-Peter Clausen:
 On 07/13/2014 03:40 PM, Richard Weinberger wrote:
 Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:
 On 07/13/2014 11:45 AM, Richard Weinberger wrote:
 Am 13.07.2014 11:27, schrieb Lennox Wu:
 As I said before, some configurations don't make sense.

 If such a configuration can be achieved using allmod/yesconfig it has to 
 be fixed.
 Chen's fixes seem reasonable as not all architectures support iomem.

 Maybe we should stub out ioremap() and friends when COMPILE_TEST is 
 enabled to avoid these linker errors. That's in my opinion better than 
 turning most of the 'depends on
 COMPILE_TEST' into 'depends on COMPILE_TEST  HAS_IOMEM'. The issue 
 comes up quite a lot and it is often overlooked when adding a driver that 
 can be build when COMPILE_TEST is
 enabled.

 And what should this stub do?
 Except calling BUG()...

 return NULL;

 It's for compile testing, it's not meant to work at runtime.

 Hm, I really don't like the idea of having a non-working kernel.
 IMHO either it should build _and_ run and nothing else.
 Greg, what do you think?
 
 The kernel will still be working fine and you can run it on a system. The 
 drivers which use ioremap() or similar are probably not instantiated on a 
 system that does not provide HAS_IOMEM. But even if it was the driver should 
 handle ioremap() returning NULL gracefully and abort the driver probe. That 
 said you'll probably not run a kernel that was built with COMPILE_TEST on 
 your real hardware since it contains so many drivers that are completely 
 useless on your hardware. The idea of COMPILE_TEST is to have as much compile 
 test exposure as possible to the code that is enabled by COMPILE_TEST. 
 Stubbing out ioremap() and friends when HAS_IOMEM is not set and COMPILE_TEST 
 is set makes it easier to get there.
 

For me, welcome Greg's idea or suggestion for it.

And also if the reply contents are wrapped (e.g. within 80 or less), that
will generate a better display under other members' email clients.


Thanks
-- 
Chen Gang

Open share and attitude like air water and life which God blessed
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Peter Senna Tschudin
This patch cleanup coding style issues reported by checkpatch.

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com
---
Based on latest staging-next.

 drivers/staging/vt6656/main_usb.c | 118 +-
 1 file changed, 54 insertions(+), 64 deletions(-)

diff --git a/drivers/staging/vt6656/main_usb.c 
b/drivers/staging/vt6656/main_usb.c
index 4cdf29e..13be8b2 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -62,7 +62,7 @@
 #include int.h
 
 /* static int msglevel = MSG_LEVEL_DEBUG; */
-static int  msglevel=MSG_LEVEL_INFO;
+static int msglevel = MSG_LEVEL_INFO;
 
 /*
  * define module options
@@ -75,18 +75,18 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_LICENSE(GPL);
 MODULE_DESCRIPTION(DEVICE_FULL_DRV_NAM);
 
-#define DEVICE_PARAM(N,D) \
-static int N[MAX_UINTS]=OPTION_DEFAULT;\
-module_param_array(N, int, NULL, 0);\
-MODULE_PARM_DESC(N, D);
+#define DEVICE_PARAM(N, D) \
+   static int N[MAX_UINTS] = OPTION_DEFAULT;   \
+   module_param_array(N, int, NULL, 0);\
+   MODULE_PARM_DESC(N, D)
 
-#define RX_DESC_DEF0 64
-DEVICE_PARAM(RxDescriptors0,Number of receive usb desc buffer);
+#define RX_DESC_DEF0 64
+DEVICE_PARAM(RxDescriptors0, Number of receive usb desc buffer);
 
-#define TX_DESC_DEF0 64
-DEVICE_PARAM(TxDescriptors0,Number of transmit usb desc buffer);
+#define TX_DESC_DEF0 64
+DEVICE_PARAM(TxDescriptors0, Number of transmit usb desc buffer);
 
-#define CHANNEL_DEF 6
+#define CHANNEL_DEF 6
 DEVICE_PARAM(Channel, Channel number);
 
 /* PreambleType[] is the preamble length used for transmit.
@@ -177,13 +177,12 @@ static struct usb_device_id vt6656_table[] = {
 /* frequency list (map channels to frequencies) */
 /*
 static const long frequency_list[] = {
-2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 
2472, 2484,
-4915, 4920, 4925, 4935, 4940, 4945, 4960, 4980,
-5035, 5040, 5045, 5055, 5060, 5080, 5170, 5180, 5190, 5200, 5210, 5220, 
5230, 5240,
-5260, 5280, 5300, 5320, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640, 
5660, 5680,
-5700, 5745, 5765, 5785, 5805, 5825
-   };
-
+   2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467,
+   2472, 2484, 4915, 4920, 4925, 4935, 4940, 4945, 4960, 4980, 5035, 5040,
+   5045, 5055, 5060, 5080, 5170, 5180, 5190, 5200, 5210, 5220, 5230, 5240,
+   5260, 5280, 5300, 5320, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640,
+   5660, 5680, 5700, 5745, 5765, 5785, 5805, 5825
+};
 */
 
 static int vt6656_probe(struct usb_interface *intf,
@@ -206,16 +205,16 @@ static void usb_device_reset(struct vnt_private *pDevice);
 
 static void
 device_set_options(struct vnt_private *pDevice) {
-pDevice-cbTD = TX_DESC_DEF0;
-pDevice-cbRD = RX_DESC_DEF0;
-pDevice-byShortRetryLimit = SHORT_RETRY_DEF;
-pDevice-byLongRetryLimit = LONG_RETRY_DEF;
-pDevice-op_mode = NL80211_IFTYPE_UNSPECIFIED;
-pDevice-byBBType = BBP_TYPE_DEF;
-pDevice-byPacketType = pDevice-byBBType;
-pDevice-byAutoFBCtrl = AUTO_FB_0;
-pDevice-byPreambleType = 0;
-pDevice-bExistSWNetAddr = false;
+   pDevice-cbTD = TX_DESC_DEF0;
+   pDevice-cbRD = RX_DESC_DEF0;
+   pDevice-byShortRetryLimit = SHORT_RETRY_DEF;
+   pDevice-byLongRetryLimit = LONG_RETRY_DEF;
+   pDevice-op_mode = NL80211_IFTYPE_UNSPECIFIED;
+   pDevice-byBBType = BBP_TYPE_DEF;
+   pDevice-byPacketType = pDevice-byBBType;
+   pDevice-byAutoFBCtrl = AUTO_FB_0;
+   pDevice-byPreambleType = 0;
+   pDevice-bExistSWNetAddr = false;
 }
 
 /*
@@ -383,38 +382,40 @@ static int device_init_registers(struct vnt_private 
*pDevice)
/* load vt3266 calibration parameters in EEPROM */
if (pDevice-byRFType == RF_VT3226D0) {
if ((pDevice-abyEEPROM[EEP_OFS_MAJOR_VER] == 0x1) 
-   (pDevice-abyEEPROM[EEP_OFS_MINOR_VER] = 0x4)) {
+  (pDevice-abyEEPROM[EEP_OFS_MINOR_VER] = 0x4)) {
 
byCalibTXIQ = pDevice-abyEEPROM[EEP_OFS_CALIB_TX_IQ];
byCalibTXDC = pDevice-abyEEPROM[EEP_OFS_CALIB_TX_DC];
byCalibRXIQ = pDevice-abyEEPROM[EEP_OFS_CALIB_RX_IQ];
if (byCalibTXIQ || byCalibTXDC || byCalibRXIQ) {
-   /* CR255, enable TX/RX IQ and DC compensation mode */
+   /* CR255, enable TX/RX IQ and
+  DC compensation mode */
vnt_control_out_u8(pDevice,
-   MESSAGE_REQUEST_BBREG,
-   0xff,
-   0x03);
-   /* CR251, TX I/Q Imbalance Calibration */
+  MESSAGE_REQUEST_BBREG,
+

Re: [RESEND PATCH] staging: android: Clean up binder_send_failed_reply

2014-07-13 Thread Greg Kroah-Hartman
On Sun, Jul 13, 2014 at 11:49:29AM -0300, Lucas Tanure wrote:
 Kernel coding style. Remove useless else statement after return.
 
 Signed-off-by: Lucas Tanure tan...@linux.com
 ---
  drivers/staging/android/binder.c | 27 +--
  1 file changed, 13 insertions(+), 14 deletions(-)

Why the RESEND?  What was wrong with the first patch?  What is
different with this one?

confused,

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


[PATCH] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Peter Senna Tschudin
This patch cleanup coding style issues reported by checkpatch.

This patch change the following enums:
 - typedef enum __device_msg_level
 - typedef enum __DEVICE_NDIS_STATUS

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com
---
Made against latest staging-next.
 drivers/staging/vt6656/channel.c |  5 +++--
 drivers/staging/vt6656/device.h  | 27 +--
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/vt6656/channel.c b/drivers/staging/vt6656/channel.c
index fb1838e..4a53f1a 100644
--- a/drivers/staging/vt6656/channel.c
+++ b/drivers/staging/vt6656/channel.c
@@ -28,8 +28,9 @@
  *
  *
  * Revision History:
- *  01-18-2005  RobertYu:  remove the for loop searching in 
ChannelValid,
- * change ChannelRuleTab to lookup-type, 
reorder table items.
+ * 01-18-2005  RobertYu:   remove the for loop searching in
+ * ChannelValid, change ChannelRuleTab
+ * to lookup-type, reorder table items.
  *
  *
  */
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 789c55d..e3acf2f 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -187,13 +187,13 @@
 
 #define DBG_PRT(l, p, args...) { if (l = msglevel) printk(p, ##args); }
 
-typedef enum __device_msg_level {
+enum {
MSG_LEVEL_ERR = 0,/* Errors causing abnormal operation */
MSG_LEVEL_NOTICE = 1, /* Errors needing user notification */
MSG_LEVEL_INFO = 2,   /* Normal message. */
MSG_LEVEL_VERBOSE = 3,/* Will report all trival errors. */
MSG_LEVEL_DEBUG = 4   /* Only for debug purpose. */
-} DEVICE_MSG_LEVEL, *PDEVICE_MSG_LEVEL;
+};
 
 #define DEVICE_INIT_COLD   0x0 /* cold init */
 #define DEVICE_INIT_RESET  0x1 /* reset init or Dx to D0 power remain */
@@ -268,13 +268,12 @@ struct vnt_interrupt_buffer {
 
 /*++ NDIS related */
 
-typedef enum __DEVICE_NDIS_STATUS {
-STATUS_SUCCESS = 0,
-STATUS_FAILURE,
-STATUS_RESOURCES,
-STATUS_PENDING,
-} DEVICE_NDIS_STATUS, *PDEVICE_NDIS_STATUS;
-
+enum {
+   STATUS_SUCCESS = 0,
+   STATUS_FAILURE,
+   STATUS_RESOURCES,
+   STATUS_PENDING,
+};
 
 /* flags for options */
 #define DEVICE_FLAGS_UNPLUG  0x0001UL
@@ -443,11 +442,11 @@ struct vnt_private {
struct ieee80211_low_level_stats low_stats;
 };
 
-#define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) {   \
-if ((uVar) = ((uModulo) - 1))  \
-(uVar) = 0; \
-else\
-(uVar)++;   \
+#define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) {  \
+   if ((uVar) = ((uModulo) - 1))  \
+   (uVar) = 0; \
+   else\
+   (uVar)++;   \
 }
 
 #define fMP_DISCONNECTED0x0002
-- 
1.9.3

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


Re: [RESEND PATCH] staging: android: Clean up binder_send_failed_reply

2014-07-13 Thread Greg Kroah-Hartman
On Sun, Jul 13, 2014 at 01:38:45PM -0300, Lucas Tanure wrote:
 I missed on trailing whitespace in first patch.
 Didn't saw a ERROR: trailing whitespace in the first patch.

Ok.  Please, always say that this is a 'v2' patch, and what the
difference is between this one, and the previous version, otherwise I
have no idea what to do here.

thanks,

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


Re: Anybody working on ced1401?

2014-07-13 Thread Greg KH
On Fri, Jun 27, 2014 at 05:11:45PM +0200, Luca Ellero wrote:
 Hi Greg,
 
 On 27/06/2014 16:55, Greg KH wrote:
 On Fri, Jun 27, 2014 at 03:04:43PM +0200, Luca Ellero wrote:
 Il 26/06/2014 21:23, Greg KH ha scritto:
 On Thu, Jun 26, 2014 at 09:36:17AM +0200, Alois Schloegl wrote:
 On 2014-06-18 13:33, Kristina Martšenko wrote:
 Hi Alois,
 
 I'm helping Greg do a bit of cleanup in the staging tree. I noticed that
 nobody seems to have worked towards moving ced1401 out of staging in
 over a year. Are there any plans to clean it up and move it out soon?
 Because otherwise we're going to have to delete the driver, as we don't
 want staging to become a permanent place for unfinished code.
 
 Thanks,
 Kristina
 
 
 
 Hi Kristina,
 
 
 thanks for the notice. Please, give me some time for checking here how
 we want to go forward with this.
 
 What do you mean by this?  You all have had a lot of time, with no real
 progress at all?  How about we delete the driver and if you decide to
 continue to work on it, we can revert that deletion and go from there?
 
 thanks,
 
 greg k-h
 
 Hi,
 I have a hundred patches for this driver ready to send.
 
 Why have you not sent them previously?  What is preventing you to send
 them?
 
 Because it's only for a few weeks that I've been working on them.
 
 They basically convert all camelCase and Hungarian notation names to
 Linux convention and fix some checkpatch errors (no logic is modified).
 
 Do you have this hardware to test the code with?  Do you want to work on
 getting this driver merged out of the staging tree?
 
 I used to have one CED1401, but unfortunately I don't have it any more.
 Anyway if Alois (or someone else) can test the patches it would be
 great. I can do a bit more work to get this driver out of staging.

As you don't have the hardware anymore, does it make much sense to keep
working on the driver?  I'd recommend just deleting it, if someone shows
up with the hardware later, we can always revert it.

thanks,

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


Re: [PATCH v3 1/5] staging:iio:hmc5843: Added regmap support

2014-07-13 Thread Jonathan Cameron

On 08/07/14 14:38, Josef Gajdusek wrote:

This patch changes hmc5843.c to use regmap. This provides transparent caching
to the code as well as abstraction necessary to add support for SPI-based
hmc5983.

Signed-off-by: Josef Gajdusek a...@atx.name

Applied to the togreg branch of iio.git.

Ideally we would have had a short history of the patch below the --- for
each of the patches (or a summary in the cover letter).

Thanks,

---
  drivers/staging/iio/magnetometer/Kconfig   |   1 +
  drivers/staging/iio/magnetometer/hmc5843.c | 140 +++--
  2 files changed, 96 insertions(+), 45 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/Kconfig 
b/drivers/staging/iio/magnetometer/Kconfig
index 34634da..ad88d61 100644
--- a/drivers/staging/iio/magnetometer/Kconfig
+++ b/drivers/staging/iio/magnetometer/Kconfig
@@ -8,6 +8,7 @@ config SENSORS_HMC5843
depends on I2C
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
+   select REGMAP_I2C
help
  Say Y here to add support for the Honeywell HMC5843, HMC5883 and
  HMC5883L 3-Axis Magnetometer (digital compass).
diff --git a/drivers/staging/iio/magnetometer/hmc5843.c 
b/drivers/staging/iio/magnetometer/hmc5843.c
index d4f4dd9..a458160 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -21,6 +21,7 @@

  #include linux/module.h
  #include linux/i2c.h
+#include linux/regmap.h
  #include linux/iio/iio.h
  #include linux/iio/sysfs.h
  #include linux/iio/trigger_consumer.h
@@ -34,6 +35,7 @@
  #define HMC5843_DATA_OUT_MSB_REGS 0x03
  #define HMC5843_STATUS_REG0x09
  #define HMC5843_ID_REG0x0a
+#define HMC5843_ID_END 0x0c

  enum hmc5843_ids {
HMC5843_ID,
@@ -49,6 +51,7 @@ enum hmc5843_ids {
  #define HMC5843_RANGE_GAIN_OFFSET 0x05
  #define HMC5843_RANGE_GAIN_DEFAULT0x01
  #define HMC5843_RANGE_GAINS   8
+#define HMC5843_RANGE_GAIN_MASK0xe0

  /* Device status */
  #define HMC5843_DATA_READY0x01
@@ -68,6 +71,7 @@ enum hmc5843_ids {
  #define HMC5843_RATE_OFFSET   0x02
  #define HMC5843_RATE_DEFAULT  0x04
  #define HMC5843_RATES 7
+#define HMC5843_RATE_MASK  0x1c

  /* Device measurement configuration */
  #define HMC5843_MEAS_CONF_NORMAL  0x00
@@ -121,10 +125,7 @@ struct hmc5843_chip_info {
  struct hmc5843_data {
struct i2c_client *client;
struct mutex lock;
-   u8 rate;
-   u8 meas_conf;
-   u8 operating_mode;
-   u8 range;
+   struct regmap *regmap;
const struct hmc5843_chip_info *variant;
__be16 buffer[8]; /* 3x 16-bit channels + padding + 64-bit timestamp */
  };
@@ -135,10 +136,8 @@ static s32 hmc5843_set_mode(struct hmc5843_data *data, u8 
operating_mode)
int ret;

mutex_lock(data-lock);
-   ret = i2c_smbus_write_byte_data(data-client, HMC5843_MODE_REG,
-   operating_mode  HMC5843_MODE_MASK);
-   if (ret = 0)
-   data-operating_mode = operating_mode;
+   ret = regmap_update_bits(data-regmap, HMC5843_MODE_REG,
+   HMC5843_MODE_MASK, operating_mode);
mutex_unlock(data-lock);

return ret;
@@ -146,15 +145,15 @@ static s32 hmc5843_set_mode(struct hmc5843_data *data, u8 
operating_mode)

  static int hmc5843_wait_measurement(struct hmc5843_data *data)
  {
-   s32 result;
int tries = 150;
+   int val;
+   int ret;

while (tries--  0) {
-   result = i2c_smbus_read_byte_data(data-client,
-   HMC5843_STATUS_REG);
-   if (result  0)
-   return result;
-   if (result  HMC5843_DATA_READY)
+   ret = regmap_read(data-regmap, HMC5843_STATUS_REG, val);
+   if (ret  0)
+   return ret;
+   if (val  HMC5843_DATA_READY)
break;
msleep(20);
}
@@ -171,20 +170,20 @@ static int hmc5843_wait_measurement(struct hmc5843_data 
*data)
  static int hmc5843_read_measurement(struct hmc5843_data *data,
int idx, int *val)
  {
-   s32 result;
__be16 values[3];
+   int ret;

mutex_lock(data-lock);
-   result = hmc5843_wait_measurement(data);
-   if (result  0) {
+   ret = hmc5843_wait_measurement(data);
+   if (ret  0) {
mutex_unlock(data-lock);
-   return result;
+   return ret;
}
-   result = i2c_smbus_read_i2c_block_data(data-client,
-   HMC5843_DATA_OUT_MSB_REGS, sizeof(values), (u8 *) values);
+   ret = regmap_bulk_read(data-regmap, HMC5843_DATA_OUT_MSB_REGS,
+   values, sizeof(values));

RE: [PATCH V3 0/7] Drivers: scsi: storvsc: Bug fixes and improvements

2014-07-13 Thread KY Srinivasan


 -Original Message-
 From: Christoph Hellwig [mailto:h...@infradead.org]
 Sent: Sunday, July 13, 2014 2:51 AM
 To: KY Srinivasan
 Cc: jasow...@redhat.com; a...@canonical.com; linux-
 ker...@vger.kernel.org; de...@linuxdriverproject.org; oher...@suse.com;
 jbottom...@parallels.com; h...@infradead.org; linux-s...@vger.kernel.org
 Subject: Re: [PATCH V3 0/7] Drivers: scsi: storvsc: Bug fixes and
 improvements
 
 The series looks good to me, although I'll probably put the commit message
 for the timer patch into the comment for the eh_timed_out handler.

Do you want me to send the patch out with the additional comments. Would
you be checking these in.

K. Y
 
 Can I get another set of reviews?  I've seen Olaf has put them into the SLES
 tree, so I'd expect he's done a review already?

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


Re: [PATCH v3 2/5] staging:iio:hmc5843: Split hmc5843.c to multiple files

2014-07-13 Thread Jonathan Cameron

On 08/07/14 14:39, Josef Gajdusek wrote:

This patch splits hmc5843.c to multiple files - the interface-agnostic
hmc5843_core.c, i2c specific hmc5843_i2c.c and header file hmc5843.h. This is
another step to add support of SPI-enabled hmc5983.

Signed-off-by: Josef Gajdusek a...@atx.name

Something rather odd is going on when I try to apply this patch to my tree.
It simply refuses to apply and patch -p1  thinks part of it has already
happened. I'm too confused to figure it out at this time on a Sunday.
For now I'm backing out patch 1 as well.

Jonathan

---
  drivers/staging/iio/magnetometer/Kconfig|  16 +-
  drivers/staging/iio/magnetometer/Makefile   |   3 +-
  drivers/staging/iio/magnetometer/hmc5843.c  | 702 
  drivers/staging/iio/magnetometer/hmc5843.h  |  75 +++
  drivers/staging/iio/magnetometer/hmc5843_core.c | 598 
  drivers/staging/iio/magnetometer/hmc5843_i2c.c  | 106 
  6 files changed, 793 insertions(+), 707 deletions(-)
  delete mode 100644 drivers/staging/iio/magnetometer/hmc5843.c
  create mode 100644 drivers/staging/iio/magnetometer/hmc5843.h
  create mode 100644 drivers/staging/iio/magnetometer/hmc5843_core.c
  create mode 100644 drivers/staging/iio/magnetometer/hmc5843_i2c.c

diff --git a/drivers/staging/iio/magnetometer/Kconfig 
b/drivers/staging/iio/magnetometer/Kconfig
index ad88d61..28c2612 100644
--- a/drivers/staging/iio/magnetometer/Kconfig
+++ b/drivers/staging/iio/magnetometer/Kconfig
@@ -5,15 +5,23 @@ menu Magnetometer sensors

  config SENSORS_HMC5843
tristate Honeywell HMC5843/5883/5883L 3-Axis Magnetometer
-   depends on I2C
+   depends on (I2C || SPI_MASTER)
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
-   select REGMAP_I2C
+   select SENSORS_HMC5843_I2C if (I2C)
help
  Say Y here to add support for the Honeywell HMC5843, HMC5883 and
  HMC5883L 3-Axis Magnetometer (digital compass).

- To compile this driver as a module, choose M here: the module
- will be called hmc5843.
+ This driver can also be compiled as a set of modules.
+ If so, these modules will be created:
+ - hmc5843_core (core functions)
+ - hmc5843_i2c (support for HMC5843, HMC5883 and HMC5883L)
+
+config SENSORS_HMC5843_I2C
+   tristate
+   depends on I2C
+   depends on SENSORS_HMC5843
+   select REGMAP_I2C

  endmenu
diff --git a/drivers/staging/iio/magnetometer/Makefile 
b/drivers/staging/iio/magnetometer/Makefile
index f9bfb2e..65baf1c 100644
--- a/drivers/staging/iio/magnetometer/Makefile
+++ b/drivers/staging/iio/magnetometer/Makefile
@@ -2,4 +2,5 @@
  # Makefile for industrial I/O Magnetometer sensors
  #

-obj-$(CONFIG_SENSORS_HMC5843)  += hmc5843.o
+obj-$(CONFIG_SENSORS_HMC5843)  += hmc5843_core.o
+obj-$(CONFIG_SENSORS_HMC5843_I2C)  += hmc5843_i2c.o
diff --git a/drivers/staging/iio/magnetometer/hmc5843.c 
b/drivers/staging/iio/magnetometer/hmc5843.c
deleted file mode 100644
index a458160..000
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ /dev/null
@@ -1,702 +0,0 @@
-/*  Copyright (C) 2010 Texas Instruments
-Author: Shubhrajyoti Datta shubhrajy...@ti.com
-Acknowledgement: Jonathan Cameron ji...@kernel.org for valuable inputs.
-
-Support for HMC5883 and HMC5883L by Peter Meerwald pme...@pmeerw.net.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include linux/module.h
-#include linux/i2c.h
-#include linux/regmap.h
-#include linux/iio/iio.h
-#include linux/iio/sysfs.h
-#include linux/iio/trigger_consumer.h
-#include linux/iio/buffer.h
-#include linux/iio/triggered_buffer.h
-#include linux/delay.h
-
-#define HMC5843_CONFIG_REG_A   0x00
-#define HMC5843_CONFIG_REG_B   0x01
-#define HMC5843_MODE_REG   0x02
-#define HMC5843_DATA_OUT_MSB_REGS  0x03
-#define HMC5843_STATUS_REG 0x09
-#define HMC5843_ID_REG 0x0a
-#define HMC5843_ID_END 0x0c
-
-enum hmc5843_ids {
-   HMC5843_ID,
-   HMC5883_ID,
-   HMC5883L_ID,
-};
-
-/*
- * Range gain settings in (+-)Ga
- * Beware: HMC5843 and HMC5883 have different recommended sensor field
- * ranges; default corresponds to +-1.0 Ga and +-1.3 

Re: [PATCH] drivers/staging/iio/adc/Kconfig: Let MXS_LRADC depend on HAS_IOMEM

2014-07-13 Thread Jonathan Cameron

On 13/07/14 14:27, Marek Vasut wrote:

On Sunday, July 13, 2014 at 01:44:38 PM, Chen Gang wrote:

MXS_LRADC need HAS_IOMEM, so let it depend on HAS_IOMEM

The related error (with allmodconfig under score):

 MODPOST 1365 modules
   ERROR: devm_ioremap_resource [drivers/staging/iio/adc/mxs-lradc.ko]
undefined!


Signed-off-by: Chen Gang gang.chen.5...@gmail.com


Acked-by: Marek Vasut ma...@denx.de

Applied to the togreg branch of iio.git.

Thanks,


Best regards,
Marek Vasut



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


RE: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16

2014-07-13 Thread KY Srinivasan


 -Original Message-
 From: Martin K. Petersen [mailto:martin.peter...@oracle.com]
 Sent: Sunday, July 13, 2014 5:59 AM
 To: KY Srinivasan
 Cc: h...@infradead.org; James Bottomley; linux-ker...@vger.kernel.org;
 de...@linuxdriverproject.org; a...@canonical.com; sta...@vger.kernel.org;
 linux-s...@vger.kernel.org; oher...@suse.com; jasow...@redhat.com
 Subject: Re: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16
 
  KY == KY Srinivasan k...@microsoft.com writes:
 
 KY Windows hosts do support UNMAP and set the field in the EVPD.
 KY However, since the host advertises SPC-2 compliance, Linux does not
 KY even query the VPD page.
 
  If we want to enable UNMAP in this case I'd prefer a blacklist entry
  than trying UNMAP despite the device not advertising it.
 
 I agree with that. We could do something like the patch below.
 
 However, I do think it's a good idea that you guys are looking into reporting
 SPC-3.

Thanks Martin; this patch would address our present issues. I will get some 
testing done
and report back.

Regards,

K. Y
 
 
 SCSI: Add a blacklist flag which enables VPD page inquiries
 
 Despite supporting modern SCSI features some storage devices continue to
 claim conformance to an older version of the SPC spec. This is done for
 compatibility with legacy operating systems.
 
 Linux by default will not attempt to read VPD pages on devices that claim
 SPC-2 or older. Introduce a blacklist flag that can be used to trigger VPD 
 page
 inquiries on devices that are known to support them.
 
 Reported-by: KY Srinivasan k...@microsoft.com
 Signed-off-by: Martin K. Petersen martin.peter...@oracle.com
 
 diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index
 4a6e4ba5a400..a5b1a224628a 100644
 --- a/drivers/scsi/scsi_scan.c
 +++ b/drivers/scsi/scsi_scan.c
 @@ -949,7 +949,9 @@ static int scsi_add_lun(struct scsi_device *sdev,
 unsigned char *inq_result,
 
   sdev-eh_timeout = SCSI_DEFAULT_EH_TIMEOUT;
 
 - if (*bflags  BLIST_SKIP_VPD_PAGES)
 + if (*bflags  BLIST_TRY_VPD_PAGES)
 + sdev-try_vpd_pages = 1;
 + else if (*bflags  BLIST_SKIP_VPD_PAGES)
   sdev-skip_vpd_pages = 1;
 
   transport_configure_device(sdev-sdev_gendev);
 diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index
 87566b51fcf7..31d32b9077ca 100644
 --- a/drivers/scsi/sd.c
 +++ b/drivers/scsi/sd.c
 @@ -2701,6 +2701,11 @@ static void sd_read_write_same(struct scsi_disk
 *sdkp, unsigned char *buffer)
 
  static int sd_try_extended_inquiry(struct scsi_device *sdp)  {
 + /* Attempt VPD inquiry if the device blacklist explicitly calls
 +  * for it.
 +  */
 + if (sdp-try_vpd_pages)
 + return 1;
   /*
* Although VPD inquiries can go to SCSI-2 type devices,
* some USB ones crash on receiving them, and the pages diff --git
 a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index
 9aa38f7b303b..f579408620f0 100644
 --- a/include/scsi/scsi_device.h
 +++ b/include/scsi/scsi_device.h
 @@ -155,6 +155,7 @@ struct scsi_device {
   unsigned skip_ms_page_8:1;  /* do not use MODE SENSE page 0x08
 */
   unsigned skip_ms_page_3f:1; /* do not use MODE SENSE page 0x3f
 */
   unsigned skip_vpd_pages:1;  /* do not read VPD pages */
 + unsigned try_vpd_pages:1;   /* attempt to read VPD pages */
   unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page
 0x3f */
   unsigned no_start_on_add:1; /* do not issue start on add */
   unsigned allow_restart:1; /* issue START_UNIT in error handler */
 diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h index
 8670c04e199e..1fdd6fc5492b 100644
 --- a/include/scsi/scsi_devinfo.h
 +++ b/include/scsi/scsi_devinfo.h
 @@ -34,4 +34,5 @@
  #define BLIST_SKIP_VPD_PAGES 0x400 /* Ignore SBC-3 VPD pages
 */
  #define BLIST_SCSI3LUN   0x800 /* Scan more than 256
 LUNs
for sequential scan */
 +#define BLIST_TRY_VPD_PAGES  0x1000 /* Attempt to read VPD
 pages */
  #endif
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Greg KH
On Sun, Jul 13, 2014 at 05:39:55PM +0200, Peter Senna Tschudin wrote:
 This patch cleanup coding style issues reported by checkpatch.
 
 Tested by compilation only.
 
 Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com
 ---
 Based on latest staging-next.

You just sent me 4 patches, all with the same subject (but at least 2 of
them had the order in which to apply them in, which is nice.)

Please redo these such that they have a unique subject, and I can tell
which order to apply them in, as I really have no idea about the second
two.

thanks,

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


Re: [PATCH] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

2014-07-13 Thread Greg Kroah-Hartman
On Sun, Jul 13, 2014 at 10:50:55PM +0800, Chen Gang wrote:
 Some of architectures have already defined 'die' as macro, so can not use
 this common name as declaration in other modules, or will cause compiling
 issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.
 
 The related error (with allmodconfig under score):
 
 CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
 'sptlrpc_cli_ctx_expire':
   drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
 ptlrpc_ctx_ops' has no member named '__die'
 ctx-cc_ops-die(ctx, 0);
^
   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
 'ctx_refresh_timeout':
   drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
 ptlrpc_ctx_ops' has no member named '__die'
  req-rq_cli_ctx-cc_ops-die(req-rq_cli_ctx, 0);
 ^
   make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
   make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
   make[3]: *** [drivers/staging/lustre/lustre] Error 2
   make[2]: *** [drivers/staging/lustre] Error 2
   make[1]: *** [drivers/staging] Error 2
   make: *** [drivers] Error 2
 
 
 Signed-off-by: Chen Gang gang.chen.5...@gmail.com
 ---
  drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
  drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
  2 files changed, 4 insertions(+), 4 deletions(-)

This doesn't apply to my tree, can you please refresh it against the
staging-next branch of staging.git so that I can apply it?

thanks,

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


Re: [RESEND PATCH] staging: android: Clean up binder_send_failed_reply

2014-07-13 Thread Greg Kroah-Hartman
On Sun, Jul 13, 2014 at 11:49:29AM -0300, Lucas Tanure wrote:
 Kernel coding style. Remove useless else statement after return.
 
 Signed-off-by: Lucas Tanure tan...@linux.com
 ---
  drivers/staging/android/binder.c | 27 +--
  1 file changed, 13 insertions(+), 14 deletions(-)

You didn't compile this patch :(

Or if you did, you ignored the fact that it now adds a warning to the
kernel build process, which is not allowed.  Please fix this up and
resend.

thanks,

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


[PATCH V2 2/4] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Peter Senna Tschudin
This patch cleanup coding style issues reported by checkpatch.

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com
---
Cahnges from V1:
 - Sent all patches in a series

Made against latest staging-next.

 drivers/staging/vt6656/main_usb.c | 118 +-
 1 file changed, 54 insertions(+), 64 deletions(-)

diff --git a/drivers/staging/vt6656/main_usb.c 
b/drivers/staging/vt6656/main_usb.c
index 4cdf29e..13be8b2 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -62,7 +62,7 @@
 #include int.h
 
 /* static int msglevel = MSG_LEVEL_DEBUG; */
-static int  msglevel=MSG_LEVEL_INFO;
+static int msglevel = MSG_LEVEL_INFO;
 
 /*
  * define module options
@@ -75,18 +75,18 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_LICENSE(GPL);
 MODULE_DESCRIPTION(DEVICE_FULL_DRV_NAM);
 
-#define DEVICE_PARAM(N,D) \
-static int N[MAX_UINTS]=OPTION_DEFAULT;\
-module_param_array(N, int, NULL, 0);\
-MODULE_PARM_DESC(N, D);
+#define DEVICE_PARAM(N, D) \
+   static int N[MAX_UINTS] = OPTION_DEFAULT;   \
+   module_param_array(N, int, NULL, 0);\
+   MODULE_PARM_DESC(N, D)
 
-#define RX_DESC_DEF0 64
-DEVICE_PARAM(RxDescriptors0,Number of receive usb desc buffer);
+#define RX_DESC_DEF0 64
+DEVICE_PARAM(RxDescriptors0, Number of receive usb desc buffer);
 
-#define TX_DESC_DEF0 64
-DEVICE_PARAM(TxDescriptors0,Number of transmit usb desc buffer);
+#define TX_DESC_DEF0 64
+DEVICE_PARAM(TxDescriptors0, Number of transmit usb desc buffer);
 
-#define CHANNEL_DEF 6
+#define CHANNEL_DEF 6
 DEVICE_PARAM(Channel, Channel number);
 
 /* PreambleType[] is the preamble length used for transmit.
@@ -177,13 +177,12 @@ static struct usb_device_id vt6656_table[] = {
 /* frequency list (map channels to frequencies) */
 /*
 static const long frequency_list[] = {
-2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 
2472, 2484,
-4915, 4920, 4925, 4935, 4940, 4945, 4960, 4980,
-5035, 5040, 5045, 5055, 5060, 5080, 5170, 5180, 5190, 5200, 5210, 5220, 
5230, 5240,
-5260, 5280, 5300, 5320, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640, 
5660, 5680,
-5700, 5745, 5765, 5785, 5805, 5825
-   };
-
+   2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467,
+   2472, 2484, 4915, 4920, 4925, 4935, 4940, 4945, 4960, 4980, 5035, 5040,
+   5045, 5055, 5060, 5080, 5170, 5180, 5190, 5200, 5210, 5220, 5230, 5240,
+   5260, 5280, 5300, 5320, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640,
+   5660, 5680, 5700, 5745, 5765, 5785, 5805, 5825
+};
 */
 
 static int vt6656_probe(struct usb_interface *intf,
@@ -206,16 +205,16 @@ static void usb_device_reset(struct vnt_private *pDevice);
 
 static void
 device_set_options(struct vnt_private *pDevice) {
-pDevice-cbTD = TX_DESC_DEF0;
-pDevice-cbRD = RX_DESC_DEF0;
-pDevice-byShortRetryLimit = SHORT_RETRY_DEF;
-pDevice-byLongRetryLimit = LONG_RETRY_DEF;
-pDevice-op_mode = NL80211_IFTYPE_UNSPECIFIED;
-pDevice-byBBType = BBP_TYPE_DEF;
-pDevice-byPacketType = pDevice-byBBType;
-pDevice-byAutoFBCtrl = AUTO_FB_0;
-pDevice-byPreambleType = 0;
-pDevice-bExistSWNetAddr = false;
+   pDevice-cbTD = TX_DESC_DEF0;
+   pDevice-cbRD = RX_DESC_DEF0;
+   pDevice-byShortRetryLimit = SHORT_RETRY_DEF;
+   pDevice-byLongRetryLimit = LONG_RETRY_DEF;
+   pDevice-op_mode = NL80211_IFTYPE_UNSPECIFIED;
+   pDevice-byBBType = BBP_TYPE_DEF;
+   pDevice-byPacketType = pDevice-byBBType;
+   pDevice-byAutoFBCtrl = AUTO_FB_0;
+   pDevice-byPreambleType = 0;
+   pDevice-bExistSWNetAddr = false;
 }
 
 /*
@@ -383,38 +382,40 @@ static int device_init_registers(struct vnt_private 
*pDevice)
/* load vt3266 calibration parameters in EEPROM */
if (pDevice-byRFType == RF_VT3226D0) {
if ((pDevice-abyEEPROM[EEP_OFS_MAJOR_VER] == 0x1) 
-   (pDevice-abyEEPROM[EEP_OFS_MINOR_VER] = 0x4)) {
+  (pDevice-abyEEPROM[EEP_OFS_MINOR_VER] = 0x4)) {
 
byCalibTXIQ = pDevice-abyEEPROM[EEP_OFS_CALIB_TX_IQ];
byCalibTXDC = pDevice-abyEEPROM[EEP_OFS_CALIB_TX_DC];
byCalibRXIQ = pDevice-abyEEPROM[EEP_OFS_CALIB_RX_IQ];
if (byCalibTXIQ || byCalibTXDC || byCalibRXIQ) {
-   /* CR255, enable TX/RX IQ and DC compensation mode */
+   /* CR255, enable TX/RX IQ and
+  DC compensation mode */
vnt_control_out_u8(pDevice,
-   MESSAGE_REQUEST_BBREG,
-   0xff,
-   0x03);
-   /* CR251, TX I/Q Imbalance Calibration */
+  

[PATCH V2 3/4] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Peter Senna Tschudin
This patch cleanup coding style issues reported by checkpatch.

Additionally this typedef was removed from card.h:

typedef enum _CARD_PHY_TYPE {
PHY_TYPE_AUTO = 0,
PHY_TYPE_11B,
PHY_TYPE_11G,
PHY_TYPE_11A
} CARD_PHY_TYPE, *PCARD_PHY_TYPE;

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com
---
Cahnges from V1:
 - Sent all patches in a series

Made against latest staging-next.

 drivers/staging/vt6656/card.c | 19 ---
 drivers/staging/vt6656/card.h | 13 +++--
 2 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index ea06b63..f469d68 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -55,11 +55,12 @@
 #include key.h
 #include usbpipe.h
 
-//const u16 cwRXBCNTSFOff[MAX_RATE] =
-//{17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3};
+/* const u16 cwRXBCNTSFOff[MAX_RATE] =
+   {17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3}; */
 
-static const u16 cwRXBCNTSFOff[MAX_RATE] =
-{192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3};
+static const u16 cwRXBCNTSFOff[MAX_RATE] = {
+   192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3
+};
 
 /*
  * Description: Set NIC media channel
@@ -477,7 +478,7 @@ void vnt_update_top_rates(struct vnt_private *priv)
}
 
priv-byTopCCKBasicRate = top_cck;
- }
+}
 
 int vnt_ofdm_min_rate(struct vnt_private *priv)
 {
@@ -673,9 +674,7 @@ void vnt_reset_next_tbtt(struct vnt_private *priv, u16 
beacon_interval)
data[7] = (u8)(next_tbtt  56);
 
vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT,
-   MESSAGE_REQUEST_TBTT, 0, 8, data);
-
-   return;
+   MESSAGE_REQUEST_TBTT, 0, 8, data);
 }
 
 /*
@@ -710,11 +709,9 @@ void vnt_update_next_tbtt(struct vnt_private *priv, u64 
tsf,
data[7] = (u8)(tsf  56);
 
vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT,
-   MESSAGE_REQUEST_TBTT, 0, 8, data);
+   MESSAGE_REQUEST_TBTT, 0, 8, data);
 
dev_dbg(priv-usb-dev, %s TBTT: %8llx\n, __func__, tsf);
-
-   return;
 }
 
 /*
diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h
index 5b7cc5a..03fc167 100644
--- a/drivers/staging/vt6656/card.h
+++ b/drivers/staging/vt6656/card.h
@@ -32,16 +32,9 @@
 
 /* init card type */
 
-typedef enum _CARD_PHY_TYPE {
-PHY_TYPE_AUTO = 0,
-PHY_TYPE_11B,
-PHY_TYPE_11G,
-PHY_TYPE_11A
-} CARD_PHY_TYPE, *PCARD_PHY_TYPE;
-
-#define CB_MAX_CHANNEL_24G  14
-#define CB_MAX_CHANNEL_5G   42 /* add channel9(5045MHz), 41==42 */
-#define CB_MAX_CHANNEL  (CB_MAX_CHANNEL_24G+CB_MAX_CHANNEL_5G)
+#define CB_MAX_CHANNEL_24G 14
+#define CB_MAX_CHANNEL_5G  42 /* add channel9(5045MHz), 41==42 */
+#define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G + CB_MAX_CHANNEL_5G)
 
 struct vnt_private;
 
-- 
1.9.3

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


[PATCH V2 4/4] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Peter Senna Tschudin
This patch cleanup coding style issues reported by checkpatch.

This patch change the following enums:
 - typedef enum __device_msg_level
 - typedef enum __DEVICE_NDIS_STATUS

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com
---
Cahnges from V1:
 - Sent all patches in a series

Made against latest staging-next.

 drivers/staging/vt6656/channel.c |  5 +++--
 drivers/staging/vt6656/device.h  | 27 +--
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/vt6656/channel.c b/drivers/staging/vt6656/channel.c
index fb1838e..4a53f1a 100644
--- a/drivers/staging/vt6656/channel.c
+++ b/drivers/staging/vt6656/channel.c
@@ -28,8 +28,9 @@
  *
  *
  * Revision History:
- *  01-18-2005  RobertYu:  remove the for loop searching in 
ChannelValid,
- * change ChannelRuleTab to lookup-type, 
reorder table items.
+ * 01-18-2005  RobertYu:   remove the for loop searching in
+ * ChannelValid, change ChannelRuleTab
+ * to lookup-type, reorder table items.
  *
  *
  */
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 789c55d..e3acf2f 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -187,13 +187,13 @@
 
 #define DBG_PRT(l, p, args...) { if (l = msglevel) printk(p, ##args); }
 
-typedef enum __device_msg_level {
+enum {
MSG_LEVEL_ERR = 0,/* Errors causing abnormal operation */
MSG_LEVEL_NOTICE = 1, /* Errors needing user notification */
MSG_LEVEL_INFO = 2,   /* Normal message. */
MSG_LEVEL_VERBOSE = 3,/* Will report all trival errors. */
MSG_LEVEL_DEBUG = 4   /* Only for debug purpose. */
-} DEVICE_MSG_LEVEL, *PDEVICE_MSG_LEVEL;
+};
 
 #define DEVICE_INIT_COLD   0x0 /* cold init */
 #define DEVICE_INIT_RESET  0x1 /* reset init or Dx to D0 power remain */
@@ -268,13 +268,12 @@ struct vnt_interrupt_buffer {
 
 /*++ NDIS related */
 
-typedef enum __DEVICE_NDIS_STATUS {
-STATUS_SUCCESS = 0,
-STATUS_FAILURE,
-STATUS_RESOURCES,
-STATUS_PENDING,
-} DEVICE_NDIS_STATUS, *PDEVICE_NDIS_STATUS;
-
+enum {
+   STATUS_SUCCESS = 0,
+   STATUS_FAILURE,
+   STATUS_RESOURCES,
+   STATUS_PENDING,
+};
 
 /* flags for options */
 #define DEVICE_FLAGS_UNPLUG  0x0001UL
@@ -443,11 +442,11 @@ struct vnt_private {
struct ieee80211_low_level_stats low_stats;
 };
 
-#define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) {   \
-if ((uVar) = ((uModulo) - 1))  \
-(uVar) = 0; \
-else\
-(uVar)++;   \
+#define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) {  \
+   if ((uVar) = ((uModulo) - 1))  \
+   (uVar) = 0; \
+   else\
+   (uVar)++;   \
 }
 
 #define fMP_DISCONNECTED0x0002
-- 
1.9.3

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


[PATCH V2 1/4] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Peter Senna Tschudin
This patch cleanup coding style issues reported by checkpatch.

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com
---
Cahnges from V1:
 - Sent all patches in a series

Made against latest staging-next.

 drivers/staging/vt6656/baseband.c | 28 
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/vt6656/baseband.c 
b/drivers/staging/vt6656/baseband.c
index c1675d5..040b232 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -26,9 +26,10 @@
  * Date: Jun. 5, 2002
  *
  * Functions:
- *  vnt_get_frame_time- Calculate data frame transmitting time
- *  vnt_get_phy_field   - Calculate PhyLength, PhyService and Phy Signal 
parameter for baseband Tx
- *  BBbVT3184Init  - VIA VT3184 baseband chip init code
+ * vnt_get_frame_time  - Calculate data frame transmitting time
+ * vnt_get_phy_field   - Calculate PhyLength, PhyService and Phy
+ *   Signal parameter for baseband Tx
+ * BBbVT3184Init   - VIA VT3184 baseband chip init code
  *
  * Revision History:
  *
@@ -86,7 +87,7 @@ static u8 vnt_vt3184_al2230[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00  /* 0xff */
 };
 
-//{{RobertYu:20060515, new BB setting for VT3226D0
+/* {{RobertYu:20060515, new BB setting for VT3226D0 */
 static u8 vnt_vt3184_vt3226d0[] = {
0x31, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
0x70, 0x45, 0x2a, 0x76, 0x00, 0x00, 0x80, 0x00, /* 0x0f */
@@ -122,8 +123,9 @@ static u8 vnt_vt3184_vt3226d0[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00  /* 0xff */
 };
 
-static const u16 awcFrameTime[MAX_RATE] =
-{10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216};
+static const u16 awcFrameTime[MAX_RATE] = {
+   10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216
+};
 
 /*
  * Description: Calculate data frame transmitting time
@@ -191,9 +193,9 @@ unsigned int vnt_get_frame_time(u8 preamble_type, u8 
pkt_type,
  *  tx_rate   - Tx Rate
  *  Out:
  * struct vnt_phy_field *phy
- * - pointer to Phy Length field
- * - pointer to Phy Service field
- * - pointer to Phy Signal field
+ * - pointer to Phy Length field
+ * - pointer to Phy Service field
+ * - pointer to Phy Signal field
  *
  * Return Value: none
  *
@@ -450,8 +452,9 @@ int BBbVT3184Init(struct vnt_private *priv)
priv-ldBmThreshold[2] = 0;
priv-ldBmThreshold[3] = 0;
/* Fix VT3226 DFC system timing issue */
-   vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2, 
SOFTPWRCTL_RFLEOPT);
-   } else if ((priv-byRFType == RF_VT3342A0)) {
+   vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2,
+   SOFTPWRCTL_RFLEOPT);
+   } else if (priv-byRFType == RF_VT3342A0) {
priv-byBBRxConf = vnt_vt3184_vt3226d0[10];
length = sizeof(vnt_vt3184_vt3226d0);
addr = vnt_vt3184_vt3226d0;
@@ -467,7 +470,8 @@ int BBbVT3184Init(struct vnt_private *priv)
priv-ldBmThreshold[2] = 0;
priv-ldBmThreshold[3] = 0;
/* Fix VT3226 DFC system timing issue */
-   vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2, 
SOFTPWRCTL_RFLEOPT);
+   vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2,
+   SOFTPWRCTL_RFLEOPT);
} else {
return true;
}
-- 
1.9.3

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


RE: [PATCH 2/2] staging: comedi: addi_apci_1564: use addi_watchdog module to init watchdog subdevice

2014-07-13 Thread Hartley Sweeten
On Saturday, July 12, 2014 3:44 PM, Chase Southwood wrote:
 Use the addi_watchdog module to provide support for the watchdog
 subdevice.

 Also, rearrange the subdevice init blocks so that the order makes sense.
 Digital input/output subdevices and subdevices for DI/DO interrupt
 support, followed by timer/counter/watchdog subdevices is the new order.

 Signed-off-by: Chase Southwood chase.southw...@gmail.com
 Cc: Ian Abbott abbo...@mev.co.uk
 Cc: H Hartley Sweeten hswee...@visionengravers.com
 ---
  drivers/staging/comedi/drivers/addi_apci_1564.c | 34 
 +++--
  1 file changed, 20 insertions(+), 14 deletions(-)

Chase,

You should also add the dependency for the addi watchdog module
to the Kconfig.

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


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Greg Kroah-Hartman
On Sun, Jul 13, 2014 at 04:25:06PM +0200, Lars-Peter Clausen wrote:
 On 07/13/2014 04:03 PM, Richard Weinberger wrote:
 Am 13.07.2014 15:56, schrieb Lars-Peter Clausen:
 On 07/13/2014 03:40 PM, Richard Weinberger wrote:
 Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:
 On 07/13/2014 11:45 AM, Richard Weinberger wrote:
 Am 13.07.2014 11:27, schrieb Lennox Wu:
 As I said before, some configurations don't make sense.
 
 If such a configuration can be achieved using allmod/yesconfig it has to 
 be fixed.
 Chen's fixes seem reasonable as not all architectures support iomem.
 
 Maybe we should stub out ioremap() and friends when COMPILE_TEST is 
 enabled to avoid these linker errors. That's in my opinion better than 
 turning most of the 'depends on
 COMPILE_TEST' into 'depends on COMPILE_TEST  HAS_IOMEM'. The issue 
 comes up quite a lot and it is often overlooked when adding a driver that 
 can be build when COMPILE_TEST is
 enabled.
 
 And what should this stub do?
 Except calling BUG()...
 
 return NULL;
 
 It's for compile testing, it's not meant to work at runtime.
 
 Hm, I really don't like the idea of having a non-working kernel.
 IMHO either it should build _and_ run and nothing else.
 Greg, what do you think?
 
 The kernel will still be working fine and you can run it on a system. The
 drivers which use ioremap() or similar are probably not instantiated on a
 system that does not provide HAS_IOMEM. But even if it was the driver should
 handle ioremap() returning NULL gracefully and abort the driver probe. That
 said you'll probably not run a kernel that was built with COMPILE_TEST on
 your real hardware since it contains so many drivers that are completely
 useless on your hardware. The idea of COMPILE_TEST is to have as much
 compile test exposure as possible to the code that is enabled by
 COMPILE_TEST. Stubbing out ioremap() and friends when HAS_IOMEM is not set
 and COMPILE_TEST is set makes it easier to get there.

I run my kernels with COMPILE_TEST enabled as I need to build test
things that I don't happen to use.

I like the 'return NULL' option for this, it hits us all the time, might
as well fix it properly like this so that we don't have to deal with
Kconfig changes everywhere.

Also put a big This platform does not support IOMEM error printk in
there, so that people have a chance to figure out what is going on if
they happen to run such a driver on a platform that can't support it.

thanks,

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


Re: [PATCH V2 1/4] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Greg KH
On Sun, Jul 13, 2014 at 09:11:18PM +0200, Peter Senna Tschudin wrote:
 This patch cleanup coding style issues reported by checkpatch.
 
 Tested by compilation only.
 
 Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com
 ---
 Cahnges from V1:
  - Sent all patches in a series

Why did you forget the other thing that I asked you to change?

I can't take these as-is, sorry, please go back and re-read what I
wrote...

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


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Richard Weinberger
Am 13.07.2014 21:22, schrieb Greg Kroah-Hartman:
 On Sun, Jul 13, 2014 at 04:25:06PM +0200, Lars-Peter Clausen wrote:
 On 07/13/2014 04:03 PM, Richard Weinberger wrote:
 Am 13.07.2014 15:56, schrieb Lars-Peter Clausen:
 On 07/13/2014 03:40 PM, Richard Weinberger wrote:
 Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:
 On 07/13/2014 11:45 AM, Richard Weinberger wrote:
 Am 13.07.2014 11:27, schrieb Lennox Wu:
 As I said before, some configurations don't make sense.

 If such a configuration can be achieved using allmod/yesconfig it has 
 to be fixed.
 Chen's fixes seem reasonable as not all architectures support iomem.

 Maybe we should stub out ioremap() and friends when COMPILE_TEST is 
 enabled to avoid these linker errors. That's in my opinion better than 
 turning most of the 'depends on
 COMPILE_TEST' into 'depends on COMPILE_TEST  HAS_IOMEM'. The issue 
 comes up quite a lot and it is often overlooked when adding a driver 
 that can be build when COMPILE_TEST is
 enabled.

 And what should this stub do?
 Except calling BUG()...

 return NULL;

 It's for compile testing, it's not meant to work at runtime.

 Hm, I really don't like the idea of having a non-working kernel.
 IMHO either it should build _and_ run and nothing else.
 Greg, what do you think?

 The kernel will still be working fine and you can run it on a system. The
 drivers which use ioremap() or similar are probably not instantiated on a
 system that does not provide HAS_IOMEM. But even if it was the driver should
 handle ioremap() returning NULL gracefully and abort the driver probe. That
 said you'll probably not run a kernel that was built with COMPILE_TEST on
 your real hardware since it contains so many drivers that are completely
 useless on your hardware. The idea of COMPILE_TEST is to have as much
 compile test exposure as possible to the code that is enabled by
 COMPILE_TEST. Stubbing out ioremap() and friends when HAS_IOMEM is not set
 and COMPILE_TEST is set makes it easier to get there.
 
 I run my kernels with COMPILE_TEST enabled as I need to build test
 things that I don't happen to use.
 
 I like the 'return NULL' option for this, it hits us all the time, might
 as well fix it properly like this so that we don't have to deal with
 Kconfig changes everywhere.
 
 Also put a big This platform does not support IOMEM error printk in
 there, so that people have a chance to figure out what is going on if
 they happen to run such a driver on a platform that can't support it.

Maybe we could add COMPILE_TEST to the version string too?
Just to detect such kernels fast in user bug reports...

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


Re: [RESEND PATCH] staging: android: Clean up binder_send_failed_reply

2014-07-13 Thread Lucas Tanure
Sorry,
I didn't know. I will fix.

Thanks
--
Lucas Tanure
+55 (19) 988176559


On Sun, Jul 13, 2014 at 4:07 PM, Greg Kroah-Hartman
gre...@linuxfoundation.org wrote:
 On Sun, Jul 13, 2014 at 11:49:29AM -0300, Lucas Tanure wrote:
 Kernel coding style. Remove useless else statement after return.

 Signed-off-by: Lucas Tanure tan...@linux.com
 ---
  drivers/staging/android/binder.c | 27 +--
  1 file changed, 13 insertions(+), 14 deletions(-)

 You didn't compile this patch :(

 Or if you did, you ignored the fact that it now adds a warning to the
 kernel build process, which is not allowed.  Please fix this up and
 resend.

 thanks,

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


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Greg Kroah-Hartman
On Sun, Jul 13, 2014 at 09:33:38PM +0200, Richard Weinberger wrote:
 Am 13.07.2014 21:22, schrieb Greg Kroah-Hartman:
  On Sun, Jul 13, 2014 at 04:25:06PM +0200, Lars-Peter Clausen wrote:
  On 07/13/2014 04:03 PM, Richard Weinberger wrote:
  Am 13.07.2014 15:56, schrieb Lars-Peter Clausen:
  On 07/13/2014 03:40 PM, Richard Weinberger wrote:
  Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:
  On 07/13/2014 11:45 AM, Richard Weinberger wrote:
  Am 13.07.2014 11:27, schrieb Lennox Wu:
  As I said before, some configurations don't make sense.
 
  If such a configuration can be achieved using allmod/yesconfig it has 
  to be fixed.
  Chen's fixes seem reasonable as not all architectures support iomem.
 
  Maybe we should stub out ioremap() and friends when COMPILE_TEST is 
  enabled to avoid these linker errors. That's in my opinion better than 
  turning most of the 'depends on
  COMPILE_TEST' into 'depends on COMPILE_TEST  HAS_IOMEM'. The issue 
  comes up quite a lot and it is often overlooked when adding a driver 
  that can be build when COMPILE_TEST is
  enabled.
 
  And what should this stub do?
  Except calling BUG()...
 
  return NULL;
 
  It's for compile testing, it's not meant to work at runtime.
 
  Hm, I really don't like the idea of having a non-working kernel.
  IMHO either it should build _and_ run and nothing else.
  Greg, what do you think?
 
  The kernel will still be working fine and you can run it on a system. The
  drivers which use ioremap() or similar are probably not instantiated on a
  system that does not provide HAS_IOMEM. But even if it was the driver 
  should
  handle ioremap() returning NULL gracefully and abort the driver probe. That
  said you'll probably not run a kernel that was built with COMPILE_TEST on
  your real hardware since it contains so many drivers that are completely
  useless on your hardware. The idea of COMPILE_TEST is to have as much
  compile test exposure as possible to the code that is enabled by
  COMPILE_TEST. Stubbing out ioremap() and friends when HAS_IOMEM is not set
  and COMPILE_TEST is set makes it easier to get there.
  
  I run my kernels with COMPILE_TEST enabled as I need to build test
  things that I don't happen to use.
  
  I like the 'return NULL' option for this, it hits us all the time, might
  as well fix it properly like this so that we don't have to deal with
  Kconfig changes everywhere.
  
  Also put a big This platform does not support IOMEM error printk in
  there, so that people have a chance to figure out what is going on if
  they happen to run such a driver on a platform that can't support it.
 
 Maybe we could add COMPILE_TEST to the version string too?
 Just to detect such kernels fast in user bug reports...

What kind of bug report are you going to get?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

2014-07-13 Thread Chen Gang
On 07/14/2014 03:05 AM, Greg Kroah-Hartman wrote:
 On Sun, Jul 13, 2014 at 10:50:55PM +0800, Chen Gang wrote:
 Some of architectures have already defined 'die' as macro, so can not use
 this common name as declaration in other modules, or will cause compiling
 issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

 The related error (with allmodconfig under score):

 CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
 'sptlrpc_cli_ctx_expire':
   drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
 ptlrpc_ctx_ops' has no member named '__die'
 ctx-cc_ops-die(ctx, 0);
^
   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
 'ctx_refresh_timeout':
   drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
 ptlrpc_ctx_ops' has no member named '__die'
  req-rq_cli_ctx-cc_ops-die(req-rq_cli_ctx, 0);
 ^
   make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
   make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
   make[3]: *** [drivers/staging/lustre/lustre] Error 2
   make[2]: *** [drivers/staging/lustre] Error 2
   make[1]: *** [drivers/staging] Error 2
   make: *** [drivers] Error 2


 Signed-off-by: Chen Gang gang.chen.5...@gmail.com
 ---
  drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
  drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
  2 files changed, 4 insertions(+), 4 deletions(-)
 
 This doesn't apply to my tree, can you please refresh it against the
 staging-next branch of staging.git so that I can apply it?
 

OK, I shall go to that tree and send patch for it (I shall finish within
2 days).

Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

2014-07-13 Thread Chen Gang
On 07/14/2014 05:41 AM, Chen Gang wrote:
 On 07/14/2014 03:05 AM, Greg Kroah-Hartman wrote:
 On Sun, Jul 13, 2014 at 10:50:55PM +0800, Chen Gang wrote:
 Some of architectures have already defined 'die' as macro, so can not use
 this common name as declaration in other modules, or will cause compiling
 issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

 The related error (with allmodconfig under score):

 CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
 'sptlrpc_cli_ctx_expire':
   drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
 ptlrpc_ctx_ops' has no member named '__die'
 ctx-cc_ops-die(ctx, 0);
^
   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
 'ctx_refresh_timeout':
   drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
 ptlrpc_ctx_ops' has no member named '__die'
  req-rq_cli_ctx-cc_ops-die(req-rq_cli_ctx, 0);
 ^
   make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
   make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
   make[3]: *** [drivers/staging/lustre/lustre] Error 2
   make[2]: *** [drivers/staging/lustre] Error 2
   make[1]: *** [drivers/staging] Error 2
   make: *** [drivers] Error 2


 Signed-off-by: Chen Gang gang.chen.5...@gmail.com
 ---
  drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
  drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
  2 files changed, 4 insertions(+), 4 deletions(-)

 This doesn't apply to my tree, can you please refresh it against the
 staging-next branch of staging.git so that I can apply it?



After checkout, I get the same patch, the related git link:

  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git.

The related new patch is in attachment, please check, thanks.


 
 OK, I shall go to that tree and send patch for it (I shall finish within
 2 days).


Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed
From 2c5239e3f52206f7a54814d39fc42aed4afe788f Mon Sep 17 00:00:00 2001
From: Chen Gang gang.chen.5...@gmail.com
Date: Mon, 14 Jul 2014 06:21:57 +0800
Subject: [PATCH v2] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

Some of architectures have already defined 'die' as macro, so can not use
this common name as declaration in other modules, or will cause compiling
issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

The related error (with allmodconfig under score):

CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
  drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 'sptlrpc_cli_ctx_expire':
  drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct ptlrpc_ctx_ops' has no member named '__die'
ctx-cc_ops-die(ctx, 0);
   ^
  drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 'ctx_refresh_timeout':
  drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct ptlrpc_ctx_ops' has no member named '__die'
 req-rq_cli_ctx-cc_ops-die(req-rq_cli_ctx, 0);
^
  make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
  make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
  make[3]: *** [drivers/staging/lustre/lustre] Error 2
  make[2]: *** [drivers/staging/lustre] Error 2
  make[1]: *** [drivers/staging] Error 2
  make: *** [drivers] Error 2


Signed-off-by: Chen Gang gang.chen.5...@gmail.com
---
 drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_sec.h b/drivers/staging/lustre/lustre/include/lustre_sec.h
index bf3ee39..1b8ec11 100644
--- a/drivers/staging/lustre/lustre/include/lustre_sec.h
+++ b/drivers/staging/lustre/lustre/include/lustre_sec.h
@@ -387,7 +387,7 @@ struct ptlrpc_ctx_ops {
 	/**
 	 * Force the \a ctx to die.
 	 */
-	void(*die)	 (struct ptlrpc_cli_ctx *ctx,
+	void(*force_die)   (struct ptlrpc_cli_ctx *ctx,
 int grace);
 	int (*display) (struct ptlrpc_cli_ctx *ctx,
 char *buf, int bufsize);
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c
index 28ac824..bb5b4b6 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c
@@ -305,8 +305,8 @@ EXPORT_SYMBOL(sptlrpc_cli_ctx_put);
  */
 void sptlrpc_cli_ctx_expire(struct ptlrpc_cli_ctx *ctx)
 {
-	LASSERT(ctx-cc_ops-die);
-	ctx-cc_ops-die(ctx, 0);
+	LASSERT(ctx-cc_ops-force_die);
+	ctx-cc_ops-force_die(ctx, 0);
 }
 EXPORT_SYMBOL(sptlrpc_cli_ctx_expire);
 
@@ -591,7 +591,7 @@ int ctx_refresh_timeout(void *data)
 	 * later than the context refresh expire time.
 	 */
 	if (rc == 0)
-		req-rq_cli_ctx-cc_ops-die(req-rq_cli_ctx, 0);
+		req-rq_cli_ctx-cc_ops-force_die(req-rq_cli_ctx, 0);
 	

Re: [PATCH] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

2014-07-13 Thread Chen Gang
On 07/14/2014 06:31 AM, Chen Gang wrote:
 On 07/14/2014 05:41 AM, Chen Gang wrote:
 On 07/14/2014 03:05 AM, Greg Kroah-Hartman wrote:
 On Sun, Jul 13, 2014 at 10:50:55PM +0800, Chen Gang wrote:
 Some of architectures have already defined 'die' as macro, so can not use
 this common name as declaration in other modules, or will cause compiling
 issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

 The related error (with allmodconfig under score):

 CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
 'sptlrpc_cli_ctx_expire':
   drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
 ptlrpc_ctx_ops' has no member named '__die'
 ctx-cc_ops-die(ctx, 0);
^
   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
 'ctx_refresh_timeout':
   drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
 ptlrpc_ctx_ops' has no member named '__die'
  req-rq_cli_ctx-cc_ops-die(req-rq_cli_ctx, 0);
 ^
   make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
   make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
   make[3]: *** [drivers/staging/lustre/lustre] Error 2
   make[2]: *** [drivers/staging/lustre] Error 2
   make[1]: *** [drivers/staging] Error 2
   make: *** [drivers] Error 2


 Signed-off-by: Chen Gang gang.chen.5...@gmail.com
 ---
  drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
  drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
  2 files changed, 4 insertions(+), 4 deletions(-)

 This doesn't apply to my tree, can you please refresh it against the
 staging-next branch of staging.git so that I can apply it?

 
 
 After checkout, I get the same patch, the related git link:
 
   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git.

Oh, sorry, maybe I need:

  git clone -b staging-next 
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

And I shall try again, and finish within 2 days.

Thanks.

 
 The related new patch is in attachment, please check, thanks.
 
 

 OK, I shall go to that tree and send patch for it (I shall finish within
 2 days).
 
 
 Thanks.
 


-- 
Chen Gang

Open share and attitude like air water and life which God blessed
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: rtl8821ae: fix coding style issues in cam.c Fix all coding style error and warnings in cam.c reported by checkpatch.pl

2014-07-13 Thread Greg KH
On Sun, Jul 13, 2014 at 11:47:57PM +0200, Joerg C. Meyer wrote:
 Signed-off-by: Joerg C. Meyer jo...@meyer.homedns.org

Your changelog body ended up in the Subject: line (that happens if you
don't put a blank line after the first line in your git commit.

Also, you don't say _what_ issues you fixed here, please be specific.

And if you fix more than one type of thing, please break that up into
multiple patches, as you are only allowed to do one-thing-per-patch.

Care to try this again?

thanks,

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


Re: [PATCH] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

2014-07-13 Thread Greg Kroah-Hartman
On Mon, Jul 14, 2014 at 06:38:24AM +0800, Chen Gang wrote:
 On 07/14/2014 06:31 AM, Chen Gang wrote:
  On 07/14/2014 05:41 AM, Chen Gang wrote:
  On 07/14/2014 03:05 AM, Greg Kroah-Hartman wrote:
  On Sun, Jul 13, 2014 at 10:50:55PM +0800, Chen Gang wrote:
  Some of architectures have already defined 'die' as macro, so can not use
  this common name as declaration in other modules, or will cause compiling
  issue. So use more precise name 'force_die' (like 'wrap_bulk') instead 
  of.
 
  The related error (with allmodconfig under score):
 
  CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
  'sptlrpc_cli_ctx_expire':
drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
  ptlrpc_ctx_ops' has no member named '__die'
  ctx-cc_ops-die(ctx, 0);
 ^
drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
  'ctx_refresh_timeout':
drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
  ptlrpc_ctx_ops' has no member named '__die'
   req-rq_cli_ctx-cc_ops-die(req-rq_cli_ctx, 0);
  ^
make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
make[3]: *** [drivers/staging/lustre/lustre] Error 2
make[2]: *** [drivers/staging/lustre] Error 2
make[1]: *** [drivers/staging] Error 2
make: *** [drivers] Error 2
 
 
  Signed-off-by: Chen Gang gang.chen.5...@gmail.com
  ---
   drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
   drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
   2 files changed, 4 insertions(+), 4 deletions(-)
 
  This doesn't apply to my tree, can you please refresh it against the
  staging-next branch of staging.git so that I can apply it?
 
  
  
  After checkout, I get the same patch, the related git link:
  
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git.
 
 Oh, sorry, maybe I need:
 
   git clone -b staging-next 
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
 
 And I shall try again, and finish within 2 days.

Yes, you need the staging-next branch.

You can take your original clone of:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

and then just check out the staging-next branch in it:
git checkout -t -b staging-next origin/staging-next

no need to do another full clone.

thanks,

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


Re: [PATCH] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

2014-07-13 Thread Chen Gang
On 07/14/2014 06:50 AM, Greg Kroah-Hartman wrote:
 On Mon, Jul 14, 2014 at 06:38:24AM +0800, Chen Gang wrote:
 On 07/14/2014 06:31 AM, Chen Gang wrote:
 On 07/14/2014 05:41 AM, Chen Gang wrote:
 On 07/14/2014 03:05 AM, Greg Kroah-Hartman wrote:
 On Sun, Jul 13, 2014 at 10:50:55PM +0800, Chen Gang wrote:
 Some of architectures have already defined 'die' as macro, so can not use
 this common name as declaration in other modules, or will cause compiling
 issue. So use more precise name 'force_die' (like 'wrap_bulk') instead 
 of.

 The related error (with allmodconfig under score):

 CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
 'sptlrpc_cli_ctx_expire':
   drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
 ptlrpc_ctx_ops' has no member named '__die'
 ctx-cc_ops-die(ctx, 0);
^
   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
 'ctx_refresh_timeout':
   drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
 ptlrpc_ctx_ops' has no member named '__die'
  req-rq_cli_ctx-cc_ops-die(req-rq_cli_ctx, 0);
 ^
   make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
   make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
   make[3]: *** [drivers/staging/lustre/lustre] Error 2
   make[2]: *** [drivers/staging/lustre] Error 2
   make[1]: *** [drivers/staging] Error 2
   make: *** [drivers] Error 2


 Signed-off-by: Chen Gang gang.chen.5...@gmail.com
 ---
  drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
  drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
  2 files changed, 4 insertions(+), 4 deletions(-)

 This doesn't apply to my tree, can you please refresh it against the
 staging-next branch of staging.git so that I can apply it?



 After checkout, I get the same patch, the related git link:

   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git.

 Oh, sorry, maybe I need:

   git clone -b staging-next 
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

 And I shall try again, and finish within 2 days.
 
 Yes, you need the staging-next branch.
 
 You can take your original clone of:
   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
 
 and then just check out the staging-next branch in it:
   git checkout -t -b staging-next origin/staging-next
 
 no need to do another full clone.
 

OK, thanks. I will finish it within this night (Chinese region).

Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3] staging: android: Clean up else statement from binder_send_failed_reply

2014-07-13 Thread Lucas Tanure
Kernel coding style. Remove useless else statement after return.
Changes from v1 and v2: Fix warning for mixed declarations and code.
Declaration of struct binder_transaction *next made outside of while,
and initialized with NULL. 

Signed-off-by: Lucas Tanure tan...@linux.com
---
 drivers/staging/android/binder.c | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 14714a6..574f529 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -1183,6 +1183,7 @@ static void binder_send_failed_reply(struct 
binder_transaction *t,
 uint32_t error_code)
 {
struct binder_thread *target_thread;
+   struct binder_transaction *next = NULL;
 
BUG_ON(t-flags  TF_ONE_WAY);
while (1) {
@@ -1210,24 +1211,23 @@ static void binder_send_failed_reply(struct 
binder_transaction *t,
target_thread-return_error);
}
return;
-   } else {
-   struct binder_transaction *next = t-from_parent;
+   }
+   next = t-from_parent;
 
-   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
-send failed reply for transaction %d, 
target dead\n,
-t-debug_id);
+   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
+send failed reply for transaction %d, target 
dead\n,
+t-debug_id);
 
-   binder_pop_transaction(target_thread, t);
-   if (next == NULL) {
-   binder_debug(BINDER_DEBUG_DEAD_BINDER,
-reply failed, no target thread at 
root\n);
-   return;
-   }
-   t = next;
+   binder_pop_transaction(target_thread, t);
+   if (next == NULL) {
binder_debug(BINDER_DEBUG_DEAD_BINDER,
-reply failed, no target thread -- retry 
%d\n,
- t-debug_id);
+reply failed, no target thread at 
root\n);
+   return;
}
+   t = next;
+   binder_debug(BINDER_DEBUG_DEAD_BINDER,
+reply failed, no target thread -- retry %d\n,
+ t-debug_id);
}
 }
 
-- 
2.0.1

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


Re: [PATCH v3] staging: android: Clean up else statement from binder_send_failed_reply

2014-07-13 Thread Greg Kroah-Hartman
On Sun, Jul 13, 2014 at 08:25:13PM -0300, Lucas Tanure wrote:
 Kernel coding style. Remove useless else statement after return.
 Changes from v1 and v2: Fix warning for mixed declarations and code.
 Declaration of struct binder_transaction *next made outside of while,
 and initialized with NULL. 

Why did you initialize it with NULL?  It's not needed to do this, right?

4th time's a charm?

thanks,

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


[PATCH v4] staging: android: Clean up else statement from binder_send_failed_reply

2014-07-13 Thread Lucas Tanure
Kernel coding style. Remove useless else statement after return.
Changes from v1 and v2: Fix warning for mixed declarations and code.
Declaration of struct binder_transaction *next made outside of while.

Changes from v3: Removed initialization to NULL for next variable.

Signed-off-by: Lucas Tanure tan...@linux.com
---
 drivers/staging/android/binder.c | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 14714a6..4f34dc0 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -1183,6 +1183,7 @@ static void binder_send_failed_reply(struct 
binder_transaction *t,
 uint32_t error_code)
 {
struct binder_thread *target_thread;
+   struct binder_transaction *next;
 
BUG_ON(t-flags  TF_ONE_WAY);
while (1) {
@@ -1210,24 +1211,23 @@ static void binder_send_failed_reply(struct 
binder_transaction *t,
target_thread-return_error);
}
return;
-   } else {
-   struct binder_transaction *next = t-from_parent;
+   }
+   next = t-from_parent;
 
-   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
-send failed reply for transaction %d, 
target dead\n,
-t-debug_id);
+   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
+send failed reply for transaction %d, target 
dead\n,
+t-debug_id);
 
-   binder_pop_transaction(target_thread, t);
-   if (next == NULL) {
-   binder_debug(BINDER_DEBUG_DEAD_BINDER,
-reply failed, no target thread at 
root\n);
-   return;
-   }
-   t = next;
+   binder_pop_transaction(target_thread, t);
+   if (next == NULL) {
binder_debug(BINDER_DEBUG_DEAD_BINDER,
-reply failed, no target thread -- retry 
%d\n,
- t-debug_id);
+reply failed, no target thread at 
root\n);
+   return;
}
+   t = next;
+   binder_debug(BINDER_DEBUG_DEAD_BINDER,
+reply failed, no target thread -- retry %d\n,
+ t-debug_id);
}
 }
 
-- 
2.0.1

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


RE: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16

2014-07-13 Thread KY Srinivasan


 -Original Message-
 From: KY Srinivasan
 Sent: Sunday, July 13, 2014 11:50 AM
 To: 'Martin K. Petersen'
 Cc: h...@infradead.org; James Bottomley; linux-ker...@vger.kernel.org;
 de...@linuxdriverproject.org; a...@canonical.com; sta...@vger.kernel.org;
 linux-s...@vger.kernel.org; oher...@suse.com; jasow...@redhat.com
 Subject: RE: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16
 
 
 
  -Original Message-
  From: Martin K. Petersen [mailto:martin.peter...@oracle.com]
  Sent: Sunday, July 13, 2014 5:59 AM
  To: KY Srinivasan
  Cc: h...@infradead.org; James Bottomley; linux-ker...@vger.kernel.org;
  de...@linuxdriverproject.org; a...@canonical.com;
  sta...@vger.kernel.org; linux-s...@vger.kernel.org; oher...@suse.com;
  jasow...@redhat.com
  Subject: Re: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16
 
   KY == KY Srinivasan k...@microsoft.com writes:
 
  KY Windows hosts do support UNMAP and set the field in the EVPD.
  KY However, since the host advertises SPC-2 compliance, Linux does
  KY not even query the VPD page.
 
   If we want to enable UNMAP in this case I'd prefer a blacklist
   entry than trying UNMAP despite the device not advertising it.
 
  I agree with that. We could do something like the patch below.
 
  However, I do think it's a good idea that you guys are looking into
  reporting SPC-3.
 
 Thanks Martin; this patch would address our present issues. I will get some
 testing done and report back.

How should we force the flag (BLIST_TRY_VPD_PAGES) to be set.

K. Y
 
 Regards,
 
 K. Y
 
 
  SCSI: Add a blacklist flag which enables VPD page inquiries
 
  Despite supporting modern SCSI features some storage devices continue
  to claim conformance to an older version of the SPC spec. This is done
  for compatibility with legacy operating systems.
 
  Linux by default will not attempt to read VPD pages on devices that
  claim
  SPC-2 or older. Introduce a blacklist flag that can be used to trigger
  VPD page inquiries on devices that are known to support them.
 
  Reported-by: KY Srinivasan k...@microsoft.com
  Signed-off-by: Martin K. Petersen martin.peter...@oracle.com
 
  diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index
  4a6e4ba5a400..a5b1a224628a 100644
  --- a/drivers/scsi/scsi_scan.c
  +++ b/drivers/scsi/scsi_scan.c
  @@ -949,7 +949,9 @@ static int scsi_add_lun(struct scsi_device *sdev,
  unsigned char *inq_result,
 
  sdev-eh_timeout = SCSI_DEFAULT_EH_TIMEOUT;
 
  -   if (*bflags  BLIST_SKIP_VPD_PAGES)
  +   if (*bflags  BLIST_TRY_VPD_PAGES)
  +   sdev-try_vpd_pages = 1;
  +   else if (*bflags  BLIST_SKIP_VPD_PAGES)
  sdev-skip_vpd_pages = 1;
 
  transport_configure_device(sdev-sdev_gendev);
  diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index
  87566b51fcf7..31d32b9077ca 100644
  --- a/drivers/scsi/sd.c
  +++ b/drivers/scsi/sd.c
  @@ -2701,6 +2701,11 @@ static void sd_read_write_same(struct scsi_disk
  *sdkp, unsigned char *buffer)
 
   static int sd_try_extended_inquiry(struct scsi_device *sdp)  {
  +   /* Attempt VPD inquiry if the device blacklist explicitly calls
  +* for it.
  +*/
  +   if (sdp-try_vpd_pages)
  +   return 1;
  /*
   * Although VPD inquiries can go to SCSI-2 type devices,
   * some USB ones crash on receiving them, and the pages diff --git
  a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index
  9aa38f7b303b..f579408620f0 100644
  --- a/include/scsi/scsi_device.h
  +++ b/include/scsi/scsi_device.h
  @@ -155,6 +155,7 @@ struct scsi_device {
  unsigned skip_ms_page_8:1;  /* do not use MODE SENSE page 0x08
  */
  unsigned skip_ms_page_3f:1; /* do not use MODE SENSE page 0x3f
  */
  unsigned skip_vpd_pages:1;  /* do not read VPD pages */
  +   unsigned try_vpd_pages:1;   /* attempt to read VPD pages */
  unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page
 0x3f
  */
  unsigned no_start_on_add:1; /* do not issue start on add */
  unsigned allow_restart:1; /* issue START_UNIT in error handler */
  diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h
  index 8670c04e199e..1fdd6fc5492b 100644
  --- a/include/scsi/scsi_devinfo.h
  +++ b/include/scsi/scsi_devinfo.h
  @@ -34,4 +34,5 @@
   #define BLIST_SKIP_VPD_PAGES   0x400 /* Ignore SBC-3 VPD pages
  */
   #define BLIST_SCSI3LUN 0x800 /* Scan more than 256
  LUNs
   for sequential scan */
  +#define BLIST_TRY_VPD_PAGES0x1000 /* Attempt to read VPD
  pages */
   #endif
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] xillybus: place 'else' on same line as '}'

2014-07-13 Thread Jeremiah Mahler
Place 'else' on same line as closing brace '}' as per
Documentation/CodingStyle.  Fixes 1 error found by checkpatch.pl.

Signed-off-by: Jeremiah Mahler jmmah...@gmail.com
---
 drivers/staging/xillybus/xillybus_core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/xillybus/xillybus_core.c 
b/drivers/staging/xillybus/xillybus_core.c
index ab6502c..7de4c11 100644
--- a/drivers/staging/xillybus/xillybus_core.c
+++ b/drivers/staging/xillybus/xillybus_core.c
@@ -546,8 +546,7 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
channel-rd_buffers = buffers;
rc = xilly_get_dma_buffers(ep, rd_alloc, buffers,
   bufnum, bytebufsize);
-   }
-   else if (channelnum  0) {
+   } else if (channelnum  0) {
channel-num_wr_buffers = bufnum;
 
channel-seekable = seekable;
-- 
2.0.1

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


Re: [PATCH 2/2] staging: comedi: addi_apci_1564: use addi_watchdog module to init watchdog subdevice

2014-07-13 Thread Chase Southwood
On Sun, Jul 13, 2014 at 2:17 PM, Hartley Sweeten
hartl...@visionengravers.com wrote:
 On Saturday, July 12, 2014 3:44 PM, Chase Southwood wrote:
 Use the addi_watchdog module to provide support for the watchdog
 subdevice.

 Also, rearrange the subdevice init blocks so that the order makes sense.
 Digital input/output subdevices and subdevices for DI/DO interrupt
 support, followed by timer/counter/watchdog subdevices is the new order.

 Signed-off-by: Chase Southwood chase.southw...@gmail.com
 Cc: Ian Abbott abbo...@mev.co.uk
 Cc: H Hartley Sweeten hswee...@visionengravers.com
 ---
  drivers/staging/comedi/drivers/addi_apci_1564.c | 34 
 +++--
  1 file changed, 20 insertions(+), 14 deletions(-)

 Chase,

 You should also add the dependency for the addi watchdog module
 to the Kconfig.


Hello, Hartley!

The select statement for COMEDI_ADDI_WATCHDOG was added to Kconfig for
the addi_apci_1564 driver in commit
8851362:

From: Arnd Bergmann a...@arndb.de
Date: Tue, 3 Jun 2014 12:29:29 +0200
Subject: [PATCH] staging: comedi: addi_apci_1564: add addi_watchdog dependency

Signed-off-by: Arnd Bergmann a...@arndb.de
Cc: H Hartley Sweeten hswee...@visionengravers.com
Acked-by: Ian Abbott abbo...@mev.co.uk
Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org

This is because the driver has already been using
addi_watchdog_reset() and I had forgotten to add the select to the
Kconfig when I added that function call, so Arnd added it when a
randconfig build error turned up later.  Sorry for the
confusion.

Thanks,
Chase

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


RE: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16

2014-07-13 Thread KY Srinivasan


 -Original Message-
 From: driverdev-devel-boun...@linuxdriverproject.org [mailto:driverdev-
 devel-boun...@linuxdriverproject.org] On Behalf Of KY Srinivasan
 Sent: Sunday, July 13, 2014 7:38 PM
 To: Martin K. Petersen
 Cc: linux-s...@vger.kernel.org; jasow...@redhat.com; linux-
 ker...@vger.kernel.org; sta...@vger.kernel.org; oher...@suse.com;
 h...@infradead.org; James Bottomley; a...@canonical.com;
 de...@linuxdriverproject.org
 Subject: RE: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16
 
 
 
  -Original Message-
  From: KY Srinivasan
  Sent: Sunday, July 13, 2014 11:50 AM
  To: 'Martin K. Petersen'
  Cc: h...@infradead.org; James Bottomley; linux-ker...@vger.kernel.org;
  de...@linuxdriverproject.org; a...@canonical.com;
  sta...@vger.kernel.org; linux-s...@vger.kernel.org; oher...@suse.com;
  jasow...@redhat.com
  Subject: RE: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16
 
 
 
   -Original Message-
   From: Martin K. Petersen [mailto:martin.peter...@oracle.com]
   Sent: Sunday, July 13, 2014 5:59 AM
   To: KY Srinivasan
   Cc: h...@infradead.org; James Bottomley;
   linux-ker...@vger.kernel.org; de...@linuxdriverproject.org;
   a...@canonical.com; sta...@vger.kernel.org;
   linux-s...@vger.kernel.org; oher...@suse.com; jasow...@redhat.com
   Subject: Re: [PATCH 4/8] Drivers: scsi: storvsc: Filter
   WRITE_SAME_16
  
KY == KY Srinivasan k...@microsoft.com writes:
  
   KY Windows hosts do support UNMAP and set the field in the EVPD.
   KY However, since the host advertises SPC-2 compliance, Linux does
   KY not even query the VPD page.
  
If we want to enable UNMAP in this case I'd prefer a blacklist
entry than trying UNMAP despite the device not advertising it.
  
   I agree with that. We could do something like the patch below.
  
   However, I do think it's a good idea that you guys are looking into
   reporting SPC-3.
 
  Thanks Martin; this patch would address our present issues. I will get
  some testing done and report back.
 
 How should we force the flag (BLIST_TRY_VPD_PAGES) to be set.

Once I force the flag set, it works. Thanks Martin.

K. Y
 
 K. Y
 
  Regards,
 
  K. Y
  
  
   SCSI: Add a blacklist flag which enables VPD page inquiries
  
   Despite supporting modern SCSI features some storage devices
   continue to claim conformance to an older version of the SPC spec.
   This is done for compatibility with legacy operating systems.
  
   Linux by default will not attempt to read VPD pages on devices that
   claim
   SPC-2 or older. Introduce a blacklist flag that can be used to
   trigger VPD page inquiries on devices that are known to support them.
  
   Reported-by: KY Srinivasan k...@microsoft.com
   Signed-off-by: Martin K. Petersen martin.peter...@oracle.com
  
   diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
   index 4a6e4ba5a400..a5b1a224628a 100644
   --- a/drivers/scsi/scsi_scan.c
   +++ b/drivers/scsi/scsi_scan.c
   @@ -949,7 +949,9 @@ static int scsi_add_lun(struct scsi_device
   *sdev, unsigned char *inq_result,
  
 sdev-eh_timeout = SCSI_DEFAULT_EH_TIMEOUT;
  
   - if (*bflags  BLIST_SKIP_VPD_PAGES)
   + if (*bflags  BLIST_TRY_VPD_PAGES)
   + sdev-try_vpd_pages = 1;
   + else if (*bflags  BLIST_SKIP_VPD_PAGES)
 sdev-skip_vpd_pages = 1;
  
 transport_configure_device(sdev-sdev_gendev);
   diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index
   87566b51fcf7..31d32b9077ca 100644
   --- a/drivers/scsi/sd.c
   +++ b/drivers/scsi/sd.c
   @@ -2701,6 +2701,11 @@ static void sd_read_write_same(struct
   scsi_disk *sdkp, unsigned char *buffer)
  
static int sd_try_extended_inquiry(struct scsi_device *sdp)  {
   + /* Attempt VPD inquiry if the device blacklist explicitly calls
   +  * for it.
   +  */
   + if (sdp-try_vpd_pages)
   + return 1;
 /*
  * Although VPD inquiries can go to SCSI-2 type devices,
  * some USB ones crash on receiving them, and the pages diff --git
   a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index
   9aa38f7b303b..f579408620f0 100644
   --- a/include/scsi/scsi_device.h
   +++ b/include/scsi/scsi_device.h
   @@ -155,6 +155,7 @@ struct scsi_device {
 unsigned skip_ms_page_8:1;  /* do not use MODE SENSE page 0x08
   */
 unsigned skip_ms_page_3f:1; /* do not use MODE SENSE page 0x3f
   */
 unsigned skip_vpd_pages:1;  /* do not read VPD pages */
   + unsigned try_vpd_pages:1;   /* attempt to read VPD pages */
 unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page
  0x3f
   */
 unsigned no_start_on_add:1; /* do not issue start on add */
 unsigned allow_restart:1; /* issue START_UNIT in error handler */
   diff --git a/include/scsi/scsi_devinfo.h
   b/include/scsi/scsi_devinfo.h index 8670c04e199e..1fdd6fc5492b
   100644
   --- a/include/scsi/scsi_devinfo.h
   +++ b/include/scsi/scsi_devinfo.h
   @@ -34,4 +34,5 @@
#define BLIST_SKIP_VPD_PAGES 0x400 /*