Re: [PATCH v3 3/4] staging/rtl8188eu : Remove duplicated BIT() definitions

2015-09-12 Thread Anish Bhatt
On Fri, Sep 11, 2015 at 7:42 PM, Greg KH  wrote:
> On Wed, Sep 09, 2015 at 03:57:09PM -0700, Anish Bhatt wrote:
>> The BIT() macro is already defined in bitops.h, remove duplicate
>> definitions. Users of BIT() macro are expecting unsigned int/u32, so
>> add typecasts where this creates a build warning.
>>
>> Signed-off-by: Anish Bhatt 
>> ---
>>  drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 7 +--
>>  drivers/staging/rtl8188eu/core/rtw_wlan_util.c| 6 --
>>  drivers/staging/rtl8188eu/include/rtl8188e_spec.h | 4 
>>  drivers/staging/rtl8188eu/include/wifi.h  | 7 ---
>>  4 files changed, 9 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c 
>> b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
>> index 5dae7de..dd82018 100644
>> --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
>> +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
>> @@ -4177,10 +4177,13 @@ void mgt_dispatcher(struct adapter *padapter, struct 
>> recv_frame *precv_frame)
>>
>>   RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
>>("+mgt_dispatcher: type(0x%x) subtype(0x%x)\n",
>> -   GetFrameType(pframe), GetFrameSubType(pframe)));
>> +   (unsigned int)GetFrameType(pframe),
>> +   (unsigned int)GetFrameSubType(pframe)));
>
> I don't understand why you are adding these typecasts, you aren't
> changing anything that requires this, right?

BIT() is defined in bitops as (1UL << x). This causes compiler warnings with
the %x format specifier used in the RT_TRACE messages, where previously
rtl8188eu simply had (1 << x), hence the typecasts.

>
>>
>>   if (GetFrameType(pframe) != WIFI_MGT_TYPE) {
>> - RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("mgt_dispatcher: 
>> type(0x%x) error!\n", GetFrameType(pframe)));
>> + RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
>> +  ("mgt_dispatcher: type(0x%x) error!\n",
>> +   (unsigned int)GetFrameType(pframe)));
>>   return;
>>   }
>>
>> diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c 
>> b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
>> index 077b39a..3bb40a7fe 100644
>> --- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
>> +++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
>> @@ -1414,13 +1414,15 @@ void update_IOT_info(struct adapter *padapter)
>>   pmlmeinfo->turboMode_cts2self = 0;
>>   pmlmeinfo->turboMode_rtsen = 1;
>>   /* disable high power */
>> - Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false);
>> + Switch_DM_Func(padapter, (u32)(~DYNAMIC_BB_DYNAMIC_TXPWR),
>> +false);
>>   break;
>>   case HT_IOT_PEER_REALTEK:
>>   /* rtw_write16(padapter, 0x4cc, 0x); */
>>   /* rtw_write16(padapter, 0x546, 0x01c0); */
>>   /* disable high power */
>> - Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false);
>> + Switch_DM_Func(padapter, (u32)(~DYNAMIC_BB_DYNAMIC_TXPWR),
>> +false);
>>   break;
>>   default:
>>   pmlmeinfo->turboMode_cts2self = 0;
>> diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_spec.h 
>> b/drivers/staging/rtl8188eu/include/rtl8188e_spec.h
>> index 2c33eb3..e99179a 100644
>> --- a/drivers/staging/rtl8188eu/include/rtl8188e_spec.h
>> +++ b/drivers/staging/rtl8188eu/include/rtl8188e_spec.h
>> @@ -19,10 +19,6 @@
>>  #ifndef __RTL8188E_SPEC_H__
>>  #define __RTL8188E_SPEC_H__
>>
>> -#ifndef BIT
>> -#define BIT(x)   (1 << (x))
>> -#endif
>> -
>>  #define BIT0 0x0001
>>  #define BIT1 0x0002
>>  #define BIT2 0x0004
>
> What about these BIT0 and other #defines, they should be removed too,
> right?

Yes, I am covering that in a different patch because I was trying to avoid
changing BIT(N) and #define BITN in the same patch.

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


[PATCH] staging: wilc1000: Add terminating entry for wilc_sdio_ids

2015-09-12 Thread Axel Lin
The sdio_device_id table is supposed to be zero-terminated.

Signed-off-by: Axel Lin 
---
 drivers/staging/wilc1000/linux_wlan_sdio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/wilc1000/linux_wlan_sdio.c 
b/drivers/staging/wilc1000/linux_wlan_sdio.c
index 37f31f4..5f0e6cd 100644
--- a/drivers/staging/wilc1000/linux_wlan_sdio.c
+++ b/drivers/staging/wilc1000/linux_wlan_sdio.c
@@ -40,6 +40,7 @@ static unsigned int sdio_default_speed;
 
 static const struct sdio_device_id wilc_sdio_ids[] = {
{ SDIO_DEVICE(SDIO_VENDOR_ID_WILC, SDIO_DEVICE_ID_WILC) },
+   { },
 };
 
 
-- 
2.1.0



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


[PATCH] drivers/staging/andrid/ashmem.c: Fix coding style issues

2015-09-12 Thread Martin Pietryka
Signed-off-by: Martin Pietryka 
---
 drivers/staging/android/ashmem.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index 60200a3..c549a1b 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -618,7 +618,7 @@ static int ashmem_pin(struct ashmem_area *asma, size_t 
pgstart, size_t pgend)
 
/* Case #3: We overlap from the rear, so adjust it */
if (range->pgend <= pgend) {
-   range_shrink(range, range->pgstart, pgstart-1);
+   range_shrink(range, range->pgstart, pgstart - 
1);
continue;
}
 
@@ -715,7 +715,7 @@ static int ashmem_pin_unpin(struct ashmem_area *asma, 
unsigned long cmd,
if (unlikely((pin.offset | pin.len) & ~PAGE_MASK))
return -EINVAL;
 
-   if (unlikely(((__u32) -1) - pin.offset < pin.len))
+   if (unlikely(((__u32)-1) - pin.offset < pin.len))
return -EINVAL;
 
if (unlikely(PAGE_ALIGN(asma->size) < pin.offset + pin.len))
@@ -759,7 +759,7 @@ static long ashmem_ioctl(struct file *file, unsigned int 
cmd, unsigned long arg)
ret = -EINVAL;
if (!asma->file) {
ret = 0;
-   asma->size = (size_t) arg;
+   asma->size = (size_t)arg;
}
break;
case ASHMEM_GET_SIZE:
@@ -833,16 +833,16 @@ static int __init ashmem_init(void)
int ret;
 
ashmem_area_cachep = kmem_cache_create("ashmem_area_cache",
- sizeof(struct ashmem_area),
- 0, 0, NULL);
+  sizeof(struct ashmem_area),
+  0, 0, NULL);
if (unlikely(!ashmem_area_cachep)) {
pr_err("failed to create slab cache\n");
return -ENOMEM;
}
 
ashmem_range_cachep = kmem_cache_create("ashmem_range_cache",
- sizeof(struct ashmem_range),
- 0, 0, NULL);
+   sizeof(struct ashmem_range),
+   0, 0, NULL);
if (unlikely(!ashmem_range_cachep)) {
pr_err("failed to create slab cache\n");
return -ENOMEM;
-- 
2.5.0

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


[PATCH] staging: ft1000: code style cleanup

2015-09-12 Thread lucasg
There was a stray '*' in a comment block.

Signed-off-by: lucasg 
---
 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c 
b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index 5f4794b..6a6e345 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -1544,7 +1544,7 @@ int ft1000_poll(void *dev_id)
   FT1000_REG_MAG_WATERMARK);
/* ring doorbell to tell DSP that
 * ASIC is out of reset
-* */
+*/
status = ft1000_write_register(dev,
   FT1000_ASIC_RESET_DSP,
   FT1000_REG_DOORBELL);
-- 
2.5.1

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


见到客户很容易冷场,找不到话说怎么办?

2015-09-12 Thread Oated
656oY

4、客户提出异议,有些销售人员就不知所措,怎么办?

200

 << Ïú ÊÛ  ¾« Ó¢ 2Ìì Ç¿ »¯ ѵ Á· >> 


 2015Äê09ÔÂ12-13ÈÕ ÉîÛÚ¡¢10ÔÂ17-18ÈÕ ±±¾©¡¢10ÔÂ24-25ÈÕ ÉîÛÚ
 2015Äê11ÔÂ14-15ÈÕ ÉϺ£¡¢12ÔÂ05-06ÈÕ ±±¾©¡¢12ÔÂ19-20ÈÕ ÉîÛÚ



¡¾Ö÷°ìµ¥Î»¡¿£ºÐ ˼ ά Æó Òµ Åà ѵ Íø www.hpxcn.com

¡¾Ñ§Ô±¶ÔÏó¡¿£º×ܾ­Àí¡¢ÏúÊÛ×Ü¼à¡¢ÇøÓò¾­Àí¡¢ÏúÊÛ¾­Àí¡¢ÒµÎñ´ú±í¡¢ÏúÊÛÅàѵרԱµÈ¡£  

¡¾Åàѵ·ÑÓá¿£º4600Ôª/Á½ÈË,²»ÔÙ´òÕÛ(ÐèÔÚͬһ¸öÔµÄͬһ¿Î³Ì²ÅÏíÓдËÓÅ»Ý)µ¥¶ÀÒ»ÈËÊÕ·Ñ2800Ôª

¡££¨2ÌìÖвÍ, ˰·Ñ,ר¼ÒÑݽ²·Ñ,½Ì²Ä·Ñ,²èµãµÈ)£»×¡ËÞͳһ°²ÅÅ£¬·ÑÓÃ×ÔÀí£»   


¡¾ÎÂܰÌáʾ¡¿£º±¾¿Î³Ì¿ÉΪÆóÒµÌṩÉÏÃÅÄÚѵ·þÎñ£¬»¶Ó­À´µç×Éѯ£¡


¡¾±¨|Ãû¡¢×É|ѯ¡¿£º  


Éî|ÛÚ£º£¨£°£·£µ£µ£©-£¸£±£¹£³ £¹£´£·£¸ ¡¢£¨£°£·£µ£µ£©-£¸£±£¹£³ £±£¸£·£²  

ÉÏ|º££º£¨£°£²£±£©---£µ£±£¶£± £¹£µ£³£² ¡¢£¨£°£²£±£©---£µ£±£°£· £¸£±£³£°  

¹ã|ÖÝ£º£¨£°£²£°£©---£¶£±£±£³ £¶£²£´£µ   





¡¾Åà=ѵ±³¾°¡¿£º 

Judge£¨ÆÀ¼Û£©Ò»¸öÈË£¬Ò»¸ö¹«Ë¾ÊDz»ÊÇÓÅÐã,²»Òª¿´ËûÊDz»ÊÇHarvard£¨¹þ·ð´óѧ£©,ÊDz»ÊÇStanford

£¨Ë¹Ì¹¸£´óѧ£©.²»Òªjudge£¨ÆÀ¼Û£©ÀïÃæÓжàÉÙÃûÅÆ´óѧ±ÏÒµÉú,¶øÒªjudge£¨ÆÀ¼Û£©Õâ°ïÈ˸ɻîÊDz»

ÊÇ·¢·èÒ»Ñù¸É£¬¿´ËûÿÌìϰàÊDz»ÊÇЦÃÐÃлؼң¡

  ¨D¨D °¢Àï°Í°Í¹«Ë¾ÂíÔÆ 


1¡¢ÐÂÔ±¹¤Óм¤Ç飬ûÓÐÒµ¼¨£¬Ôõô°ì£¿ 

2¡¢ÎªÊ²Ã´²Å×öÁË2Ä꣬ÀÏÔ±¹¤¾Í³öÏÖÁËÖ°Òµ¾ëµ¡£¬²»ÖªÉϽøÔõô°ì£¿

3¡¢ÓÐЩÏúÊÛÈËÔ±Óöµ½Ò»µã´ìÕ۾ͻÒÐÄÉËÉ¥ÆøÔõô°ì£¿ 

4¡¢¿Í»§Ìá³öÒìÒ飬ÓÐЩÏúÊÛÈËÔ±¾Í²»ÖªËù´ë£¬Ôõô°ì£¿   

5¡¢µ¥×ÓËÀµô£¬ÏúÊÛÈËÔ±¶¼»¹²»ÖªµÀÔõô»ØÊ£»   

6¡¢¼ûµ½¿Í»§ºÜÈÝÒ×À䳡£¬ÕÒ²»µ½»°ËµÔõô°ì£¿   

7¡¢ÎªÊ²Ã´ÏúÊÛÈËÔ±ÇáÒ׸ø¿Í»§ÁÁ³ö×Ô¼ºµÄ¡°µ×ÅÆ¡±£¿ 

8¡¢ÎªÊ²Ã´²»Í¬µÄ¿Í»§£¬ÏúÊÛÈËԱ˵´ÊǧƪһÂÉ£¿ 

9¡¢ÎªÊ²Ã´µÚÒ»´ÎÉÏÃź󣬵ÚÒ»´Î´òÍêµç»°ºóÒµÎñÔ±¾Í²»ÖªµÀÔõô¸ú½ø£¿ 

..  

¡¾Åà+ÑµÌØµã¡¿£º 

1.·Ö×éÌÖÂÛ£¬ÑµÁ·ÎªÖ÷£¬»¥¶¯Ê½½Ìѧ£»2´ÎÏÖ³¡¿¼ÊÔ;  

2.ÕæÊµ°¸Àý·ÖÎö£¬´óÁ¿¿Îºó×÷ÒµÌ⣬¼ÈÓÐÇÀ´ð£¬ÓÖÓбçÂÛ£¬»¹ÓÐÏÖ³¡ÑÝÁ·£¬ÈÈÁҵĿÎÌ÷ÕΧ£»
  
3.½«ÏúÊÛ¹ÜÀíÈÚÈëÅàѵÏÖ³¡£º  

3.1 ²»½ö¹Ø×¢¸öÈËѧϰ±íÏÖ£¬¶øÇÒÖØÊÓÍŶӺÏ×÷£»

3.2 ²»½ö¹Ø×¢2ÌìÒÔÄÚµÄѧϰ£¬¶øÇÒÓªÔì2ÌìÒÔºóµÄÅàѵѧϰ·ÕΧ£»  

3.3