[PATCH] staging: mt7621-pinctrl: Style fixes to pinctrl-rt2880
Replaces instances of "unsigned" with "unsigned int"; fixes comma and tab spacing. Signed-off-by: Peter Vernia --- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 35 + 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c index 0c3e498..6894510 100644 --- a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +++ b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c @@ -54,7 +54,7 @@ static int rt2880_get_group_count(struct pinctrl_dev *pctrldev) } static const char *rt2880_get_group_name(struct pinctrl_dev *pctrldev, -unsigned group) +unsigned int group) { struct rt2880_priv *p = pinctrl_dev_get_drvdata(pctrldev); @@ -65,9 +65,9 @@ static const char *rt2880_get_group_name(struct pinctrl_dev *pctrldev, } static int rt2880_get_group_pins(struct pinctrl_dev *pctrldev, -unsigned group, -const unsigned **pins, -unsigned *num_pins) +unsigned int group, +const unsigned int **pins, +unsigned int *num_pins) { struct rt2880_priv *p = pinctrl_dev_get_drvdata(pctrldev); @@ -81,7 +81,8 @@ static int rt2880_get_group_pins(struct pinctrl_dev *pctrldev, } static void rt2880_pinctrl_dt_free_map(struct pinctrl_dev *pctrldev, - struct pinctrl_map *map, unsigned num_maps) + struct pinctrl_map *map, + unsigned int num_maps) { int i; @@ -94,7 +95,7 @@ static void rt2880_pinctrl_dt_free_map(struct pinctrl_dev *pctrldev, static void rt2880_pinctrl_pin_dbg_show(struct pinctrl_dev *pctrldev, struct seq_file *s, - unsigned offset) + unsigned int offset) { seq_printf(s, "ralink pio"); } @@ -103,7 +104,7 @@ static void rt2880_pinctrl_dt_subnode_to_map(struct pinctrl_dev *pctrldev, struct device_node *np, struct pinctrl_map **map) { -const char *function; + const char *function; int func = of_property_read_string(np, "ralink,function", ); int grps = of_property_count_strings(np, "ralink,group"); int i; @@ -112,7 +113,7 @@ static void rt2880_pinctrl_dt_subnode_to_map(struct pinctrl_dev *pctrldev, return; for (i = 0; i < grps; i++) { - const char *group; + const char *group; of_property_read_string_index(np, "ralink,group", i, ); @@ -127,7 +128,7 @@ static void rt2880_pinctrl_dt_subnode_to_map(struct pinctrl_dev *pctrldev, static int rt2880_pinctrl_dt_node_to_map(struct pinctrl_dev *pctrldev, struct device_node *np_config, struct pinctrl_map **map, - unsigned *num_maps) + unsigned int *num_maps) { int max_maps = 0; struct pinctrl_map *tmp; @@ -173,7 +174,7 @@ static int rt2880_pmx_func_count(struct pinctrl_dev *pctrldev) } static const char *rt2880_pmx_func_name(struct pinctrl_dev *pctrldev, -unsigned func) +unsigned int func) { struct rt2880_priv *p = pinctrl_dev_get_drvdata(pctrldev); @@ -181,7 +182,7 @@ static const char *rt2880_pmx_func_name(struct pinctrl_dev *pctrldev, } static int rt2880_pmx_group_get_groups(struct pinctrl_dev *pctrldev, - unsigned func, + unsigned int func, const char * const **groups, unsigned * const num_groups) { @@ -198,11 +199,11 @@ static int rt2880_pmx_group_get_groups(struct pinctrl_dev *pctrldev, } static int rt2880_pmx_group_enable(struct pinctrl_dev *pctrldev, - unsigned func, - unsigned group) + unsigned int func, + unsigned int group) { struct rt2880_priv *p = pinctrl_dev_get_drvdata(pctrldev); -u32 mode = 0; + u32 mode = 0; u32 reg = SYSC_REG_GPIO_MODE; int i; int shift; @@ -243,7 +244,7 @@ static int rt2880_pmx_group_enable(struct pinctrl_dev *pctrldev, static int rt2880_pmx_group_gpio_request_enable(struct pinctrl_dev *pctrldev, struct pinctrl_gpio_range *range, - unsigned pin) + unsigned int pin) { struct rt2880_priv
Re: [PATCH] staging: mt7621-pinctrl: Replaces "unsigned" with "unsigned int", fixes mixed indentation, and puts spaces after commas.
> The subject is over 72 characters or whatever the limit is and there > isn't a commit message. Dan, thanks for your help, I realize where I went wrong now. I will re-submit the patch fresh to fix the message subject. --Peter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8188eu: remove rtw_mp_phy_regdef.h
The header rtw_mp_phy_regdef.h is not used anywhere. 'git grep rtw_mp_phy_regdef.h' returns nothing, remove the file. Signed-off-by: Michael Straube --- .../rtl8188eu/include/rtw_mp_phy_regdef.h | 1078 - 1 file changed, 1078 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/include/rtw_mp_phy_regdef.h diff --git a/drivers/staging/rtl8188eu/include/rtw_mp_phy_regdef.h b/drivers/staging/rtl8188eu/include/rtw_mp_phy_regdef.h deleted file mode 100644 index 9276e2321f2a.. --- a/drivers/staging/rtl8188eu/include/rtw_mp_phy_regdef.h +++ /dev/null @@ -1,1078 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - **/ -/* - * - * Module: __RTW_MP_PHY_REGDEF_H_ - * - * - * Note: 1. Define PMAC/BB register map - * 2. Define RF register map - * 3. PMAC/BB register bit mask. - * 4. RF reg bit mask. - * 5. Other BB/RF relative definition. - * - * - * Export: Constants, macro, functions(API), global variables(None). - * - * Abbrev: - * - * History: - * DataWho Remark - * 08/07/2007 MHC 1. Porting from 9x series PHYCFG.h. - * 2. Reorganize code architecture. - * 09/25/2008 MH 1. Add RL6052 register definition - * - */ -#ifndef __RTW_MP_PHY_REGDEF_H_ -#define __RTW_MP_PHY_REGDEF_H_ - - -/*--Define Parameters---*/ - -/* */ -/* 8192S Regsiter offset definition */ -/* */ - -/* */ -/* BB-PHY register PMAC 0x100 PHY 0x800 - 0xEFF */ -/* 1. PMAC duplicate register due to connection: RF_Mode, TRxRN, NumOf L-STF */ -/* 2. 0x800/0x900/0xA00/0xC00/0xD00/0xE00 */ -/* 3. RF register 0x00-2E */ -/* 4. Bit Mask for BB/RF register */ -/* 5. Other definition for BB/RF R/W */ -/* */ - - -/* */ -/* 1. PMAC duplicate register due to connection: RF_Mode, TRxRN, NumOf L-STF */ -/* 1. Page1(0x100) */ -/* */ -#definerPMAC_Reset 0x100 -#definerPMAC_TxStart 0x104 -#definerPMAC_TxLegacySIG 0x108 -#definerPMAC_TxHTSIG1 0x10c -#definerPMAC_TxHTSIG2 0x110 -#definerPMAC_PHYDebug 0x114 -#definerPMAC_TxPacketNum 0x118 -#definerPMAC_TxIdle0x11c -#definerPMAC_TxMACHeader0 0x120 -#definerPMAC_TxMACHeader1 0x124 -#definerPMAC_TxMACHeader2 0x128 -#definerPMAC_TxMACHeader3 0x12c -#definerPMAC_TxMACHeader4 0x130 -#definerPMAC_TxMACHeader5 0x134 -#definerPMAC_TxDataType0x138 -#definerPMAC_TxRandomSeed 0x13c -#definerPMAC_CCKPLCPPreamble 0x140 -#definerPMAC_CCKPLCPHeader 0x144 -#definerPMAC_CCKCRC16 0x148 -#definerPMAC_OFDMRxCRC32OK 0x170 -#definerPMAC_OFDMRxCRC32Er 0x174 -#definerPMAC_OFDMRxParityEr0x178 -#definerPMAC_OFDMRxCRC8Er 0x17c -#definerPMAC_CCKCRxRC16Er 0x180 -#definerPMAC_CCKCRxRC32Er 0x184 -#definerPMAC_CCKCRxRC32OK 0x188 -#definerPMAC_TxStatus 0x18c - -/* */ -/* 2. Page2(0x200) */ -/* */ -/* The following two definition are only used for USB interface. */ -/* define RF_BB_CMD_ADDR 0x02c0 RF/BB read/write command address. */ -/* define RF_BB_CMD_DATA 0x02c4 RF/BB read/write command data. */ - -/* */ -/* 3. Page8(0x800) */ -/* */ -#definerFPGA0_RFMOD0x800 /* RF mode & CCK TxSC RF BW Setting?? */ - -#definerFPGA0_TxInfo 0x804 /* Status report?? */ -#definerFPGA0_PSDFunction 0x808 - -#definerFPGA0_TxGainStage 0x80c /* Set TX PWR init gain? */ - -#definerFPGA0_RFTiming10x810 /* Useless now */ -#definerFPGA0_RFTiming20x814 -/* define rFPGA0_XC_RFTiming 0x818 */ -/* define rFPGA0_XD_RFTiming 0x81c */ - -#define rFPGA0_XA_HSSIParameter1 0x820 /* RF 3 wire register */ -#define rFPGA0_XA_HSSIParameter2 0x824 -#define rFPGA0_XB_HSSIParameter1 0x828 -#define rFPGA0_XB_HSSIParameter2 0x82c -#define rFPGA0_XC_HSSIParameter1 0x830 -#define rFPGA0_XC_HSSIParameter2 0x834 -#define rFPGA0_XD_HSSIParameter1 0x838 -#define rFPGA0_XD_HSSIParameter2 0x83c -#definerFPGA0_XA_LSSIParameter 0x840 -#definerFPGA0_XB_LSSIParameter 0x844 -#define
[PATCH] Drivers: hv: hv_kvp: Mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva --- drivers/hv/hv_kvp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c index 5eed1e7..9b1adcb 100644 --- a/drivers/hv/hv_kvp.c +++ b/drivers/hv/hv_kvp.c @@ -352,6 +352,7 @@ static void process_ib_ipinfo(void *in_msg, void *out_msg, int op) MAX_IP_ADDR_SIZE); out->body.kvp_ip_val.dhcp_enabled = in->kvp_ip_val.dhcp_enabled; + /* fall through */ default: utf16s_to_utf8s((wchar_t *)in->kvp_ip_val.adapter_id, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/4] X86/Hyper-V: Add flush HvFlushGuestPhysicalAddressSpace hypercall support
Hyper-V supports a pv hypercall HvFlushGuestPhysicalAddressSpace to flush nested VM address space mapping in l1 hypervisor and it's to reduce overhead of flushing ept tlb among vcpus. This patch is to implement it. Signed-off-by: Lan Tianyu --- arch/x86/hyperv/Makefile | 2 +- arch/x86/hyperv/nested.c | 64 ++ arch/x86/include/asm/hyperv-tlfs.h | 8 + arch/x86/include/asm/mshyperv.h| 2 ++ 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 arch/x86/hyperv/nested.c diff --git a/arch/x86/hyperv/Makefile b/arch/x86/hyperv/Makefile index b173d404e3df..b21ee65c4101 100644 --- a/arch/x86/hyperv/Makefile +++ b/arch/x86/hyperv/Makefile @@ -1,2 +1,2 @@ -obj-y := hv_init.o mmu.o +obj-y := hv_init.o mmu.o nested.o obj-$(CONFIG_X86_64) += hv_apic.o diff --git a/arch/x86/hyperv/nested.c b/arch/x86/hyperv/nested.c new file mode 100644 index ..74dd38b5221d --- /dev/null +++ b/arch/x86/hyperv/nested.c @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: GPL-2.0 + +/* + * Hyper-V nested virtualization code. + * + * Copyright (C) 2018, Microsoft, Inc. + * + * Author : Lan Tianyu + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or + * NON INFRINGEMENT. See the GNU General Public License for more + * details. + * + */ + + +#include +#include +#include +#include + +int hyperv_flush_guest_mapping(u64 as) +{ + struct hv_guest_mapping_flush **flush_pcpu; + struct hv_guest_mapping_flush *flush; + u64 status; + unsigned long flags; + int ret = -EFAULT; + + if (!hv_hypercall_pg) + goto fault; + + local_irq_save(flags); + + flush_pcpu = (struct hv_guest_mapping_flush **) + this_cpu_ptr(hyperv_pcpu_input_arg); + + flush = *flush_pcpu; + + if (unlikely(!flush)) { + local_irq_restore(flags); + goto fault; + } + + flush->address_space = as; + flush->flags = 0; + + status = hv_do_hypercall(HVCALL_FLUSH_GUEST_PHYSICAL_ADDRESS_SPACE, +flush, NULL); + local_irq_restore(flags); + + if (!(status & HV_HYPERCALL_RESULT_MASK)) + ret = 0; + +fault: + return ret; +} +EXPORT_SYMBOL_GPL(hyperv_flush_guest_mapping); diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h index b8c89265baf0..08e24f552030 100644 --- a/arch/x86/include/asm/hyperv-tlfs.h +++ b/arch/x86/include/asm/hyperv-tlfs.h @@ -309,6 +309,7 @@ struct ms_hyperv_tsc_page { #define HV_X64_MSR_REENLIGHTENMENT_CONTROL 0x4106 /* Nested features (CPUID 0x400A) EAX */ +#define HV_X64_NESTED_GUEST_MAPPING_FLUSH BIT(18) #define HV_X64_NESTED_MSR_BITMAP BIT(19) struct hv_reenlightenment_control { @@ -350,6 +351,7 @@ struct hv_tsc_emulation_status { #define HVCALL_SEND_IPI_EX 0x0015 #define HVCALL_POST_MESSAGE0x005c #define HVCALL_SIGNAL_EVENT0x005d +#define HVCALL_FLUSH_GUEST_PHYSICAL_ADDRESS_SPACE 0x00af #define HV_X64_MSR_VP_ASSIST_PAGE_ENABLE 0x0001 #define HV_X64_MSR_VP_ASSIST_PAGE_ADDRESS_SHIFT12 @@ -741,6 +743,12 @@ struct ipi_arg_ex { struct hv_vpset vp_set; }; +/* HvFlushGuestPhysicalAddressSpace hypercalls */ +struct hv_guest_mapping_flush { + u64 address_space; + u64 flags; +}; + /* HvFlushVirtualAddressSpace, HvFlushVirtualAddressList hypercalls */ struct hv_tlb_flush { u64 address_space; diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h index 3cd14311edfa..a6a615b49876 100644 --- a/arch/x86/include/asm/mshyperv.h +++ b/arch/x86/include/asm/mshyperv.h @@ -302,6 +302,7 @@ void hyperv_reenlightenment_intr(struct pt_regs *regs); void set_hv_tscchange_cb(void (*cb)(void)); void clear_hv_tscchange_cb(void); void hyperv_stop_tsc_emulation(void); +int hyperv_flush_guest_mapping(u64 as); #ifdef CONFIG_X86_64 void hv_apic_init(void); @@ -321,6 +322,7 @@ static inline struct hv_vp_assist_page *hv_get_vp_assist_page(unsigned int cpu) { return NULL; } +static inline int hyperv_flush_guest_mapping(u64 as) { return -1; } #endif /* CONFIG_HYPERV */ #ifdef CONFIG_HYPERV_TSCPAGE -- 2.14.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/4] KVM/x86/hyper-V: Introduce PV guest address space mapping flush support
Hyper-V provides a para-virtualization hypercall HvFlushGuestPhysicalAddressSpace to flush nested VM address space mapping in l1 hypervisor and it's to reduce overhead of flushing ept tlb among vcpus. The tradition way is to send IPIs to all affected vcpus and executes INVEPT on each vcpus. It will trigger several vmexits for IPI and INVEPT emulation. The pv hypercall can help to flush specified ept table on all vcpus via one single hypercall. Lan Tianyu (4): X86/Hyper-V: Add flush HvFlushGuestPhysicalAddressSpace hypercall support KVM: Add tlb remote flush callback in kvm_x86_ops. KVM/VMX: Add identical ept table pointer check KVM/x86: Add tlb_remote_flush callback support for vmcs arch/x86/hyperv/Makefile | 2 +- arch/x86/hyperv/nested.c | 64 ++ arch/x86/include/asm/hyperv-tlfs.h | 8 + arch/x86/include/asm/kvm_host.h| 1 + arch/x86/include/asm/mshyperv.h| 2 ++ arch/x86/kvm/vmx.c | 56 + virt/kvm/kvm_main.c| 12 ++- 7 files changed, 143 insertions(+), 2 deletions(-) create mode 100644 arch/x86/hyperv/nested.c -- 2.14.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH][staging-next] staging: rts5208: fix missing error check on call to rtsx_write_register
From: Colin Ian King Currently the check on error return from the call to rtsx_write_register is checking the error status from the previous call. Fix this by adding in the missing assignment of retval. Detected by CoverityScan, CID#709877 Fixes: fa590c222fba ("staging: rts5208: add support for rts5208 and rts5288") Signed-off-by: Colin Ian King --- drivers/staging/rts5208/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c index f2778abf10c0..e7efa34195c7 100644 --- a/drivers/staging/rts5208/sd.c +++ b/drivers/staging/rts5208/sd.c @@ -4690,7 +4690,7 @@ int sd_execute_write_data(struct scsi_cmnd *srb, struct rtsx_chip *chip) goto sd_execute_write_cmd_failed; } - rtsx_write_register(chip, SD_BYTE_CNT_L, 0xFF, 0x00); + retval = rtsx_write_register(chip, SD_BYTE_CNT_L, 0xFF, 0x00); if (retval != STATUS_SUCCESS) { goto sd_execute_write_cmd_failed; } -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/3] staging: rtl8192u: Use __func__ instead of hardcoded string - Style
On Mon, Jul 02, 2018 at 09:59:34AM +0100, John Whitmore wrote: > I'll fix that up and re-submit Please do not top-post, or send html email, as the mailing lists will reject it (as you saw...) greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/3] staging: rtl8192u: Use __func__ instead of hardcoded string - Style
On Fri, Jun 29, 2018 at 07:10:05PM +0100, John Whitmore wrote: > Chnaged logging statements to use %s and __func__ instead of hard coding the > function name in a string. > > Signed-off-by: John Whitmore > --- > drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c > b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c > index 1dd4c6ae7319..a4fbc0435de5 100644 > --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c > +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c > @@ -534,7 +534,7 @@ void HTConstructCapabilityElement(struct ieee80211_device > *ieee, u8 *posHTCap, u > //u8 bIsDeclareMCS13; > > if (!posHTCap || !pHT) { > - IEEE80211_DEBUG(IEEE80211_DL_ERR, "posHTCap or pHTInfo can't be > null in HTConstructCapabilityElement()\n"); > + IEEE80211_DEBUG(IEEE80211_DL_ERR, "posHTCap or pHTInfo can't be > null in %s\n", __func__); You should properly line-wrap thse lines, otherwise you will have to go back and fix them after this patch. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: fbtft: indent fbtft_device_display - last entry - pdev - dev
The dev section was opening curly bracket, but not adding ident, which resulted in two times "}," after each other with same indentation. Add ident at the right place fixes this problem. This formatting issue is not detectable by checkpatch.pl Signed-off-by: Radek Dostál --- Changes in v2: - Extended commit message. drivers/staging/fbtft/fbtft_device.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c index ec84776..22ba81d 100644 --- a/drivers/staging/fbtft/fbtft_device.c +++ b/drivers/staging/fbtft/fbtft_device.c @@ -1223,14 +1223,14 @@ static struct fbtft_device_display displays[] = { .name = "", .id = 0, .dev = { - .release = fbtft_device_pdev_release, - .platform_data = &(struct fbtft_platform_data) { - .gpios = (const struct fbtft_gpio []) { - {}, + .release = fbtft_device_pdev_release, + .platform_data = &(struct fbtft_platform_data) { + .gpios = (const struct fbtft_gpio []) { + {}, + }, }, }, }, - }, } }; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel