[9610] wlbt: Fix compilation erros in netif.c (Android P)
authorTarun Karela <t.karela@samsung.com>
Wed, 30 May 2018 11:17:15 +0000 (12:17 +0100)
committerYoungsoo Kim <youngss.kim@samsung.com>
Fri, 15 Jun 2018 22:47:09 +0000 (07:47 +0900)
Replace atomic_read with refcount_read to get rid of the following errors
drivers/net/wireless/scsc/netif.c: In function 'slsi_net_hw_xmit':
drivers/net/wireless/scsc/netif.c:825:47: error: 'refcount_t' has no member named 'counter'
  known_users = atomic_read(&skb->users);
                                               ^
drivers/net/wireless/scsc/netif.c:825:124: error: 'refcount_t' has no member named 'counter'
  known_users = atomic_read(&skb->users);
                                                                                                                            ^
drivers/net/wireless/scsc/netif.c:825:165: error: 'refcount_t' has no member named 'counter'
  known_users = atomic_read(&skb->users);
                                                                                                                                                                     ^
drivers/net/wireless/scsc/netif.c:825:223: error: 'refcount_t' has no member named 'counter'
  known_users = atomic_read(&skb->users);
                                                                                                                                                                                                                               ^
drivers/net/wireless/scsc/netif.c:825:264: error: 'refcount_t' has no member named 'counter'
  known_users = atomic_read(&skb->users);
                                                                                                                                                                                                                                                                        ^
drivers/net/wireless/scsc/netif.c:886:76: error: 'refcount_t' has no member named 'counter'
    WARN_ON(known_users &&
                                                                            ^
drivers/net/wireless/scsc/netif.c:886:153: error: 'refcount_t' has no member named 'counter'
    WARN_ON(known_users &&
                                                                                                                                                         ^
drivers/net/wireless/scsc/netif.c:886:194: error: 'refcount_t' has no member named 'counter'
    WARN_ON(known_users &&
                                                                                                                                                                                                  ^
drivers/net/wireless/scsc/netif.c:886:252: error: 'refcount_t' has no member named 'counter'
    WARN_ON(known_users &&
                                                                                                                                                                                                                                                            ^
drivers/net/wireless/scsc/netif.c:886:293: error: 'refcount_t' has no member named 'counter'
    WARN_ON(known_users &&

Change-Id: I011ad1396bf50dfd38b7c60877d9207e4718713f
SCSC-Bug-Id: SSB-40175
Signed-off-by: Tarun Karela <t.karela@samsung.com>
drivers/net/wireless/scsc/netif.c

index 2bd31a94bb2d584f690910be5ab57c5aa962bc22..cc94cf7b243a2e01648f21ef362457e657531a42 100755 (executable)
@@ -822,7 +822,7 @@ static netdev_tx_t slsi_net_hw_xmit(struct sk_buff *skb, struct net_device *dev)
        }
 
 #ifdef CONFIG_SCSC_WLAN_DEBUG
-       known_users = atomic_read(&skb->users);
+       known_users = refcount_read(&skb->users);
 #endif
 
 #ifndef CONFIG_ARM
@@ -884,7 +884,7 @@ evaluate:
                } else {
 #ifdef CONFIG_SCSC_WLAN_DEBUG
                        WARN_ON(known_users &&
-                               atomic_read(&skb->users) != known_users);
+                               refcount_read(&skb->users) != known_users);
 #endif
                        if (original_skb)
                                slsi_kfree_skb(original_skb);