[PATCH] drivers:statging:rtl8821ae Fixed few coding style errors
Fixed few coding style errors in header files base.h:58: WARNING: please, no space before tabs base.h:81: ERROR: "(foo*)" should be "(foo *)" pci.h:338: ERROR: "foo * bar" should be "foo *bar" pci.h:151: ERROR: do not use C99 // comments Signed-off-by: Surendra Patil --- drivers/staging/rtl8821ae/base.h | 46 +++ drivers/staging/rtl8821ae/debug.h | 10 - drivers/staging/rtl8821ae/efuse.h | 4 ++-- drivers/staging/rtl8821ae/pci.h | 18 +++ 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/drivers/staging/rtl8821ae/base.h b/drivers/staging/rtl8821ae/base.h index 629d14f..5eb2a18 100644 --- a/drivers/staging/rtl8821ae/base.h +++ b/drivers/staging/rtl8821ae/base.h @@ -43,7 +43,7 @@ enum ap_peer { PEER_MARV = 7, PEER_AIRGO = 9, PEER_MAX = 10, -} ; +}; #define RTL_DUMMY_OFFSET 0 #define RTL_DUMMY_UNIT 8 @@ -51,11 +51,11 @@ enum ap_peer { #define RTL_TX_DESC_SIZE 32 #define RTL_TX_HEADER_SIZE (RTL_TX_DESC_SIZE + RTL_TX_DUMMY_SIZE) -#define HT_AMSDU_SIZE_4K 3839 -#define HT_AMSDU_SIZE_8K 7935 +#define HT_AMSDU_SIZE_4K 3839 +#define HT_AMSDU_SIZE_8K 7935 -#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */ -#define MAX_BIT_RATE_40MHZ_MCS7150 /* Mbps */ +#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */ +#define MAX_BIT_RATE_40MHZ_MCS7150 /* Mbps */ #define RTL_RATE_COUNT_LEGACY 12 #define RTL_CHANNEL_COUNT 14 @@ -78,33 +78,33 @@ enum ap_peer { SET_BITS_TO_LE_2BYTE(_hdr, 8, 1, _val) #define SET_80211_PS_POLL_AID(_hdr, _val) \ - WRITEEF2BYTE(((u8*)(_hdr))+2, _val) + WRITEEF2BYTE(((u8 *)(_hdr))+2, _val) #define SET_80211_PS_POLL_BSSID(_hdr, _val)\ - CP_MACADDR(((u8*)(_hdr))+4, (u8*)(_val)) + CP_MACADDR(((u8 *)(_hdr))+4, (u8 *)(_val)) #define SET_80211_PS_POLL_TA(_hdr, _val) \ - CP_MACADDR(((u8*)(_hdr))+10, (u8*)(_val)) + CP_MACADDR(((u8 *)(_hdr))+10, (u8 *)(_val)) #define SET_80211_HDR_DURATION(_hdr, _val) \ - WRITEEF2BYTE((u8*)(_hdr)+FRAME_OFFSET_DURATION, _val) + WRITEEF2BYTE((u8 *)(_hdr)+FRAME_OFFSET_DURATION, _val) #define SET_80211_HDR_ADDRESS1(_hdr, _val) \ - CP_MACADDR((u8*)(_hdr)+FRAME_OFFSET_ADDRESS1, (u8*)(_val)) -#define SET_80211_HDR_ADDRESS2(_hdr, _val) \ - CP_MACADDR((u8*)(_hdr)+FRAME_OFFSET_ADDRESS2, (u8*)(_val)) -#define SET_80211_HDR_ADDRESS3(_hdr, _val) \ - CP_MACADDR((u8*)(_hdr)+FRAME_OFFSET_ADDRESS3, (u8*)(_val)) + CP_MACADDR((u8 *)(_hdr)+FRAME_OFFSET_ADDRESS1, (u8 *)(_val)) +#define SET_80211_HDR_ADDRESS2(_hdr, _val) \ + CP_MACADDR((u8 *)(_hdr)+FRAME_OFFSET_ADDRESS2, (u8 *)(_val)) +#define SET_80211_HDR_ADDRESS3(_hdr, _val) \ + CP_MACADDR((u8 *)(_hdr)+FRAME_OFFSET_ADDRESS3, (u8 *)(_val)) #define SET_80211_HDR_FRAGMENT_SEQUENCE(_hdr, _val) \ - WRITEEF2BYTE((u8*)(_hdr)+FRAME_OFFSET_SEQUENCE, _val) + WRITEEF2BYTE((u8 *)(_hdr)+FRAME_OFFSET_SEQUENCE, _val) -#define SET_BEACON_PROBE_RSP_TIME_STAMP_LOW(__phdr, __val) \ - WRITEEF4BYTE(((u8*)(__phdr)) + 24, __val) +#define SET_BEACON_PROBE_RSP_TIME_STAMP_LOW(__phdr, __val) \ + WRITEEF4BYTE(((u8 *)(__phdr)) + 24, __val) #define SET_BEACON_PROBE_RSP_TIME_STAMP_HIGH(__phdr, __val) \ - WRITEEF4BYTE(((u8*)(__phdr)) + 28, __val) + WRITEEF4BYTE(((u8 *)(__phdr)) + 28, __val) #define SET_BEACON_PROBE_RSP_BEACON_INTERVAL(__phdr, __val) \ - WRITEEF2BYTE(((u8*)(__phdr)) + 32, __val) -#define GET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr) \ - READEF2BYTE(((u8*)(__phdr)) + 34) + WRITEEF2BYTE(((u8 *)(__phdr)) + 32, __val) +#define GET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr) \ + READEF2BYTE(((u8 *)(__phdr)) + 34) #define SET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr, __val) \ - WRITEEF2BYTE(((u8*)(__phdr)) + 34, __val) + WRITEEF2BYTE(((u8 *)(__phdr)) + 34, __val) #define MASK_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr, __val) \ SET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr, \ (GET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr) & (~(__val @@ -125,7 +125,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx); void rtl_beacon_statistic(struct ieee80211_hw *hw, struct sk_buff *skb); void rtl_watch_dog_timer_callback(unsigned long data); int rtl_tx_agg_start(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_sta *sta, u16 tid, u16 * ssn); +struct ieee80211_sta *sta, u16 tid, u16 *ssn); int rtl_tx_agg_stop(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta, u16 tid); int rtl_tx_agg_oper(struct ieee80211_hw *hw, diff --git a/drivers/staging/rtl8821ae/debug.h b/drivers/staging/rtl8821ae/debug.h index 5eb6251..fc7be27 100644 --- a/drivers/staging/rtl8821ae/debug.h +
[PATCH 2/3] staging: rtl8188eu: remove header file ip.h
"ip.h" is included in four files but not being used, so remove "include/ip.h" header file and inclusion of this header file. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_recv.c |1 - drivers/staging/rtl8188eu/core/rtw_xmit.c |1 - drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |1 - drivers/staging/rtl8188eu/include/ip.h | 126 drivers/staging/rtl8188eu/os_dep/xmit_linux.c |1 - 5 files changed, 130 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/include/ip.h diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 92fb12e..b49a246 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c index aa77270..ca7a25a 100644 --- a/drivers/staging/rtl8188eu/core/rtw_xmit.c +++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index 6e84f08..540c5ad 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/rtl8188eu/include/ip.h b/drivers/staging/rtl8188eu/include/ip.h deleted file mode 100644 index 9fdac6d..000 --- a/drivers/staging/rtl8188eu/include/ip.h +++ /dev/null @@ -1,126 +0,0 @@ -/** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - **/ -#ifndef _LINUX_IP_H -#define _LINUX_IP_H - -/* SOL_IP socket options */ - -#define IPTOS_TOS_MASK 0x1E -#define IPTOS_TOS(tos) ((tos)&IPTOS_TOS_MASK) -#defineIPTOS_LOWDELAY 0x10 -#defineIPTOS_THROUGHPUT0x08 -#defineIPTOS_RELIABILITY 0x04 -#defineIPTOS_MINCOST 0x02 - -#define IPTOS_PREC_MASK0xE0 -#define IPTOS_PREC(tos)((tos)&IPTOS_PREC_MASK) -#define IPTOS_PREC_NETCONTROL 0xe0 -#define IPTOS_PREC_INTERNETCONTROL 0xc0 -#define IPTOS_PREC_CRITIC_ECP 0xa0 -#define IPTOS_PREC_FLASHOVERRIDE0x80 -#define IPTOS_PREC_FLASH0x60 -#define IPTOS_PREC_IMMEDIATE0x40 -#define IPTOS_PREC_PRIORITY 0x20 -#define IPTOS_PREC_ROUTINE 0x00 - - -/* IP options */ -#define IPOPT_COPY 0x80 -#define IPOPT_CLASS_MASK 0x60 -#define IPOPT_NUMBER_MASK 0x1f - -#defineIPOPT_COPIED(o) ((o)&IPOPT_COPY) -#defineIPOPT_CLASS(o) ((o)&IPOPT_CLASS_MASK) -#defineIPOPT_NUMBER(o) ((o)&IPOPT_NUMBER_MASK) - -#defineIPOPT_CONTROL 0x00 -#defineIPOPT_RESERVED1 0x20 -#defineIPOPT_MEASUREMENT 0x40 -#defineIPOPT_RESERVED2 0x60 - -#define IPOPT_END (0 | IPOPT_CONTROL) -#define IPOPT_NOOP (1 | IPOPT_CONTROL) -#define IPOPT_SEC (2 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_LSRR (3 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_TIMESTAMP(4 | IPOPT_MEASUREMENT) -#define IPOPT_RR (7 | IPOPT_CONTROL) -#define IPOPT_SID (8 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_SSRR (9 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_RA (20 | IPOPT_CONTROL | IPOPT_COPY) - -#define IPVERSION 4 -#define MAXTTL 255 -#define IPDEFTTL 64 -#define IPOPT_OPTVAL 0 -#define IPOPT_OLEN 1 -#define IPOPT_OFFSET 2 -#define IPOPT_MINOFF 4 -#define MAX_IPOPTLEN 40 -#define IPOPT_NOP IPOPT_NOOP -#define IPOPT_EOL IPOPT_END -#define IPOPT_TS IPOPT_TIMESTAMP - -#defineIPOPT_TS_TSONLY 0 /* timestamps only */ -#defineIPOPT_TS_TSANDADDR 1 /* timestamps and addresses */ -#defineIPOPT_TS_PRESPEC3 /* specified modules only */ - -struct i
[PATCH 1/3] staging: rtl8188eu: remove header file if_ether.h
"if_ether.h" is included in three files but not being used, so remove "include/if_ether.h" header file and inclusion of this header file. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_recv.c |1 - drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |1 - drivers/staging/rtl8188eu/include/if_ether.h | 111 drivers/staging/rtl8188eu/os_dep/xmit_linux.c |1 - 4 files changed, 114 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/include/if_ether.h diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 8490d51..92fb12e 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index 17c94f4..6e84f08 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/rtl8188eu/include/if_ether.h b/drivers/staging/rtl8188eu/include/if_ether.h deleted file mode 100644 index db15771..000 --- a/drivers/staging/rtl8188eu/include/if_ether.h +++ /dev/null @@ -1,111 +0,0 @@ -/** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - **/ - -#ifndef _LINUX_IF_ETHER_H -#define _LINUX_IF_ETHER_H - -/* - * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble - * and FCS/CRC (frame check sequence). - */ - -#define ETH_ALEN 6 /* Octets in one ethernet addr */ -#define ETH_HLEN 14 /* Total octets in header. */ -#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ -#define ETH_DATA_LEN 1500/* Max. octets in payload*/ -#define ETH_FRAME_LEN 1514/* Max. octets in frame sans FCS */ - -/* - * These are the defined Ethernet Protocol ID's. - */ - -#define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */ -#define ETH_P_PUP 0x0200 /* Xerox PUP packet */ -#define ETH_P_PUPAT0x0201 /* Xerox PUP Addr Trans packet */ -#define ETH_P_IP 0x0800 /* Internet Protocol packet */ -#define ETH_P_X25 0x0805 /* CCITT X.25 */ -#define ETH_P_ARP 0x0806 /* Address Resolution packet*/ -#defineETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet */ -#define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */ -#define ETH_P_IEEEPUPAT0x0a01 /* Xerox IEEE802.3 PUP */ -#define ETH_P_DEC 0x6000 /* DEC Assigned proto */ -#define ETH_P_DNA_DL0x6001 /* DEC DNA Dump/Load*/ -#define ETH_P_DNA_RC0x6002 /* DEC DNA Remote Console */ -#define ETH_P_DNA_RT0x6003 /* DEC DNA Routing */ -#define ETH_P_LAT 0x6004 /* DEC LAT */ -#define ETH_P_DIAG 0x6005 /* DEC Diagnostics */ -#define ETH_P_CUST 0x6006 /* DEC Customer use */ -#define ETH_P_SCA 0x6007 /* DEC Systems Comms Arch */ -#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */ -#define ETH_P_ATALK0x809B /* Appletalk DDP*/ -#define ETH_P_AARP 0x80F3 /* Appletalk AARP */ -#define ETH_P_8021Q0x8100 /* 802.1Q VLAN Extended Header */ -#define ETH_P_IPX 0x8137 /* IPX over DIX */ -#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */ -#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */ -#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */ -#define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */ -#define ETH_P_ATMFATE 0x8884 /* Frame-based A
[PATCH 3/3] staging: rtl8188eu: remove header file ethernet.h
"ethernet.h" is included in three files but only "rtw_recv.c" using two macros defined in "ethernet.h", so move used macros in "rtw_recv.c" and remove "include/ethernet.h" header file and inclusion of this header file. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_recv.c |4 ++- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c |1 - drivers/staging/rtl8188eu/include/ethernet.h | 42 drivers/staging/rtl8188eu/os_dep/recv_linux.c |1 - 4 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/include/ethernet.h diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index b49a246..b9d86cd 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -23,10 +23,12 @@ #include #include #include -#include #include #include +#define ETHERNET_HEADER_SIZE 14 /* Ethernet Header Length */ +#define LLC_HEADER_SIZE6 /* LLC Header Length */ + static u8 SNAP_ETH_TYPE_IPX[2] = {0x81, 0x37}; static u8 SNAP_ETH_TYPE_APPLETALK_AARP[2] = {0x80, 0xf3}; diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index 540c5ad..b1b1584 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/rtl8188eu/include/ethernet.h b/drivers/staging/rtl8188eu/include/ethernet.h deleted file mode 100644 index a59f912..000 --- a/drivers/staging/rtl8188eu/include/ethernet.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - **/ -/*! \file */ -#ifndef __INC_ETHERNET_H -#define __INC_ETHERNET_H - -#define ETHERNET_ADDRESS_LENGTH6 /* Ethernet Address Length */ -#define ETHERNET_HEADER_SIZE 14 /* Ethernet Header Length */ -#define LLC_HEADER_SIZE6 /* LLC Header Length */ -#define TYPE_LENGTH_FIELD_SIZE 2 /* Type/Length Size */ -#define MINIMUM_ETHERNET_PACKET_SIZE 60 /* Min Ethernet Packet Size */ -#define MAXIMUM_ETHERNET_PACKET_SIZE 1514/* Max Ethernet Packet Size */ - -/* Is Multicast Address? */ -#define RT_ETH_IS_MULTICAST(_addr) u8 *)(_addr))[0]&0x01) != 0) -#define RT_ETH_IS_BROADCAST(_addr) ( \ - ((u8 *)(_addr))[0] == 0xff && \ - ((u8 *)(_addr))[1] == 0xff && \ - ((u8 *)(_addr))[2] == 0xff && \ - ((u8 *)(_addr))[3] == 0xff && \ - ((u8 *)(_addr))[4] == 0xff && \ - ((u8 *)(_addr))[5] == 0xff) /* Is Broadcast Address? */ - - -#endif /* #ifndef __INC_ETHERNET_H */ diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep/recv_linux.c index 2a18b32..b4f44f2 100644 --- a/drivers/staging/rtl8188eu/os_dep/recv_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/recv_linux.c @@ -26,7 +26,6 @@ #include #include -#include #include /* init os related resource in struct recv_priv */ -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH RFC 0/2] drivers/base: simplify simple DT-based components
On Fri, 7 Feb 2014 20:23:51 + Russell King - ARM Linux wrote: > Here's my changes to the TDA998x driver to add support for the component > helper. The TDA998x driver retains support for the old way so that > drivers can be transitioned. For any one DRM "card" the transition to I rewrote the tda998x as a simple encoder+connector (i.e. not a slave_encoder) with your component helper, and the code is much clearer and simpler: the DRM driver has nothing to do except to know that the tda998x is a component and to set the possible_crtcs. AFAIK, only the tilcdc drm driver is using the tda998x as a slave_encoder. It does a (encoder+connector) conversion to (slave_encoder). Then, in your changes in the TDA998x, you do a (slave_encoder) translation to (encoder+connector). This seems rather complicated! I think it would be easier to use your component helper and rewrite (remove?) tilcdc_slave.c. > And yes, I'm thinking that maybe moving compare_of() into the component > support so that drivers can share this generic function may be a good > idea. This function exists already in drivers/of/platform.c as of_dev_node_match(). It just needs to be exported. -- Ken ar c'hentaƱ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH RFC 0/2] drivers/base: simplify simple DT-based components
On Sun, Feb 09, 2014 at 10:22:19AM +0100, Jean-Francois Moine wrote: > On Fri, 7 Feb 2014 20:23:51 + > Russell King - ARM Linux wrote: > > > Here's my changes to the TDA998x driver to add support for the component > > helper. The TDA998x driver retains support for the old way so that > > drivers can be transitioned. For any one DRM "card" the transition to > > I rewrote the tda998x as a simple encoder+connector (i.e. not a > slave_encoder) with your component helper, and the code is much clearer > and simpler: the DRM driver has nothing to do except to know that the > tda998x is a component and to set the possible_crtcs. That's exactly what I've done - the slave encoder veneer can be simply deleted when tilcdc is converted. > AFAIK, only the tilcdc drm driver is using the tda998x as a > slave_encoder. It does a (encoder+connector) conversion to > (slave_encoder). Then, in your changes in the TDA998x, you do a > (slave_encoder) translation to (encoder+connector). > This seems rather complicated! No. I first split out the slave encoder functions to be a veneer onto the tda998x backend, and then add the encoder & connector component support. Later, the slave encoder veneer can be deleted. The reason for this is that virtually all the tda998x backend is what's required by the encoder & connector support - which is completely logical when you realise that the generic slave encoder support is just a veneer itself adapting the encoder & connector support to a slave encoder. So, we're basically getting rid of two veneers, but we end up with exactly the same functionality. > > And yes, I'm thinking that maybe moving compare_of() into the component > > support so that drivers can share this generic function may be a good > > idea. > > This function exists already in drivers/of/platform.c as > of_dev_node_match(). It just needs to be exported. Good, thanks for pointing that out. -- FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up. Estimation in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad. Estimate before purchase was "up to 13.2Mbit". ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: rtl8812ae: remove undefined Kconfig macros
There are references to four undefined Kconfig macros in the code. Remove these as the checks for them will always evaluate to false. There are additional cleanups possible now, but I'll gladly leave those to people that are actually familiar with the code. Signed-off-by: Paul Bolle --- Untested (that is, tested with "git grep" only). drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.c b/drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.c index 9d9fa4d..1152fc8 100644 --- a/drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.c +++ b/drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.c @@ -732,17 +732,7 @@ bool exhalbtc_initlize_variables(struct rtl_priv *adapter) else btcoexist->binded = true; -#if ( defined(CONFIG_PCI_HCI)) - btcoexist->chip_interface = BTC_INTF_PCI; -#elif ( defined(CONFIG_USB_HCI)) - btcoexist->chip_interface = BTC_INTF_USB; -#elif ( defined(CONFIG_SDIO_HCI)) - btcoexist->chip_interface = BTC_INTF_SDIO; -#elif ( defined(CONFIG_GSPI_HCI)) - btcoexist->chip_interface = BTC_INTF_GSPI; -#else btcoexist->chip_interface = BTC_INTF_UNKNOWN; -#endif if (NULL == btcoexist->adapter) btcoexist->adapter = adapter; -- 1.8.5.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] [media] v4l: omap4iss: Remove VIDEO_OMAP4_DEBUG
Commit d632dfefd36f ("[media] v4l: omap4iss: Add support for OMAP4 camera interface - Build system") added a Kconfig entry for VIDEO_OMAP4_DEBUG. But nothing uses that symbol. This entry was apparently copied from a similar entry for "OMAP 3 Camera debug messages". But a corresponding Makefile line is missing. Besides, the debug code also depends on a mysterious ISS_ISR_DEBUG macro. This Kconfig entry can be removed. Someone familiar with the code might be able to say what to do with the code depending on the DEBUG and ISS_ISR_DEBUG macros. Signed-off-by: Paul Bolle --- Untested. drivers/staging/media/omap4iss/Kconfig | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/media/omap4iss/Kconfig b/drivers/staging/media/omap4iss/Kconfig index b9fe753..78b0fba 100644 --- a/drivers/staging/media/omap4iss/Kconfig +++ b/drivers/staging/media/omap4iss/Kconfig @@ -4,9 +4,3 @@ config VIDEO_OMAP4 select VIDEOBUF2_DMA_CONTIG ---help--- Driver for an OMAP 4 ISS controller. - -config VIDEO_OMAP4_DEBUG - bool "OMAP 4 Camera debug messages" - depends on VIDEO_OMAP4 - ---help--- - Enable debug messages on OMAP 4 ISS controller driver. -- 1.8.5.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] drivers:staging:rtl8821ae: Fixed few coding style erors and warnings
On 02/09/2014 01:30 AM, Surendra Patil wrote: Fixed multiple coding style errors and warnings wifi.h:1077: WARNING: please, no space before tabs wifi.h:762: WARNING: missing space after struct definition wifi.h:972: WARNING: please, no spaces at the start of a line wifi.h:1825: WARNING: Unnecessary space after function pointer name wifi.h:1826: ERROR: "foo * bar" should be "foo *bar" wifi.h:1099: WARNING: missing space after return type wifi.h:1320: ERROR: Macros with complex values should be enclosed in parenthesis wifi.h:1758: WARNING: Multiple spaces after return type wifi.h:1855: ERROR: code indent should use tabs where possible wifi.h:2303: ERROR: space prohibited after that open parenthesis '(' wifi.h:2408: ERROR: spaces required around that '=' (ctx:VxV) Signed-off-by: Surendra Patil You are free to hack on this driver as much as you want, but please be aware that this driver is only in staging on a temporary basis. I already have cleaned up the checkpatch errors on my version, and merged it with the version of rtlwifi that is in the wireless-testing tree. Once I obtain one of these devices and can test that the device actually works, it will be submitted to the drivers/net/wireless tree of the regular kernel, and it should be there by 3.15. That said, Acked-by: Larry Finger Larry --- drivers/staging/rtl8821ae/wifi.h | 450 --- 1 file changed, 226 insertions(+), 224 deletions(-) diff --git a/drivers/staging/rtl8821ae/wifi.h b/drivers/staging/rtl8821ae/wifi.h index cfe88a1..5ad95b8 100644 --- a/drivers/staging/rtl8821ae/wifi.h +++ b/drivers/staging/rtl8821ae/wifi.h @@ -40,10 +40,10 @@ #define RF_CHANGE_BY_INIT 0 -#define RF_CHANGE_BY_IPS BIT(28) -#define RF_CHANGE_BY_PSBIT(29) -#define RF_CHANGE_BY_HWBIT(30) -#define RF_CHANGE_BY_SWBIT(31) +#define RF_CHANGE_BY_IPS BIT(28) +#define RF_CHANGE_BY_PSBIT(29) +#define RF_CHANGE_BY_HWBIT(30) +#define RF_CHANGE_BY_SWBIT(31) #define IQK_ADDA_REG_NUM 16 #define IQK_MAC_REG_NUM 4 @@ -69,7 +69,7 @@ #define QBSS_LOAD_SIZE5 #define MAX_WMMELE_LENGTH 64 -#define TOTAL_CAM_ENTRY32 +#define TOTAL_CAM_ENTRY32 /*slot time for 11g. */ #define RTL_SLOT_TIME_9 9 @@ -77,27 +77,27 @@ /*related with tcp/ip. */ /*if_ehther.h*/ -#define ETH_P_PAE 0x888E /*Port Access Entity +#define ETH_P_PAE 0x888E /*Port Access Entity *(IEEE 802.1X) */ -#define ETH_P_IP 0x0800 /*Internet Protocol packet */ -#define ETH_P_ARP 0x0806 /*Address Resolution packet */ -#define SNAP_SIZE 6 +#define ETH_P_IP 0x0800 /*Internet Protocol packet */ +#define ETH_P_ARP 0x0806 /*Address Resolution packet */ +#define SNAP_SIZE 6 #define PROTOC_TYPE_SIZE 2 /*related with 802.11 frame*/ -#define MAC80211_3ADDR_LEN 24 -#define MAC80211_4ADDR_LEN 30 +#define MAC80211_3ADDR_LEN 24 +#define MAC80211_4ADDR_LEN 30 #define CHANNEL_MAX_NUMBER(14 + 24 + 21) /* 14 is the max * channel number */ #define CHANNEL_MAX_NUMBER_2G 14 -#define CHANNEL_MAX_NUMBER_5G 54 /* Please refer to +#define CHANNEL_MAX_NUMBER_5G 54 /* Please refer to *"phy_GetChnlGroup8812A" and * "Hal_ReadTxPowerInfo8812A"*/ #define CHANNEL_MAX_NUMBER_5G_80M 7 #define CHANNEL_GROUP_MAX (3 + 9) /* ch1~3, ch4~9, ch10~14 * total three groups */ -#define MAX_PG_GROUP 13 +#define MAX_PG_GROUP 13 #define CHANNEL_GROUP_MAX_2G3 #define CHANNEL_GROUP_IDX_5GL 3 #define CHANNEL_GROUP_IDX_5GM 6 @@ -119,7 +119,7 @@ #define MAX_CHNL_GROUP_5G 14 /* BK, BE, VI, VO, HCCA, MANAGEMENT, COMMAND, HIGH, BEACON. */ -#define MAX_TX_QUEUE 9 +#define MAX_TX_QUEUE 9 #define TX_PWR_BY_RATE_NUM_BAND 2 #define TX_PWR_BY_RATE_NUM_RF 4 @@ -127,11 +127,11 @@ #define MAX_BASE_NUM_IN_PHY_REG_PG_24G 6 #define MAX_BASE_NUM_IN_PHY_REG_PG_5G 5 -#define DELTA_SWINGIDX_SIZE30 -#define BAND_NUM 3 +#define DELTA_SWINGIDX_SIZE30 +#define BAND_NUM 3 /*Now, it's just for 8192ee *not OK yet, keep it 0*/ -#define DMA_IS_64BIT 0 +#define DMA_
Re: [PATCH 2/2] vers:staging:rtl8821ae: Fixed multiple coding style erors and warnings
On 02/09/2014 01:30 AM, Surendra Patil wrote: Fixed multiple coding style errors and warnings wifi.h:1077: WARNING: please, no space before tabs wifi.h:762: WARNING: missing space after struct definition wifi.h:972: WARNING: please, no spaces at the start of a line wifi.h:1825: WARNING: Unnecessary space after function pointer name wifi.h:1826: ERROR: "foo * bar" should be "foo *bar" wifi.h:1099: WARNING: missing space after return type wifi.h:1320: ERROR: Macros with complex values should be enclosed in parenthesis wifi.h:1758: WARNING: Multiple spaces after return type wifi.h:1855: ERROR: code indent should use tabs where possible wifi.h:2303: ERROR: space prohibited after that open parenthesis '(' wifi.h:2408: ERROR: spaces required around that '=' (ctx:VxV) Signed-off-by: Surendra Patil Are you sure that changing this one macro can fix all those errors and warnings? I do not think so. Because the commit message is not appropriate, I must NACK this patch; however, thanks for calling this macro to my attention. Surely it should be replaced with a memcpy() call in the final version. The starting items in the patch subject usually indicate the driver name. For staging drivers, there is an additional mention of it. Thus the subject should be "[PATCH 2/2] staging: rtl8821ae: Fixed .". Where does that "vers:" come from? If you mean "version", then any such information should be inside the "[]" and after the PATCH. Larry --- drivers/staging/rtl8821ae/wifi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8821ae/wifi.h b/drivers/staging/rtl8821ae/wifi.h index 5ad95b8..1e830e8 100644 --- a/drivers/staging/rtl8821ae/wifi.h +++ b/drivers/staging/rtl8821ae/wifi.h @@ -2403,9 +2403,9 @@ Set subfield of little-endian 4-byte value to specified value.*/ (_os).length = (_len); #define CP_MACADDR(des,src) \ - ((des)[0] = (src)[0],(des)[1] = (src)[1],\ - (des)[2] = (src)[2],(des)[3] = (src)[3],\ - (des)[4] = (src)[4],(des)[5] = (src)[5]) + ((des)[0] = (src)[0], (des)[1] = (src)[1],\ + (des)[2] = (src)[2], (des)[3] = (src)[3],\ + (des)[4] = (src)[4], (des)[5] = (src)[5]) static inline u8 rtl_read_byte(struct rtl_priv *rtlpriv, u32 addr) { ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] drivers:statging:rtl8821ae Fixed few coding style errors
On 02/09/2014 02:29 AM, Surendra Patil wrote: Fixed few coding style errors in header files base.h:58: WARNING: please, no space before tabs base.h:81: ERROR: "(foo*)" should be "(foo *)" pci.h:338: ERROR: "foo * bar" should be "foo *bar" pci.h:151: ERROR: do not use C99 // comments Signed-off-by: Surendra Patil The changes made in the code do not match what the commit message states. Sorry, but I must NACK. Larry --- drivers/staging/rtl8821ae/base.h | 46 +++ drivers/staging/rtl8821ae/debug.h | 10 - drivers/staging/rtl8821ae/efuse.h | 4 ++-- drivers/staging/rtl8821ae/pci.h | 18 +++ 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/drivers/staging/rtl8821ae/base.h b/drivers/staging/rtl8821ae/base.h index 629d14f..5eb2a18 100644 --- a/drivers/staging/rtl8821ae/base.h +++ b/drivers/staging/rtl8821ae/base.h @@ -43,7 +43,7 @@ enum ap_peer { PEER_MARV = 7, PEER_AIRGO = 9, PEER_MAX = 10, -} ; +}; #define RTL_DUMMY_OFFSET 0 #define RTL_DUMMY_UNIT8 @@ -51,11 +51,11 @@ enum ap_peer { #define RTL_TX_DESC_SIZE 32 #define RTL_TX_HEADER_SIZE(RTL_TX_DESC_SIZE + RTL_TX_DUMMY_SIZE) -#define HT_AMSDU_SIZE_4K 3839 -#define HT_AMSDU_SIZE_8K 7935 +#define HT_AMSDU_SIZE_4K 3839 +#define HT_AMSDU_SIZE_8K 7935 -#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */ -#define MAX_BIT_RATE_40MHZ_MCS7150 /* Mbps */ +#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */ +#define MAX_BIT_RATE_40MHZ_MCS7150 /* Mbps */ #define RTL_RATE_COUNT_LEGACY 12 #define RTL_CHANNEL_COUNT 14 @@ -78,33 +78,33 @@ enum ap_peer { SET_BITS_TO_LE_2BYTE(_hdr, 8, 1, _val) #define SET_80211_PS_POLL_AID(_hdr, _val) \ - WRITEEF2BYTE(((u8*)(_hdr))+2, _val) + WRITEEF2BYTE(((u8 *)(_hdr))+2, _val) #define SET_80211_PS_POLL_BSSID(_hdr, _val) \ - CP_MACADDR(((u8*)(_hdr))+4, (u8*)(_val)) + CP_MACADDR(((u8 *)(_hdr))+4, (u8 *)(_val)) #define SET_80211_PS_POLL_TA(_hdr, _val) \ - CP_MACADDR(((u8*)(_hdr))+10, (u8*)(_val)) + CP_MACADDR(((u8 *)(_hdr))+10, (u8 *)(_val)) #define SET_80211_HDR_DURATION(_hdr, _val)\ - WRITEEF2BYTE((u8*)(_hdr)+FRAME_OFFSET_DURATION, _val) + WRITEEF2BYTE((u8 *)(_hdr)+FRAME_OFFSET_DURATION, _val) #define SET_80211_HDR_ADDRESS1(_hdr, _val)\ - CP_MACADDR((u8*)(_hdr)+FRAME_OFFSET_ADDRESS1, (u8*)(_val)) -#define SET_80211_HDR_ADDRESS2(_hdr, _val) \ - CP_MACADDR((u8*)(_hdr)+FRAME_OFFSET_ADDRESS2, (u8*)(_val)) -#define SET_80211_HDR_ADDRESS3(_hdr, _val) \ - CP_MACADDR((u8*)(_hdr)+FRAME_OFFSET_ADDRESS3, (u8*)(_val)) + CP_MACADDR((u8 *)(_hdr)+FRAME_OFFSET_ADDRESS1, (u8 *)(_val)) +#define SET_80211_HDR_ADDRESS2(_hdr, _val) \ + CP_MACADDR((u8 *)(_hdr)+FRAME_OFFSET_ADDRESS2, (u8 *)(_val)) +#define SET_80211_HDR_ADDRESS3(_hdr, _val) \ + CP_MACADDR((u8 *)(_hdr)+FRAME_OFFSET_ADDRESS3, (u8 *)(_val)) #define SET_80211_HDR_FRAGMENT_SEQUENCE(_hdr, _val) \ - WRITEEF2BYTE((u8*)(_hdr)+FRAME_OFFSET_SEQUENCE, _val) + WRITEEF2BYTE((u8 *)(_hdr)+FRAME_OFFSET_SEQUENCE, _val) -#define SET_BEACON_PROBE_RSP_TIME_STAMP_LOW(__phdr, __val) \ - WRITEEF4BYTE(((u8*)(__phdr)) + 24, __val) +#define SET_BEACON_PROBE_RSP_TIME_STAMP_LOW(__phdr, __val) \ + WRITEEF4BYTE(((u8 *)(__phdr)) + 24, __val) #define SET_BEACON_PROBE_RSP_TIME_STAMP_HIGH(__phdr, __val) \ - WRITEEF4BYTE(((u8*)(__phdr)) + 28, __val) + WRITEEF4BYTE(((u8 *)(__phdr)) + 28, __val) #define SET_BEACON_PROBE_RSP_BEACON_INTERVAL(__phdr, __val) \ - WRITEEF2BYTE(((u8*)(__phdr)) + 32, __val) -#define GET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr) \ - READEF2BYTE(((u8*)(__phdr)) + 34) + WRITEEF2BYTE(((u8 *)(__phdr)) + 32, __val) +#define GET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr) \ + READEF2BYTE(((u8 *)(__phdr)) + 34) #define SET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr, __val) \ - WRITEEF2BYTE(((u8*)(__phdr)) + 34, __val) + WRITEEF2BYTE(((u8 *)(__phdr)) + 34, __val) #define MASK_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr, __val) \ SET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr, \ (GET_BEACON_PROBE_RSP_CAPABILITY_INFO(__phdr) & (~(__val @@ -125,7 +125,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx); void rtl_beacon_statistic(struct ieee80211_hw *hw, struct sk_buff *skb); void rtl_watch_dog_timer_callback(unsigned long data); int rtl_tx_agg_start(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_sta *sta, u16 tid, u16 * ssn); +struct ieee80211_sta *sta, u16 tid, u16 *ssn); int rtl_tx_agg_stop(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta, u16 tid); int rtl_tx_agg_oper(struct
[PATCH 20/28] Remove OMAP_PM_SRF
The symbol is an orphan, get rid of it. Signed-off-by: Richard Weinberger --- drivers/staging/tidspbridge/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/tidspbridge/Kconfig b/drivers/staging/tidspbridge/Kconfig index 1b6d581..b5e74e9 100644 --- a/drivers/staging/tidspbridge/Kconfig +++ b/drivers/staging/tidspbridge/Kconfig @@ -17,7 +17,7 @@ menuconfig TIDSPBRIDGE config TIDSPBRIDGE_DVFS bool "Enable Bridge Dynamic Voltage and Frequency Scaling (DVFS)" - depends on TIDSPBRIDGE && OMAP_PM_SRF && CPU_FREQ + depends on TIDSPBRIDGE && CPU_FREQ help DVFS allows DSP Bridge to initiate the operating point change to scale the chip voltage and frequency in order to match the -- 1.8.4.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 20/28] Remove OMAP_PM_SRF
On Sun, 2014-02-09 at 19:47 +0100, Richard Weinberger wrote: > The symbol is an orphan, get rid of it. > > Signed-off-by: Richard Weinberger > --- > drivers/staging/tidspbridge/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/tidspbridge/Kconfig > b/drivers/staging/tidspbridge/Kconfig > index 1b6d581..b5e74e9 100644 > --- a/drivers/staging/tidspbridge/Kconfig > +++ b/drivers/staging/tidspbridge/Kconfig > @@ -17,7 +17,7 @@ menuconfig TIDSPBRIDGE > > config TIDSPBRIDGE_DVFS > bool "Enable Bridge Dynamic Voltage and Frequency Scaling (DVFS)" > - depends on TIDSPBRIDGE && OMAP_PM_SRF && CPU_FREQ > + depends on TIDSPBRIDGE && CPU_FREQ You're effectively enabling the TIDSPBRIDGE_DVFS code here. As far as I'm aware that code has _never_ been buildable (ever since it got merged in v2.6.36). I think TIDSPBRIDGE_DVFS (and everything depending on it) might better be removed. Paul Bolle > help > DVFS allows DSP Bridge to initiate the operating point change to > scale the chip voltage and frequency in order to match the ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 20/28] Remove OMAP_PM_SRF
Am 09.02.2014 20:55, schrieb Paul Bolle: > On Sun, 2014-02-09 at 19:47 +0100, Richard Weinberger wrote: >> The symbol is an orphan, get rid of it. >> >> Signed-off-by: Richard Weinberger >> --- >> drivers/staging/tidspbridge/Kconfig | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/staging/tidspbridge/Kconfig >> b/drivers/staging/tidspbridge/Kconfig >> index 1b6d581..b5e74e9 100644 >> --- a/drivers/staging/tidspbridge/Kconfig >> +++ b/drivers/staging/tidspbridge/Kconfig >> @@ -17,7 +17,7 @@ menuconfig TIDSPBRIDGE >> >> config TIDSPBRIDGE_DVFS >> bool "Enable Bridge Dynamic Voltage and Frequency Scaling (DVFS)" >> -depends on TIDSPBRIDGE && OMAP_PM_SRF && CPU_FREQ >> +depends on TIDSPBRIDGE && CPU_FREQ > > You're effectively enabling the TIDSPBRIDGE_DVFS code here. As far as > I'm aware that code has _never_ been buildable (ever since it got merged > in v2.6.36). Samre here, this is by design. If the code does not build/work it needs to be fixed or removed. Thanks, //richard ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/6] Various cleanups of r8188eu
As has been noted, this driver is very rough. This set of patches is intended to smooth some of the rough edges. Signed-off-by: Larry Finger Larry Finger (6): staging: r8188eu: Replace wrapper around _rtw_memcmp() staging: r8188eu: Remove dead file staging: r8188eu: Remove some dead code from headers staging: r8188eu: Replace misspelled local container macro staging: r8188eu: Eliminate macro to get next list item staging: r8188eu: Remove _func_enter and _func_exit macros drivers/staging/rtl8188eu/Makefile | 1 - drivers/staging/rtl8188eu/core/rtw_ap.c| 64 +++--- drivers/staging/rtl8188eu/core/rtw_cmd.c | 114 +-- drivers/staging/rtl8188eu/core/rtw_debug.c | 6 +- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 55 ++ drivers/staging/rtl8188eu/core/rtw_io.c| 28 --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 31 +-- drivers/staging/rtl8188eu/core/rtw_mlme.c | 218 - drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 90 - drivers/staging/rtl8188eu/core/rtw_mp_ioctl.c | 78 drivers/staging/rtl8188eu/core/rtw_p2p.c | 50 ++--- drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 25 --- drivers/staging/rtl8188eu/core/rtw_recv.c | 159 ++- drivers/staging/rtl8188eu/core/rtw_security.c | 75 +-- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 78 +++- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 44 ++--- drivers/staging/rtl8188eu/core/rtw_xmit.c | 107 +++--- drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c | 4 +- drivers/staging/rtl8188eu/hal/hal_intf.c | 4 - drivers/staging/rtl8188eu/hal/odm.c| 4 +- drivers/staging/rtl8188eu/hal/odm_interface.c | 34 drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 12 -- drivers/staging/rtl8188eu/hal/rtl8188e_dm.c| 2 - drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 3 +- drivers/staging/rtl8188eu/hal/rtl8188e_mp.c| 4 +- drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c| 4 +- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 6 +- drivers/staging/rtl8188eu/hal/usb_halinit.c| 10 - drivers/staging/rtl8188eu/hal/usb_ops_linux.c | 23 +-- drivers/staging/rtl8188eu/include/ioctl_cfg80211.h | 107 -- drivers/staging/rtl8188eu/include/osdep_service.h | 10 - drivers/staging/rtl8188eu/include/rtw_debug.h | 14 -- drivers/staging/rtl8188eu/include/rtw_io.h | 44 - drivers/staging/rtl8188eu/include/rtw_ioctl.h | 2 - drivers/staging/rtl8188eu/include/rtw_mlme.h | 32 --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 136 - drivers/staging/rtl8188eu/os_dep/mlme_linux.c | 9 +- drivers/staging/rtl8188eu/os_dep/os_intfs.c| 4 - drivers/staging/rtl8188eu/os_dep/osdep_service.c | 10 - drivers/staging/rtl8188eu/os_dep/recv_linux.c | 7 +- drivers/staging/rtl8188eu/os_dep/rtw_android.c | 1 - drivers/staging/rtl8188eu/os_dep/usb_intf.c| 14 -- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 5 - drivers/staging/rtl8188eu/os_dep/xmit_linux.c | 15 +- 44 files changed, 360 insertions(+), 1383 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/hal/odm_interface.c delete mode 100644 drivers/staging/rtl8188eu/include/ioctl_cfg80211.h -- 1.8.4.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/6] staging: r8188eu: Remove some dead code from headers
The headers for this driver contain a number of unused structs and macros that are removed. File include/ioctl_cfg80211.h is now empty and was deleted. Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/include/ioctl_cfg80211.h | 107 - drivers/staging/rtl8188eu/include/rtw_io.h | 44 - drivers/staging/rtl8188eu/include/rtw_mlme.h | 32 -- drivers/staging/rtl8188eu/os_dep/rtw_android.c | 1 - 4 files changed, 184 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/include/ioctl_cfg80211.h diff --git a/drivers/staging/rtl8188eu/include/ioctl_cfg80211.h b/drivers/staging/rtl8188eu/include/ioctl_cfg80211.h deleted file mode 100644 index 037e9a5..000 --- a/drivers/staging/rtl8188eu/include/ioctl_cfg80211.h +++ /dev/null @@ -1,107 +0,0 @@ -/** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - **/ -#ifndef __IOCTL_CFG80211_H__ -#define __IOCTL_CFG80211_H__ - -struct rtw_wdev_invit_info { - u8 token; - u8 flags; - u8 status; - u8 req_op_ch; - u8 rsp_op_ch; -}; - -#define rtw_wdev_invit_info_init(invit_info) \ - do { \ - (invit_info)->token = 0; \ - (invit_info)->flags = 0x00; \ - (invit_info)->status = 0xff; \ - (invit_info)->req_op_ch = 0; \ - (invit_info)->rsp_op_ch = 0; \ - } while (0) - -struct rtw_wdev_priv { - struct wireless_dev *rtw_wdev; - - struct adapter *padapter; - - struct cfg80211_scan_request *scan_request; - spinlock_t scan_req_lock; - - struct net_device *pmon_ndev;/* for monitor interface */ - char ifname_mon[IFNAMSIZ + 1]; /* name of monitor interface */ - - u8 p2p_enabled; - - u8 provdisc_req_issued; - - struct rtw_wdev_invit_info invit_info; - - u8 bandroid_scan; - bool block; - bool power_mgmt; -}; - -#define wdev_to_priv(w) ((struct rtw_wdev_priv *)(wdev_priv(w))) - -#define wiphy_to_wdev(x) \ -((struct wireless_dev *)(((struct rtw_wdev_priv *)wiphy_priv(x))->rtw_wdev)) - -int rtw_wdev_alloc(struct adapter *padapter, struct device *dev); -void rtw_wdev_free(struct wireless_dev *wdev); -void rtw_wdev_unregister(struct wireless_dev *wdev); - -void rtw_cfg80211_init_wiphy(struct adapter *padapter); - -void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter); - -void rtw_cfg80211_indicate_connect(struct adapter *padapter); -void rtw_cfg80211_indicate_disconnect(struct adapter *padapter); -void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv, -bool aborted); - -#ifdef CONFIG_88EU_AP_MODE -void rtw_cfg80211_indicate_sta_assoc(struct adapter *padapter, -u8 *pmgmt_frame, uint frame_len); -void rtw_cfg80211_indicate_sta_disassoc(struct adapter *padapter, - unsigned char *da, - unsigned short reason); -#endif /* CONFIG_88EU_AP_MODE */ - -void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter, - const u8 *buf, size_t len); -void rtw_cfg80211_rx_p2p_action_public(struct adapter *padapter, - u8 *pmgmt_frame, uint frame_len); -void rtw_cfg80211_rx_action_p2p(struct adapter *padapter, u8 *pmgmt_frame, - uint frame_len); -void rtw_cfg80211_rx_action(struct adapter *adapter, u8 *frame, - uint frame_len, const char *msg); - -int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net, - char *buf, int len, int type); - -bool rtw_cfg80211_pwr_mgmt(struct adapter *adapter); - -#define rtw_cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp) \ - cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp) -#define rtw_cfg80211_send_rx_assoc(dev, bss, buf, len) \ - cfg80211_send_rx_assoc(dev, bss, buf, len) - -#endif /* __IOCTL_CFG80211_H__ */ diff --git a/drivers/staging/rtl8188eu/include/rtw_io.h b
[PATCH 1/6] staging: r8188eu: Replace wrapper around _rtw_memcmp()
This wrapper is replaced with a simple memcmp(). As the wrapper inverts the logic of memcmp(), care needed to be taken. This patch also adds one include of vmalloc.h that was missed in a previous patch. Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/core/rtw_ap.c | 16 ++--- drivers/staging/rtl8188eu/core/rtw_ieee80211.c| 42 ++--- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c| 4 +- drivers/staging/rtl8188eu/core/rtw_mlme.c | 20 +++--- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 76 --- drivers/staging/rtl8188eu/core/rtw_p2p.c | 20 +++--- drivers/staging/rtl8188eu/core/rtw_recv.c | 48 +++--- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 10 +-- drivers/staging/rtl8188eu/core/rtw_wlan_util.c| 42 ++--- drivers/staging/rtl8188eu/core/rtw_xmit.c | 4 +- drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c| 4 +- drivers/staging/rtl8188eu/hal/odm.c | 4 +- drivers/staging/rtl8188eu/hal/odm_interface.c | 33 -- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 1 + drivers/staging/rtl8188eu/hal/rtl8188e_mp.c | 4 +- drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 4 +- drivers/staging/rtl8188eu/include/osdep_service.h | 1 - drivers/staging/rtl8188eu/os_dep/osdep_service.c | 10 --- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 4 +- 19 files changed, 154 insertions(+), 193 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index 8ebe6bc..fe5ec8e 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -980,7 +980,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) for (p = ie + _BEACON_IE_OFFSET_;; p += (ie_len + 2)) { p = rtw_get_ie(p, _SSN_IE_1_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_ - (ie_len + 2))); - if ((p) && (_rtw_memcmp(p+2, OUI1, 4))) { + if ((p) && (!memcmp(p+2, OUI1, 4))) { if (rtw_parse_wpa_ie(p, ie_len+2, &group_cipher, &pairwise_cipher, NULL) == _SUCCESS) { psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X; @@ -1005,7 +1005,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) for (p = ie + _BEACON_IE_OFFSET_;; p += (ie_len + 2)) { p = rtw_get_ie(p, _VENDOR_SPECIFIC_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_ - (ie_len + 2))); - if ((p) && _rtw_memcmp(p+2, WMM_PARA_IE, 6)) { + if ((p) && !memcmp(p+2, WMM_PARA_IE, 6)) { pmlmepriv->qospriv.qos_option = 1; *(p+8) |= BIT(7);/* QoS Info, support U-APSD */ @@ -1150,7 +1150,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list); plist = get_next(plist); - if (_rtw_memcmp(paclnode->addr, addr, ETH_ALEN)) { + if (!memcmp(paclnode->addr, addr, ETH_ALEN)) { if (paclnode->valid) { added = true; DBG_88E("%s, sta has been added\n", __func__); @@ -1211,7 +1211,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr) paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list); plist = get_next(plist); - if (_rtw_memcmp(paclnode->addr, addr, ETH_ALEN)) { + if (!memcmp(paclnode->addr, addr, ETH_ALEN)) { if (paclnode->valid) { paclnode->valid = false; @@ -1351,13 +1351,13 @@ static void update_bcn_vendor_spec_ie(struct adapter *padapter, u8 *oui) { DBG_88E("%s\n", __func__); - if (_rtw_memcmp(RTW_WPA_OUI, oui, 4)) + if (!memcmp(RTW_WPA_OUI, oui, 4)) update_bcn_wpa_ie(padapter); - else if (_rtw_memcmp(WMM_OUI, oui, 4)) + else if (!memcmp(WMM_OUI, oui, 4)) update_bcn_wmm_ie(padapter); - else if (_rtw_memcmp(WPS_OUI, oui, 4)) + else if (!memcmp(WPS_OUI, oui, 4)) update_bcn_wps_ie(padapter); - else if (_rtw_memcmp(P2P_OUI, oui, 4)) + else if (!memcmp(P2P_OUI, oui, 4)) update_bcn_p2p_ie(padapter); else DBG_88E("unknown OUI type!\n"); diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c index e6f98fb..002195a 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c @@ -273,7 +273,7 @@ u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len,
[PATCH 2/6] staging: r8188eu: Remove dead file
After the previous cleanups, file hal/odm_interface.c is now empty. It is hereby deleted, and removed from Makefile. Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/Makefile| 1 - drivers/staging/rtl8188eu/hal/odm_interface.c | 1 - 2 files changed, 2 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/hal/odm_interface.c diff --git a/drivers/staging/rtl8188eu/Makefile b/drivers/staging/rtl8188eu/Makefile index 0a617b4..6a138ff 100644 --- a/drivers/staging/rtl8188eu/Makefile +++ b/drivers/staging/rtl8188eu/Makefile @@ -34,7 +34,6 @@ r8188eu-y := \ hal/hal_com.o \ hal/odm.o \ hal/odm_debug.o \ - hal/odm_interface.o \ hal/odm_HWConfig.o \ hal/odm_RegConfig8188E.o\ hal/odm_RTL8188E.o \ diff --git a/drivers/staging/rtl8188eu/hal/odm_interface.c b/drivers/staging/rtl8188eu/hal/odm_interface.c deleted file mode 100644 index 8b13789..000 --- a/drivers/staging/rtl8188eu/hal/odm_interface.c +++ /dev/null @@ -1 +0,0 @@ - -- 1.8.4.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/6] staging: r8188eu: Replace misspelled local container macro
This driver has its own implementation of a "container_of" macro. It is replaced with the standard container_of version. Most of these are a straight one-to-one replacement; however, a few of the instances referred to the member of a union. Those were replaced with the struct that is part of that union. Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/core/rtw_ap.c | 16 - drivers/staging/rtl8188eu/core/rtw_cmd.c | 2 +- drivers/staging/rtl8188eu/core/rtw_debug.c| 2 +- drivers/staging/rtl8188eu/core/rtw_mlme.c | 14 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 4 +-- drivers/staging/rtl8188eu/core/rtw_p2p.c | 4 +-- drivers/staging/rtl8188eu/core/rtw_recv.c | 44 --- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 16 + drivers/staging/rtl8188eu/core/rtw_xmit.c | 20 +-- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c| 2 +- drivers/staging/rtl8188eu/include/osdep_service.h | 4 --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c| 26 +++--- drivers/staging/rtl8188eu/os_dep/xmit_linux.c | 2 +- 13 files changed, 78 insertions(+), 78 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index fe5ec8e..f32011c 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -289,7 +289,7 @@ voidexpire_timeout_chk(struct adapter *padapter) /* check auth_queue */ while ((rtw_end_of_queue_search(phead, plist)) == false) { - psta = LIST_CONTAINOR(plist, struct sta_info, auth_list); + psta = container_of(plist, struct sta_info, auth_list); plist = get_next(plist); if (psta->expire_to > 0) { @@ -323,7 +323,7 @@ voidexpire_timeout_chk(struct adapter *padapter) /* check asoc_queue */ while ((rtw_end_of_queue_search(phead, plist)) == false) { - psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); + psta = container_of(plist, struct sta_info, asoc_list); plist = get_next(plist); if (chk_sta_is_alive(psta) || !psta->expire_to) { @@ -1147,7 +1147,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) plist = get_next(phead); while (!rtw_end_of_queue_search(phead, plist)) { - paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list); + paclnode = container_of(plist, struct rtw_wlan_acl_node, list); plist = get_next(plist); if (!memcmp(paclnode->addr, addr, ETH_ALEN)) { @@ -1208,7 +1208,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr) plist = get_next(phead); while (!rtw_end_of_queue_search(phead, plist)) { - paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list); + paclnode = container_of(plist, struct rtw_wlan_acl_node, list); plist = get_next(plist); if (!memcmp(paclnode->addr, addr, ETH_ALEN)) { @@ -1507,7 +1507,7 @@ void associated_clients_update(struct adapter *padapter, u8 updated) /* check asoc_queue */ while ((rtw_end_of_queue_search(phead, plist)) == false) { - psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); + psta = container_of(plist, struct sta_info, asoc_list); plist = get_next(plist); @@ -1781,7 +1781,7 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset) /* for each sta in asoc_queue */ while (!rtw_end_of_queue_search(phead, plist)) { - psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); + psta = container_of(plist, struct sta_info, asoc_list); plist = get_next(plist); issue_action_spct_ch_switch(padapter, psta->hwaddr, new_ch, ch_offset); @@ -1815,7 +1815,7 @@ int rtw_sta_flush(struct adapter *padapter) /* free sta asoc_queue */ while ((rtw_end_of_queue_search(phead, plist)) == false) { - psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); + psta = container_of(plist, struct sta_info, asoc_list); plist = get_next(plist); @@ -1944,7 +1944,7 @@ void stop_ap_mode(struct adapter *padapter) phead = get_list_head(pacl_node_q); plist = get_next(phead); while ((rtw_end_of_queue_search(phead, plist)) == false) { - paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list); + paclnode = container_of(plist, struct rtw_wlan_acl_node, list); plist = get_next(plist); if (paclnode->valid) { diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 82fe8c4..d2
[PATCH 5/6] staging: r8188eu: Eliminate macro to get next list item
The driver contains a macro that gets the next item in a linked list. Replace it with a simple copy of the pointer. Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/core/rtw_ap.c | 32 +++--- drivers/staging/rtl8188eu/core/rtw_cmd.c | 2 +- drivers/staging/rtl8188eu/core/rtw_debug.c| 4 +- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c| 2 +- drivers/staging/rtl8188eu/core/rtw_mlme.c | 28 ++-- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 8 ++-- drivers/staging/rtl8188eu/core/rtw_p2p.c | 8 ++-- drivers/staging/rtl8188eu/core/rtw_recv.c | 26 ++-- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 26 ++-- drivers/staging/rtl8188eu/core/rtw_xmit.c | 34 +++ drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c| 4 +- drivers/staging/rtl8188eu/include/osdep_service.h | 5 --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c| 52 +++ drivers/staging/rtl8188eu/os_dep/xmit_linux.c | 4 +- 14 files changed, 115 insertions(+), 120 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index f32011c..62a6147 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -285,12 +285,12 @@ void expire_timeout_chk(struct adapter *padapter) spin_lock_bh(&pstapriv->auth_list_lock); phead = &pstapriv->auth_list; - plist = get_next(phead); + plist = phead->next; /* check auth_queue */ while ((rtw_end_of_queue_search(phead, plist)) == false) { psta = container_of(plist, struct sta_info, auth_list); - plist = get_next(plist); + plist = plist->next; if (psta->expire_to > 0) { psta->expire_to--; @@ -319,12 +319,12 @@ void expire_timeout_chk(struct adapter *padapter) spin_lock_bh(&pstapriv->asoc_list_lock); phead = &pstapriv->asoc_list; - plist = get_next(phead); + plist = phead->next; /* check asoc_queue */ while ((rtw_end_of_queue_search(phead, plist)) == false) { psta = container_of(plist, struct sta_info, asoc_list); - plist = get_next(plist); + plist = plist->next; if (chk_sta_is_alive(psta) || !psta->expire_to) { psta->expire_to = pstapriv->expire_to; @@ -1144,11 +1144,11 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) spin_lock_bh(&(pacl_node_q->lock)); phead = get_list_head(pacl_node_q); - plist = get_next(phead); + plist = phead->next; while (!rtw_end_of_queue_search(phead, plist)) { paclnode = container_of(plist, struct rtw_wlan_acl_node, list); - plist = get_next(plist); + plist = plist->next; if (!memcmp(paclnode->addr, addr, ETH_ALEN)) { if (paclnode->valid) { @@ -1205,11 +1205,11 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr) spin_lock_bh(&(pacl_node_q->lock)); phead = get_list_head(pacl_node_q); - plist = get_next(phead); + plist = phead->next; while (!rtw_end_of_queue_search(phead, plist)) { paclnode = container_of(plist, struct rtw_wlan_acl_node, list); - plist = get_next(plist); + plist = plist->next; if (!memcmp(paclnode->addr, addr, ETH_ALEN)) { if (paclnode->valid) { @@ -1503,13 +1503,13 @@ void associated_clients_update(struct adapter *padapter, u8 updated) spin_lock_bh(&pstapriv->asoc_list_lock); phead = &pstapriv->asoc_list; - plist = get_next(phead); + plist = phead->next; /* check asoc_queue */ while ((rtw_end_of_queue_search(phead, plist)) == false) { psta = container_of(plist, struct sta_info, asoc_list); - plist = get_next(plist); + plist = plist->next; VCS_update(padapter, psta); } @@ -1777,12 +1777,12 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset) spin_lock_bh(&pstapriv->asoc_list_lock); phead = &pstapriv->asoc_list; - plist = get_next(phead); + plist = phead->next; /* for each sta in asoc_queue */ while (!rtw_end_of_queue_search(phead, plist)) { psta = container_of(plist, struct sta_info, asoc_list); - plist = get_next(plist); + plist = plist->next; issue_action_spct_ch_switch(padapter, psta->hwaddr, new_ch, ch_offset); psta->expire_to = ((pstapriv->expire_to * 2) > 5) ? 5 : (pstapriv->expire_to * 2); @@ -1811,13 +1811,13 @@ int rt
[PATCH net] hyperv: Fix the carrier status setting
Signed-off-by: Haiyang Zhang Reviewed-by: K. Y. Srinivasan --- drivers/net/hyperv/netvsc_drv.c | 24 +++- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 7756118..836211c 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -88,8 +88,12 @@ static int netvsc_open(struct net_device *net) { struct net_device_context *net_device_ctx = netdev_priv(net); struct hv_device *device_obj = net_device_ctx->device_ctx; + struct netvsc_device *nvdev; + struct rndis_device *rdev; int ret = 0; + netif_carrier_off(net); + /* Open up the device */ ret = rndis_filter_open(device_obj); if (ret != 0) { @@ -99,6 +103,11 @@ static int netvsc_open(struct net_device *net) netif_start_queue(net); + nvdev = hv_get_drvdata(device_obj); + rdev = nvdev->extension; + if (!rdev->link_state) + netif_carrier_on(net); + return ret; } @@ -229,15 +238,17 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj, struct net_device *net; struct net_device_context *ndev_ctx; struct netvsc_device *net_device; + struct rndis_device *rdev; net_device = hv_get_drvdata(device_obj); + rdev = net_device->extension; + + rdev->link_state = !(status == 1); + net = net_device->ndev; - if (!net) { - netdev_err(net, "got link status but net device " - "not initialized yet\n"); + if (!net || net->reg_state != NETREG_REGISTERED) return; - } if (status == 1) { netif_carrier_on(net); @@ -414,9 +425,6 @@ static int netvsc_probe(struct hv_device *dev, if (!net) return -ENOMEM; - /* Set initial state */ - netif_carrier_off(net); - net_device_ctx = netdev_priv(net); net_device_ctx->device_ctx = dev; hv_set_drvdata(dev, net); @@ -443,8 +451,6 @@ static int netvsc_probe(struct hv_device *dev, } memcpy(net->dev_addr, device_info.mac_adr, ETH_ALEN); - netif_carrier_on(net); - ret = register_netdev(net); if (ret != 0) { pr_err("Unable to register netdev.\n"); -- 1.7.4.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging : android : fix checkpatch issues
>From 1348300b03697d0499eddba6035a851d1278abd1 Mon Sep 17 00:00:00 2001 From: Daeseok Youn Date: Mon, 10 Feb 2014 10:45:30 +0900 Subject: [PATCH] staging : android : fix checkpatch issues drivers/staging/android/ ion/ion.c : - WARNNING: Unnecessary space after function pointer name - ERROR: return is not a function, parentheses are not required - WARNNING: Prefer seq_puts to seq_printf - WARNING: quoted string split across lines ion/ion_priv.h : - WARNING: Unnecessary space after function pointer name sync.h : - WARNING: missing space after return type timed_output.h : - WARNING: Multiple spaces after return type Signed-off-by: Daeseok Youn --- drivers/staging/android/ion/ion.c | 19 +-- drivers/staging/android/ion/ion_priv.h | 16 drivers/staging/android/sync.h |2 +- drivers/staging/android/timed_output.h |4 ++-- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 574066f..d81f231 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -55,7 +55,7 @@ struct ion_device { struct mutex buffer_lock; struct rw_semaphore lock; struct plist_head heaps; - long (*custom_ioctl) (struct ion_client *client, unsigned int cmd, + long (*custom_ioctl)(struct ion_client *client, unsigned int cmd, unsigned long arg); struct rb_root clients; struct dentry *debug_root; @@ -429,7 +429,7 @@ static bool ion_handle_validate(struct ion_client *client, struct ion_handle *handle) { WARN_ON(!mutex_is_locked(&client->lock)); - return (idr_find(&client->idr, handle->id) == handle); + return idr_find(&client->idr, handle->id) == handle; } static int ion_handle_add(struct ion_client *client, struct ion_handle *handle) @@ -1338,7 +1338,7 @@ static int ion_debug_heap_show(struct seq_file *s, void *unused) size_t total_orphaned_size = 0; seq_printf(s, "%16.s %16.s %16.s\n", "client", "pid", "size"); - seq_printf(s, "\n"); + seq_puts(s, "\n"); for (n = rb_first(&dev->clients); n; n = rb_next(n)) { struct ion_client *client = rb_entry(n, struct ion_client, @@ -1357,9 +1357,9 @@ static int ion_debug_heap_show(struct seq_file *s, void *unused) client->pid, size); } } - seq_printf(s, "\n"); - seq_printf(s, "orphaned allocations (info is from last known client):" - "\n"); + seq_puts(s, "\n"); + seq_puts(s, "orphaned allocations (info is from last known client):\n"); + mutex_lock(&dev->buffer_lock); for (n = rb_first(&dev->buffers); n; n = rb_next(n)) { struct ion_buffer *buffer = rb_entry(n, struct ion_buffer, @@ -1376,14 +1376,14 @@ static int ion_debug_heap_show(struct seq_file *s, void *unused) } } mutex_unlock(&dev->buffer_lock); - seq_printf(s, "\n"); + seq_puts(s, "\n"); seq_printf(s, "%16.s %16zu\n", "total orphaned", total_orphaned_size); seq_printf(s, "%16.s %16zu\n", "total ", total_size); if (heap->flags & ION_HEAP_FLAG_DEFER_FREE) seq_printf(s, "%16.s %16zu\n", "deferred free", heap->free_list_size); - seq_printf(s, "\n"); + seq_puts(s, "\n"); if (heap->debug_show) heap->debug_show(heap, s, unused); @@ -1527,8 +1527,7 @@ void __init ion_reserve(struct ion_platform_data *data) data->heaps[i].align, MEMBLOCK_ALLOC_ANYWHERE); if (!paddr) { - pr_err("%s: error allocating memblock for " - "heap %d\n", + pr_err("%s: error allocating memblock for heap %d\n", __func__, i); continue; } diff --git a/drivers/staging/android/ion/ion_priv.h b/drivers/staging/android/ion/ion_priv.h index d986739..10f315a 100644 --- a/drivers/staging/android/ion/ion_priv.h +++ b/drivers/staging/android/ion/ion_priv.h @@ -100,18 +100,18 @@ void ion_buffer_destroy(struct ion_buffer *buffer); * map_dma and map_kernel return pointer on success, ERR_PTR o
[PATCH] drivers:staging:silicom: Fixed MACRO, Extern, parentheses Coding style warnings and errors
Fixed MACRO,Extern and parentheses Coding style warnings and errors - listed only few bpctl_mod.c:120: WARNING: externs should be avoided in .c files bpctl_mod.c:121: WARNING: externs should be avoided in .c files bpctl_mod.c:122: WARNING: externs should be avoided in .c files bpctl_mod.c:124: WARNING: externs should be avoided in .c files bpctl_mod.c:125: WARNING: externs should be avoided in .c files bp_ioctl.h:54: ERROR: Macros with complex values should be enclosed in parenthesis bp_ioctl.h:159: ERROR: Macros with complex values should be enclosed in p arenthesis bpctl_mod.c:1395: WARNING: Unnecessary parentheses - maybe == should be = ? Signed-off-by: Surendra Patil --- drivers/staging/silicom/bpctl_mod.c | 28 ++-- drivers/staging/silicom/bypasslib/bp_ioctl.h | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c index 20325f5..5edb9d4 100644 --- a/drivers/staging/silicom/bpctl_mod.c +++ b/drivers/staging/silicom/bpctl_mod.c @@ -117,12 +117,12 @@ static int wdt_timer(struct bpctl_dev *pbpctl_dev, int *time_left); static struct bpctl_dev *get_status_port_fn(struct bpctl_dev *pbpctl_dev); static void if_scan_init(void); -int bypass_proc_create_dev_sd(struct bpctl_dev *pbp_device_block); -int bypass_proc_remove_dev_sd(struct bpctl_dev *pbp_device_block); -int bp_proc_create(void); +static int bypass_proc_create_dev_sd(struct bpctl_dev *pbp_device_block); +static int bypass_proc_remove_dev_sd(struct bpctl_dev *pbp_device_block); +static int bp_proc_create(void); -int is_bypass_fn(struct bpctl_dev *pbpctl_dev); -int get_dev_idx_bsf(int bus, int slot, int func); +static int is_bypass_fn(struct bpctl_dev *pbpctl_dev); +static int get_dev_idx_bsf(int bus, int slot, int func); static int bp_get_dev_idx_bsf(struct net_device *dev, int *index) { @@ -262,8 +262,8 @@ static struct notifier_block bp_notifier_block = { .notifier_call = bp_device_event, }; -int is_bypass_fn(struct bpctl_dev *pbpctl_dev); -int wdt_time_left(struct bpctl_dev *pbpctl_dev); +static int is_bypass_fn(struct bpctl_dev *pbpctl_dev); +static int wdt_time_left(struct bpctl_dev *pbpctl_dev); static void write_pulse(struct bpctl_dev *pbpctl_dev, unsigned int ctrl_ext, @@ -1392,7 +1392,7 @@ static int wdt_pulse(struct bpctl_dev *pbpctl_dev) (ctrl_ext & ~(BP10G_MCLK_DATA_OUT | BP10G_MDIO_DATA_OUT))); } - if ((pbpctl_dev->wdt_status == WDT_STATUS_EN)) + if (pbpctl_dev->wdt_status == WDT_STATUS_EN) /*&& (pbpctl_dev->bp_ext_verbypass_wdt_on_time = jiffies; #ifdef BP_SYNC_FLAG @@ -2866,7 +2866,7 @@ int std_nic_off(struct bpctl_dev *pbpctl_dev) return BP_NOT_CAP; } -int wdt_time_left(struct bpctl_dev *pbpctl_dev) +static int wdt_time_left(struct bpctl_dev *pbpctl_dev) { /* unsigned long curr_time=((long long)(jiffies*1000))/HZ, delta_time=0,wdt_on_time=((long long)(pbpctl_dev->bypass_wdt_on_time*1000))/HZ; */ @@ -7101,13 +7101,13 @@ int get_bp_hw_reset_sd(int ifindex) } EXPORT_SYMBOL(get_bp_hw_reset_sd); -int get_bypass_info_sd(int ifindex, struct bp_info *bp_info) +static int get_bypass_info_sd(int ifindex, struct bp_info *bp_info) { return get_bypass_info_fn(get_dev_idx_p(ifindex), bp_info->prod_name, &bp_info->fw_ver); } EXPORT_SYMBOL(get_bypass_info_sd); -int bp_if_scan_sd(void) +static int bp_if_scan_sd(void) { if_scan_init(); return 0; @@ -7118,7 +7118,7 @@ EXPORT_SYMBOL(bp_if_scan_sd); static struct proc_dir_entry *bp_procfs_dir; -int bp_proc_create(void) +static int bp_proc_create(void) { bp_procfs_dir = proc_mkdir(BP_PROC_DIR, init_net.proc_net); if (bp_procfs_dir == (struct proc_dir_entry *)0) { @@ -7746,7 +7746,7 @@ static int show_wd_autoreset(struct seq_file *m, void *v) } RW_FOPS(wd_autoreset) -int bypass_proc_create_dev_sd(struct bpctl_dev *pbp_device_block) +static int bypass_proc_create_dev_sd(struct bpctl_dev *pbp_device_block) { struct bypass_pfs_sd *current_pfs = &(pbp_device_block->bypass_pfs_set); static struct proc_dir_entry *procfs_dir; @@ -7816,7 +7816,7 @@ int bypass_proc_create_dev_sd(struct bpctl_dev *pbp_device_block) return ret; } -int bypass_proc_remove_dev_sd(struct bpctl_dev *pbp_device_block) +static int bypass_proc_remove_dev_sd(struct bpctl_dev *pbp_device_block) { struct bypass_pfs_sd *current_pfs = &pbp_device_block->bypass_pfs_set; diff --git a/drivers/staging/silicom/bypasslib/bp_ioctl.h b/drivers/staging/silicom/bypasslib/bp_ioctl.h index 2d1ef53..a0fb79f 100644 --- a/drivers/staging/silicom/bypasslib/bp_ioctl.h +++ b/drivers/staging/silicom/bypasslib/bp_ioctl.h @@ -51,7 +51,7 @@ #define WDT_STEP_TIME 0x10/* BIT_4 */ #define WD_MIN_TIME_GET(desc) (desc & 0xf) -#define WD_STEP_COUNT
Re: [PATCH] staging : android : fix checkpatch issues
On Mon, Feb 10, 2014 at 10:59:14AM +0900, Daeseok Youn wrote: > >From 1348300b03697d0499eddba6035a851d1278abd1 Mon Sep 17 00:00:00 2001 > From: Daeseok Youn > Date: Mon, 10 Feb 2014 10:45:30 +0900 > Subject: [PATCH] staging : android : fix checkpatch issues > > drivers/staging/android/ > ion/ion.c : > - WARNNING: Unnecessary space after function pointer name > - ERROR: return is not a function, parentheses are not required > - WARNNING: Prefer seq_puts to seq_printf > - WARNING: quoted string split across lines > > ion/ion_priv.h : > - WARNING: Unnecessary space after function pointer name > > sync.h : > - WARNING: missing space after return type > > timed_output.h : > - WARNING: Multiple spaces after return type You are doing multiple things in different files, please break this up into smaller patches... thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging : android : fix checkpatch issues
2014-02-10 13:26 GMT+09:00 Greg KH : > On Mon, Feb 10, 2014 at 10:59:14AM +0900, Daeseok Youn wrote: >> >From 1348300b03697d0499eddba6035a851d1278abd1 Mon Sep 17 00:00:00 2001 >> From: Daeseok Youn >> Date: Mon, 10 Feb 2014 10:45:30 +0900 >> Subject: [PATCH] staging : android : fix checkpatch issues >> >> drivers/staging/android/ >> ion/ion.c : >> - WARNNING: Unnecessary space after function pointer name >> - ERROR: return is not a function, parentheses are not required >> - WARNNING: Prefer seq_puts to seq_printf >> - WARNING: quoted string split across lines >> >> ion/ion_priv.h : >> - WARNING: Unnecessary space after function pointer name >> >> sync.h : >> - WARNING: missing space after return type >> >> timed_output.h : >> - WARNING: Multiple spaces after return type > > You are doing multiple things in different files, please break this up > into smaller patches... > > thanks, > > greg k-h Yes, I will break this into smaller patches and re-send. Thanks. Daeseok Youn ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging : ion : Fix some checkpatch warnings and an error
>From aa06cc53c7214a044fbc220872aa6210c09608d3 Mon Sep 17 00:00:00 2001 From: Daeseok Youn Date: Mon, 10 Feb 2014 14:27:40 +0900 Subject: [PATCH] staging : ion : Fix some checkpatch warnings and an error Warning: - Unnecessary space after function pointer name - Prefer seq_puts to seq_printf - quoted string split across lines Error: - return is not a function, parentheses are not required Signed-off-by: Daeseok Youn --- drivers/staging/android/ion/ion.c | 19 +-- drivers/staging/android/ion/ion_priv.h | 16 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 574066f..d81f231 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -55,7 +55,7 @@ struct ion_device { struct mutex buffer_lock; struct rw_semaphore lock; struct plist_head heaps; - long (*custom_ioctl) (struct ion_client *client, unsigned int cmd, + long (*custom_ioctl)(struct ion_client *client, unsigned int cmd, unsigned long arg); struct rb_root clients; struct dentry *debug_root; @@ -429,7 +429,7 @@ static bool ion_handle_validate(struct ion_client *client, struct ion_handle *handle) { WARN_ON(!mutex_is_locked(&client->lock)); - return (idr_find(&client->idr, handle->id) == handle); + return idr_find(&client->idr, handle->id) == handle; } static int ion_handle_add(struct ion_client *client, struct ion_handle *handle) @@ -1338,7 +1338,7 @@ static int ion_debug_heap_show(struct seq_file *s, void *unused) size_t total_orphaned_size = 0; seq_printf(s, "%16.s %16.s %16.s\n", "client", "pid", "size"); - seq_printf(s, "\n"); + seq_puts(s, "\n"); for (n = rb_first(&dev->clients); n; n = rb_next(n)) { struct ion_client *client = rb_entry(n, struct ion_client, @@ -1357,9 +1357,9 @@ static int ion_debug_heap_show(struct seq_file *s, void *unused) client->pid, size); } } - seq_printf(s, "\n"); - seq_printf(s, "orphaned allocations (info is from last known client):" - "\n"); + seq_puts(s, "\n"); + seq_puts(s, "orphaned allocations (info is from last known client):\n"); + mutex_lock(&dev->buffer_lock); for (n = rb_first(&dev->buffers); n; n = rb_next(n)) { struct ion_buffer *buffer = rb_entry(n, struct ion_buffer, @@ -1376,14 +1376,14 @@ static int ion_debug_heap_show(struct seq_file *s, void *unused) } } mutex_unlock(&dev->buffer_lock); - seq_printf(s, "\n"); + seq_puts(s, "\n"); seq_printf(s, "%16.s %16zu\n", "total orphaned", total_orphaned_size); seq_printf(s, "%16.s %16zu\n", "total ", total_size); if (heap->flags & ION_HEAP_FLAG_DEFER_FREE) seq_printf(s, "%16.s %16zu\n", "deferred free", heap->free_list_size); - seq_printf(s, "\n"); + seq_puts(s, "\n"); if (heap->debug_show) heap->debug_show(heap, s, unused); @@ -1527,8 +1527,7 @@ void __init ion_reserve(struct ion_platform_data *data) data->heaps[i].align, MEMBLOCK_ALLOC_ANYWHERE); if (!paddr) { - pr_err("%s: error allocating memblock for " - "heap %d\n", + pr_err("%s: error allocating memblock for heap %d\n", __func__, i); continue; } diff --git a/drivers/staging/android/ion/ion_priv.h b/drivers/staging/android/ion/ion_priv.h index d986739..10f315a 100644 --- a/drivers/staging/android/ion/ion_priv.h +++ b/drivers/staging/android/ion/ion_priv.h @@ -100,18 +100,18 @@ void ion_buffer_destroy(struct ion_buffer *buffer); * map_dma and map_kernel return pointer on success, ERR_PTR on error. */ struct ion_heap_ops { - int (*allocate) (struct ion_heap *heap, + int (*allocate)(struct ion_heap *heap, struct ion_buffer *buffer, unsigned long len, unsigned long align, unsigned long flags); - void (*free) (struct ion_buffer *buffer); - int (*phys)
[PATCH] staging : android : sync : fix a checkpatch warning
>From 16140b1ec1b1e1060f74707e4a6661aface81a14 Mon Sep 17 00:00:00 2001 From: Daeseok Youn Date: Mon, 10 Feb 2014 14:36:48 +0900 Subject: [PATCH] staging : android : sync : fix a checkpatch warning - WARNING: missing space after return type Signed-off-by: Daeseok Youn --- drivers/staging/android/sync.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h index 62e2255b..6ee8d69 100644 --- a/drivers/staging/android/sync.h +++ b/drivers/staging/android/sync.h @@ -53,7 +53,7 @@ struct sync_timeline_ops { const char *driver_name; /* required */ - struct sync_pt *(*dup)(struct sync_pt *pt); + struct sync_pt * (*dup)(struct sync_pt *pt); /* required */ int (*has_signaled)(struct sync_pt *pt); -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: android: timed_output: fix a checkpatch warning
>From 866c5eb6cb88b59702802876a724dfd0144c447e Mon Sep 17 00:00:00 2001 From: Daeseok Youn Date: Mon, 10 Feb 2014 14:38:05 +0900 Subject: [PATCH] staging: android: timed_output: fix a checkpatch warning - WARNING: Multiple spaces after return type Signed-off-by: Daeseok Youn --- drivers/staging/android/timed_output.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/timed_output.h b/drivers/staging/android/timed_output.h index 905c7cc..13d2ca5 100644 --- a/drivers/staging/android/timed_output.h +++ b/drivers/staging/android/timed_output.h @@ -20,10 +20,10 @@ struct timed_output_dev { const char *name; /* enable the output and set the timer */ - void(*enable)(struct timed_output_dev *sdev, int timeout); + void (*enable)(struct timed_output_dev *sdev, int timeout); /* returns the current number of milliseconds remaining on the timer */ - int (*get_time)(struct timed_output_dev *sdev); + int (*get_time)(struct timed_output_dev *sdev); /* private data */ struct device *dev; -- 1.7.9.5 --- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging : ion : Fix some checkpatch warnings and an error
I think It looks better than reported by checkpatch.pl. But I have a qeustion, if your patch is applied to checkpatch.pl file, a return type of "void *" line will be changed. for example, void * (*map_kernel)(struct ion_heap *heap, struct ion_buffer *buffer); => void *(*map_kernel)(struct ion_heap *heap, struct ion_buffer *buffer); in same file. right? If you confirm my question, I re-send my patch after fixing that line. And I have a patch which is same fix. (driver/staging/android/sync.h) diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h index 62e2255b..6ee8d69 100644 --- a/drivers/staging/android/sync.h +++ b/drivers/staging/android/sync.h @@ -53,7 +53,7 @@ struct sync_timeline_ops { const char *driver_name; /* required */ - struct sync_pt *(*dup)(struct sync_pt *pt); + struct sync_pt * (*dup)(struct sync_pt *pt); /* required */ int (*has_signaled)(struct sync_pt *pt); 2014-02-10 15:07 GMT+09:00 Joe Perches : > On Mon, 2014-02-10 at 14:56 +0900, Daeseok Youn wrote: >> > > Hello. > >> diff --git a/drivers/staging/android/ion/ion_priv.h >> b/drivers/staging/android/ion/ion_priv.h > [] >> - struct sg_table *(*map_dma) (struct ion_heap *heap, >> + struct sg_table * (*map_dma)(struct ion_heap *heap, > > The message about space required after "struct sg_table *" > is a checkpatch defect. This is better as: > > struct sg_table *(*map_dma)(struct ion_heap *heap, etc...) > > I'll fix checkpatch in a little bit. > > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging : android : sync : fix a checkpatch warning
CC+ Joe Perches. 2014-02-10 14:58 GMT+09:00 Daeseok Youn : > From 16140b1ec1b1e1060f74707e4a6661aface81a14 Mon Sep 17 00:00:00 2001 > From: Daeseok Youn > Date: Mon, 10 Feb 2014 14:36:48 +0900 > Subject: [PATCH] staging : android : sync : fix a checkpatch warning > > - WARNING: missing space after return type > > Signed-off-by: Daeseok Youn > --- > drivers/staging/android/sync.h |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h > index 62e2255b..6ee8d69 100644 > --- a/drivers/staging/android/sync.h > +++ b/drivers/staging/android/sync.h > @@ -53,7 +53,7 @@ struct sync_timeline_ops { > const char *driver_name; > > /* required */ > - struct sync_pt *(*dup)(struct sync_pt *pt); > + struct sync_pt * (*dup)(struct sync_pt *pt); > > /* required */ > int (*has_signaled)(struct sync_pt *pt); > -- > 1.7.9.5 > > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel