[PATCH 1/2] media: atomisp: get rid of some unused static vars
There are several static vars declared inside the system local headers. This causes lots of warnings when W=1. Remove the unused ones. Signed-off-by: Mauro Carvalho Chehab --- .../media/atomisp/pci/isp2400_system_local.h | 38 --- .../media/atomisp/pci/isp2401_system_local.h | 30 --- 2 files changed, 68 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/isp2400_system_local.h b/drivers/staging/media/atomisp/pci/isp2400_system_local.h index 675b8e5bdcc1..f889b7bf8f2d 100644 --- a/drivers/staging/media/atomisp/pci/isp2400_system_local.h +++ b/drivers/staging/media/atomisp/pci/isp2400_system_local.h @@ -38,11 +38,6 @@ #define GP_FIFO_BASE ((hrt_address)0x00090104) /* This is NOT a base address */ -/* DDR */ -static const hrt_address DDR_BASE[N_DDR_ID] = { - (hrt_address)0x00012000ULL -}; - /* ISP */ static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = { (hrt_address)0x0002ULL @@ -56,16 +51,6 @@ static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = { (hrt_address)0x0010ULL }; -static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = { - (hrt_address)0x001CULL, - (hrt_address)0x001DULL, - (hrt_address)0x001EULL -}; - -static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = { - (hrt_address)0x001FULL -}; - /* SP */ static const hrt_address SP_CTRL_BASE[N_SP_ID] = { (hrt_address)0x0001ULL @@ -75,10 +60,6 @@ static const hrt_address SP_DMEM_BASE[N_SP_ID] = { (hrt_address)0x0030ULL }; -static const hrt_address SP_PMEM_BASE[N_SP_ID] = { - (hrt_address)0x000BULL -}; - /* MMU */ /* * MMU0_ID: The data MMU @@ -177,11 +158,6 @@ static const hrt_address RX_BASE[N_RX_ID] = { #define GP_FIFO_BASE ((hrt_address)0x00090104) /* This is NOT a base address */ -/* DDR : Attention, this value not defined in 32-bit */ -static const hrt_address DDR_BASE[N_DDR_ID] = { - (hrt_address)0xUL -}; - /* ISP */ static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = { (hrt_address)0x0002UL @@ -195,16 +171,6 @@ static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = { (hrt_address)0x10UL }; -static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = { - (hrt_address)0xUL, - (hrt_address)0xUL, - (hrt_address)0xUL -}; - -static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = { - (hrt_address)0xUL -}; - /* SP */ static const hrt_address SP_CTRL_BASE[N_SP_ID] = { (hrt_address)0x0001UL @@ -214,10 +180,6 @@ static const hrt_address SP_DMEM_BASE[N_SP_ID] = { (hrt_address)0x0030UL }; -static const hrt_address SP_PMEM_BASE[N_SP_ID] = { - (hrt_address)0x000BUL -}; - /* MMU */ /* * MMU0_ID: The data MMU diff --git a/drivers/staging/media/atomisp/pci/isp2401_system_local.h b/drivers/staging/media/atomisp/pci/isp2401_system_local.h index b09f8faadb13..1bb01e627cd7 100644 --- a/drivers/staging/media/atomisp/pci/isp2401_system_local.h +++ b/drivers/staging/media/atomisp/pci/isp2401_system_local.h @@ -36,11 +36,6 @@ #define GP_FIFO_BASE ((hrt_address)0x00090104) /* This is NOT a base address */ -/* DDR */ -static const hrt_address DDR_BASE[N_DDR_ID] = { - 0x00012000ULL -}; - /* ISP */ static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = { 0x0002ULL @@ -54,16 +49,6 @@ static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = { 0x0010ULL }; -static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = { - 0x001CULL, - 0x001DULL, - 0x001EULL -}; - -static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = { - 0x001FULL -}; - /* SP */ static const hrt_address SP_CTRL_BASE[N_SP_ID] = { 0x0001ULL @@ -217,11 +202,6 @@ static const hrt_address STREAM2MMIO_CTRL_BASE[N_STREAM2MMIO_ID] = { #define GP_FIFO_BASE ((hrt_address)0x00090104) /* This is NOT a base address */ -/* DDR : Attention, this value not defined in 32-bit */ -static const hrt_address DDR_BASE[N_DDR_ID] = { - 0xUL -}; - /* ISP */ static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = { 0x0002UL @@ -235,16 +215,6 @@ static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = { 0xUL }; -static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = { - 0xUL, - 0xUL, - 0xUL -}; - -static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = { - 0xUL -}; - /* SP */ static const hrt_address SP_CTRL_BASE[N_SP_ID] = { 0x0001UL -- 2.26.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] atomisp: remove non-used 32-bits consts at system_local
There is an abstraction at the code in order to support 32 or 64 bits address/data length. However, for all Atom chipsets supported by this version, the size is fixed. So, cleanup the mess, removing the uused code and placing the data sizes on a single place. The end goal is to completely remove those local/global headers, replacing them by some ISP-version dependent struct, in order for the driver to decide what version it would need in runtime. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/pci/hive_types.h| 24 +-- .../media/atomisp/pci/isp2400_system_global.h | 2 - .../media/atomisp/pci/isp2400_system_local.h | 131 - .../media/atomisp/pci/isp2401_system_global.h | 4 - .../media/atomisp/pci/isp2401_system_local.h | 173 -- 5 files changed, 3 insertions(+), 331 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/hive_types.h b/drivers/staging/media/atomisp/pci/hive_types.h index addda9b81d7b..4b8a679fb672 100644 --- a/drivers/staging/media/atomisp/pci/hive_types.h +++ b/drivers/staging/media/atomisp/pci/hive_types.h @@ -52,32 +52,14 @@ typedef unsigned short hive_uint16; typedef unsigned int hive_uint32; typedef unsigned long long hive_uint64; -/* by default assume 32 bit master port (both data and address) */ -#ifndef HRT_DATA_WIDTH -#define HRT_DATA_WIDTH 32 -#endif -#ifndef HRT_ADDRESS_WIDTH -#define HRT_ADDRESS_WIDTH 32 -#endif - +#define HRT_DATA_WIDTH 32 +#define HRT_ADDRESS_WIDTH 64 #define HRT_DATA_BYTES(HRT_DATA_WIDTH / 8) #define HRT_ADDRESS_BYTES (HRT_ADDRESS_WIDTH / 8) +#define SIZEOF_HRT_REG(HRT_DATA_WIDTH >> 3) -#if HRT_DATA_WIDTH == 64 -typedef hive_uint64 hrt_data; -#elif HRT_DATA_WIDTH == 32 typedef hive_uint32 hrt_data; -#else -#error data width not supported -#endif - -#if HRT_ADDRESS_WIDTH == 64 typedef hive_uint64 hrt_address; -#elif HRT_ADDRESS_WIDTH == 32 -typedef hive_uint32 hrt_address; -#else -#error adddres width not supported -#endif /* use 64 bit addresses in simulation, where possible */ typedef hive_uint64 hive_sim_address; diff --git a/drivers/staging/media/atomisp/pci/isp2400_system_global.h b/drivers/staging/media/atomisp/pci/isp2400_system_global.h index d87ddf1d2fe9..3888793a31e2 100644 --- a/drivers/staging/media/atomisp/pci/isp2400_system_global.h +++ b/drivers/staging/media/atomisp/pci/isp2400_system_global.h @@ -75,8 +75,6 @@ * Semi global. "HRT" is accessible from SP, but the HRT types do not fully apply */ #define HRT_VADDRESS_WIDTH 32 -//#define HRT_ADDRESS_WIDTH64 /* Surprise, this is a local property*/ -#define HRT_DATA_WIDTH 32 #define SIZEOF_HRT_REG (HRT_DATA_WIDTH >> 3) #define HIVE_ISP_CTRL_DATA_BYTES (HIVE_ISP_CTRL_DATA_WIDTH / 8) diff --git a/drivers/staging/media/atomisp/pci/isp2400_system_local.h b/drivers/staging/media/atomisp/pci/isp2400_system_local.h index f889b7bf8f2d..3c7dc180ffe6 100644 --- a/drivers/staging/media/atomisp/pci/isp2400_system_local.h +++ b/drivers/staging/media/atomisp/pci/isp2400_system_local.h @@ -24,17 +24,12 @@ #include "system_global.h" -/* HRT assumes 32 by default (see Linux/include/hive_types.h), overrule it in case it is different */ -#undef HRT_ADDRESS_WIDTH -#define HRT_ADDRESS_WIDTH 64 /* Surprise, this is a local property */ - /* This interface is deprecated */ #include "hive_types.h" /* * Cell specific address maps */ -#if HRT_ADDRESS_WIDTH == 64 #define GP_FIFO_BASE ((hrt_address)0x00090104) /* This is NOT a base address */ @@ -154,130 +149,4 @@ static const hrt_address RX_BASE[N_RX_ID] = { (hrt_address)0x00080100ULL }; -#elif HRT_ADDRESS_WIDTH == 32 - -#define GP_FIFO_BASE ((hrt_address)0x00090104) /* This is NOT a base address */ - -/* ISP */ -static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = { - (hrt_address)0x0002UL -}; - -static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = { - (hrt_address)0x0020UL -}; - -static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = { - (hrt_address)0x10UL -}; - -/* SP */ -static const hrt_address SP_CTRL_BASE[N_SP_ID] = { - (hrt_address)0x0001UL -}; - -static const hrt_address SP_DMEM_BASE[N_SP_ID] = { - (hrt_address)0x0030UL -}; - -/* MMU */ -/* - * MMU0_ID: The data MMU - * MMU1_ID: The icache MMU - */ -static const hrt_address MMU_BASE[N_MMU_ID] = { - (hrt_address)0x0007UL, - (hrt_address)0x000AUL -}; - -/* DMA */ -static const hrt_address DMA_BASE[N_DMA_ID] = { - (hrt_address)0x0004UL -}; - -/* IRQ */ -static const hrt_address IRQ_BASE[N_IRQ_ID] = { - (hrt_address)0x0500UL, - (hrt_address)0x00030A00UL, - (hrt_address)0x0008C000UL, - (hrt_address)0x00090200UL -}; - -/* - (hrt_address)0x0500UL}; - */ - -/* GDC */ -static const hrt_address GDC_BASE[N_GDC_ID] = { - (hrt_address)0x0005UL, -
Re: [RFC PATCH 4/7] crypto: remove ARC4 support from the skcipher API
On Fri, 3 Jul 2020 at 02:04, Ard Biesheuvel wrote: > > On Thu, 2 Jul 2020 at 20:21, Ard Biesheuvel wrote: > > > > On Thu, 2 Jul 2020 at 19:50, Eric Biggers wrote: > > > > > > [+linux-wireless, Marcel Holtmann, and Denis Kenzior] > > > > > > On Thu, Jul 02, 2020 at 12:19:44PM +0200, Ard Biesheuvel wrote: > > > > Remove the generic ecb(arc4) skcipher, which is slightly cumbersome from > > > > a maintenance perspective, since it does not quite behave like other > > > > skciphers do in terms of key vs IV lifetime. Since we are leaving the > > > > library interface in place, which is used by the various WEP and TKIP > > > > implementations we have in the tree, we can safely drop this code now > > > > it no longer has any users. > > > > > > > > Signed-off-by: Ard Biesheuvel > > > > > > Last year there was a discussion where it was mentioned that iwd uses > > > "ecb(arc4)" via AF_ALG. So can we really remove it yet? > > > See > > > https://lkml.kernel.org/r/97bb95f6-4a4c-4984-9eab-6069e19b4...@holtmann.org > > > Note that the code isn't in "iwd" itself but rather in "libell" which iwd > > > depends on: https://git.kernel.org/pub/scm/libs/ell/ell.git/ > > > > > > Apparently it also uses md4 and ecb(des) too. > > > > > > > Ah yes, I remember now :-( > > > > > Marcel and Denis, what's your deprecation plan for these obsolete and > > > insecure > > > algorithms? > > > > > > > Given Denis's statement: > > > > It sounds to me like it was broken and should be fixed. So our vote / > > preference is to have ARC4 fixed to follow the proper semantics. We > > can deal with the kernel behavioral change on our end easily enough; > > the required workarounds are the worse evil. > > > > I would think that an ABI break is not the end of the world for them, > > and given how trivial it is to implement RC4 in C, the workaround > > should be to simply implement RC4 in user space, and not even bother > > trying to use AF_ALG to get at ecb(arc4) > > > > (same applies to md4 and ecb(des) btw) > > > > There will always be a long tail of use cases, and at some point, we > > just have to draw the line and remove obsolete and insecure cruft, > > especially when it impedes progress on other fronts. > > > > I have ported iwd to Nettle's LGPL 2.1 implementation of ARC4, and the > diffstat is > > src/crypto.c | 80 > src/main.c| 8 -- > unit/test-eapol.c | 3 +- > 3 files changed, 51 insertions(+), 40 deletions(-) > > https://git.kernel.org/pub/scm/linux/kernel/git/ardb/iwd.git/log/?h=arc4-cleanup Marcel, Denis, Do you have any objections to the ecb(arc4) skcipher being dropped from the kernel, given the fallback i proposed above (which is a much better way of doing rc4 in user space anyway)? For libell, I would suggest dropping rc4 entirely, once iwd stops relying on it, as using rc4 for tls is obsolete as well. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/4] staging: rtl8188eu: include: fixed multiple blank space coding style issues
fixed multiple blank space coding style issues reported by checkpatch Signed-off-by: B K Karthik --- drivers/staging/rtl8188eu/include/hal_com.h | 2 +- drivers/staging/rtl8188eu/include/osdep_service.h | 2 +- drivers/staging/rtl8188eu/include/rtl8188e_hal.h | 2 +- drivers/staging/rtl8188eu/include/rtl8188e_xmit.h | 12 ++-- drivers/staging/rtl8188eu/include/rtw_cmd.h | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/hal_com.h b/drivers/staging/rtl8188eu/include/hal_com.h index 542e6e93ff8e..da772a6ebad3 100644 --- a/drivers/staging/rtl8188eu/include/hal_com.h +++ b/drivers/staging/rtl8188eu/include/hal_com.h @@ -81,7 +81,7 @@ #defineRATE_ALL_OFDM_AG(RATR_6M | RATR_9M | RATR_12M | RATR_18M | \ RATR_24M | RATR_36M | RATR_48M | RATR_54M) #defineRATE_ALL_OFDM_1SS (RATR_MCS0 | RATR_MCS1 | RATR_MCS2 | \ -RATR_MCS3 | RATR_MCS4 | RATR_MCS5|RATR_MCS6 | \ +RATR_MCS3 | RATR_MCS4 | RATR_MCS5 | RATR_MCS6 | \ RATR_MCS7) #defineRATE_ALL_OFDM_2SS (RATR_MCS8 | RATR_MCS9 | RATR_MCS10 | \ RATR_MCS11 | RATR_MCS12 | RATR_MCS13 | \ diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 0d3e4a6e7e85..31d897f1d21f 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -82,7 +82,7 @@ void rtw_free_netdev(struct net_device *netdev); /* Macros for handling unaligned memory accesses */ -#define RTW_GET_BE24(a) u32)(a)[0]) << 16) | (((u32) (a)[1]) << 8) | \ +#define RTW_GET_BE24(a) u32)(a)[0]) << 16) | (((u32)(a)[1]) << 8) | \ ((u32)(a)[2])) void rtw_buf_free(u8 **buf, u32 *buf_len); diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_hal.h b/drivers/staging/rtl8188eu/include/rtl8188e_hal.h index ba7c98712934..3be28a6dbd49 100644 --- a/drivers/staging/rtl8188eu/include/rtl8188e_hal.h +++ b/drivers/staging/rtl8188eu/include/rtl8188e_hal.h @@ -104,7 +104,7 @@ enum usb_rx_agg_mode { (WMM_NORMAL_TX_TOTAL_PAGE_NUMBER + 1) /* 0xA9 */ /* Chip specific */ -#define CHIP_BONDING_IDENTIFIER(_value)(((_value)>>22)&0x3) +#define CHIP_BONDING_IDENTIFIER(_value)(((_value) >> 22) & 0x3) #define CHIP_BONDING_92C_1T2R 0x1 #define CHIP_BONDING_88C_USB_MCARD 0x2 #define CHIP_BONDING_88C_USB_HP0x1 diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h index 49884cceb349..1472c597cc53 100644 --- a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h +++ b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h @@ -30,11 +30,11 @@ #define SET_EARLYMODE_LEN2_1(__pAddr, __Value) \ SET_BITS_TO_LE_4BYTE(__pAddr, 28, 4, __Value) #define SET_EARLYMODE_LEN2_2(__pAddr, __Value) \ - SET_BITS_TO_LE_4BYTE(__pAddr+4, 0, 8, __Value) + SET_BITS_TO_LE_4BYTE(__pAddr + 4, 0, 8, __Value) #define SET_EARLYMODE_LEN3(__pAddr, __Value) \ - SET_BITS_TO_LE_4BYTE(__pAddr+4, 8, 12, __Value) + SET_BITS_TO_LE_4BYTE(__pAddr + 4, 8, 12, __Value) #define SET_EARLYMODE_LEN4(__pAddr, __Value) \ - SET_BITS_TO_LE_4BYTE(__pAddr+4, 20, 12, __Value) + SET_BITS_TO_LE_4BYTE(__pAddr + 4, 20, 12, __Value) /* */ /* defined for TX DESC Operation */ @@ -100,7 +100,7 @@ enum TXDESC_SC { #define txdesc_set_ccx_sw_88e(txdesc, value) \ do { \ - ((struct txdesc_88e *)(txdesc))->sw1 = (((value)>>8) & 0x0f); \ + ((struct txdesc_88e *)(txdesc))->sw1 = (((value) >> 8) & 0x0f); \ ((struct txdesc_88e *)(txdesc))->sw0 = ((value) & 0xff); \ } while (0) @@ -138,9 +138,9 @@ struct txrpt_ccx_88e { u8 sw0; }; -#define txrpt_ccx_sw_88e(txrpt_ccx) ((txrpt_ccx)->sw0 + ((txrpt_ccx)->sw1<<8)) +#define txrpt_ccx_sw_88e(txrpt_ccx) ((txrpt_ccx)->sw0 + ((txrpt_ccx)->sw1 << 8)) #define txrpt_ccx_qtime_88e(txrpt_ccx) \ - ((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1<<8)) + ((txrpt_ccx)->ccx_qtime0 + ((txrpt_ccx)->ccx_qtime1 << 8)) void rtl8188e_fill_fake_txdesc(struct adapter *padapter, u8 *pDesc, u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull); diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index fa5e212fc9e0..002a797c6d0a 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -115,7 +115,7 @@ struct setopmode_parm { */ #define RTW_SSID_SCAN_AMOUNT 9 /* for WEXT_CSCAN_AMOUNT 9 */ -#define RTW_CHANNEL_SCAN_AMOUNT (14+37) +#define RTW_CHANNEL_SCAN_AMOUNT (14 + 37) struct sitesurvey_
[PATCH 2/4] staging: rtl8188eu: include: fixed multiple parentheses coding style issues
fixed multiple parentheses coding style issues reported by checkpatch. Signed-off-by: B K Karthik --- drivers/staging/rtl8188eu/include/ieee80211.h | 4 +-- .../staging/rtl8188eu/include/osdep_service.h | 4 +-- drivers/staging/rtl8188eu/include/wifi.h | 34 +-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/ieee80211.h b/drivers/staging/rtl8188eu/include/ieee80211.h index 83218e7ec0a9..a872a86f89ab 100644 --- a/drivers/staging/rtl8188eu/include/ieee80211.h +++ b/drivers/staging/rtl8188eu/include/ieee80211.h @@ -646,8 +646,8 @@ struct rtw_ieee80211_channel { "flags:0x%08x" \ #define CHAN_ARG(channel) \ - (channel)->hw_value \ - , (channel)->flags \ + ((channel)->hw_value \ + , (channel)->flags) /* Parsed Information Elements */ struct rtw_ieee802_11_elems { diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 31d897f1d21f..2245cc430981 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -76,9 +76,9 @@ struct net_device *rtw_alloc_etherdev_with_old_priv(void *old_priv); void rtw_free_netdev(struct net_device *netdev); #define FUNC_NDEV_FMT "%s(%s)" -#define FUNC_NDEV_ARG(ndev) __func__, ndev->name +#define FUNC_NDEV_ARG(ndev) (__func__, (ndev)->name) #define FUNC_ADPT_FMT "%s(%s)" -#define FUNC_ADPT_ARG(adapter) __func__, adapter->pnetdev->name +#define FUNC_ADPT_ARG(adapter) (__func__, (adapter)->pnetdev->name) /* Macros for handling unaligned memory accesses */ diff --git a/drivers/staging/rtl8188eu/include/wifi.h b/drivers/staging/rtl8188eu/include/wifi.h index 791f287a546d..677827900607 100644 --- a/drivers/staging/rtl8188eu/include/wifi.h +++ b/drivers/staging/rtl8188eu/include/wifi.h @@ -143,57 +143,57 @@ enum WIFI_REG_DOMAIN { #define _ORDER_BIT(15) #define SetToDs(pbuf) \ - *(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_) + (*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_)) #define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0) #define ClearToDs(pbuf)\ - *(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_)) + (*(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_))) #define SetFrDs(pbuf) \ - *(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_) + (*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_)) #define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0) #define ClearFrDs(pbuf)\ - *(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)) + (*(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_))) #define get_tofr_ds(pframe)((GetToDs(pframe) << 1) | GetFrDs(pframe)) #define SetMFrag(pbuf) \ - *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_) + (*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_)) #define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0) #define ClearMFrag(pbuf) \ - *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)) + (*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_))) #define SetRetry(pbuf) \ - *(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_) + (*(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_)) #define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0) #define ClearRetry(pbuf) \ - *(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_)) + (*(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_))) #define SetPwrMgt(pbuf)\ - *(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_) + (*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_)) #define GetPwrMgt(pbuf)(((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0) #define ClearPwrMgt(pbuf) \ - *(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_)) + (*(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_))) #define SetMData(pbuf) \ - *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_) + (*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_)) #define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0) #define ClearMData(pbuf) \ - *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_)) + (*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_))) #define SetPrivacy(pbuf) \ - *(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_) + (*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_)) #define GetPrivacy(pbuf) \ (((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0) @@ -228,18 +228,18 @@ enum WIFI_REG_DOMAIN { } while (0) #define SetDuration(pbuf, dur) \ - *(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0x & (dur)) + (*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0x & (dur))) #define SetPriority(pbuf, tid) \ - *(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf) + (*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)) #define GetPriority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf) #define SetEOSP(pbuf, eosp)\
[PATCH 3/4] staging: rtl8188eu: include: enclosed macros in do-while loops
enclosed macros starting with if inside do-while loops to avoid possible if-else logic defects Signed-off-by: B K Karthik --- drivers/staging/rtl8188eu/include/odm_debug.h | 28 +++ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/odm_debug.h b/drivers/staging/rtl8188eu/include/odm_debug.h index 857c64b8d2f4..c7a928d396b0 100644 --- a/drivers/staging/rtl8188eu/include/odm_debug.h +++ b/drivers/staging/rtl8188eu/include/odm_debug.h @@ -76,20 +76,24 @@ #endif #define ODM_RT_TRACE(pDM_Odm, comp, level, fmt) \ - if (((comp) & pDM_Odm->DebugComponents) && \ - (level <= pDM_Odm->DebugLevel)) { \ - pr_info("[ODM-8188E] ");\ - RT_PRINTK fmt; \ - } + do { + if (((comp) & pDM_Odm->DebugComponents) && \ + (level <= pDM_Odm->DebugLevel)) { \ + pr_info("[ODM-8188E] "); \ + RT_PRINTK fmt; \ + } + } while (0) #define ODM_RT_ASSERT(pDM_Odm, expr, fmt) \ - if (!(expr)) { \ - pr_info("Assertion failed! %s at ..\n", #expr); \ - pr_info(" ..%s,%s,line=%d\n", __FILE__,\ - __func__, __LINE__);\ - RT_PRINTK fmt; \ - ASSERT(false); \ - } + do { + if (!(expr)) { \ + pr_info("Assertion failed! %s at ..\n", #expr); \ + pr_info(" ..%s,%s,line=%d\n", __FILE__, \ + __func__, __LINE__); \ + RT_PRINTK fmt; \ + ASSERT(false); \ + } + } while (0) void ODM_InitDebugSetting(struct odm_dm_struct *pDM_Odm); -- 2.20.1 signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/4] staging: rtl8188eu: include: placed constant on the right side of the test in comparisons
placed constant on the right side of the test to fix warnings issued by checkpatch Signed-off-by: B K Karthik --- drivers/staging/rtl8188eu/include/rtw_mlme.h | 4 ++-- drivers/staging/rtl8188eu/include/wifi.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h b/drivers/staging/rtl8188eu/include/rtw_mlme.h index 010f0c42368a..1b74b32b8a81 100644 --- a/drivers/staging/rtl8188eu/include/rtw_mlme.h +++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h @@ -266,7 +266,7 @@ static inline void set_fwstate(struct mlme_priv *pmlmepriv, int state) { pmlmepriv->fw_state |= state; /* FOR HW integration */ - if (_FW_UNDER_SURVEY == state) + if (state == _FW_UNDER_SURVEY) pmlmepriv->bScanInProcess = true; } @@ -274,7 +274,7 @@ static inline void _clr_fwstate_(struct mlme_priv *pmlmepriv, int state) { pmlmepriv->fw_state &= ~state; /* FOR HW integration */ - if (_FW_UNDER_SURVEY == state) + if (state == _FW_UNDER_SURVEY) pmlmepriv->bScanInProcess = false; } diff --git a/drivers/staging/rtl8188eu/include/wifi.h b/drivers/staging/rtl8188eu/include/wifi.h index 677827900607..dcef3da21970 100644 --- a/drivers/staging/rtl8188eu/include/wifi.h +++ b/drivers/staging/rtl8188eu/include/wifi.h @@ -326,7 +326,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe) static inline int IsFrameTypeCtrl(unsigned char *pframe) { - if (WIFI_CTRL_TYPE == GetFrameType(pframe)) + if (GetFrameType(pframe) == WIFI_CTRL_TYPE) return true; else return false; -- 2.20.1 signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 2/4] media: atomisp: remove non-used 32-bits consts at system_local
There is an abstraction at the code in order to support 32 or 64 bits address/data length. However, for all Atom chipsets supported by this version, the size is fixed. So, cleanup the mess, removing the uused code and placing the data sizes on a single place. The end goal is to completely remove those local/global headers, replacing them by some ISP-version dependent struct, in order for the driver to decide what version it would need in runtime. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/pci/hive_types.h| 24 +-- .../media/atomisp/pci/isp2400_system_global.h | 2 - .../media/atomisp/pci/isp2400_system_local.h | 131 - .../media/atomisp/pci/isp2401_system_global.h | 4 - .../media/atomisp/pci/isp2401_system_local.h | 173 -- 5 files changed, 3 insertions(+), 331 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/hive_types.h b/drivers/staging/media/atomisp/pci/hive_types.h index addda9b81d7b..4b8a679fb672 100644 --- a/drivers/staging/media/atomisp/pci/hive_types.h +++ b/drivers/staging/media/atomisp/pci/hive_types.h @@ -52,32 +52,14 @@ typedef unsigned short hive_uint16; typedef unsigned int hive_uint32; typedef unsigned long long hive_uint64; -/* by default assume 32 bit master port (both data and address) */ -#ifndef HRT_DATA_WIDTH -#define HRT_DATA_WIDTH 32 -#endif -#ifndef HRT_ADDRESS_WIDTH -#define HRT_ADDRESS_WIDTH 32 -#endif - +#define HRT_DATA_WIDTH 32 +#define HRT_ADDRESS_WIDTH 64 #define HRT_DATA_BYTES(HRT_DATA_WIDTH / 8) #define HRT_ADDRESS_BYTES (HRT_ADDRESS_WIDTH / 8) +#define SIZEOF_HRT_REG(HRT_DATA_WIDTH >> 3) -#if HRT_DATA_WIDTH == 64 -typedef hive_uint64 hrt_data; -#elif HRT_DATA_WIDTH == 32 typedef hive_uint32 hrt_data; -#else -#error data width not supported -#endif - -#if HRT_ADDRESS_WIDTH == 64 typedef hive_uint64 hrt_address; -#elif HRT_ADDRESS_WIDTH == 32 -typedef hive_uint32 hrt_address; -#else -#error adddres width not supported -#endif /* use 64 bit addresses in simulation, where possible */ typedef hive_uint64 hive_sim_address; diff --git a/drivers/staging/media/atomisp/pci/isp2400_system_global.h b/drivers/staging/media/atomisp/pci/isp2400_system_global.h index d87ddf1d2fe9..3888793a31e2 100644 --- a/drivers/staging/media/atomisp/pci/isp2400_system_global.h +++ b/drivers/staging/media/atomisp/pci/isp2400_system_global.h @@ -75,8 +75,6 @@ * Semi global. "HRT" is accessible from SP, but the HRT types do not fully apply */ #define HRT_VADDRESS_WIDTH 32 -//#define HRT_ADDRESS_WIDTH64 /* Surprise, this is a local property*/ -#define HRT_DATA_WIDTH 32 #define SIZEOF_HRT_REG (HRT_DATA_WIDTH >> 3) #define HIVE_ISP_CTRL_DATA_BYTES (HIVE_ISP_CTRL_DATA_WIDTH / 8) diff --git a/drivers/staging/media/atomisp/pci/isp2400_system_local.h b/drivers/staging/media/atomisp/pci/isp2400_system_local.h index f889b7bf8f2d..3c7dc180ffe6 100644 --- a/drivers/staging/media/atomisp/pci/isp2400_system_local.h +++ b/drivers/staging/media/atomisp/pci/isp2400_system_local.h @@ -24,17 +24,12 @@ #include "system_global.h" -/* HRT assumes 32 by default (see Linux/include/hive_types.h), overrule it in case it is different */ -#undef HRT_ADDRESS_WIDTH -#define HRT_ADDRESS_WIDTH 64 /* Surprise, this is a local property */ - /* This interface is deprecated */ #include "hive_types.h" /* * Cell specific address maps */ -#if HRT_ADDRESS_WIDTH == 64 #define GP_FIFO_BASE ((hrt_address)0x00090104) /* This is NOT a base address */ @@ -154,130 +149,4 @@ static const hrt_address RX_BASE[N_RX_ID] = { (hrt_address)0x00080100ULL }; -#elif HRT_ADDRESS_WIDTH == 32 - -#define GP_FIFO_BASE ((hrt_address)0x00090104) /* This is NOT a base address */ - -/* ISP */ -static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = { - (hrt_address)0x0002UL -}; - -static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = { - (hrt_address)0x0020UL -}; - -static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = { - (hrt_address)0x10UL -}; - -/* SP */ -static const hrt_address SP_CTRL_BASE[N_SP_ID] = { - (hrt_address)0x0001UL -}; - -static const hrt_address SP_DMEM_BASE[N_SP_ID] = { - (hrt_address)0x0030UL -}; - -/* MMU */ -/* - * MMU0_ID: The data MMU - * MMU1_ID: The icache MMU - */ -static const hrt_address MMU_BASE[N_MMU_ID] = { - (hrt_address)0x0007UL, - (hrt_address)0x000AUL -}; - -/* DMA */ -static const hrt_address DMA_BASE[N_DMA_ID] = { - (hrt_address)0x0004UL -}; - -/* IRQ */ -static const hrt_address IRQ_BASE[N_IRQ_ID] = { - (hrt_address)0x0500UL, - (hrt_address)0x00030A00UL, - (hrt_address)0x0008C000UL, - (hrt_address)0x00090200UL -}; - -/* - (hrt_address)0x0500UL}; - */ - -/* GDC */ -static const hrt_address GDC_BASE[N_GDC_ID] = { - (hrt_address)0x0005UL, -
[PATCH v2 4/4] media: atomisp: get rid of version-specific system_local.h
After removing the unused 32-bits data, the isp2401_system_local.h now contains everything that it is needed, either by isp2401 or by isp2400. So, remove code duplication. Signed-off-by: Mauro Carvalho Chehab --- .../media/atomisp/pci/isp2400_system_local.h | 149 - .../media/atomisp/pci/isp2401_system_local.h | 196 - .../staging/media/atomisp/pci/system_local.h | 199 +- 3 files changed, 194 insertions(+), 350 deletions(-) delete mode 100644 drivers/staging/media/atomisp/pci/isp2400_system_local.h delete mode 100644 drivers/staging/media/atomisp/pci/isp2401_system_local.h diff --git a/drivers/staging/media/atomisp/pci/isp2400_system_local.h b/drivers/staging/media/atomisp/pci/isp2400_system_local.h deleted file mode 100644 index fb6355c7e1a3.. --- a/drivers/staging/media/atomisp/pci/isp2400_system_local.h +++ /dev/null @@ -1,149 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * Support for Intel Camera Imaging ISP subsystem. - * Copyright (c) 2010-2015, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope 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. - */ - -#ifndef __SYSTEM_LOCAL_H_INCLUDED__ -#define __SYSTEM_LOCAL_H_INCLUDED__ - -#ifdef HRT_ISP_CSS_CUSTOM_HOST -#ifndef HRT_USE_VIR_ADDRS -#define HRT_USE_VIR_ADDRS -#endif -#endif - -#include "system_global.h" - -/* - * Cell specific address maps - */ - -#define GP_FIFO_BASE ((hrt_address)0x00090104) /* This is NOT a base address */ - -/* ISP */ -static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = { - (hrt_address)0x0002ULL -}; - -static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = { - (hrt_address)0x0020ULL -}; - -static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = { - (hrt_address)0x0010ULL -}; - -/* SP */ -static const hrt_address SP_CTRL_BASE[N_SP_ID] = { - (hrt_address)0x0001ULL -}; - -static const hrt_address SP_DMEM_BASE[N_SP_ID] = { - (hrt_address)0x0030ULL -}; - -/* MMU */ -/* - * MMU0_ID: The data MMU - * MMU1_ID: The icache MMU - */ -static const hrt_address MMU_BASE[N_MMU_ID] = { - (hrt_address)0x0007ULL, - (hrt_address)0x000AULL -}; - -/* DMA */ -static const hrt_address DMA_BASE[N_DMA_ID] = { - (hrt_address)0x0004ULL -}; - -/* IRQ */ -static const hrt_address IRQ_BASE[N_IRQ_ID] = { - (hrt_address)0x0500ULL, - (hrt_address)0x00030A00ULL, - (hrt_address)0x0008C000ULL, - (hrt_address)0x00090200ULL -}; - -/* - (hrt_address)0x0500ULL}; - */ - -/* GDC */ -static const hrt_address GDC_BASE[N_GDC_ID] = { - (hrt_address)0x0005ULL, - (hrt_address)0x0006ULL -}; - -/* FIFO_MONITOR (not a subset of GP_DEVICE) */ -static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = { - (hrt_address)0xULL -}; - -/* -static const hrt_address GP_REGS_BASE[N_GP_REGS_ID] = { - (hrt_address)0xULL}; - -static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = { - (hrt_address)0x0009ULL}; -*/ - -/* GP_DEVICE (single base for all separate GP_REG instances) */ -static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = { - (hrt_address)0xULL -}; - -/*GP TIMER , all timer registers are inter-twined, - * so, having multiple base addresses for - * different timers does not help*/ -static const hrt_address GP_TIMER_BASE = -(hrt_address)0x0600ULL; -/* GPIO */ -static const hrt_address GPIO_BASE[N_GPIO_ID] = { - (hrt_address)0x0400ULL -}; - -/* TIMED_CTRL */ -static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = { - (hrt_address)0x0100ULL -}; - -/* INPUT_FORMATTER */ -static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = { - (hrt_address)0x0003ULL, - (hrt_address)0x00030200ULL, - (hrt_address)0x00030400ULL, - (hrt_address)0x00030600ULL -}; /* memcpy() */ - -/* INPUT_SYSTEM */ -static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = { - (hrt_address)0x0008ULL -}; - -/* (hrt_address)0x00081000ULL, */ /* capture A */ -/* (hrt_address)0x00082000ULL, */ /* capture B */ -/* (hrt_address)0x00083000ULL, */ /* capture C */ -/* (hrt_address)0x00084000ULL, */ /* Acquisition */ -/* (hrt_address)0x00085000ULL, */ /* DMA */ -/* (hrt_address)0x00089000ULL, *
[PATCH v2 3/4] media: atomisp: move global stuff into a common header
Right now, there are two versions of system_global.h headers. Both share a lot of common code. There are some ISP2401 specific types on one of the headers, but it doesn't conflict with the ISP2400 ones. Also, the common code is identical. So, remove code duplication by moving such code into a common header. Signed-off-by: Mauro Carvalho Chehab --- .../media/atomisp/pci/isp2400_system_global.h | 300 - .../media/atomisp/pci/isp2400_system_local.h | 3 - .../media/atomisp/pci/isp2401_system_global.h | 406 +- .../media/atomisp/pci/isp2401_system_local.h | 3 - drivers/staging/media/atomisp/pci/sh_css.c| 9 +- .../staging/media/atomisp/pci/system_global.h | 395 + .../staging/media/atomisp/pci/system_local.h | 1 - 7 files changed, 403 insertions(+), 714 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/isp2400_system_global.h b/drivers/staging/media/atomisp/pci/isp2400_system_global.h index 3888793a31e2..74fff465e8e8 100644 --- a/drivers/staging/media/atomisp/pci/isp2400_system_global.h +++ b/drivers/staging/media/atomisp/pci/isp2400_system_global.h @@ -13,304 +13,4 @@ * more details. */ -#ifndef __SYSTEM_GLOBAL_H_INCLUDED__ -#define __SYSTEM_GLOBAL_H_INCLUDED__ - -#include -#include - -/* - * The longest allowed (uninteruptible) bus transfer, does not - * take stalling into account - */ -#define HIVE_ISP_MAX_BURST_LENGTH 1024 - -/* - * Maximum allowed burst length in words for the ISP DMA - */ -#define ISP_DMA_MAX_BURST_LENGTH 128 - -/* - * Create a list of HAS and IS properties that defines the system - * - * The configuration assumes the following - * - The system is hetereogeneous; Multiple cells and devices classes - * - The cell and device instances are homogeneous, each device type - * belongs to the same class - * - Device instances supporting a subset of the class capabilities are - * allowed - * - * We could manage different device classes through the enumerated - * lists (C) or the use of classes (C++), but that is presently not - * fully supported - * - * N.B. the 3 input formatters are of 2 different classess - */ - #define USE_INPUT_SYSTEM_VERSION_2 - -#define HAS_MMU_VERSION_2 -#define HAS_DMA_VERSION_2 -#define HAS_GDC_VERSION_2 -#define HAS_VAMEM_VERSION_2 -#define HAS_HMEM_VERSION_1 -#define HAS_BAMEM_VERSION_2 -#define HAS_IRQ_VERSION_2 -#define HAS_IRQ_MAP_VERSION_2 -#define HAS_INPUT_FORMATTER_VERSION_2 -/* 2401: HAS_INPUT_SYSTEM_VERSION_2401 */ -#define HAS_INPUT_SYSTEM_VERSION_2 -#define HAS_BUFFERED_SENSOR -#define HAS_FIFO_MONITORS_VERSION_2 -/* #define HAS_GP_REGS_VERSION_2 */ -#define HAS_GP_DEVICE_VERSION_2 -#define HAS_GPIO_VERSION_1 -#define HAS_TIMED_CTRL_VERSION_1 -#define HAS_RX_VERSION_2 - -#define DMA_DDR_TO_VAMEM_WORKAROUND -#define DMA_DDR_TO_HMEM_WORKAROUND - -/* - * Semi global. "HRT" is accessible from SP, but the HRT types do not fully apply - */ -#define HRT_VADDRESS_WIDTH 32 - -#define SIZEOF_HRT_REG (HRT_DATA_WIDTH >> 3) -#define HIVE_ISP_CTRL_DATA_BYTES (HIVE_ISP_CTRL_DATA_WIDTH / 8) - -/* The main bus connecting all devices */ -#define HRT_BUS_WIDTH HIVE_ISP_CTRL_DATA_WIDTH -#define HRT_BUS_BYTES HIVE_ISP_CTRL_DATA_BYTES - -/* per-frame parameter handling support */ -#define SH_CSS_ENABLE_PER_FRAME_PARAMS - -typedef u32hrt_bus_align_t; - -/* - * Enumerate the devices, device access through the API is by ID, through the DLI by address - * The enumerator terminators are used to size the wiring arrays and as an exception value. - */ -typedef enum { - DDR0_ID = 0, - N_DDR_ID -} ddr_ID_t; - -typedef enum { - ISP0_ID = 0, - N_ISP_ID -} isp_ID_t; - -typedef enum { - SP0_ID = 0, - N_SP_ID -} sp_ID_t; - -typedef enum { - MMU0_ID = 0, - MMU1_ID, - N_MMU_ID -} mmu_ID_t; - -typedef enum { - DMA0_ID = 0, - N_DMA_ID -} dma_ID_t; - -typedef enum { - GDC0_ID = 0, - GDC1_ID, - N_GDC_ID -} gdc_ID_t; - -#define N_GDC_ID_CPP 2 // this extra define is needed because we want to use it also in the preprocessor, and that doesn't work with enums. - -typedef enum { - VAMEM0_ID = 0, - VAMEM1_ID, - VAMEM2_ID, - N_VAMEM_ID -} vamem_ID_t; - -typedef enum { - BAMEM0_ID = 0, - N_BAMEM_ID -} bamem_ID_t; - -typedef enum { - HMEM0_ID = 0, - N_HMEM_ID -} hmem_ID_t; - -/* -typedef enum { - IRQ0_ID = 0, - N_IRQ_ID -} irq_ID_t; -*/ - -typedef enum { - IRQ0_ID = 0,// GP IRQ block - IRQ1_ID,// Input formatter - IRQ2_ID,// input system - IRQ3_ID,// input selector - N_IRQ_ID -} irq_ID_t; - -typedef enum { - FIFO_MONITOR0_ID = 0, - N_FIFO_MONITOR_ID -} fifo_monitor_ID_t; - -/* - * Deprecated: Since all gp_reg instances are different - * and put in the address maps of other devices we cannot - * enumerate them as that ass
[PATCH v2 1/4] media: atomisp: get rid of some unused static vars
There are several static vars declared inside the system local headers. This causes lots of warnings when W=1. Remove the unused ones. Signed-off-by: Mauro Carvalho Chehab --- .../media/atomisp/pci/isp2400_system_local.h | 38 --- .../media/atomisp/pci/isp2401_system_local.h | 30 --- 2 files changed, 68 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/isp2400_system_local.h b/drivers/staging/media/atomisp/pci/isp2400_system_local.h index 675b8e5bdcc1..f889b7bf8f2d 100644 --- a/drivers/staging/media/atomisp/pci/isp2400_system_local.h +++ b/drivers/staging/media/atomisp/pci/isp2400_system_local.h @@ -38,11 +38,6 @@ #define GP_FIFO_BASE ((hrt_address)0x00090104) /* This is NOT a base address */ -/* DDR */ -static const hrt_address DDR_BASE[N_DDR_ID] = { - (hrt_address)0x00012000ULL -}; - /* ISP */ static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = { (hrt_address)0x0002ULL @@ -56,16 +51,6 @@ static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = { (hrt_address)0x0010ULL }; -static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = { - (hrt_address)0x001CULL, - (hrt_address)0x001DULL, - (hrt_address)0x001EULL -}; - -static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = { - (hrt_address)0x001FULL -}; - /* SP */ static const hrt_address SP_CTRL_BASE[N_SP_ID] = { (hrt_address)0x0001ULL @@ -75,10 +60,6 @@ static const hrt_address SP_DMEM_BASE[N_SP_ID] = { (hrt_address)0x0030ULL }; -static const hrt_address SP_PMEM_BASE[N_SP_ID] = { - (hrt_address)0x000BULL -}; - /* MMU */ /* * MMU0_ID: The data MMU @@ -177,11 +158,6 @@ static const hrt_address RX_BASE[N_RX_ID] = { #define GP_FIFO_BASE ((hrt_address)0x00090104) /* This is NOT a base address */ -/* DDR : Attention, this value not defined in 32-bit */ -static const hrt_address DDR_BASE[N_DDR_ID] = { - (hrt_address)0xUL -}; - /* ISP */ static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = { (hrt_address)0x0002UL @@ -195,16 +171,6 @@ static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = { (hrt_address)0x10UL }; -static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = { - (hrt_address)0xUL, - (hrt_address)0xUL, - (hrt_address)0xUL -}; - -static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = { - (hrt_address)0xUL -}; - /* SP */ static const hrt_address SP_CTRL_BASE[N_SP_ID] = { (hrt_address)0x0001UL @@ -214,10 +180,6 @@ static const hrt_address SP_DMEM_BASE[N_SP_ID] = { (hrt_address)0x0030UL }; -static const hrt_address SP_PMEM_BASE[N_SP_ID] = { - (hrt_address)0x000BUL -}; - /* MMU */ /* * MMU0_ID: The data MMU diff --git a/drivers/staging/media/atomisp/pci/isp2401_system_local.h b/drivers/staging/media/atomisp/pci/isp2401_system_local.h index b09f8faadb13..1bb01e627cd7 100644 --- a/drivers/staging/media/atomisp/pci/isp2401_system_local.h +++ b/drivers/staging/media/atomisp/pci/isp2401_system_local.h @@ -36,11 +36,6 @@ #define GP_FIFO_BASE ((hrt_address)0x00090104) /* This is NOT a base address */ -/* DDR */ -static const hrt_address DDR_BASE[N_DDR_ID] = { - 0x00012000ULL -}; - /* ISP */ static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = { 0x0002ULL @@ -54,16 +49,6 @@ static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = { 0x0010ULL }; -static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = { - 0x001CULL, - 0x001DULL, - 0x001EULL -}; - -static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = { - 0x001FULL -}; - /* SP */ static const hrt_address SP_CTRL_BASE[N_SP_ID] = { 0x0001ULL @@ -217,11 +202,6 @@ static const hrt_address STREAM2MMIO_CTRL_BASE[N_STREAM2MMIO_ID] = { #define GP_FIFO_BASE ((hrt_address)0x00090104) /* This is NOT a base address */ -/* DDR : Attention, this value not defined in 32-bit */ -static const hrt_address DDR_BASE[N_DDR_ID] = { - 0xUL -}; - /* ISP */ static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = { 0x0002UL @@ -235,16 +215,6 @@ static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = { 0xUL }; -static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = { - 0xUL, - 0xUL, - 0xUL -}; - -static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = { - 0xUL -}; - /* SP */ static const hrt_address SP_CTRL_BASE[N_SP_ID] = { 0x0001UL -- 2.26.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: rtl8188eu: core: Fix coding style issue
From: Anoop S This fixes the following checkpatch.pl warning WARNING: Prefer using '"%s...", __func__' to using 'rtw_tkip_decrypt', this function's name, in a string. Signed-off-by: Anoop S --- drivers/staging/rtl8188eu/core/rtw_security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c b/drivers/staging/rtl8188eu/core/rtw_security.c index 435c0fbec54a..ece5291ce7c0 100644 --- a/drivers/staging/rtl8188eu/core/rtw_security.c +++ b/drivers/staging/rtl8188eu/core/rtw_security.c @@ -718,7 +718,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe) res = _FAIL; } } else { - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_decrypt: stainfo==NULL!!!\n")); + RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo==NULL!!!\n",__func__)); res = _FAIL; } } -- 2.27.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/4] staging: rtl8188eu: include: fixed multiple parentheses coding style issues
Hi K, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on staging/staging-testing] url: https://github.com/0day-ci/linux/commits/B-K-Karthik/staging-rtl8188eu-include-fixed-multiple-blank-space-coding-style-issues/20200718-172103 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 9d5d041eebe3dcf7591ff7004896c329eb841ca6 config: m68k-allmodconfig (attached as .config) compiler: m68k-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from arch/m68k/include/asm/io_mm.h:25, from arch/m68k/include/asm/io.h:8, from include/linux/scatterlist.h:9, from include/linux/dma-mapping.h:11, from include/linux/skbuff.h:31, from include/linux/if_ether.h:19, from include/linux/ieee80211.h:19, from drivers/staging/rtl8188eu/core/rtw_ap.c:9: arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb': arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable] 83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \ | ^~~ arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8' 430 | rom_out_8(port, *buf++); | ^ arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw': arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable] 86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \ |^~~ arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16' 448 | rom_out_be16(port, *buf++); | ^~~~ arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw': arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable] 90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \ |^~~ arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16' 466 | rom_out_le16(port, *buf++); | ^~~~ In file included from include/linux/kernel.h:11, from include/linux/skbuff.h:13, from include/linux/if_ether.h:19, from include/linux/ieee80211.h:19, from drivers/staging/rtl8188eu/core/rtw_ap.c:9: include/linux/scatterlist.h: In function 'sg_set_buf': arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra] 169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory) | ^~ include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON' 143 | BUG_ON(!virt_addr_valid(buf)); | ^~ include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid' 143 | BUG_ON(!virt_addr_valid(buf)); | ^~~ In file included from arch/m68k/include/asm/bug.h:32, from include/linux/bug.h:5, from include/linux/thread_info.h:12, from include/asm-generic/preempt.h:5, from ./arch/m68k/include/generated/asm/preempt.h:1, from include/linux/preempt.h:78, from include/linux/spinlock.h:51, from include/linux/seqlock.h:36, from include/linux/time.h:6, from include/linux/skbuff.h:15, from include/linux/if_ether.h:19, from include/linux/ieee80211.h:19, from drivers/staging/rtl8188eu/core/rtw_ap.c:9: include/linux/dma-mapping.h: In function 'dma_map_resource': arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra] 169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory) |
Re: [PATCH 3/4] staging: rtl8188eu: include: enclosed macros in do-while loops
Hi K, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] url: https://github.com/0day-ci/linux/commits/B-K-Karthik/staging-rtl8188eu-include-fixed-multiple-blank-space-coding-style-issues/20200718-172103 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 9d5d041eebe3dcf7591ff7004896c329eb841ca6 config: m68k-allmodconfig (attached as .config) compiler: m68k-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All error/warnings (new ones prefixed by >>): In file included from arch/m68k/include/asm/io_mm.h:25, from arch/m68k/include/asm/io.h:8, from include/linux/scatterlist.h:9, from include/linux/dma-mapping.h:11, from include/linux/skbuff.h:31, from include/linux/if_ether.h:19, from include/uapi/linux/ethtool.h:19, from include/linux/ethtool.h:18, from include/linux/netdevice.h:37, from drivers/staging/rtl8188eu/include/osdep_service.h:23, from drivers/staging/rtl8188eu/core/rtw_efuse.c:9: arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb': arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable] 83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \ | ^~~ arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8' 430 | rom_out_8(port, *buf++); | ^ arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw': arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable] 86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \ |^~~ arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16' 448 | rom_out_be16(port, *buf++); | ^~~~ arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw': arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable] 90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \ |^~~ arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16' 466 | rom_out_le16(port, *buf++); | ^~~~ In file included from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/preempt.h:11, from include/linux/spinlock.h:51, from drivers/staging/rtl8188eu/include/osdep_service.h:16, from drivers/staging/rtl8188eu/core/rtw_efuse.c:9: include/linux/scatterlist.h: In function 'sg_set_buf': arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra] 169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory) | ^~ include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON' 143 | BUG_ON(!virt_addr_valid(buf)); | ^~ include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid' 143 | BUG_ON(!virt_addr_valid(buf)); | ^~~ In file included from arch/m68k/include/asm/bug.h:32, from include/linux/bug.h:5, from include/linux/thread_info.h:12, from include/asm-generic/preempt.h:5, from ./arch/m68k/include/generated/asm/preempt.h:1, from include/linux/preempt.h:78, from include/linux/spinlock.h:51, from drivers/staging/rtl8188eu/include/osdep_service.h:16, from drivers/staging/rtl8188eu/core/rtw_efuse.c:9: include/linux/dma-mapping.h: In function 'dma_map_resource': arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra] 169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) &l
[PATCH] staging: rts5208: rtsx: Replace depracated MSI API
Replace depracated pci_enable_msi with pci_alloc_irq_vectors. Signed-off-by: Suraj Upadhyay --- drivers/staging/rts5208/rtsx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index e28e162d004e..adc80e766412 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -310,7 +310,7 @@ static int __maybe_unused rtsx_resume(struct device *dev_d) pci_set_master(pci); if (chip->msi_en) { - if (pci_enable_msi(pci) < 0) + if (pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSI) < 0) chip->msi_en = 0; } @@ -881,7 +881,7 @@ static int rtsx_probe(struct pci_dev *pci, dev_info(&pci->dev, "pci->irq = %d\n", pci->irq); if (dev->chip->msi_en) { - if (pci_enable_msi(pci) < 0) + if (pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSI) < 0) dev->chip->msi_en = 0; } -- 2.17.1 signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: media: atomisp: Replace depracated MSI API.
Replace depracated pci_enable_msi with pci_alloc_irq_vectors. And as a result modify how the returned value is handled. Signed-off-by: Suraj Upadhyay --- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c index d36809a0182c..b824c6f78a9c 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c @@ -1735,8 +1735,8 @@ static int atomisp_pci_probe(struct pci_dev *dev, pci_set_master(dev); pci_set_drvdata(dev, isp); - err = pci_enable_msi(dev); - if (err) { + err = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSI); + if (err < 0) { dev_err(&dev->dev, "Failed to enable msi (%d)\n", err); goto enable_msi_fail; } -- 2.17.1 signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: media: ipu3: Replace depracated MSI API.
Replace depracated psi_enable_msi with pci_alloc_irq_vectors. And as a result modify how the returned value is handled. Signed-off-by: Suraj Upadhyay --- drivers/staging/media/ipu3/ipu3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/ipu3/ipu3.c b/drivers/staging/media/ipu3/ipu3.c index ee1bba6bdcac..54690e7442be 100644 --- a/drivers/staging/media/ipu3/ipu3.c +++ b/drivers/staging/media/ipu3/ipu3.c @@ -602,9 +602,9 @@ static irqreturn_t imgu_isr(int irq, void *imgu_ptr) static int imgu_pci_config_setup(struct pci_dev *dev) { u16 pci_command; - int r = pci_enable_msi(dev); + int r = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSI); - if (r) { + if (r < 0) { dev_err(&dev->dev, "failed to enable MSI (%d)\n", r); return r; } -- 2.17.1 signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 4/4] staging: rtl8188eu: include: placed constant on the right side of the test in comparisons
On Sat, Jul 18, 2020 at 9:17 AM Joe Perches wrote: > > On Sat, 2020-07-18 at 05:18 -0400, B K Karthik wrote: > > placed constant on the right side of the test > > to fix warnings issued by checkpatch > [] > > diff --git a/drivers/staging/rtl8188eu/include/wifi.h > > b/drivers/staging/rtl8188eu/include/wifi.h > [] > > @@ -326,7 +326,7 @@ static inline unsigned char *get_hdr_bssid(unsigned > > char *pframe) > > > > static inline int IsFrameTypeCtrl(unsigned char *pframe) > > { > > - if (WIFI_CTRL_TYPE == GetFrameType(pframe)) > > + if (GetFrameType(pframe) == WIFI_CTRL_TYPE) > > return true; > > else > > return false; > > Always try to improve code instead of merely shutting > up checkpatch warnings. > > This function should likely be written: > > static inline bool IsFrameTypeCtrl(unsigned char *pframe) > { > return GetFrameType(pframe) == WIFI_CTRL_TYPE; > } > > and given it's used only once, it might be expanded > in that place and removed altogether. > > Something like: > > (and the memcmp below could be ether_addr_equal instead > but I'm too lazy to find out if the addresses are both > guaranteed to be __aligned(2) which is likely) Alright, I will try to do that and send a v2 asap :) > > --- > drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 8 +--- > drivers/staging/rtl8188eu/include/wifi.h| 7 --- > 2 files changed, 5 insertions(+), 10 deletions(-) > > diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c > b/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c > index 7d0135fde795..a2994f9ecbde 100644 > --- a/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c > +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c > @@ -144,10 +144,12 @@ void update_recvframe_phyinfo_88e(struct recv_frame > *precvframe, > > wlanhdr = precvframe->pkt->data; > > - pkt_info.bPacketMatchBSSID = ((!IsFrameTypeCtrl(wlanhdr)) && > - !pattrib->icv_err && !pattrib->crc_err && > + pkt_info.bPacketMatchBSSID = > + GetFrameType(wlanhdr) != WIFI_CTRL_TYPE && > + !pattrib->icv_err && > + !pattrib->crc_err && > !memcmp(get_hdr_bssid(wlanhdr), > -get_bssid(&padapter->mlmepriv), ETH_ALEN)); > + get_bssid(&padapter->mlmepriv), ETH_ALEN); > > pkt_info.bPacketToSelf = pkt_info.bPacketMatchBSSID && > (!memcmp(get_da(wlanhdr), > diff --git a/drivers/staging/rtl8188eu/include/wifi.h > b/drivers/staging/rtl8188eu/include/wifi.h > index 791f287a546d..3998d5633860 100644 > --- a/drivers/staging/rtl8188eu/include/wifi.h > +++ b/drivers/staging/rtl8188eu/include/wifi.h > @@ -324,13 +324,6 @@ static inline unsigned char *get_hdr_bssid(unsigned char > *pframe) > return sa; > } > > -static inline int IsFrameTypeCtrl(unsigned char *pframe) > -{ > - if (WIFI_CTRL_TYPE == GetFrameType(pframe)) > - return true; > - else > - return false; > -} > > /*- > Below is for the security related definition > > --*/ thank you for pointing me. karthik ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: kpc2000: Replace depracated MSI API.
Replace depracated pci_enable_msi with pci_alloc_irq_vectors. Signed-off-by: Suraj Upadhyay --- drivers/staging/kpc2000/kpc2000/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index 358d7b2f4ad1..bf21cdc5546f 100644 --- a/drivers/staging/kpc2000/kpc2000/core.c +++ b/drivers/staging/kpc2000/kpc2000/core.c @@ -440,7 +440,7 @@ static int kp2000_pcie_probe(struct pci_dev *pdev, dev_dbg(&pcard->pdev->dev, "Using DMA mask %0llx\n", dma_get_mask(PCARD_TO_DEV(pcard))); - err = pci_enable_msi(pcard->pdev); + err = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSI); if (err < 0) goto err_release_dma; -- 2.17.1 signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 4/4] staging: rtl8188eu: include: placed constant on the right side of the test in comparisons
On Sat, 2020-07-18 at 05:18 -0400, B K Karthik wrote: > placed constant on the right side of the test > to fix warnings issued by checkpatch [] > diff --git a/drivers/staging/rtl8188eu/include/wifi.h > b/drivers/staging/rtl8188eu/include/wifi.h [] > @@ -326,7 +326,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char > *pframe) > > static inline int IsFrameTypeCtrl(unsigned char *pframe) > { > - if (WIFI_CTRL_TYPE == GetFrameType(pframe)) > + if (GetFrameType(pframe) == WIFI_CTRL_TYPE) > return true; > else > return false; Always try to improve code instead of merely shutting up checkpatch warnings. This function should likely be written: static inline bool IsFrameTypeCtrl(unsigned char *pframe) { return GetFrameType(pframe) == WIFI_CTRL_TYPE; } and given it's used only once, it might be expanded in that place and removed altogether. Something like: (and the memcmp below could be ether_addr_equal instead but I'm too lazy to find out if the addresses are both guaranteed to be __aligned(2) which is likely) --- drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 8 +--- drivers/staging/rtl8188eu/include/wifi.h| 7 --- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c b/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c index 7d0135fde795..a2994f9ecbde 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c @@ -144,10 +144,12 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe, wlanhdr = precvframe->pkt->data; - pkt_info.bPacketMatchBSSID = ((!IsFrameTypeCtrl(wlanhdr)) && - !pattrib->icv_err && !pattrib->crc_err && + pkt_info.bPacketMatchBSSID = + GetFrameType(wlanhdr) != WIFI_CTRL_TYPE && + !pattrib->icv_err && + !pattrib->crc_err && !memcmp(get_hdr_bssid(wlanhdr), -get_bssid(&padapter->mlmepriv), ETH_ALEN)); + get_bssid(&padapter->mlmepriv), ETH_ALEN); pkt_info.bPacketToSelf = pkt_info.bPacketMatchBSSID && (!memcmp(get_da(wlanhdr), diff --git a/drivers/staging/rtl8188eu/include/wifi.h b/drivers/staging/rtl8188eu/include/wifi.h index 791f287a546d..3998d5633860 100644 --- a/drivers/staging/rtl8188eu/include/wifi.h +++ b/drivers/staging/rtl8188eu/include/wifi.h @@ -324,13 +324,6 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe) return sa; } -static inline int IsFrameTypeCtrl(unsigned char *pframe) -{ - if (WIFI_CTRL_TYPE == GetFrameType(pframe)) - return true; - else - return false; -} /*- Below is for the security related definition --*/ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: kpc2000: Replace depracated MSI API.
Hi Suraj, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] url: https://github.com/0day-ci/linux/commits/Suraj-Upadhyay/staging-kpc2000-Replace-depracated-MSI-API/20200718-213859 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 9d5d041eebe3dcf7591ff7004896c329eb841ca6 config: alpha-allyesconfig (attached as .config) compiler: alpha-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/staging/kpc2000/kpc2000/core.c: In function 'kp2000_pcie_probe': >> drivers/staging/kpc2000/kpc2000/core.c:443:30: error: 'dev' undeclared >> (first use in this function); did you mean 'pdev'? 443 | err = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSI); | ^~~ | pdev drivers/staging/kpc2000/kpc2000/core.c:443:30: note: each undeclared identifier is reported only once for each function it appears in vim +443 drivers/staging/kpc2000/kpc2000/core.c 295 296 static int kp2000_pcie_probe(struct pci_dev *pdev, 297 const struct pci_device_id *id) 298 { 299 int err = 0; 300 struct kp2000_device *pcard; 301 unsigned long reg_bar_phys_addr; 302 unsigned long reg_bar_phys_len; 303 unsigned long dma_bar_phys_addr; 304 unsigned long dma_bar_phys_len; 305 u16 regval; 306 307 pcard = kzalloc(sizeof(*pcard), GFP_KERNEL); 308 if (!pcard) 309 return -ENOMEM; 310 dev_dbg(&pdev->dev, "probe: allocated struct kp2000_device @ %p\n", 311 pcard); 312 313 err = ida_simple_get(&card_num_ida, 1, INT_MAX, GFP_KERNEL); 314 if (err < 0) { 315 dev_err(&pdev->dev, "probe: failed to get card number (%d)\n", 316 err); 317 goto err_free_pcard; 318 } 319 pcard->card_num = err; 320 scnprintf(pcard->name, 16, "kpcard%u", pcard->card_num); 321 322 mutex_init(&pcard->sem); 323 mutex_lock(&pcard->sem); 324 325 pcard->pdev = pdev; 326 pci_set_drvdata(pdev, pcard); 327 328 err = pci_enable_device(pcard->pdev); 329 if (err) { 330 dev_err(&pcard->pdev->dev, 331 "probe: failed to enable PCIE2000 PCIe device (%d)\n", 332 err); 333 goto err_remove_ida; 334 } 335 336 /* Setup the Register BAR */ 337 reg_bar_phys_addr = pci_resource_start(pcard->pdev, REG_BAR); 338 reg_bar_phys_len = pci_resource_len(pcard->pdev, REG_BAR); 339 340 pcard->regs_bar_base = ioremap(reg_bar_phys_addr, PAGE_SIZE); 341 if (!pcard->regs_bar_base) { 342 dev_err(&pcard->pdev->dev, 343 "probe: REG_BAR could not remap memory to virtual space\n"); 344 err = -ENODEV; 345 goto err_disable_device; 346 } 347 dev_dbg(&pcard->pdev->dev, 348 "probe: REG_BAR virt hardware address start [%p]\n", 349 pcard->regs_bar_base); 350 351 err = pci_request_region(pcard->pdev, REG_BAR, KP_DRIVER_NAME_KP2000); 352 if (err) { 353 dev_err(&pcard->pdev->dev, 354 "probe: failed to acquire PCI region (%d)\n", 355 err); 356 err = -ENODEV; 357 goto err_unmap_regs; 358 } 359 360 pcard->regs_base_resource.start = reg_bar_phys_addr; 361 pcard->regs_base_resource.end = reg_bar_phys_addr + 362reg_bar_phys_len - 1; 363 pcard->regs_base_resource.flags = IORESOURCE_MEM; 364 365 /* Setup the DMA BAR */ 366 dma_bar_phys_addr = pci_resource_start(pcard->pdev, DMA_BAR); 367 dma_bar_phys_len = pci_resource_len(pcard->pdev, DMA_BAR); 368 369 pcard->dma_bar_base
Hello
Hello, Acknowledge please if you still use this e-mail. There is a heritage that has your surname. get in touch at:zhuq...@gmail.com Thanks, Qi ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rts5208: rtsx: Replace depracated MSI API
On Sat, Jul 18, 2020 at 06:48:56PM +0530, Suraj Upadhyay wrote: > Replace depracated pci_enable_msi with pci_alloc_irq_vectors. > > Signed-off-by: Suraj Upadhyay > --- > drivers/staging/rts5208/rtsx.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c > index e28e162d004e..adc80e766412 100644 > --- a/drivers/staging/rts5208/rtsx.c > +++ b/drivers/staging/rts5208/rtsx.c > @@ -310,7 +310,7 @@ static int __maybe_unused rtsx_resume(struct device > *dev_d) > pci_set_master(pci); > > if (chip->msi_en) { > - if (pci_enable_msi(pci) < 0) > + if (pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSI) < 0) The conversion is buggy, It changes variable name. > chip->msi_en = 0; > } > > @@ -881,7 +881,7 @@ static int rtsx_probe(struct pci_dev *pci, > dev_info(&pci->dev, "pci->irq = %d\n", pci->irq); > > if (dev->chip->msi_en) { > - if (pci_enable_msi(pci) < 0) > + if (pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSI) < 0) This has the same mistake. > dev->chip->msi_en = 0; > } > > -- > 2.17.1 > Resending this patch. I hope this wasn't an annoyance. Thanks, Suraj Upadhyay ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: rts5208: rtsx: Replace depracated MSI API
Replace depracated pci_enable_msi with pci_alloc_irq_vectors. Signed-off-by: Suraj Upadhyay --- drivers/staging/rts5208/rtsx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index e28e162d004e..b39d3f8b54df 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -310,7 +310,7 @@ static int __maybe_unused rtsx_resume(struct device *dev_d) pci_set_master(pci); if (chip->msi_en) { - if (pci_enable_msi(pci) < 0) + if (pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI) < 0) chip->msi_en = 0; } @@ -881,7 +881,7 @@ static int rtsx_probe(struct pci_dev *pci, dev_info(&pci->dev, "pci->irq = %d\n", pci->irq); if (dev->chip->msi_en) { - if (pci_enable_msi(pci) < 0) + if (pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI) < 0) dev->chip->msi_en = 0; } -- 2.17.1 signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: kpc2000: Replace depracated MSI API.
Replace depracated pci_enable_msi with pci_alloc_irq_vectors. And as a result modify how the returned value is handled. Signed-off-by: Suraj Upadhyay --- Changes: v2: Removed the undefined variable. Reported by kernel-bot. drivers/staging/kpc2000/kpc2000/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index 358d7b2f4ad1..8339026ffb41 100644 --- a/drivers/staging/kpc2000/kpc2000/core.c +++ b/drivers/staging/kpc2000/kpc2000/core.c @@ -440,7 +440,7 @@ static int kp2000_pcie_probe(struct pci_dev *pdev, dev_dbg(&pcard->pdev->dev, "Using DMA mask %0llx\n", dma_get_mask(PCARD_TO_DEV(pcard))); - err = pci_enable_msi(pcard->pdev); + err = pci_alloc_irq_vectors(pcard->pdev, 1, 1, PCI_IRQ_MSI); if (err < 0) goto err_release_dma; -- 2.17.1 signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: wlan-ng: properly check endpoint types
As syzkaller detected, wlan-ng driver submits bulk urb without checking that the endpoint type is actually bulk, add usb_urb_ep_type_check() Reported-and-tested-by: syzbot+c2a1fa67c02faa0de...@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=c2a1fa67c02faa0de723 Signed-off-by: Rustam Kovhaev --- drivers/staging/wlan-ng/hfa384x_usb.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index fa1bf8b069fd..7cde60ea68a2 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -339,6 +339,12 @@ static int submit_rx_urb(struct hfa384x *hw, gfp_t memflags) hw->rx_urb_skb = skb; + result = usb_urb_ep_type_check(&hw->rx_urb); + if (result) { + netdev_warn(hw->wlandev->netdev, "invalid rx endpoint"); + goto cleanup; + } + result = -ENOLINK; if (!hw->wlandev->hwremoved && !test_bit(WORK_RX_HALT, &hw->usb_flags)) { @@ -354,6 +360,7 @@ static int submit_rx_urb(struct hfa384x *hw, gfp_t memflags) } } +cleanup: /* Don't leak memory if anything should go wrong */ if (result != 0) { dev_kfree_skb(skb); @@ -388,6 +395,12 @@ static int submit_tx_urb(struct hfa384x *hw, struct urb *tx_urb, gfp_t memflags) struct net_device *netdev = hw->wlandev->netdev; int result; + result = usb_urb_ep_type_check(&hw->tx_urb); + if (result) { + netdev_warn(hw->wlandev->netdev, "invalid tx endpoint"); + goto done; + } + result = -ENOLINK; if (netif_running(netdev)) { if (!hw->wlandev->hwremoved && @@ -407,6 +420,7 @@ static int submit_tx_urb(struct hfa384x *hw, struct urb *tx_urb, gfp_t memflags) } } +done: return result; } -- 2.27.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/4] staging: rtl8188eu: include: fixed multiple parentheses coding style issues
Hi K, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on staging/staging-testing] url: https://github.com/0day-ci/linux/commits/B-K-Karthik/staging-rtl8188eu-include-fixed-multiple-blank-space-coding-style-issues/20200718-172103 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 9d5d041eebe3dcf7591ff7004896c329eb841ca6 config: x86_64-allyesconfig (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/staging/rtl8188eu/core/rtw_ap.c:1606:29: warning: expression result unused [-Wunused-value] DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(padapter->pnetdev)); ^~~~ drivers/staging/rtl8188eu/include/osdep_service.h:79:30: note: expanded from macro 'FUNC_NDEV_ARG' #define FUNC_NDEV_ARG(ndev) (__func__, (ndev)->name) ^~~~ drivers/staging/rtl8188eu/include/rtw_debug.h:70:26: note: expanded from macro 'DBG_88E' pr_info(DRIVER_PREFIX __VA_ARGS__); \ ^~~ include/linux/printk.h:368:34: note: expanded from macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^~~ >> drivers/staging/rtl8188eu/core/rtw_ap.c:1606:10: warning: more '%' >> conversions than data arguments [-Wformat] DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(padapter->pnetdev)); ^ drivers/staging/rtl8188eu/include/osdep_service.h:78:28: note: expanded from macro 'FUNC_NDEV_FMT' #define FUNC_NDEV_FMT "%s(%s)" ~^ drivers/staging/rtl8188eu/include/rtw_debug.h:70:26: note: expanded from macro 'DBG_88E' pr_info(DRIVER_PREFIX __VA_ARGS__); \ ^~~ include/linux/printk.h:368:26: note: expanded from macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^~~ include/linux/printk.h:296:21: note: expanded from macro 'pr_fmt' #define pr_fmt(fmt) fmt ^~~ 2 warnings generated. -- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c:427:42: warning: expression result unused [-Wunused-value] DBG_88E(FUNC_ADPT_FMT": scan deny\n", FUNC_ADPT_ARG(padapter)); ^~~ drivers/staging/rtl8188eu/include/osdep_service.h:81:33: note: expanded from macro 'FUNC_ADPT_ARG' #define FUNC_ADPT_ARG(adapter) (__func__, (adapter)->pnetdev->name) ^~~~ drivers/staging/rtl8188eu/include/rtw_debug.h:70:26: note: expanded from macro 'DBG_88E' pr_info(DRIVER_PREFIX __VA_ARGS__); \ ^~~ include/linux/printk.h:368:34: note: expanded from macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^~~ >> drivers/staging/rtl8188eu/core/rtw_ioctl_set.c:427:12: warning: more '%' >> conversions than data arguments [-Wformat] DBG_88E(FUNC_ADPT_FMT": scan deny\n", FUNC_ADPT_ARG(padapter)); ^ drivers/staging/rtl8188eu/include/osdep_service.h:80:28: note: expanded from macro 'FUNC_ADPT_FMT' #define FUNC_ADPT_FMT "%s(%s)" ~^ drivers/staging/rtl8188eu/include/rtw_debug.h:70:26: note: expanded from macro 'DBG_88E' pr_info(DRIVER_PREFIX __VA_ARGS__); \ ^~~ include/linux/printk.h:368:26: note: expanded from macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^~~ include/linux/printk.h:296:21: note: expanded from macro 'pr_fmt&
Re: [PATCH] Staging: comedi: driver: Remove condition with no effect
On Mon, Jul 13, 2020 at 02:41:19PM +0100, Ian Abbott wrote: > On 13/07/2020 14:34, Greg KH wrote: > > On Sun, Jul 12, 2020 at 12:36:28PM +0530, Saurav Girepunje wrote: > > > Remove below warning in das1800.c > > > WARNING: possible condition with no effect (if == else) > > > > > > Signed-off-by: Saurav Girepunje > > > --- > > > drivers/staging/comedi/drivers/das1800.c | 6 -- > > > 1 file changed, 6 deletions(-) > > > > > > diff --git a/drivers/staging/comedi/drivers/das1800.c > > > b/drivers/staging/comedi/drivers/das1800.c > > > index f16aa7e9f4f3..7ab72e83d3d0 100644 > > > --- a/drivers/staging/comedi/drivers/das1800.c > > > +++ b/drivers/staging/comedi/drivers/das1800.c > > > @@ -1299,12 +1299,6 @@ static int das1800_attach(struct comedi_device > > > *dev, > > > outb(DAC(i), dev->iobase + DAS1800_SELECT); > > > outw(0, dev->iobase + DAS1800_DAC); > > > } > > > - } else if (board->id == DAS1800_ID_AO) { > > > - /* > > > - * 'ao' boards have waveform analog outputs that are not > > > - * currently supported. > > > - */ > > > - s->type = COMEDI_SUBD_UNUSED; > > > > What gave that warning? The comment should show you why this is good to > > keep as-is, right? > > One option is to move the comment into the '} else {' part that follows this > part. > > -- > -=( Ian Abbott || Web: www.mev.co.uk )=- > -=( MEV Ltd. is a company registered in England & Wales. )=- > -=( Registered number: 02862268. Registered address:)=- > -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=- @gregkh : Got the warning using coccinelle. @Ian: Yes, we can move comment to else part. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/4] staging: rtl8188eu: include: enclosed macros in do-while loops
Hi K, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] url: https://github.com/0day-ci/linux/commits/B-K-Karthik/staging-rtl8188eu-include-fixed-multiple-blank-space-coding-style-issues/20200718-172103 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 9d5d041eebe3dcf7591ff7004896c329eb841ca6 config: x86_64-allyesconfig (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All error/warnings (new ones prefixed by >>): In file included from drivers/staging/rtl8188eu/core/rtw_sreset.c:8: In file included from drivers/staging/rtl8188eu/include/rtw_sreset.h:17: In file included from drivers/staging/rtl8188eu/include/rtl8188e_hal.h:21: In file included from drivers/staging/rtl8188eu/include/odm_precomp.h:26: >> drivers/staging/rtl8188eu/include/odm_debug.h:80:3: error: expected >> identifier or '(' if (((comp) & pDM_Odm->DebugComponents) && \ ^ >> drivers/staging/rtl8188eu/include/odm_debug.h:85:2: error: extraneous >> closing brace ('}') } while (0) ^ drivers/staging/rtl8188eu/include/odm_debug.h:85:4: error: expected identifier or '(' } while (0) ^ drivers/staging/rtl8188eu/include/odm_debug.h:96:2: error: extraneous closing brace ('}') } while (0) ^ drivers/staging/rtl8188eu/include/odm_debug.h:96:4: error: expected identifier or '(' } while (0) ^ 5 errors generated. -- In file included from drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:6: In file included from drivers/staging/rtl8188eu/include/odm_precomp.h:26: >> drivers/staging/rtl8188eu/include/odm_debug.h:80:3: error: expected >> identifier or '(' if (((comp) & pDM_Odm->DebugComponents) && \ ^ >> drivers/staging/rtl8188eu/include/odm_debug.h:85:2: error: extraneous >> closing brace ('}') } while (0) ^ drivers/staging/rtl8188eu/include/odm_debug.h:85:4: error: expected identifier or '(' } while (0) ^ drivers/staging/rtl8188eu/include/odm_debug.h:96:2: error: extraneous closing brace ('}') } while (0) ^ drivers/staging/rtl8188eu/include/odm_debug.h:96:4: error: expected identifier or '(' } while (0) ^ >> drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:109:1: error: >> expected 'while' in do/while loop static int odm_RateDown_8188E(struct odm_dm_struct *dm_odm, ^ drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:105:2: note: to match this 'do' ODM_RT_TRACE(dm_odm, ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD, ^ drivers/staging/rtl8188eu/include/odm_debug.h:79:2: note: expanded from macro 'ODM_RT_TRACE' do { ^ >> drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:761:2: error: >> expected '}' } ^ drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c:86:1: note: to match this '{' { ^ 7 errors generated. -- In file included from drivers/staging/rtl8188eu/hal/odm.c:8: In file included from drivers/staging/rtl8188eu/include/odm_precomp.h:26: >> drivers/staging/rtl8188eu/include/odm_debug.h:80:3: error: expected >> identifier or '(' if (((comp) & pDM_Odm->DebugComponents) && \ ^ >> drivers/staging/rtl8188eu/include/odm_debug.h:85:2: error: extraneous >> closing brace ('}') } while (0) ^ drivers/staging/rtl8188eu/include/odm_debug.h:85:4: error: expected identifier or '(' } while (0) ^ drivers/staging/rtl8188eu/include/odm_debug.h:96:2: error: extraneous closing brace ('}') } while (0) ^ drivers/staging/rtl8188eu/include/odm_debug.h:96:4: error: expected identifier or '(' } while (0) ^ >> drivers/staging/rtl8188eu/hal/odm.c
[PATCH] android: binder.h: drop a duplicated word
Drop the repeated word "the" in a comment. Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: Arve Hjønnevåg Cc: Todd Kjos Cc: Martijn Coenen Cc: Joel Fernandes Cc: Christian Brauner Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: de...@driverdev.osuosl.org --- include/uapi/linux/android/binder.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20200717.orig/include/uapi/linux/android/binder.h +++ linux-next-20200717/include/uapi/linux/android/binder.h @@ -404,7 +404,7 @@ enum binder_driver_return_protocol { BR_FAILED_REPLY = _IO('r', 17), /* -* The the last transaction (either a bcTRANSACTION or +* The last transaction (either a bcTRANSACTION or * a bcATTEMPT_ACQUIRE) failed (e.g. out of memory). No parameters. */ }; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: kpc2000: Replace depracated MSI API.
On Sat, Jul 18, 2020 at 09:19:51PM +0530, Suraj Upadhyay wrote: > Replace depracated pci_enable_msi with pci_alloc_irq_vectors. > And as a result modify how the returned value is handled. > > Signed-off-by: Suraj Upadhyay > --- > Changes: > v2: Removed the undefined variable. > Reported by kernel-bot. > Don't merge it. This patch is incomplete. I have to replce pci_disable_msi too. I hope this didn't cause any annoyances. Thanks, Suraj Upadhyay. > drivers/staging/kpc2000/kpc2000/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/kpc2000/kpc2000/core.c > b/drivers/staging/kpc2000/kpc2000/core.c > index 358d7b2f4ad1..8339026ffb41 100644 > --- a/drivers/staging/kpc2000/kpc2000/core.c > +++ b/drivers/staging/kpc2000/kpc2000/core.c > @@ -440,7 +440,7 @@ static int kp2000_pcie_probe(struct pci_dev *pdev, > dev_dbg(&pcard->pdev->dev, > "Using DMA mask %0llx\n", dma_get_mask(PCARD_TO_DEV(pcard))); > > - err = pci_enable_msi(pcard->pdev); > + err = pci_alloc_irq_vectors(pcard->pdev, 1, 1, PCI_IRQ_MSI); > if (err < 0) > goto err_release_dma; > > -- > 2.17.1 > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: rts5208: rtsx: Replace depracated MSI API
On Sat, Jul 18, 2020 at 09:10:30PM +0530, Suraj Upadhyay wrote: > Replace depracated pci_enable_msi with pci_alloc_irq_vectors. > > Signed-off-by: Suraj Upadhyay > --- > drivers/staging/rts5208/rtsx.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Hii, don't merge this patch. It is still incomplete. It doesn't replace pci_disable_msi. I hope this didn't cause any annoyances. Thanks, Suraj Upadhyay. > diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c > index e28e162d004e..b39d3f8b54df 100644 > --- a/drivers/staging/rts5208/rtsx.c > +++ b/drivers/staging/rts5208/rtsx.c > @@ -310,7 +310,7 @@ static int __maybe_unused rtsx_resume(struct device > *dev_d) > pci_set_master(pci); > > if (chip->msi_en) { > - if (pci_enable_msi(pci) < 0) > + if (pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI) < 0) > chip->msi_en = 0; > } > > @@ -881,7 +881,7 @@ static int rtsx_probe(struct pci_dev *pci, > dev_info(&pci->dev, "pci->irq = %d\n", pci->irq); > > if (dev->chip->msi_en) { > - if (pci_enable_msi(pci) < 0) > + if (pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_MSI) < 0) > dev->chip->msi_en = 0; > } > > -- > 2.17.1 > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: media: atomisp: Replace depracated MSI API.
On Sat, Jul 18, 2020 at 06:56:32PM +0530, Suraj Upadhyay wrote: > Replace depracated pci_enable_msi with pci_alloc_irq_vectors. > And as a result modify how the returned value is handled. > > Signed-off-by: Suraj Upadhyay > --- > drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Hii, Please don't merge this patch. It is still incomplete. It doesn't replace pci_disable_msi. I hope this wasn't an annoyance. Thanks, Suraj Upadhyay. > diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c > b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c > index d36809a0182c..b824c6f78a9c 100644 > --- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c > +++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c > @@ -1735,8 +1735,8 @@ static int atomisp_pci_probe(struct pci_dev *dev, > pci_set_master(dev); > pci_set_drvdata(dev, isp); > > - err = pci_enable_msi(dev); > - if (err) { > + err = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSI); > + if (err < 0) { > dev_err(&dev->dev, "Failed to enable msi (%d)\n", err); > goto enable_msi_fail; > } > -- > 2.17.1 > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] media: atomisp: move system_local consts into a C file
Instead of declaring all those consts everywhere when the headers are included, just place them on a single place. This change shuts up lots of warnings when built with W=1: In file included from drivers/staging/media/atomisp/pci/ia_css_acc_types.h:23, from drivers/staging/media/atomisp/pci/ia_css.h:26, from drivers/staging/media/atomisp/pci/atomisp_compat_css20.h:24, from drivers/staging/media/atomisp/pci/atomisp_compat.h:22, from drivers/staging/media/atomisp/pci/atomisp_drvfs.c:23: ./drivers/staging/media/atomisp//pci/system_local.h:193:26: warning: ‘STREAM2MMIO_CTRL_BASE’ defined but not used [-Wunused-const-variable=] 193 | static const hrt_address STREAM2MMIO_CTRL_BASE[N_STREAM2MMIO_ID] = { | ^ ./drivers/staging/media/atomisp//pci/system_local.h:186:26: warning: ‘PIXELGEN_CTRL_BASE’ defined but not used [-Wunused-const-variable=] 186 | static const hrt_address PIXELGEN_CTRL_BASE[N_PIXELGEN_ID] = { | ^~ ./drivers/staging/media/atomisp//pci/system_local.h:179:26: warning: ‘CSI_RX_BE_CTRL_BASE’ defined but not used [-Wunused-const-variable=] 179 | static const hrt_address CSI_RX_BE_CTRL_BASE[N_CSI_RX_BACKEND_ID] = { | ^~~ ./drivers/staging/media/atomisp//pci/system_local.h:172:26: warning: ‘CSI_RX_FE_CTRL_BASE’ defined but not used [-Wunused-const-variable=] 172 | static const hrt_address CSI_RX_FE_CTRL_BASE[N_CSI_RX_FRONTEND_ID] = { | ^~~ ./drivers/staging/media/atomisp//pci/system_local.h:165:26: warning: ‘ISYS_IRQ_BASE’ defined but not used [-Wunused-const-variable=] 165 | static const hrt_address ISYS_IRQ_BASE[N_ISYS_IRQ_ID] = { | ^ ./drivers/staging/media/atomisp//pci/system_local.h:158:26: warning: ‘IBUF_CTRL_BASE’ defined but not used [-Wunused-const-variable=] 158 | static const hrt_address IBUF_CTRL_BASE[N_IBUF_CTRL_ID] = { | ^~ ./drivers/staging/media/atomisp//pci/system_local.h:153:26: warning: ‘RX_BASE’ defined but not used [-Wunused-const-variable=] 153 | static const hrt_address RX_BASE[N_RX_ID] = { | ^~~ ./drivers/staging/media/atomisp//pci/system_local.h:138:26: warning: ‘INPUT_SYSTEM_BASE’ defined but not used [-Wunused-const-variable=] 138 | static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = { | ^ ./drivers/staging/media/atomisp//pci/system_local.h:130:26: warning: ‘INPUT_FORMATTER_BASE’ defined but not used [-Wunused-const-variable=] 130 | static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = { | ^~~~ ./drivers/staging/media/atomisp//pci/system_local.h:125:26: warning: ‘TIMED_CTRL_BASE’ defined but not used [-Wunused-const-variable=] 125 | static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = { | ^~~ ./drivers/staging/media/atomisp//pci/system_local.h:120:26: warning: ‘GPIO_BASE’ defined but not used [-Wunused-const-variable=] 120 | static const hrt_address GPIO_BASE[N_GPIO_ID] = { | ^ ./drivers/staging/media/atomisp//pci/system_local.h:116:26: warning: ‘GP_TIMER_BASE’ defined but not used [-Wunused-const-variable=] 116 | static const hrt_address GP_TIMER_BASE = | ^ ./drivers/staging/media/atomisp//pci/system_local.h:109:26: warning: ‘GP_DEVICE_BASE’ defined but not used [-Wunused-const-variable=] 109 | static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = { | ^~ ./drivers/staging/media/atomisp//pci/system_local.h:96:26: warning: ‘FIFO_MONITOR_BASE’ defined but not used [-Wunused-const-variable=] 96 | static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = { | ^ ./drivers/staging/media/atomisp//pci/system_local.h:90:26: warning: ‘GDC_BASE’ defined but not used [-Wunused-const-variable=] 90 | static const hrt_address GDC_BASE[N_GDC_ID] = { | ^~~~ ./drivers/staging/media/atomisp//pci/system_local.h:78:26: warning: ‘IRQ_BASE’ defined but not used [-Wunused-const-variable=] 78 | static const hrt_address IRQ_BASE[N_IRQ_ID] = { | ^~~~ ./drivers/staging/media/atomisp//pci/system_local.h:73:26: warning: ‘ISYS2401_DMA_BASE’ defined but not used [-Wunused-const-variable=] 73 | static const hrt_address ISYS2401_DMA_BASE[N_ISYS2401_DMA_ID] = { | ^ ./drivers/staging/media/atomisp//pci/system_local.h:69:26: warning: ‘DMA_BASE’ defined but not used [-Wunused-const-variable=] 69 | static const hrt_addr
Re: [PATCH] drivers: staging: media: atomisp: pci: css_2401_system: host: csi_rx.c: fixed a sparse warning by making undeclared symbols static
Em Tue, 14 Jul 2020 09:23:50 -0400 B K Karthik escreveu: > changed symbols N_SHORT_PACKET_LUT_ENTRIES, N_LONG_PACKET_ENTRIES, > N_CSI_RX_FE_CTRL_DLANES, N_CSI_RX_BE_SID_WIDTH to static because they > were not declared earlier. This patch is broken: ERROR: modpost: "N_CSI_RX_FE_CTRL_DLANES" [drivers/staging/media/atomisp/atomisp.ko] undefined! ERROR: modpost: "N_LONG_PACKET_LUT_ENTRIES" [drivers/staging/media/atomisp/atomisp.ko] undefined! ERROR: modpost: "N_SHORT_PACKET_LUT_ENTRIES" [drivers/staging/media/atomisp/atomisp.ko] undefined! Please test your patches before submitting them. I suspect that the header declaring them weren't included at csi_rx.c. Regards, Mauro > > Signed-off-by: B K Karthik > --- > .../media/atomisp/pci/css_2401_system/host/csi_rx.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c > b/drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c > index 8e661091f7d9..4d2076db1240 100644 > --- a/drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c > +++ b/drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c > @@ -15,26 +15,26 @@ > > #include "system_global.h" > > -const u32 N_SHORT_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = { > +static const u32 N_SHORT_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = { > 4, /* 4 entries at CSI_RX_BACKEND0_ID*/ > 4, /* 4 entries at CSI_RX_BACKEND1_ID*/ > 4 /* 4 entries at CSI_RX_BACKEND2_ID*/ > }; > > -const u32 N_LONG_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = { > +static const u32 N_LONG_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = { > 8, /* 8 entries at CSI_RX_BACKEND0_ID*/ > 4, /* 4 entries at CSI_RX_BACKEND1_ID*/ > 4 /* 4 entries at CSI_RX_BACKEND2_ID*/ > }; > > -const u32 N_CSI_RX_FE_CTRL_DLANES[N_CSI_RX_FRONTEND_ID] = { > +static const u32 N_CSI_RX_FE_CTRL_DLANES[N_CSI_RX_FRONTEND_ID] = { > N_CSI_RX_DLANE_ID, /* 4 dlanes for CSI_RX_FR0NTEND0_ID */ > N_CSI_RX_DLANE_ID, /* 4 dlanes for CSI_RX_FR0NTEND1_ID */ > N_CSI_RX_DLANE_ID /* 4 dlanes for CSI_RX_FR0NTEND2_ID */ > }; > > /* sid_width for CSI_RX_BACKEND_ID */ > -const u32 N_CSI_RX_BE_SID_WIDTH[N_CSI_RX_BACKEND_ID] = { > +static const u32 N_CSI_RX_BE_SID_WIDTH[N_CSI_RX_BACKEND_ID] = { > 3, > 2, > 2 Thanks, Mauro ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: kpc2000: Replace depracated MSI API.
Hi Suraj, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] url: https://github.com/0day-ci/linux/commits/Suraj-Upadhyay/staging-kpc2000-Replace-depracated-MSI-API/20200718-213859 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 9d5d041eebe3dcf7591ff7004896c329eb841ca6 config: x86_64-allyesconfig (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All error/warnings (new ones prefixed by >>): >> drivers/staging/kpc2000/kpc2000/core.c:443:30: error: use of undeclared >> identifier 'dev'; did you mean 'pdev'? err = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSI); ^~~ pdev drivers/staging/kpc2000/kpc2000/core.c:296:46: note: 'pdev' declared here static int kp2000_pcie_probe(struct pci_dev *pdev, ^ >> drivers/staging/kpc2000/kpc2000/core.c:434:42: warning: shift count >= width >> of type [-Wshift-count-overflow] err = dma_set_mask(PCARD_TO_DEV(pcard), DMA_BIT_MASK(64)); ^~~~ include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK' #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) ^ ~~~ drivers/staging/kpc2000/kpc2000/core.c:437:35: warning: shift count >= width of type [-Wshift-count-overflow] "CANNOT use DMA mask %0llx\n", DMA_BIT_MASK(64)); ^~~~ include/linux/dev_printk.h:104:32: note: expanded from macro 'dev_err' _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~ include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK' #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) ^ ~~~ 2 warnings and 1 error generated. vim +443 drivers/staging/kpc2000/kpc2000/core.c 295 296 static int kp2000_pcie_probe(struct pci_dev *pdev, 297 const struct pci_device_id *id) 298 { 299 int err = 0; 300 struct kp2000_device *pcard; 301 unsigned long reg_bar_phys_addr; 302 unsigned long reg_bar_phys_len; 303 unsigned long dma_bar_phys_addr; 304 unsigned long dma_bar_phys_len; 305 u16 regval; 306 307 pcard = kzalloc(sizeof(*pcard), GFP_KERNEL); 308 if (!pcard) 309 return -ENOMEM; 310 dev_dbg(&pdev->dev, "probe: allocated struct kp2000_device @ %p\n", 311 pcard); 312 313 err = ida_simple_get(&card_num_ida, 1, INT_MAX, GFP_KERNEL); 314 if (err < 0) { 315 dev_err(&pdev->dev, "probe: failed to get card number (%d)\n", 316 err); 317 goto err_free_pcard; 318 } 319 pcard->card_num = err; 320 scnprintf(pcard->name, 16, "kpcard%u", pcard->card_num); 321 322 mutex_init(&pcard->sem); 323 mutex_lock(&pcard->sem); 324 325 pcard->pdev = pdev; 326 pci_set_drvdata(pdev, pcard); 327 328 err = pci_enable_device(pcard->pdev); 329 if (err) { 330 dev_err(&pcard->pdev->dev, 331 "probe: failed to enable PCIE2000 PCIe device (%d)\n", 332 err); 333 goto err_remove_ida; 334 } 335 336 /* Setup the Register BAR */ 337 reg_bar_phys_addr = pci_resource_start(pcard->pdev, REG_BAR); 338 reg_bar_phys_len = pci_resource_len(pcard->pdev, REG_BAR); 339 340 pcard->regs_bar_base = ioremap(reg_bar_phys_addr, PAGE_SIZE); 341 if (!pcard->regs_bar_base) { 342 dev_err(&pcard->pdev->d