Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support
On Sat, Oct 6, 2018 at 1:29 PM Marcelo Tosatti wrote: > > On Thu, Oct 04, 2018 at 03:15:32PM -0700, Andy Lutomirski wrote: > > For better or for worse, I'm trying to understand this code. So far, > > I've come up with this patch: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?h=x86/vdso-tglx=14fd71e12b1c4492a06f368f75041f263e6862bf > > > > Is it correct, or am I missing some subtlety? > > The master clock, when initialized, has a pair > > masterclockvalues=(TSC value, time-of-day data). > > When updating the guest clock, we only update relative to (TSC value) > that was read on masterclock initialization. I don't see the problem. The masterclock data is updated here: host_tsc_clocksource = kvm_get_time_and_clockread( >master_kernel_ns, >master_cycle_now); kvm_get_time_and_clockread() gets those values from do_monotonic_boot(), which, barring bugs, should cause get_kvmclock_ns() to return exactly the same thing as ktime_get_boot_ns() + ka->kvmclock_offset, albeit in a rather roundabout manner. So what am I missing? Is there actually something wrong with my patch? > > See the following comment on x86.c: I read that comment, and it's not obvious to me how it's related. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: rts5208: rtsx_card: Fixed multiple coding style issues
Hi, On 9/29/18 4:03 AM, Maxime Desroches wrote: > Fixed multiple coding style issues > What kind of style issues are you trying to fix? Please, always be specific about what you are trying to fix. This makes it easier for the maintainers to review your patch and give you feedback. Thanks -- Gustavo > Signed-off-by: Maxime Desroches > --- > drivers/staging/rts5208/rtsx_card.c | 96 +++-- > 1 file changed, 37 insertions(+), 59 deletions(-) > > diff --git a/drivers/staging/rts5208/rtsx_card.c > b/drivers/staging/rts5208/rtsx_card.c > index d26a8e372fce..b45abbe29bc2 100644 > --- a/drivers/staging/rts5208/rtsx_card.c > +++ b/drivers/staging/rts5208/rtsx_card.c > @@ -647,9 +647,8 @@ int switch_ssc_clock(struct rtsx_chip *chip, int clk) > dev_dbg(rtsx_dev(chip), "Switch SSC clock to %dMHz (cur_clk = %d)\n", > clk, chip->cur_clk); > > - if ((clk <= 2) || (n > max_n)) { > + if ((clk <= 2) || (n > max_n)) > return STATUS_FAIL; > - } > > mcu_cnt = (u8)(125 / clk + 3); > if (mcu_cnt > 7) > @@ -688,15 +687,13 @@ int switch_ssc_clock(struct rtsx_chip *chip, int clk) > } > > retval = rtsx_send_cmd(chip, 0, WAIT_TIME); > - if (retval < 0) { > + if (retval < 0) > return STATUS_ERROR; > - } > > udelay(10); > retval = rtsx_write_register(chip, CLK_CTL, CLK_LOW_FREQ, 0); > - if (retval) { > + if (retval) > return retval; > - } > > chip->cur_clk = clk; > > @@ -790,49 +787,44 @@ int switch_normal_clock(struct rtsx_chip *chip, int clk) > } > > retval = rtsx_write_register(chip, CLK_CTL, 0xFF, CLK_LOW_FREQ); > - if (retval) { > + if (retval) > return retval; > - } > if (sd_vpclk_phase_reset) { > retval = rtsx_write_register(chip, SD_VPCLK0_CTL, >PHASE_NOT_RESET, 0); > - if (retval) { > + if (retval) > return retval; > - } > + > retval = rtsx_write_register(chip, SD_VPCLK1_CTL, >PHASE_NOT_RESET, 0); > - if (retval) { > + if (retval) > return retval; > - } > } > retval = rtsx_write_register(chip, CLK_DIV, 0xFF, >(div << 4) | mcu_cnt); > - if (retval) { > + if (retval) > return retval; > - } > retval = rtsx_write_register(chip, CLK_SEL, 0xFF, sel); > - if (retval) { > + if (retval) > return retval; > - } > > if (sd_vpclk_phase_reset) { > udelay(200); > retval = rtsx_write_register(chip, SD_VPCLK0_CTL, >PHASE_NOT_RESET, PHASE_NOT_RESET); > - if (retval) { > + if (retval) > return retval; > - } > + > retval = rtsx_write_register(chip, SD_VPCLK1_CTL, >PHASE_NOT_RESET, PHASE_NOT_RESET); > - if (retval) { > + if (retval) > return retval; > - } > + > udelay(200); > } > retval = rtsx_write_register(chip, CLK_CTL, 0xFF, 0); > - if (retval) { > + if (retval) > return retval; > - } > > chip->cur_clk = clk; > > @@ -878,9 +870,8 @@ int enable_card_clock(struct rtsx_chip *chip, u8 card) > clk_en |= MS_CLK_EN; > > retval = rtsx_write_register(chip, CARD_CLK_EN, clk_en, clk_en); > - if (retval) { > + if (retval) > return retval; > - } > > return STATUS_SUCCESS; > } > @@ -898,9 +889,8 @@ int disable_card_clock(struct rtsx_chip *chip, u8 card) > clk_en |= MS_CLK_EN; > > retval = rtsx_write_register(chip, CARD_CLK_EN, clk_en, 0); > - if (retval) { > + if (retval) > return retval; > - } > > return STATUS_SUCCESS; > } > @@ -924,9 +914,8 @@ int card_power_on(struct rtsx_chip *chip, u8 card) > rtsx_add_cmd(chip, WRITE_REG_CMD, CARD_PWR_CTL, mask, val1); > > retval = rtsx_send_cmd(chip, 0, 100); > - if (retval != STATUS_SUCCESS) { > + if (retval != STATUS_SUCCESS) > return STATUS_FAIL; > - } > > udelay(chip->pmos_pwr_on_interval); > > @@ -934,9 +923,8 @@ int card_power_on(struct rtsx_chip *chip, u8 card) > rtsx_add_cmd(chip, WRITE_REG_CMD, CARD_PWR_CTL, mask, val2); > > retval = rtsx_send_cmd(chip, 0, 100); > - if (retval != STATUS_SUCCESS) { > + if (retval != STATUS_SUCCESS) > return STATUS_FAIL; > - } > > return STATUS_SUCCESS; > } > @@ -955,9 +943,8 @@ int card_power_off(struct rtsx_chip *chip, u8 card) > } > > retval = rtsx_write_register(chip, CARD_PWR_CTL,
Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support
On Thu, Oct 04, 2018 at 03:15:32PM -0700, Andy Lutomirski wrote: > For better or for worse, I'm trying to understand this code. So far, > I've come up with this patch: > > https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?h=x86/vdso-tglx=14fd71e12b1c4492a06f368f75041f263e6862bf > > Is it correct, or am I missing some subtlety? The master clock, when initialized, has a pair masterclockvalues=(TSC value, time-of-day data). When updating the guest clock, we only update relative to (TSC value) that was read on masterclock initialization. See the following comment on x86.c: /* * * Assuming a stable TSC across physical CPUS, and a stable TSC * across virtual CPUs, the following condition is possible. * Each numbered line represents an event visible to both * CPUs at the next numbered event. ... When updating the "masterclockvalues" pair, all vcpus are stopped. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: iio: adc: ad7280a: fix 2 checks
On paź 06, 2018 13:27, Gabriel Capella wrote: > This patch does not change the logic, it only > corrects the checkpatch checks. > > The patch fixes 2 checks of type: > "CHECK: spaces preferred around that '-'" I've made the same mistake few days ago. This change is incorrect. Please see: https://lore.kernel.org/patchwork/patch/635994/. > Signed-off-by: Gabriel Capella > --- > drivers/staging/iio/adc/ad7280a.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/iio/adc/ad7280a.c > b/drivers/staging/iio/adc/ad7280a.c > index 58420dcb406d..a4b4f8678c56 100644 > --- a/drivers/staging/iio/adc/ad7280a.c > +++ b/drivers/staging/iio/adc/ad7280a.c > @@ -750,14 +750,14 @@ static irqreturn_t ad7280_event_handler(int irq, void > *private) > } > > static IIO_DEVICE_ATTR_NAMED(in_thresh_low_value, > - in_voltage-voltage_thresh_low_value, > + in_voltage - voltage_thresh_low_value, > 0644, > ad7280_read_channel_config, > ad7280_write_channel_config, > AD7280A_CELL_UNDERVOLTAGE); > > static IIO_DEVICE_ATTR_NAMED(in_thresh_high_value, > - in_voltage-voltage_thresh_high_value, > + in_voltage - voltage_thresh_high_value, > 0644, > ad7280_read_channel_config, > ad7280_write_channel_config, -- Slawomir Stepien ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: iio: adc: ad7280a: fix 2 checks
This patch does not change the logic, it only corrects the checkpatch checks. The patch fixes 2 checks of type: "CHECK: spaces preferred around that '-'" Signed-off-by: Gabriel Capella --- drivers/staging/iio/adc/ad7280a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c index 58420dcb406d..a4b4f8678c56 100644 --- a/drivers/staging/iio/adc/ad7280a.c +++ b/drivers/staging/iio/adc/ad7280a.c @@ -750,14 +750,14 @@ static irqreturn_t ad7280_event_handler(int irq, void *private) } static IIO_DEVICE_ATTR_NAMED(in_thresh_low_value, - in_voltage-voltage_thresh_low_value, + in_voltage - voltage_thresh_low_value, 0644, ad7280_read_channel_config, ad7280_write_channel_config, AD7280A_CELL_UNDERVOLTAGE); static IIO_DEVICE_ATTR_NAMED(in_thresh_high_value, - in_voltage-voltage_thresh_high_value, + in_voltage - voltage_thresh_high_value, 0644, ad7280_read_channel_config, ad7280_write_channel_config, -- 2.17.1 (Apple Git-112) -- Gabriel Capella gabrielcapella.com hardwarelivreusp.org +55 11 98124-5668 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: rtl8188eu: remove dead code from dm_fast_training_init()
The variable AntCombination is initialized to 2 and never changed. So the else if path is never used. Remove the dead code and the variable AntCombination. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/odm_rtl8188e.c | 38 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm_rtl8188e.c b/drivers/staging/rtl8188eu/hal/odm_rtl8188e.c index 3fb0ed604e3e..3430796d56a3 100644 --- a/drivers/staging/rtl8188eu/hal/odm_rtl8188e.c +++ b/drivers/staging/rtl8188eu/hal/odm_rtl8188e.c @@ -88,7 +88,6 @@ static void dm_fast_training_init(struct odm_dm_struct *dm_odm) struct adapter *adapter = dm_odm->Adapter; u32 value32, i; struct fast_ant_train *dm_fat_tbl = _odm->DM_FatTable; - u32 AntCombination = 2; if (*dm_odm->mp_mode == 1) return; @@ -119,35 +118,12 @@ static void dm_fast_training_init(struct odm_dm_struct *dm_odm) phy_set_bb_reg(adapter, 0xca4, bMaskDWord, 0x00a0); /* antenna mapping table */ - if (AntCombination == 2) { - if (!dm_odm->bIsMPChip) { /* testchip */ - phy_set_bb_reg(adapter, 0x858, BIT(10) | BIT(9) | BIT(8), 1); - phy_set_bb_reg(adapter, 0x858, BIT(13) | BIT(12) | BIT(11), 2); - } else { /* MPchip */ - phy_set_bb_reg(adapter, 0x914, bMaskByte0, 1); - phy_set_bb_reg(adapter, 0x914, bMaskByte1, 2); - } - } else if (AntCombination == 7) { - if (!dm_odm->bIsMPChip) { /* testchip */ - phy_set_bb_reg(adapter, 0x858, BIT(10) | BIT(9) | BIT(8), 0); - phy_set_bb_reg(adapter, 0x858, BIT(13) | BIT(12) | BIT(11), 1); - phy_set_bb_reg(adapter, 0x878, BIT(16), 0); - phy_set_bb_reg(adapter, 0x858, BIT(15) | BIT(14), 2); - phy_set_bb_reg(adapter, 0x878, BIT(19) | BIT(18) | BIT(17), 3); - phy_set_bb_reg(adapter, 0x878, BIT(22) | BIT(21) | BIT(20), 4); - phy_set_bb_reg(adapter, 0x878, BIT(25) | BIT(24) | BIT(23), 5); - phy_set_bb_reg(adapter, 0x878, BIT(28) | BIT(27) | BIT(26), 6); - phy_set_bb_reg(adapter, 0x878, BIT(31) | BIT(30) | BIT(29), 7); - } else { /* MPchip */ - phy_set_bb_reg(adapter, 0x914, bMaskByte0, 0); - phy_set_bb_reg(adapter, 0x914, bMaskByte1, 1); - phy_set_bb_reg(adapter, 0x914, bMaskByte2, 2); - phy_set_bb_reg(adapter, 0x914, bMaskByte3, 3); - phy_set_bb_reg(adapter, 0x918, bMaskByte0, 4); - phy_set_bb_reg(adapter, 0x918, bMaskByte1, 5); - phy_set_bb_reg(adapter, 0x918, bMaskByte2, 6); - phy_set_bb_reg(adapter, 0x918, bMaskByte3, 7); - } + if (!dm_odm->bIsMPChip) { /* testchip */ + phy_set_bb_reg(adapter, 0x858, BIT(10) | BIT(9) | BIT(8), 1); + phy_set_bb_reg(adapter, 0x858, BIT(13) | BIT(12) | BIT(11), 2); + } else { /* MPchip */ + phy_set_bb_reg(adapter, 0x914, bMaskByte0, 1); + phy_set_bb_reg(adapter, 0x914, bMaskByte1, 2); } /* Default Ant Setting when no fast training */ @@ -156,7 +132,7 @@ static void dm_fast_training_init(struct odm_dm_struct *dm_odm) phy_set_bb_reg(adapter, 0x864, BIT(8) | BIT(7) | BIT(6), 1); /* Enter Traing state */ - phy_set_bb_reg(adapter, 0x864, BIT(2) | BIT(1) | BIT(0), (AntCombination-1)); + phy_set_bb_reg(adapter, 0x864, BIT(2) | BIT(1) | BIT(0), 1); phy_set_bb_reg(adapter, 0xc50, BIT(7), 1); } -- 2.19.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: rtl8188eu: add spaces around operators in odm_rtl8188e.c
Add spaces around '|', '>>' and '/' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/odm_rtl8188e.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm_rtl8188e.c b/drivers/staging/rtl8188eu/hal/odm_rtl8188e.c index 3430796d56a3..251bd8aba3b1 100644 --- a/drivers/staging/rtl8188eu/hal/odm_rtl8188e.c +++ b/drivers/staging/rtl8188eu/hal/odm_rtl8188e.c @@ -23,7 +23,7 @@ static void dm_rx_hw_antena_div_init(struct odm_dm_struct *dm_odm) /* MAC Setting */ value32 = phy_query_bb_reg(adapter, ODM_REG_ANTSEL_PIN_11N, bMaskDWord); phy_set_bb_reg(adapter, ODM_REG_ANTSEL_PIN_11N, bMaskDWord, - value32|(BIT(23) | BIT(25))); + value32 | (BIT(23) | BIT(25))); /* Pin Settings */ phy_set_bb_reg(adapter, ODM_REG_PIN_CTRL_11N, BIT(9) | BIT(8), 0); phy_set_bb_reg(adapter, ODM_REG_RX_ANT_CTRL_11N, BIT(10), 0); @@ -55,7 +55,7 @@ static void dm_trx_hw_antenna_div_init(struct odm_dm_struct *dm_odm) /* MAC Setting */ value32 = phy_query_bb_reg(adapter, ODM_REG_ANTSEL_PIN_11N, bMaskDWord); phy_set_bb_reg(adapter, ODM_REG_ANTSEL_PIN_11N, bMaskDWord, - value32|(BIT(23) | BIT(25))); + value32 | (BIT(23) | BIT(25))); /* Pin Settings */ phy_set_bb_reg(adapter, ODM_REG_PIN_CTRL_11N, BIT(9) | BIT(8), 0); phy_set_bb_reg(adapter, ODM_REG_RX_ANT_CTRL_11N, BIT(10), 0); @@ -103,9 +103,11 @@ static void dm_fast_training_init(struct odm_dm_struct *dm_odm) /* MAC Setting */ value32 = phy_query_bb_reg(adapter, 0x4c, bMaskDWord); - phy_set_bb_reg(adapter, 0x4c, bMaskDWord, value32|(BIT(23) | BIT(25))); + phy_set_bb_reg(adapter, 0x4c, bMaskDWord, + value32 | (BIT(23) | BIT(25))); value32 = phy_query_bb_reg(adapter, 0x7B4, bMaskDWord); - phy_set_bb_reg(adapter, 0x7b4, bMaskDWord, value32|(BIT(16) | BIT(17))); + phy_set_bb_reg(adapter, 0x7b4, bMaskDWord, + value32 | (BIT(16) | BIT(17))); /* Match MAC ADDR */ phy_set_bb_reg(adapter, 0x7b4, 0x, 0); @@ -194,8 +196,8 @@ static void update_tx_ant_88eu(struct odm_dm_struct *dm_odm, u8 ant, u32 mac_id) else target_ant = AUX_ANT_CG_TRX; dm_fat_tbl->antsel_a[mac_id] = target_ant & BIT(0); - dm_fat_tbl->antsel_b[mac_id] = (target_ant & BIT(1))>>1; - dm_fat_tbl->antsel_c[mac_id] = (target_ant & BIT(2))>>2; + dm_fat_tbl->antsel_b[mac_id] = (target_ant & BIT(1)) >> 1; + dm_fat_tbl->antsel_c[mac_id] = (target_ant & BIT(2)) >> 2; } void rtl88eu_dm_set_tx_ant_by_tx_info(struct odm_dm_struct *dm_odm, @@ -250,9 +252,11 @@ static void rtl88eu_dm_hw_ant_div(struct odm_dm_struct *dm_odm) if (IS_STA_VALID(entry)) { /* 2 Calculate RSSI per Antenna */ main_rssi = (dm_fat_tbl->MainAnt_Cnt[i] != 0) ? - (dm_fat_tbl->MainAnt_Sum[i]/dm_fat_tbl->MainAnt_Cnt[i]) : 0; +(dm_fat_tbl->MainAnt_Sum[i] / + dm_fat_tbl->MainAnt_Cnt[i]) : 0; aux_rssi = (dm_fat_tbl->AuxAnt_Cnt[i] != 0) ? - (dm_fat_tbl->AuxAnt_Sum[i]/dm_fat_tbl->AuxAnt_Cnt[i]) : 0; + (dm_fat_tbl->AuxAnt_Sum[i] / +dm_fat_tbl->AuxAnt_Cnt[i]) : 0; target_ant = (main_rssi >= aux_rssi) ? MAIN_ANT : AUX_ANT; /* 2 Select max_rssi for DIG */ local_max_rssi = max(main_rssi, aux_rssi); -- 2.19.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/7] staging: vc04_services: Some dead code removal
Hi Tuomas, > Tuomas Tynkkynen hat am 4. Oktober 2018 um 11:37 > geschrieben: > > > Drop various pieces of dead code from here and there to get rid of > the remaining users of VCHI_CONNECTION_T. After that we get to drop > entire header files worth of unused code. > > I've tested on a Raspberry Pi Model B (bcm2835_defconfig) that > snd-bcm2835 can still play analog audio just fine. > thanks and i'm fine with your patch series: Acked-by: Stefan Wahren Unfortunately this would break compilation of the downstream vchi drivers like vcsm [1]. Personally i don't want to maintain another one, because i cannot see the gain of the resulting effort. [1] - https://github.com/raspberrypi/linux/tree/rpi-4.14.y/drivers/char/broadcom/vc_sm ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH resend 00/15] staging: vboxvideo: Convert to atomic modesetting API
Hi, On 05-10-18 18:01, Daniel Vetter wrote: On Mon, Oct 01, 2018 at 11:20:04AM +0200, Hans de Goede wrote: Hi, On 01-10-18 09:25, Dan Carpenter wrote: Why are you resending this? It's because you added some more patches on the end? Just send those as a new series... I accidentally numbered the cover-letter of the original series 01/15 instea dof 00/15 this confused Greg, so he asked for a resend. Nothing is changed in the resend, otherwise I would have made the series a v2 and not a resend. I'm assuming this all lands for 4.20/5.0, Yes Greg has the entire series queued up in staging-next. Regards, Hans ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg
On Wed 12 Sep 08:08 PDT 2018, Arnd Bergmann wrote: [..] > diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c > index a76b963a7e50..02aefb2b2d47 100644 > --- a/drivers/rpmsg/rpmsg_char.c > +++ b/drivers/rpmsg/rpmsg_char.c > @@ -285,7 +285,7 @@ static const struct file_operations rpmsg_eptdev_fops = { > .write = rpmsg_eptdev_write, > .poll = rpmsg_eptdev_poll, > .unlocked_ioctl = rpmsg_eptdev_ioctl, > - .compat_ioctl = rpmsg_eptdev_ioctl, > + .compat_ioctl = generic_compat_ioctl_ptrarg, > }; > > static ssize_t name_show(struct device *dev, struct device_attribute *attr, > @@ -446,7 +446,7 @@ static const struct file_operations rpmsg_ctrldev_fops = { > .open = rpmsg_ctrldev_open, > .release = rpmsg_ctrldev_release, > .unlocked_ioctl = rpmsg_ctrldev_ioctl, > - .compat_ioctl = rpmsg_ctrldev_ioctl, > + .compat_ioctl = generic_compat_ioctl_ptrarg, > }; > For rpmsg part Acked-by: Bjorn Andersson Regards, Bjorn ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] STAGING/EMXX_UDC: Fixed all meaningful sparse errors.
Fixed all meaningful sparse errors: 1. Added static to udc_controller 2. Added mising __iomem modifier to handle p_regs 3. Added missing le16_to_cpu Signed-off-by: Tamir Carmeli --- drivers/staging/emxx_udc/emxx_udc.c | 69 +++-- drivers/staging/emxx_udc/emxx_udc.h | 2 +- 3 files changed, 38 insertions(+), 35 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index 3e51476..83eb430 100644 --- a/drivers/staging/emxx_udc/emxx_udc.c +++ b/drivers/staging/emxx_udc/emxx_udc.c @@ -56,25 +56,25 @@ static void _nbu2ss_fifo_flush(struct nbu2ss_udc *, struct nbu2ss_ep *); /*===*/ /* Global */ -struct nbu2ss_udc udc_controller; +static struct nbu2ss_udc udc_controller; /*-*/ /* Read */ -static inline u32 _nbu2ss_readl(void *address) +static inline u32 _nbu2ss_readl(void __iomem *address) { return __raw_readl(address); } /*-*/ /* Write */ -static inline void _nbu2ss_writel(void *address, u32 udata) +static inline void _nbu2ss_writel(void __iomem *address, u32 udata) { __raw_writel(udata, address); } /*-*/ /* Set Bit */ -static inline void _nbu2ss_bitset(void *address, u32 udata) +static inline void _nbu2ss_bitset(void __iomem *address, u32 udata) { u32 reg_dt = __raw_readl(address) | (udata); @@ -83,7 +83,7 @@ static inline void _nbu2ss_bitset(void *address, u32 udata) /*-*/ /* Clear Bit */ -static inline void _nbu2ss_bitclr(void *address, u32 udata) +static inline void _nbu2ss_bitclr(void __iomem *address, u32 udata) { u32 reg_dt = __raw_readl(address) & ~(udata); @@ -135,6 +135,7 @@ static void _nbu2ss_ep0_complete(struct usb_ep *_ep, struct usb_request *_req) { u8 recipient; u16 selector; + u16 wIndex; u32 test_mode; struct usb_ctrlrequest *p_ctrl; struct nbu2ss_udc *udc; @@ -149,10 +150,11 @@ static void _nbu2ss_ep0_complete(struct usb_ep *_ep, struct usb_request *_req) /*-*/ /* SET_FEATURE */ recipient = (u8)(p_ctrl->bRequestType & USB_RECIP_MASK); - selector = p_ctrl->wValue; + selector = le16_to_cpu(p_ctrl->wValue); if ((recipient == USB_RECIP_DEVICE) && (selector == USB_DEVICE_TEST_MODE)) { - test_mode = (u32)(p_ctrl->wIndex >> 8); + wIndex = le16_to_cpu(p_ctrl->wIndex); + test_mode = (u32)(wIndex >> 8); _nbu2ss_set_test_mode(udc, test_mode); } } @@ -184,7 +186,7 @@ static u32 _nbu2ss_get_begin_ram_address(struct nbu2ss_udc *udc) u32 num, buf_type; u32 data, last_ram_adr, use_ram_size; - struct ep_regs *p_ep_regs; + struct ep_regs __iomem *p_ep_regs; last_ram_adr = (D_RAM_SIZE_CTRL / sizeof(u32)) * 2; use_ram_size = 0; @@ -377,7 +379,7 @@ static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep) { u32 num; u32 data; - struct fc_regs *preg = udc->p_regs; + struct fc_regs __iomem *preg = udc->p_regs; if (udc->vbus_active == 0) return; /* VBUS OFF */ @@ -408,7 +410,7 @@ static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep) /* Abort DMA */ static void _nbu2ss_ep_dma_abort(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep) { - struct fc_regs *preg = udc->p_regs; + struct fc_regs __iomem *preg = udc->p_regs; _nbu2ss_bitclr(>EP_DCR[ep->epnum - 1].EP_DCR1, DCR1_EPN_REQEN); mdelay(DMA_DISABLE_TIME); /* DCR1_EPN_REQEN Clear */ @@ -426,7 +428,7 @@ static void _nbu2ss_ep_in_end( { u32 data; u32 num; - struct fc_regs *preg = udc->p_regs; + struct fc_regs __iomem *preg = udc->p_regs; if (length >= sizeof(u32)) return; @@ -817,7 +819,7 @@ static int _nbu2ss_out_dma( u32 burst = 1; u32 data; int result = -EINVAL; - struct fc_regs *preg = udc->p_regs; + struct fc_regs __iomem *preg = udc->p_regs; if (req->dma_flag) return 1; /* DMA is forwarded */ @@ -880,7 +882,7 @@ static int _nbu2ss_epn_out_pio( union
Re: [PATCH] staging/rtlwifi: Fixing formatting warnings from checkpatch.pl.
On Fri, 2018-10-05 at 16:58 -0600, Scott Tracy wrote: > Fixing formatting warnings in rtlwifi found by checkpatch.pl > Changes include breaking up functions calls into multi line calls. > No functional/logical changes. I believe the code is better before most of these changes. There are various tradeoffs do source code formatting. Here you are changing some alignment to open parentheses and converting to < 80 columns. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel