Re: [PATCH 1/3] staging: qlge: Remove multi-line dereferences from qlge_main.c
On Tue, Apr 28, 2020 at 09:31:10PM -0700, Joe Perches wrote: > On Wed, 2020-04-29 at 00:04 -0400, Rylan Dmello wrote: > > Fix checkpatch.pl warnings: > > > > WARNING: Avoid multiple line dereference - prefer 'qdev->func' > > WARNING: Avoid multiple line dereference - prefer 'qdev->flags' > > Assuming you are doing this for exercise: > > It'd be better to unindent all the switch/case > blocks for the entire function so more functions > fit on single lines > > switch (foo) { > case bar: > { > ...; > > should be: > > switch (foo) { > case bar: { > ...; > > goto exit; might as well be break; and remove > the exit label too. > Thank you - I noticed that clang-format unindented the switch-case blocks, but wasn't sure whether to include that in this patch set or not. I will send a V2 patch that unindents these switch-case blocks throughout the two functions listed here, and also removes the exit label from this function. > > Signed-off-by: Rylan Dmello > > --- > > drivers/staging/qlge/qlge_main.c | 9 - > > 1 file changed, 4 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/staging/qlge/qlge_main.c > > b/drivers/staging/qlge/qlge_main.c > > index d7e4dfafc1a3..10daae025790 100644 > > --- a/drivers/staging/qlge/qlge_main.c > > +++ b/drivers/staging/qlge/qlge_main.c > > @@ -396,8 +396,7 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, > > u8 *addr, u32 type, > > * the route field to NIC core. > > */ > > cam_output = (CAM_OUT_ROUTE_NIC | > > - (qdev-> > > - func << CAM_OUT_FUNC_SHIFT) | > > + (qdev->func << CAM_OUT_FUNC_SHIFT) | > > (0 << CAM_OUT_CQ_ID_SHIFT)); > > if (qdev->ndev->features & NETIF_F_HW_VLAN_CTAG_RX) > > cam_output |= CAM_OUT_RV; > > @@ -3432,9 +3431,9 @@ static int ql_request_irq(struct ql_adapter *qdev) > > >rx_ring[0]); > > status = > > request_irq(pdev->irq, qlge_isr, > > - test_bit(QL_MSI_ENABLED, > > -> > > -flags) ? 0 : IRQF_SHARED, > > + test_bit(QL_MSI_ENABLED, >flags) > > + ? 0 > > + : IRQF_SHARED, > > intr_context->name, >rx_ring[0]); > > if (status) > > goto err_irq; > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH RESEND] MAINTAINERS: remove entry after hp100 driver removal
Commit a10079c66290 ("staging: remove hp100 driver") removed all files from ./drivers/staging/hp/, but missed to adjust MAINTAINERS. Since then, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: drivers/staging/hp/hp100.* So, drop HP100 Driver entry in MAINTAINERS now. Signed-off-by: Lukas Bulwahn --- Greg, here is a minor non-urgent patch for staging. applies cleanly on v5.7-rc3, current master and next-20200428 MAINTAINERS | 5 - 1 file changed, 5 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 26f281d9f32a..41e2b577488f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7746,11 +7746,6 @@ L: platform-driver-...@vger.kernel.org S: Orphan F: drivers/platform/x86/tc1100-wmi.c -HP100: Driver for HP 10/100 Mbit/s Voice Grade Network Adapter Series -M: Jaroslav Kysela -S: Obsolete -F: drivers/staging/hp/hp100.* - HPET: High Precision Event Timers driver M: Clemens Ladisch S: Maintained -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/3] staging: qlge: Remove multi-line dereferences from qlge_main.c
Fix checkpatch.pl warnings: WARNING: Avoid multiple line dereference - prefer 'qdev->func' WARNING: Avoid multiple line dereference - prefer 'qdev->flags' Signed-off-by: Rylan Dmello --- drivers/staging/qlge/qlge_main.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index d7e4dfafc1a3..10daae025790 100644 --- a/drivers/staging/qlge/qlge_main.c +++ b/drivers/staging/qlge/qlge_main.c @@ -396,8 +396,7 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, u8 *addr, u32 type, * the route field to NIC core. */ cam_output = (CAM_OUT_ROUTE_NIC | - (qdev-> - func << CAM_OUT_FUNC_SHIFT) | + (qdev->func << CAM_OUT_FUNC_SHIFT) | (0 << CAM_OUT_CQ_ID_SHIFT)); if (qdev->ndev->features & NETIF_F_HW_VLAN_CTAG_RX) cam_output |= CAM_OUT_RV; @@ -3432,9 +3431,9 @@ static int ql_request_irq(struct ql_adapter *qdev) >rx_ring[0]); status = request_irq(pdev->irq, qlge_isr, - test_bit(QL_MSI_ENABLED, -> -flags) ? 0 : IRQF_SHARED, + test_bit(QL_MSI_ENABLED, >flags) + ? 0 + : IRQF_SHARED, intr_context->name, >rx_ring[0]); if (status) goto err_irq; -- 2.26.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/3] staging: qlge: Fix suspect indentation warning in qlge_main.c
Fix checkpatch.pl warning: WARNING: suspect code indent for conditional statements (16, 23) Signed-off-by: Rylan Dmello --- drivers/staging/qlge/qlge_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index 10daae025790..0edeea525fef 100644 --- a/drivers/staging/qlge/qlge_main.c +++ b/drivers/staging/qlge/qlge_main.c @@ -4436,7 +4436,8 @@ static int ql_init_device(struct pci_dev *pdev, struct net_device *ndev, } else { err = dma_set_mask(>dev, DMA_BIT_MASK(32)); if (!err) - err = dma_set_coherent_mask(>dev, DMA_BIT_MASK(32)); + err = dma_set_coherent_mask(>dev, + DMA_BIT_MASK(32)); } if (err) { -- 2.26.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/3] staging: qlge: Fix function argument alignment warning in qlge_main.c
Fix checkpatch.pl check: CHECK: Alignment should match open parenthesis Signed-off-by: Rylan Dmello --- drivers/staging/qlge/qlge_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index 0edeea525fef..c493da03e45f 100644 --- a/drivers/staging/qlge/qlge_main.c +++ b/drivers/staging/qlge/qlge_main.c @@ -4450,7 +4450,7 @@ static int ql_init_device(struct pci_dev *pdev, struct net_device *ndev, pci_save_state(pdev); qdev->reg_base = ioremap(pci_resource_start(pdev, 1), - pci_resource_len(pdev, 1)); + pci_resource_len(pdev, 1)); if (!qdev->reg_base) { dev_err(>dev, "Register mapping failed.\n"); err = -ENOMEM; @@ -4460,7 +4460,7 @@ static int ql_init_device(struct pci_dev *pdev, struct net_device *ndev, qdev->doorbell_area_size = pci_resource_len(pdev, 3); qdev->doorbell_area = ioremap(pci_resource_start(pdev, 3), - pci_resource_len(pdev, 3)); + pci_resource_len(pdev, 3)); if (!qdev->doorbell_area) { dev_err(>dev, "Doorbell register mapping failed.\n"); err = -ENOMEM; -- 2.26.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[driver-core:debugfs_cleanup] BUILD SUCCESS 2754c1b2291245ccfd27cce0c7a50d40a155d8ed
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git debugfs_cleanup branch HEAD: 2754c1b2291245ccfd27cce0c7a50d40a155d8ed debugfs: remove return value of debugfs_create_devm_seqfile() elapsed time: 544m configs tested: 158 configs skipped: 0 The following configs have been built successfully. More configs may be tested in the coming days. arm efm32_defconfig arm at91_dt_defconfig armshmobile_defconfig arm64 defconfig arm exynos_defconfig armmulti_v5_defconfig arm sunxi_defconfig armmulti_v7_defconfig arm64allyesconfig arm allyesconfig arm64allmodconfig arm allmodconfig arm64 allnoconfig arm allnoconfig sparcallyesconfig h8300 h8s-sim_defconfig mips ip32_defconfig powerpcadder875_defconfig openriscor1ksim_defconfig riscv defconfig i386 allnoconfig arc defconfig um i386_defconfig um defconfig i386 allyesconfig i386 alldefconfig i386defconfig i386 debian-10.3 ia64 allmodconfig ia64defconfig ia64 allnoconfig ia64generic_defconfig ia64 bigsur_defconfig ia64 allyesconfig ia64 alldefconfig ia64 tiger_defconfig m68k m5475evb_defconfig m68k allmodconfig m68k bvme6000_defconfig m68k sun3_defconfig m68k multi_defconfig nios2 3c120_defconfig nios2 10m50_defconfig c6xevmc6678_defconfig xtensa iss_defconfig c6x allyesconfig xtensa common_defconfig openrisc simple_smp_defconfig nds32 defconfig nds32 allnoconfig cskydefconfig alpha defconfig h8300 edosk2674_defconfig h8300h8300h-sim_defconfig arc allyesconfig powerpc defconfig powerpc ppc64_defconfig powerpc rhel-kconfig microblaze mmu_defconfig microblazenommu_defconfig powerpc allnoconfig mips fuloong2e_defconfig mips malta_kvm_defconfig mipsar7_defconfig mips allyesconfig mips 64r6el_defconfig mips allnoconfig mips 32r2_defconfig mips allmodconfig mipsmalta_kvm_guest_defconfig mips tb0287_defconfig mips capcella_defconfig mips decstation_64_defconfig mips loongson3_defconfig mips ath79_defconfig mipsbcm63xx_defconfig pariscallnoconfig pariscgeneric-64bit_defconfig pariscgeneric-32bit_defconfig parisc allyesconfig parisc allmodconfig powerpc mpc866_ads_defconfig powerpcamigaone_defconfig powerpc ep8248e_defconfig powerpc g5_defconfig powerpc mpc512x_defconfig powerpc chrp32_defconfig powerpc holly_defconfig parisc randconfig-a001-20200428 m68k randconfig-a001-20200428 alpharandconfig-a001-20200428 nds32randconfig-a001-20200428 riscvrandconfig-a001-20200428 nios2randconfig-a001-20200428 h8300randconfig-a001-20200428 c6x randconfig-a001-20200428 sparc64 randconfig-a001-20200428 microblaze randconfig-a001-20200428 sh randconfig-a001-20200428 csky randconfig-a001-20200428 s390
Re: [PATCH v8 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver
On Mon, Apr 27, 2020 at 2:18 PM Xin Ji wrote: > > The ANX7625 is an ultra-low power 4K Mobile HD Transmitter designed > for portable device. It converts MIPI DSI/DPI to DisplayPort 1.3 4K. > > The ANX7625 can support both USB Type-C PD feature and MIPI DSI/DPI > to DP feature. This driver only enabled MIPI DSI/DPI to DP feature. > > Signed-off-by: Xin Ji > --- > drivers/gpu/drm/bridge/Makefile |2 +- > drivers/gpu/drm/bridge/analogix/Kconfig |6 + > drivers/gpu/drm/bridge/analogix/Makefile |1 + > drivers/gpu/drm/bridge/analogix/anx7625.c | 2158 > + > drivers/gpu/drm/bridge/analogix/anx7625.h | 410 ++ > 5 files changed, 2576 insertions(+), 1 deletion(-) > create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.c > create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.h > > diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile > index 4934fcf..bcd388a 100644 > --- a/drivers/gpu/drm/bridge/Makefile > +++ b/drivers/gpu/drm/bridge/Makefile > @@ -12,8 +12,8 @@ obj-$(CONFIG_DRM_SII9234) += sii9234.o > obj-$(CONFIG_DRM_THINE_THC63LVD1024) += thc63lvd1024.o > obj-$(CONFIG_DRM_TOSHIBA_TC358764) += tc358764.o > obj-$(CONFIG_DRM_TOSHIBA_TC358767) += tc358767.o > -obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix/ > obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511/ > obj-$(CONFIG_DRM_TI_SN65DSI86) += ti-sn65dsi86.o > obj-$(CONFIG_DRM_TI_TFP410) += ti-tfp410.o > +obj-y += analogix/ > obj-y += synopsys/ > diff --git a/drivers/gpu/drm/bridge/analogix/Kconfig > b/drivers/gpu/drm/bridge/analogix/Kconfig > index e930ff9..b2f127e 100644 > --- a/drivers/gpu/drm/bridge/analogix/Kconfig > +++ b/drivers/gpu/drm/bridge/analogix/Kconfig > @@ -2,3 +2,9 @@ > config DRM_ANALOGIX_DP > tristate > depends on DRM > + > +config ANALOGIX_ANX7625 > + tristate "Analogix MIPI to DP interface support" > + help > + ANX7625 is an ultra-low power 4K mobile HD transmitter > designed > + for portable devices. It converts MIPI/DPI to DisplayPort1.3 > 4K. > diff --git a/drivers/gpu/drm/bridge/analogix/Makefile > b/drivers/gpu/drm/bridge/analogix/Makefile > index fdbf3fd..8a52867 100644 > --- a/drivers/gpu/drm/bridge/analogix/Makefile > +++ b/drivers/gpu/drm/bridge/analogix/Makefile > @@ -1,3 +1,4 @@ > # SPDX-License-Identifier: GPL-2.0-only > +obj-$(CONFIG_ANALOGIX_ANX7625) += anx7625.o > analogix_dp-objs := analogix_dp_core.o analogix_dp_reg.o > obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix_dp.o > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c > b/drivers/gpu/drm/bridge/analogix/anx7625.c > new file mode 100644 > index 000..fff7a49 > [snip] > +static int anx7625_attach_dsi(struct anx7625_data *ctx) > +{ > + struct mipi_dsi_host *host; > + struct mipi_dsi_device *dsi; > + struct device_node *mipi_host_node; > + struct device *dev = >client->dev; > + const struct mipi_dsi_device_info info = { > + .type = "anx7625", > + .channel = 0, > + .node = NULL, > + }; > + > + DRM_DEV_DEBUG_DRIVER(dev, "attach dsi\n"); > + > + if (ctx->pdata.dsi_supported) > + mipi_host_node = ctx->pdata.node.mipi_dsi_host_node; > + else > + mipi_host_node = ctx->pdata.node.mipi_dpi_host_node; > + > + if (!mipi_host_node) { > + DRM_ERROR("dsi host is not configured.\n"); > + return -EINVAL; > + } > + > + host = of_find_mipi_dsi_host_by_node(mipi_host_node); I tried this driver when connected to a dpi interface, and this fails, as of_find_mipi_dsi_host_by_node is not able to find the dpi interface from the SoC. I'm not too familiar with how dpi bridges are supposed to work in the kernel, but should we even call "anx7625_attach_dsi" for DPI interface? > + if (!host) { > + DRM_ERROR("failed to find dsi host.\n"); > + return -EINVAL; > + } > + > + dsi = mipi_dsi_device_register_full(host, ); > + if (IS_ERR(dsi)) { > + DRM_ERROR("failed to create dsi device.\n"); > + return -EINVAL; > + } > + > + dsi->lanes = 4; > + dsi->format = MIPI_DSI_FMT_RGB888; > + dsi->mode_flags = MIPI_DSI_MODE_VIDEO | > + MIPI_DSI_MODE_VIDEO_SYNC_PULSE | > + MIPI_DSI_MODE_EOT_PACKET| > + MIPI_DSI_MODE_VIDEO_HSE; > + > + if (mipi_dsi_attach(dsi) < 0) { > + DRM_ERROR("failed to attach dsi to host.\n"); > + mipi_dsi_device_unregister(dsi); > + return -EINVAL; > + } > + > + ctx->dsi = dsi; > + > + DRM_DEV_DEBUG_DRIVER(dev, "attach dsi succeeded.\n"); > + > + return 0; > +} > + > [snip] > +static int anx7625_bridge_attach(struct drm_bridge *bridge) > +{ > + struct anx7625_data *ctx = bridge_to_anx7625(bridge); > + int err; > + struct device
[driver-core:driver-core-linus] BUILD SUCCESS 35a672363ab3e8dfe4ebcadb4dd0b2d06bb85ebe
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver-core-linus branch HEAD: 35a672363ab3e8dfe4ebcadb4dd0b2d06bb85ebe driver core: Ensure wait_for_device_probe() waits until the deferred_probe_timeout fires elapsed time: 486m configs tested: 161 configs skipped: 0 The following configs have been built successfully. More configs may be tested in the coming days. arm64allyesconfig arm allyesconfig arm allmodconfig arm64 allnoconfig arm allnoconfig arm efm32_defconfig arm at91_dt_defconfig armshmobile_defconfig arm64 defconfig arm exynos_defconfig armmulti_v5_defconfig arm sunxi_defconfig armmulti_v7_defconfig arm64allmodconfig sparcallyesconfig um i386_defconfig m68k allmodconfig mips capcella_defconfig microblaze mmu_defconfig ia64defconfig mips allyesconfig h8300h8300h-sim_defconfig i386 allyesconfig ia64 allnoconfig i386 allnoconfig i386 alldefconfig i386defconfig i386 debian-10.3 ia64 allmodconfig ia64generic_defconfig ia64 tiger_defconfig ia64 bigsur_defconfig ia64 allyesconfig ia64 alldefconfig nios2 3c120_defconfig nios2 10m50_defconfig c6xevmc6678_defconfig xtensa iss_defconfig c6x allyesconfig xtensa common_defconfig openrisc simple_smp_defconfig openriscor1ksim_defconfig nds32 defconfig nds32 allnoconfig cskydefconfig alpha defconfig h8300 h8s-sim_defconfig h8300 edosk2674_defconfig m68k m5475evb_defconfig m68k sun3_defconfig m68k multi_defconfig arc defconfig arc allyesconfig powerpc defconfig powerpc ppc64_defconfig powerpc rhel-kconfig microblazenommu_defconfig powerpc allnoconfig mips fuloong2e_defconfig mips malta_kvm_defconfig mipsar7_defconfig mips 64r6el_defconfig mips allnoconfig mips 32r2_defconfig mips allmodconfig mipsmalta_kvm_guest_defconfig mips tb0287_defconfig mips ip32_defconfig mips decstation_64_defconfig mips loongson3_defconfig mips ath79_defconfig mipsbcm63xx_defconfig pariscallnoconfig pariscgeneric-64bit_defconfig pariscgeneric-32bit_defconfig parisc allyesconfig parisc allmodconfig parisc randconfig-a001-20200428 m68k randconfig-a001-20200428 alpharandconfig-a001-20200428 nds32randconfig-a001-20200428 riscvrandconfig-a001-20200428 nios2randconfig-a001-20200428 h8300randconfig-a001-20200428 c6x randconfig-a001-20200428 sparc64 randconfig-a001-20200428 microblaze randconfig-a001-20200428 sh randconfig-a001-20200428 csky randconfig-a001-20200428 s390 randconfig-a001-20200428 xtensa randconfig-a001-20200428 openrisc randconfig-a001-20200428 i386 randconfig-c002-20200428 i386 randconfig-c001-20200428 x86_64 randconfig-c001-20200428 i386 randconfig-c003-20200428 x86_64 randconfig-c003-20200428 x86_64 randconfig-d001-20200428 i386 randconfig-d002-20200428 i386 randconfig
Re: [PATCH] staging: media: imx: no need to check return value of debugfs_create functions
Hi Greg, Thanks for the cleanup. On Tue, Apr 28, 2020 at 07:04:05PM +0200, Greg Kroah-Hartman wrote: > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic should > never do something different based on this. > > Cc: Rui Miguel Silva > Cc: Steve Longerbeam > Cc: Philipp Zabel > Cc: Mauro Carvalho Chehab > Cc: Greg Kroah-Hartman > Cc: Shawn Guo > Cc: Sascha Hauer > Cc: Pengutronix Kernel Team > Cc: Fabio Estevam > Cc: NXP Linux Team > Cc: linux-me...@vger.kernel.org > Cc: de...@driverdev.osuosl.org > Signed-off-by: Greg Kroah-Hartman Reviewed-by: Rui Miguel Silva Cheers, Rui > --- > drivers/staging/media/imx/imx7-mipi-csis.c | 29 -- > 1 file changed, 5 insertions(+), 24 deletions(-) > > diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c > b/drivers/staging/media/imx/imx7-mipi-csis.c > index fbc1a924652a..d7c9e7343f1f 100644 > --- a/drivers/staging/media/imx/imx7-mipi-csis.c > +++ b/drivers/staging/media/imx/imx7-mipi-csis.c > @@ -915,33 +915,14 @@ static int mipi_csis_dump_regs_show(struct seq_file *m, > void *private) > } > DEFINE_SHOW_ATTRIBUTE(mipi_csis_dump_regs); > > -static int mipi_csis_debugfs_init(struct csi_state *state) > +static void mipi_csis_debugfs_init(struct csi_state *state) > { > - struct dentry *d; > - > - if (!debugfs_initialized()) > - return -ENODEV; > - > state->debugfs_root = debugfs_create_dir(dev_name(state->dev), NULL); > - if (!state->debugfs_root) > - return -ENOMEM; > - > - d = debugfs_create_bool("debug_enable", 0600, state->debugfs_root, > - >debug); > - if (!d) > - goto remove_debugfs; > - > - d = debugfs_create_file("dump_regs", 0600, state->debugfs_root, > - state, _csis_dump_regs_fops); > - if (!d) > - goto remove_debugfs; > - > - return 0; > - > -remove_debugfs: > - debugfs_remove_recursive(state->debugfs_root); > > - return -ENOMEM; > + debugfs_create_bool("debug_enable", 0600, state->debugfs_root, > + >debug); > + debugfs_create_file("dump_regs", 0600, state->debugfs_root, state, > + _csis_dump_regs_fops); > } > > static void mipi_csis_debugfs_exit(struct csi_state *state) > -- > 2.26.2 > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[staging:staging-testing] BUILD SUCCESS d97a9d7aea04574959178557fa4c34efed64655a
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing branch HEAD: d97a9d7aea04574959178557fa4c34efed64655a staging/speakup: Add inflection synth parameter elapsed time: 480m configs tested: 163 configs skipped: 0 The following configs have been built successfully. More configs may be tested in the coming days. arm64allyesconfig arm allyesconfig arm64allmodconfig arm allmodconfig arm64 allnoconfig arm allnoconfig arm efm32_defconfig arm at91_dt_defconfig armshmobile_defconfig arm64 defconfig arm exynos_defconfig armmulti_v5_defconfig arm sunxi_defconfig armmulti_v7_defconfig sparcallyesconfig cskydefconfig sparc64 allyesconfig um i386_defconfig m68k allmodconfig sparc64 allmodconfig mips tb0287_defconfig ia64 allmodconfig microblaze mmu_defconfig i386 allnoconfig i386 allyesconfig i386 alldefconfig i386defconfig i386 debian-10.3 ia64defconfig ia64 allnoconfig ia64generic_defconfig ia64 tiger_defconfig ia64 bigsur_defconfig ia64 allyesconfig ia64 alldefconfig nios2 3c120_defconfig nios2 10m50_defconfig c6xevmc6678_defconfig xtensa iss_defconfig c6x allyesconfig xtensa common_defconfig openrisc simple_smp_defconfig openriscor1ksim_defconfig nds32 defconfig nds32 allnoconfig alpha defconfig h8300 h8s-sim_defconfig h8300 edosk2674_defconfig m68k m5475evb_defconfig h8300h8300h-sim_defconfig m68k sun3_defconfig m68k multi_defconfig arc defconfig arc allyesconfig powerpc defconfig powerpc ppc64_defconfig powerpc rhel-kconfig microblazenommu_defconfig powerpc allnoconfig mips fuloong2e_defconfig mips malta_kvm_defconfig mipsar7_defconfig mips allyesconfig mips 64r6el_defconfig mips allnoconfig mips 32r2_defconfig mips allmodconfig mipsmalta_kvm_guest_defconfig mips capcella_defconfig mips ip32_defconfig mips decstation_64_defconfig mips loongson3_defconfig mips ath79_defconfig mipsbcm63xx_defconfig pariscallnoconfig pariscgeneric-64bit_defconfig pariscgeneric-32bit_defconfig parisc allyesconfig parisc allmodconfig parisc randconfig-a001-20200428 m68k randconfig-a001-20200428 alpharandconfig-a001-20200428 nds32randconfig-a001-20200428 riscvrandconfig-a001-20200428 nios2randconfig-a001-20200428 h8300randconfig-a001-20200428 c6x randconfig-a001-20200428 sparc64 randconfig-a001-20200428 microblaze randconfig-a001-20200428 sh randconfig-a001-20200428 csky randconfig-a001-20200428 s390 randconfig-a001-20200428 xtensa randconfig-a001-20200428 openrisc randconfig-a001-20200428 x86_64 randconfig-a001-20200428 i386 randconfig-a003-20200428 x86_64 randconfig-a003-20200428 i386 randconfig-a002-20200428 i386 randconfig-a001-20200428 x86_64 randconfig-a002-20200428 i386 randconfig
Re: [PATCH v4] staging: wfx: cleanup long lines in data_tx.c
On Mon, Apr 27, 2020 at 05:28:27PM +0530, Suraj Upadhyay wrote: > On Mon, Apr 27, 2020 at 11:50:23AM +, Jerome Pouiller wrote: > > On Saturday 25 April 2020 13:32:34 CEST Suraj Upadhyay wrote: > > > Break lines with length over 80 characters to > > > conform to the linux coding style and refactor > > > wherever necessary. > > > > > > Signed-off-by: Suraj Upadhyay > > > --- > > > > > > Changes in v4: > > > - Added a space after declaration in wfx_get_hw_rate(). > > > - A checkpatch warning for this commit is retained at line 75, > > > to maintain uniformity in function declarations. (Reviewer > > > jerome suggested). > > > > > > Changes in v3: > > > - Changed the temporary variable name for the memzcmp statement > > > to is_used. (as suggested). > > > - Added a temporary ieee80211_supported_band variable to address > > > the problem in wfx_get_hw_rate() more efficiently. (not > > > suggested, but still). > > > > > > Changes in v2: > > > - Introduced a temporary variable for the memzcmp statement. > > > - Addressed the checkpatch problem with wfx_get_hw_rate(). > > > - Restored the function definition of wfx_tx_get_tx_parms > > > as suggested by the reviewer. > > > - Added suggested changes for req->packet_id statement. > > > > > > drivers/staging/wfx/data_tx.c | 40 +++ > > > 1 file changed, 26 insertions(+), 14 deletions(-) > > > > This patch does not contain the suggestions from Dan. However, it is > > sufficient from my personal point of view. > > Yes, I considered them but thought it would be bad to introduce a new > variable at every iteration of the for-loop. > It's not bad at all. I don't know why someone would think that. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4] staging: wfx: cleanup long lines in data_tx.c
On Mon, Apr 27, 2020 at 11:50:23AM +, Jerome Pouiller wrote: > On Saturday 25 April 2020 13:32:34 CEST Suraj Upadhyay wrote: > > Break lines with length over 80 characters to > > conform to the linux coding style and refactor > > wherever necessary. > > > > Signed-off-by: Suraj Upadhyay > > --- > > > > Changes in v4: > > - Added a space after declaration in wfx_get_hw_rate(). > > - A checkpatch warning for this commit is retained at line 75, > > to maintain uniformity in function declarations. (Reviewer > > jerome suggested). > > > > Changes in v3: > > - Changed the temporary variable name for the memzcmp statement > > to is_used. (as suggested). > > - Added a temporary ieee80211_supported_band variable to address > > the problem in wfx_get_hw_rate() more efficiently. (not > > suggested, but still). > > > > Changes in v2: > > - Introduced a temporary variable for the memzcmp statement. > > - Addressed the checkpatch problem with wfx_get_hw_rate(). > > - Restored the function definition of wfx_tx_get_tx_parms > > as suggested by the reviewer. > > - Added suggested changes for req->packet_id statement. > > > > drivers/staging/wfx/data_tx.c | 40 +++ > > 1 file changed, 26 insertions(+), 14 deletions(-) > > This patch does not contain the suggestions from Dan. However, it is > sufficient from my personal point of view. Yeah. It's fine. It wasn't 100% cut and paste from my suggestions but it did address the stuff I cared about. Thanks! Reviewed-by: Dan Carpenter regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v1] staging: fbtft: fb_st7789v: Initialize the Display
On Mon, Apr 27, 2020 at 02:36:25PM +0200, Oliver Graute wrote: > On 27/04/20, Dan Carpenter wrote: > > On Mon, Apr 27, 2020 at 10:36:42AM +0200, Oliver Graute wrote: > > > On 09/04/20, Dan Carpenter wrote: > > > > On Thu, Apr 09, 2020 at 11:25:32AM +0200, Oliver Graute wrote: > > > > > From: Oliver Graute > > > > > > > > > > Set Gamma Values and Register Values for the HSD20_IPS > > > > > > > > > > Signed-off-by: Oliver Graute > > > > > --- > > > > > drivers/staging/fbtft/fb_st7789v.c | 12 ++-- > > > > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > > > > > > > diff --git a/drivers/staging/fbtft/fb_st7789v.c > > > > > b/drivers/staging/fbtft/fb_st7789v.c > > > > > index 84c5af2dc9a0..b0aa96b703a8 100644 > > > > > --- a/drivers/staging/fbtft/fb_st7789v.c > > > > > +++ b/drivers/staging/fbtft/fb_st7789v.c > > > > > @@ -17,8 +17,8 @@ > > > > > #define DRVNAME "fb_st7789v" > > > > > > > > > > #define DEFAULT_GAMMA \ > > > > > - "70 2C 2E 15 10 09 48 33 53 0B 19 18 20 25\n" \ > > > > > - "70 2C 2E 15 10 09 48 33 53 0B 19 18 20 25" > > > > > + "D0 05 0A 09 08 05 2E 44 45 0F 17 16 2B 33\n" \ > > > > > + "D0 05 0A 09 08 05 2E 43 45 0F 16 16 2B 33" > > > > > > > > How do you know this won't break someone else's setup? > > > > > > Should I declare an extra define for my values? > > > > > > +#define HSD20_IPS_GAMMA \ > > > + "D0 05 0A 09 08 05 2E 44 45 0F 17 16 2B 33\n" \ > > > + "D0 05 0A 09 08 05 2E 43 45 0F 16 16 2B 33" > > > > > > > That's fine, but it can't be a compile time thing. Both types of > > hardware have to be working/available at run time. > > ok, what is the proper way to handover the gamma values during run time? Can you detect which are appropriate and set that in the probe() function? regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v1] staging: fbtft: fb_st7789v: enabled inversion
On Mon, Apr 27, 2020 at 10:29:39AM +0200, Oliver Graute wrote: > On 09/04/20, Dan Carpenter wrote: > > On Thu, Apr 09, 2020 at 11:24:05AM +0200, Oliver Graute wrote: > > > From: Oliver Graute > > > > > > Enable inversion mode > > > > What the heck is an inversion mode and why would you want it? > > > Should I name it: > > Enable MIPI_DCS_ENTER_INVERT_MODE > What I'm saying is the changelog should explain why would want to apply the patch. What does the inversion mode do? Is it inverting the color or flipping something upside down? Probably if I had a background in graphics I would know what "Enable inversion mode" means... But three words is not a proper and complete commit message normally. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: media: usbvision: usbvision-core Correct spelling
Correct spelling in comment Signed-off-by: John Oldman --- drivers/staging/media/usbvision/usbvision-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/usbvision/usbvision-core.c b/drivers/staging/media/usbvision/usbvision-core.c index f05a5c84dc18..e35dee35b068 100644 --- a/drivers/staging/media/usbvision/usbvision-core.c +++ b/drivers/staging/media/usbvision/usbvision-core.c @@ -1268,7 +1268,7 @@ static void usbvision_isoc_irq(struct urb *urb) if (!USBVISION_IS_OPERATIONAL(usbvision)) return; - /* any urb with wrong status is ignored without acknowledgement */ + /* any urb with wrong status is ignored without acknowledgment */ if (urb->status == -ENOENT) return; -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: media: imx: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Rui Miguel Silva Cc: Steve Longerbeam Cc: Philipp Zabel Cc: Mauro Carvalho Chehab Cc: Greg Kroah-Hartman Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-me...@vger.kernel.org Cc: de...@driverdev.osuosl.org Signed-off-by: Greg Kroah-Hartman --- drivers/staging/media/imx/imx7-mipi-csis.c | 29 -- 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c index fbc1a924652a..d7c9e7343f1f 100644 --- a/drivers/staging/media/imx/imx7-mipi-csis.c +++ b/drivers/staging/media/imx/imx7-mipi-csis.c @@ -915,33 +915,14 @@ static int mipi_csis_dump_regs_show(struct seq_file *m, void *private) } DEFINE_SHOW_ATTRIBUTE(mipi_csis_dump_regs); -static int mipi_csis_debugfs_init(struct csi_state *state) +static void mipi_csis_debugfs_init(struct csi_state *state) { - struct dentry *d; - - if (!debugfs_initialized()) - return -ENODEV; - state->debugfs_root = debugfs_create_dir(dev_name(state->dev), NULL); - if (!state->debugfs_root) - return -ENOMEM; - - d = debugfs_create_bool("debug_enable", 0600, state->debugfs_root, - >debug); - if (!d) - goto remove_debugfs; - - d = debugfs_create_file("dump_regs", 0600, state->debugfs_root, - state, _csis_dump_regs_fops); - if (!d) - goto remove_debugfs; - - return 0; - -remove_debugfs: - debugfs_remove_recursive(state->debugfs_root); - return -ENOMEM; + debugfs_create_bool("debug_enable", 0600, state->debugfs_root, + >debug); + debugfs_create_file("dump_regs", 0600, state->debugfs_root, state, + _csis_dump_regs_fops); } static void mipi_csis_debugfs_exit(struct csi_state *state) -- 2.26.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4] Add new uio device for PCI with dynamic memory allocation
On Tue, Apr 28, 2020 at 03:47:42PM +, Stahl, Manuel wrote: > > > > > + return err; > > > + } > > > + pci_set_master(pdev); > > > + > > > + dev_info(>dev, "Legacy IRQ: %i", pdev->irq); > > > > Again, remove, be quiet :) > > Use dev_dbg() or remove completely? If it helps in debugging, dev_dbg() is fine to use. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4] Add new uio device for PCI with dynamic memory allocation
On Di, 2020-04-28 at 15:54 +0200, greg k-h wrote: > On Thu, Apr 16, 2020 at 06:38:30PM +0200, Manuel Stahl wrote: > > This device combines the uio_pci_generic driver and the uio_dmem_genirq > > driver since PCI uses a slightly different API for interrupts. > > A fixed number of DMA capable memory regions can be defined using the > > module parameter "dmem_sizes". The memory is not allocated until the uio > > device file is opened for the first time. When the device file is closed, > > the allocated memory block is freed. Physical (DMA) addresses for the > > dynamic regions are provided to the userspace via > > /sys/class/uio/uioX/maps/mapY/addr > > When no processes are holding the device file open, the address returned > > to userspace is DMA_ERROR_CODE. > > > > Signed-off-by: Manuel Stahl > > --- > > MAINTAINERS | 6 + > > drivers/uio/Kconfig | 9 + > > drivers/uio/Makefile | 1 + > > drivers/uio/uio_pci_dmem_genirq.c | 351 ++ > > 4 files changed, 367 insertions(+) > > create mode 100644 drivers/uio/uio_pci_dmem_genirq.c > > What changed from previous versions? Always put that below the --- > line. Only rebased to the latest kernel version and incorporated changes from uio_pci_generic and uio_dmem_genirq. No recommendations were made about other required changes, the discussion stopped about the fact if such a driver (UIO with DMA) should be allowed at all. For me such a driver allows me to quickly test different FPGA designs on computers that don't have specific security requirements. > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > index e64e5db31497..446931530dbc 100644 > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -7149,6 +7149,12 @@ L: k...@vger.kernel.org > > S: Supported > > F: drivers/uio/uio_pci_generic.c > > > > +GENERIC UIO DRIVER FOR PCI DEVICES WITH DMA > > +M: "Manuel Stahl" > > +L: k...@vger.kernel.org > > +S: Supported > > +F: drivers/uio/uio_pci_dmem_genirq.c > > + > > GENERIC VDSO LIBRARY > > M: Andy Lutomirski > > M: Thomas Gleixner > > diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig > > index 202ee81cfc2b..0d3f8a01ec74 100644 > > --- a/drivers/uio/Kconfig > > +++ b/drivers/uio/Kconfig > > @@ -94,6 +94,15 @@ config UIO_PCI_GENERIC > > primarily, for virtualization scenarios. > > If you compile this as a module, it will be called uio_pci_generic. > > > > +config UIO_PCI_DMEM_GENIRQ > > + tristate "Generic driver for PCI 2.3 and PCI Express cards with DMA" > > + depends on PCI > > + help > > + Generic driver that you can bind, dynamically, to any > > + PCI 2.3 compliant and PCI Express card. It is useful > > + for FPGAs with DMA capability connected via PCI. > > + If you compile this as a module, it will be called > > uio_pci_dmem_genirq. > > + > > config UIO_NETX > > tristate "Hilscher NetX Card driver" > > depends on PCI > > diff --git a/drivers/uio/Makefile b/drivers/uio/Makefile > > index c285dd2a4539..202d6bfdd5aa 100644 > > --- a/drivers/uio/Makefile > > +++ b/drivers/uio/Makefile > > @@ -6,6 +6,7 @@ obj-$(CONFIG_UIO_DMEM_GENIRQ) += uio_dmem_genirq.o > > obj-$(CONFIG_UIO_AEC) += uio_aec.o > > obj-$(CONFIG_UIO_SERCOS3) += uio_sercos3.o > > obj-$(CONFIG_UIO_PCI_GENERIC) += uio_pci_generic.o > > +obj-$(CONFIG_UIO_PCI_DMEM_GENIRQ) += uio_pci_dmem_genirq.o > > obj-$(CONFIG_UIO_NETX) += uio_netx.o > > obj-$(CONFIG_UIO_PRUSS) += uio_pruss.o > > obj-$(CONFIG_UIO_MF624) += uio_mf624.o > > diff --git a/drivers/uio/uio_pci_dmem_genirq.c > > b/drivers/uio/uio_pci_dmem_genirq.c > > new file mode 100644 > > index ..be1bdcc552fe > > --- /dev/null > > +++ b/drivers/uio/uio_pci_dmem_genirq.c > > @@ -0,0 +1,351 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > +/* uio_pci_generic - generic UIO driver for PCI 2.3 devices with DMA memory > > + * > > + * Copyright (C) 2016 Fraunhofer IIS > > + * Author: Manuel Stahl > > + * > > + * Based on uio_pci_generic.c by Michael S. Tsirkin > > + * and uio_dmem_genirq.c by Damian Hobson-Garcia. > > + * > > + * Since the driver does not declare any device ids, you must allocate > > + * id and bind the device to the driver yourself. For example: > > + * > > + * # echo "8086 10f5" > /sys/bus/pci/drivers/uio_pci_dmem_genirq/new_id > > + * # echo -n :00:19.0 > /sys/bus/pci/drivers/e1000e/unbind > > + * # echo -n :00:19.0 > /sys/bus/pci/drivers/uio_pci_dmem_genirq/bind > > + * # ls -l /sys/bus/pci/devices/:00:19.0/driver > > + * .../:00:19.0/driver -> ../../../bus/pci/drivers/uio_pci_dmem_genirq > > + * > > + * Or use a modprobe alias: > > + * # alias pci:v10EEd1000sv*sd*sc*i* uio_pci_dmem_genirq > > + * > > + * Driver won't bind to devices which do not support the Interrupt Disable > > Bit > > + * in the command register. All devices compliant to PCI 2.3 (circa 2002) > > and > > + * all compliant PCI Express devices
[driver-core:debugfs_cleanup 1/1] drivers/gpu/drm/drm_debugfs.c:232:5: error: conflicting types for 'drm_debugfs_remove_files'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git debugfs_cleanup head: 44bb83b556b01215b8d22a1f5a6f2dff0a394ad3 commit: 44bb83b556b01215b8d22a1f5a6f2dff0a394ad3 [1/1] drm: make .debugfs_init and drm_debugfs_create_files() return void config: x86_64-defconfig (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce: git checkout 44bb83b556b01215b8d22a1f5a6f2dff0a394ad3 # save the attached .config to linux build tree make ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot All error/warnings (new ones prefixed by >>): >> drivers/gpu/drm/drm_debugfs.c:232:5: error: conflicting types for >> 'drm_debugfs_remove_files' int drm_debugfs_remove_files(const struct drm_info_list *files, int count, ^~~~ In file included from drivers/gpu/drm/drm_debugfs.c:35:0: include/drm/drm_debugfs.h:86:6: note: previous declaration of 'drm_debugfs_remove_files' was here void drm_debugfs_remove_files(const struct drm_info_list *files, ^~~~ In file included from include/linux/linkage.h:7:0, from include/linux/fs.h:5, from include/linux/debugfs.h:15, from drivers/gpu/drm/drm_debugfs.c:26: drivers/gpu/drm/drm_debugfs.c:253:15: error: conflicting types for 'drm_debugfs_remove_files' EXPORT_SYMBOL(drm_debugfs_remove_files); ^ include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL' extern typeof(sym) sym; \ ^~~ include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL' #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "") ^~~ include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL' #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "") ^~ >> drivers/gpu/drm/drm_debugfs.c:253:1: note: in expansion of macro >> 'EXPORT_SYMBOL' EXPORT_SYMBOL(drm_debugfs_remove_files); ^ In file included from drivers/gpu/drm/drm_debugfs.c:35:0: include/drm/drm_debugfs.h:86:6: note: previous declaration of 'drm_debugfs_remove_files' was here void drm_debugfs_remove_files(const struct drm_info_list *files, ^~~~ -- >> drivers/gpu/drm/i915/i915_debugfs.c:2179:6: error: conflicting types for >> 'i915_debugfs_register' void i915_debugfs_register(struct drm_i915_private *dev_priv) ^ In file included from drivers/gpu/drm/i915/i915_debugfs.c:42:0: drivers/gpu/drm/i915/i915_debugfs.h:15:5: note: previous declaration of 'i915_debugfs_register' was here int i915_debugfs_register(struct drm_i915_private *dev_priv); ^ -- drivers/gpu/drm/i915/display/intel_display_debugfs.c: In function 'intel_display_debugfs_register': >> drivers/gpu/drm/i915/display/intel_display_debugfs.c:1943:9: error: void >> value not ignored as it ought to be return drm_debugfs_create_files(intel_display_debugfs_list, ^~~~ ARRAY_SIZE(intel_display_debugfs_list), ~~~ minor->debugfs_root, minor); ~~~ >> drivers/gpu/drm/i915/display/intel_display_debugfs.c:1946:1: warning: >> control reaches end of non-void function [-Wreturn-type] } ^ vim +/drm_debugfs_remove_files +232 drivers/gpu/drm/drm_debugfs.c 28a62277e06f93 Ben Gamari 2009-02-17 230 28a62277e06f93 Ben Gamari 2009-02-17 231 7d74795b740135 Lespiau, Damien 2013-10-17 @232 int drm_debugfs_remove_files(const struct drm_info_list *files, int count, 28a62277e06f93 Ben Gamari 2009-02-17 233 struct drm_minor *minor) 28a62277e06f93 Ben Gamari 2009-02-17 234 { 28a62277e06f93 Ben Gamari 2009-02-17 235 struct list_head *pos, *q; 28a62277e06f93 Ben Gamari 2009-02-17 236 struct drm_info_node *tmp; 28a62277e06f93 Ben Gamari 2009-02-17 237 int i; 28a62277e06f93 Ben Gamari 2009-02-17 238 b3e067c0b27619 Marcin Slusarz 2011-11-09 239 mutex_lock(>debugfs_lock); 28a62277e06f93 Ben Gamari 2009-02-17 240 for (i = 0; i < count; i++) { b3e067c0b27619 Marcin Slusarz 2011-11-09 241 list_for_each_safe(pos, q, >debugfs_list) { 28a62277e06f93 Ben Gamari 2009-02-17 242 tmp = list_entry(pos, struct drm_info_node, list); 28a62277e06f93 Ben Gamari 2009-02-17 243 if (tmp->info_ent == [i]) { 28a62277e06f93 Ben Gamari 2009-02-17 244 debugfs_remove(tmp->dent); 28a62277e06f93 Ben Gamari 2009-02-17 245
[PATCH -next] staging: pi433: fix error return code in pi433_probe()
Fix to return negative error code -ENOMEM from cdev alloc failed error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/staging/pi433/pi433_if.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index 313d22f6210f..c8d0c63fdd1d 100644 --- a/drivers/staging/pi433/pi433_if.c +++ b/drivers/staging/pi433/pi433_if.c @@ -1230,6 +1230,7 @@ static int pi433_probe(struct spi_device *spi) device->cdev = cdev_alloc(); if (!device->cdev) { dev_dbg(device->dev, "allocation of cdev failed"); + retval = -ENOMEM; goto cdev_failed; } device->cdev->owner = THIS_MODULE; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v4] Add new uio device for PCI with dynamic memory allocation
On Thu, Apr 16, 2020 at 06:38:30PM +0200, Manuel Stahl wrote: > This device combines the uio_pci_generic driver and the uio_dmem_genirq > driver since PCI uses a slightly different API for interrupts. > A fixed number of DMA capable memory regions can be defined using the > module parameter "dmem_sizes". The memory is not allocated until the uio > device file is opened for the first time. When the device file is closed, > the allocated memory block is freed. Physical (DMA) addresses for the > dynamic regions are provided to the userspace via > /sys/class/uio/uioX/maps/mapY/addr > When no processes are holding the device file open, the address returned > to userspace is DMA_ERROR_CODE. > > Signed-off-by: Manuel Stahl > --- > MAINTAINERS | 6 + > drivers/uio/Kconfig | 9 + > drivers/uio/Makefile | 1 + > drivers/uio/uio_pci_dmem_genirq.c | 351 ++ > 4 files changed, 367 insertions(+) > create mode 100644 drivers/uio/uio_pci_dmem_genirq.c What changed from previous versions? Always put that below the --- line. > > diff --git a/MAINTAINERS b/MAINTAINERS > index e64e5db31497..446931530dbc 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -7149,6 +7149,12 @@ L: k...@vger.kernel.org > S: Supported > F: drivers/uio/uio_pci_generic.c > > +GENERIC UIO DRIVER FOR PCI DEVICES WITH DMA > +M: "Manuel Stahl" > +L: k...@vger.kernel.org > +S: Supported > +F: drivers/uio/uio_pci_dmem_genirq.c > + > GENERIC VDSO LIBRARY > M: Andy Lutomirski > M: Thomas Gleixner > diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig > index 202ee81cfc2b..0d3f8a01ec74 100644 > --- a/drivers/uio/Kconfig > +++ b/drivers/uio/Kconfig > @@ -94,6 +94,15 @@ config UIO_PCI_GENERIC > primarily, for virtualization scenarios. > If you compile this as a module, it will be called uio_pci_generic. > > +config UIO_PCI_DMEM_GENIRQ > + tristate "Generic driver for PCI 2.3 and PCI Express cards with DMA" > + depends on PCI > + help > + Generic driver that you can bind, dynamically, to any > + PCI 2.3 compliant and PCI Express card. It is useful > + for FPGAs with DMA capability connected via PCI. > + If you compile this as a module, it will be called > uio_pci_dmem_genirq. > + > config UIO_NETX > tristate "Hilscher NetX Card driver" > depends on PCI > diff --git a/drivers/uio/Makefile b/drivers/uio/Makefile > index c285dd2a4539..202d6bfdd5aa 100644 > --- a/drivers/uio/Makefile > +++ b/drivers/uio/Makefile > @@ -6,6 +6,7 @@ obj-$(CONFIG_UIO_DMEM_GENIRQ) += uio_dmem_genirq.o > obj-$(CONFIG_UIO_AEC)+= uio_aec.o > obj-$(CONFIG_UIO_SERCOS3)+= uio_sercos3.o > obj-$(CONFIG_UIO_PCI_GENERIC)+= uio_pci_generic.o > +obj-$(CONFIG_UIO_PCI_DMEM_GENIRQ)+= uio_pci_dmem_genirq.o > obj-$(CONFIG_UIO_NETX) += uio_netx.o > obj-$(CONFIG_UIO_PRUSS) += uio_pruss.o > obj-$(CONFIG_UIO_MF624) += uio_mf624.o > diff --git a/drivers/uio/uio_pci_dmem_genirq.c > b/drivers/uio/uio_pci_dmem_genirq.c > new file mode 100644 > index ..be1bdcc552fe > --- /dev/null > +++ b/drivers/uio/uio_pci_dmem_genirq.c > @@ -0,0 +1,351 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* uio_pci_generic - generic UIO driver for PCI 2.3 devices with DMA memory > + * > + * Copyright (C) 2016 Fraunhofer IIS > + * Author: Manuel Stahl > + * > + * Based on uio_pci_generic.c by Michael S. Tsirkin > + * and uio_dmem_genirq.c by Damian Hobson-Garcia. > + * > + * Since the driver does not declare any device ids, you must allocate > + * id and bind the device to the driver yourself. For example: > + * > + * # echo "8086 10f5" > /sys/bus/pci/drivers/uio_pci_dmem_genirq/new_id > + * # echo -n :00:19.0 > /sys/bus/pci/drivers/e1000e/unbind > + * # echo -n :00:19.0 > /sys/bus/pci/drivers/uio_pci_dmem_genirq/bind > + * # ls -l /sys/bus/pci/devices/:00:19.0/driver > + * .../:00:19.0/driver -> ../../../bus/pci/drivers/uio_pci_dmem_genirq > + * > + * Or use a modprobe alias: > + * # alias pci:v10EEd1000sv*sd*sc*i* uio_pci_dmem_genirq > + * > + * Driver won't bind to devices which do not support the Interrupt Disable > Bit > + * in the command register. All devices compliant to PCI 2.3 (circa 2002) and > + * all compliant PCI Express devices should support this bit. > + * > + * The DMA mask bits and sizes of dynamic regions are derived from module > + * parameters. > + * > + * The format for specifying dynamic region sizes in module parameters > + * is as follows: > + * > + * uio_pci_dmem_genirq.dmem_sizes := > [;] > + *:= :[,] > + *:= : > + * := standard linux memsize > + * > + * Examples: > + * > + * 1) UIO dmem device with 3 dynamic regions: > + * uio_pci_dmem_genirq.dmem_sizes=8086:10f5:4K,16K,4M > + * > + * 2) Two UIO dmem devices with different number of dynamic regions: > + *
Re: [PATCH] Staging: mt7621-dma: mtk-hsdma.c: Fix Missing a blank line after declarations
On Tue, Apr 28, 2020 at 02:21:25PM +0100, John Oldman wrote: > I was not so happy about this one, even though I went and committed it. > > Without the blank line checkpatch reports: > > WARNING: Missing a blank line after declarations > #160: FILE: drivers/staging/mt7621-dma/mtk-hsdma.c:160: > + struct tasklet_struct task; > + volatile unsigned long chan_issued; > > So I dumly inserted a blank line to silence checkpatch. As checkpatch is just a simple script, it is not always right, don't blindly follow it. > In hindsight maybe a false positive, blank lines in a struct might not be > helpful. It can be, but not here. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: mt7621-dma: mtk-hsdma.c: Fix Missing a blank line after declarations
(this time sent as plain text) I was not so happy about this one, even though I went and committed it. Without the blank line checkpatch reports: WARNING: Missing a blank line after declarations #160: FILE: drivers/staging/mt7621-dma/mtk-hsdma.c:160: + struct tasklet_struct task; + volatile unsigned long chan_issued; So I dumly inserted a blank line to silence checkpatch. In hindsight maybe a false positive, blank lines in a struct! Someone may have been there before as there is a previous blank line in the struct mtk_hsdam_engine :o) Cheers John On Sun, 26 Apr 2020 at 18:07, Greg KH wrote: > > On Sun, Apr 26, 2020 at 05:13:19PM +0100, John Oldman wrote: > > Fixed coding style issue > > No you didn't :) > > > > > Signed-off-by: John Oldman > > --- > > drivers/staging/mt7621-dma/mtk-hsdma.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/staging/mt7621-dma/mtk-hsdma.c > > b/drivers/staging/mt7621-dma/mtk-hsdma.c > > index 14592ed9ce98..dd35d0bce6ca 100644 > > --- a/drivers/staging/mt7621-dma/mtk-hsdma.c > > +++ b/drivers/staging/mt7621-dma/mtk-hsdma.c > > @@ -157,6 +157,7 @@ struct mtk_hsdam_engine { > > struct device_dma_parameters dma_parms; > > void __iomem *base; > > struct tasklet_struct task; > > + > > volatile unsigned long chan_issued; > > > > struct mtk_hsdma_chan chan[1]; > > This file seems to be the "does the submitter look at the patch they are > sending" litmus test. > > Does that really do what you think it does? > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8723bs: os_dep: remove rtw_spt_band_free()
Now that rtw_spt_band_free() is only a direct wrapper of kfree, we can remove it and just use kfree(). Signed-off-by: Jason Yan --- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c index b037868fbf22..478e10d708e9 100644 --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c @@ -152,11 +152,6 @@ static struct ieee80211_supported_band *rtw_spt_band_alloc( return spt_band; } -static void rtw_spt_band_free(struct ieee80211_supported_band *spt_band) -{ - kfree(spt_band); -} - static const struct ieee80211_txrx_stypes rtw_cfg80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = { [NL80211_IFTYPE_ADHOC] = { @@ -3476,7 +3471,7 @@ void rtw_wdev_free(struct wireless_dev *wdev) if (!wdev) return; - rtw_spt_band_free(wdev->wiphy->bands[NL80211_BAND_2GHZ]); + kfree(wdev->wiphy->bands[NL80211_BAND_2GHZ]); wiphy_free(wdev->wiphy); -- 2.21.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/7] staging: rtl8723bs: os_dep: remove set but not used 'size'
在 2020/4/28 20:28, Greg KH 写道: On Mon, Apr 27, 2020 at 11:23:37AM +0800, Jason Yan wrote: And also remove the NULL check before kfree() because kfree() can handle NULL pointers correctly. Fix the following gcc warning: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:157:6: warning: variable ‘size’ set but not used [-Wunused-but-set-variable] u32 size = 0; ^~~~ Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c index 1ba85a43f05a..b037868fbf22 100644 --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c @@ -154,17 +154,6 @@ static struct ieee80211_supported_band *rtw_spt_band_alloc( static void rtw_spt_band_free(struct ieee80211_supported_band *spt_band) { - u32 size = 0; - - if (!spt_band) - return; - - if (spt_band->band == NL80211_BAND_2GHZ) - { - size = sizeof(struct ieee80211_supported_band) - + sizeof(struct ieee80211_channel)*RTW_2G_CHANNELS_NUM - + sizeof(struct ieee80211_rate)*RTW_G_RATES_NUM; - } kfree(spt_band); } This function can now be removed and replaced with the call to kfree(), right? Can you send a follow-on patch to do that? Sure. thanks, greg k-h . ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/7] staging: rtl8723bs: os_dep: remove set but not used 'size'
On Mon, Apr 27, 2020 at 11:23:37AM +0800, Jason Yan wrote: > And also remove the NULL check before kfree() because kfree() can handle > NULL pointers correctly. > > Fix the following gcc warning: > > drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:157:6: warning: > variable ‘size’ set but not used [-Wunused-but-set-variable] > u32 size = 0; > ^~~~ > > Reported-by: Hulk Robot > Signed-off-by: Jason Yan > --- > drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 11 --- > 1 file changed, 11 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c > b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c > index 1ba85a43f05a..b037868fbf22 100644 > --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c > +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c > @@ -154,17 +154,6 @@ static struct ieee80211_supported_band > *rtw_spt_band_alloc( > > static void rtw_spt_band_free(struct ieee80211_supported_band *spt_band) > { > - u32 size = 0; > - > - if (!spt_band) > - return; > - > - if (spt_band->band == NL80211_BAND_2GHZ) > - { > - size = sizeof(struct ieee80211_supported_band) > - + sizeof(struct ieee80211_channel)*RTW_2G_CHANNELS_NUM > - + sizeof(struct ieee80211_rate)*RTW_G_RATES_NUM; > - } > kfree(spt_band); > } This function can now be removed and replaced with the call to kfree(), right? Can you send a follow-on patch to do that? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/7] staging: rtl8723bs: os_dep: remove set but not used 'uintRet'
On Mon, Apr 27, 2020 at 11:23:36AM +0800, Jason Yan wrote: > Fix the following gcc warning: > > drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2564:22: warning: > variable ‘uintRet’ set but not used [-Wunused-but-set-variable] > unsigned int uintRet = 0; > ^~~ > > Reported-by: Hulk Robot > Signed-off-by: Jason Yan > --- > drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c > b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c > index 5059b874080e..902ac8169948 100644 > --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c > +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c > @@ -2561,14 +2561,16 @@ static int rtw_wps_start(struct net_device *dev, > struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); > struct iw_point *pdata = >data; > u32 u32wps_start = 0; > -unsigned int uintRet = 0; > > if ((true == padapter->bDriverStopped) || (true == > padapter->bSurpriseRemoved) || (NULL == pdata)) { > ret = -EINVAL; > goto exit; > } > > - uintRet = copy_from_user((void *)_start, pdata->pointer, 4); > + if (copy_from_user((void *)_start, pdata->pointer, 4)) { > + ret = -EFAULT; > + goto exit; > + } This also fixes the issue of copy_from_user not being checked, nice! greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/3] staging: qlge: Remove print statements for lbq_clean_idx and lbq_free_cnt
On Mon, Apr 27, 2020 at 12:15:18AM -0400, Rylan Dmello wrote: > Remove debug print statements referring to non-existent fields > 'lbq_clean_idx' and 'lbq_free_cnt' in the 'rx_ring' struct, which causes > a compilation failure when QL_DEV_DUMP is set. > > These fields were initially removed as a part of commit aec626d2092f > ("staging: qlge: Update buffer queue prod index despite oom") in 2019. > > Their replacement fields ('next_to_use' and 'next_to_clean') are already > being printed, so this patch does not add new debug statements for them. > > Signed-off-by: Rylan Dmello Fixes: aec626d2092f ("staging: qlge: Update buffer queue prod index despite oom") regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/3] staging: qlge: Remove unnecessary parentheses around struct field
On Mon, Apr 27, 2020 at 12:14:11AM -0400, Rylan Dmello wrote: > Remove unnecessary parentheses around a struct field accessor that > causes a build failure when QL_DEV_DUMP is set. > > Signed-off-by: Rylan Dmello Add a Fixes tag. Fixes: 67e6cf7338e1 ("staging: qlge: add braces around macro arguments") regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/3] staging: qlge: Remove print statement for vlgrp field
On Mon, Apr 27, 2020 at 12:14:44AM -0400, Rylan Dmello wrote: > Remove statement that tries to print the non-existent 'vlgrp' field > in the 'ql_adapter' struct, which causes a compilation failure when > QL_DEV_DUMP is set. > > vlgrp seems to have been removed from ql_adapter as a part of > commit 18c49b91777c ("qlge: do vlan cleanup") in 2011. > > vlgrp might be replaced by the 'active_vlans' array introduced in the > aforementioned commit. But I'm not sure if printing all 64 values of > that array would help with debugging this driver, so I'm leaving it > out of the debug code in this patch. > > Signed-off-by: Rylan Dmello Fixes: 18c49b91777c ("qlge: do vlan cleanup") regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH-3] staging: rts5208: rtsx: Use balanced braces for if/else if blocks
On Tue, Apr 28, 2020 at 11:28:04AM +0100, John Oldman wrote: > Coding style issues Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - You did not specify a description of why the patch is needed, or possibly, any description at all, in the email body. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/SubmittingPatches for what is needed in order to properly describe the change. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH-3] staging: rts5208: rtsx: Use balanced braces for if/else if blocks
Coding style issues Signed-off-by: John Oldman --- v1: Initial attempt v2: Do more blocks v3: Single patch drivers/staging/rts5208/rtsx.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index be0053c795b7..e16a7b9c3203 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -402,27 +402,21 @@ static int rtsx_control_thread(void *__dev) if (chip->srb->sc_data_direction == DMA_BIDIRECTIONAL) { dev_err(>pci->dev, "UNKNOWN data direction\n"); chip->srb->result = DID_ERROR << 16; - } - - /* reject if target != 0 or if LUN is higher than -* the maximum known LUN -*/ - else if (chip->srb->device->id) { + } else if (chip->srb->device->id) { + /* reject if target != 0 or if LUN is higher than +* the maximum known LUN +*/ dev_err(>pci->dev, "Bad target number (%d:%d)\n", chip->srb->device->id, (u8)chip->srb->device->lun); chip->srb->result = DID_BAD_TARGET << 16; - } - - else if (chip->srb->device->lun > chip->max_lun) { + } else if (chip->srb->device->lun > chip->max_lun) { dev_err(>pci->dev, "Bad LUN (%d:%d)\n", chip->srb->device->id, (u8)chip->srb->device->lun); chip->srb->result = DID_BAD_TARGET << 16; - } - - /* we've got a command, let's do it! */ - else { + } else { + /* we've got a command, let's do it! */ scsi_show_command(chip); rtsx_invoke_transport(chip->srb, chip); } -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v7 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver
On Fri, Apr 24, 2020 at 08:12:04PM +0800, Nicolas Boichat wrote: > On Fri, Apr 24, 2020 at 2:51 PM Xin Ji wrote: > > > > On Thu, Apr 23, 2020 at 07:55:15PM +0800, Nicolas Boichat wrote: > > > Hi, > > > > > > Just commenting on the mode_fixup function that was added in v7. > > > > > [snip] > > > > + /* > > > > +* once illegal timing detected, use default HFP, HSYNC, HBP > > > > +*/ > > > > + if (hblanking < HBLANKING_MIN || (hfp < HP_MIN && hbp < > > > > HP_MIN)) { > > > > > > should this be adj_hblanking/adj_hfp/adj_hbp? > > NO, need check original HFP and HBP, if they are not legal, driver need > > set default value to adj_hsync, adj_hfp, adj_hbp. > > > > > > > + adj_hsync = SYNC_LEN_DEF; > > > > + adj_hfp = HFP_HBP_DEF; > > > > + adj_hbp = HFP_HBP_DEF; > > > > + vref = adj->clock * 1000 / (adj->htotal * adj->vtotal); > > > > + if (hblanking < HBLANKING_MIN) { > > > > + delta_adj = HBLANKING_MIN - hblanking; > > > > + adj_clock = vref * delta_adj * adj->vtotal; > > > > + adj->clock += DIV_ROUND_UP(adj_clock, 1000); > > > > + } else { > > > > + delta_adj = hblanking - HBLANKING_MIN; > > > > + adj_clock = vref * delta_adj * adj->vtotal; > > > > + adj->clock -= DIV_ROUND_UP(adj_clock, 1000); > > > > + } > > > > + > > > > + DRM_WARN("illegal hblanking timing, use default.\n"); > > > > + DRM_WARN("hfp(%d),hbp(%d),hsync(%d).\n", hfp, hbp, > > > > hsync); > > > > > > How likely is it that this mode is going to work? Can you just return > > > false here to reject the mode? > > We want to set the default minimal Hblancking value, then it may display, > > otherwise. If we just return false, there is no display for sure. > > Right, understand your argument. I'm pondering if it's not just better > to reject the mode rather than trying a timing that is definitely > quite different from what the monitor was asking for. No super strong > opinion, I'll let other people on the list weigh in. Yeah mode_fixup is supposed to be used to adjust the mode in intermediate stages (e.g. if you go from progressive to interlaced only at the end of your pipeline or something like that). It's not meant for adjusting the mode yout actually put out through a hdmi or dp connector. For fixed panels adjusting modes to fit the panel is also fairly common, but not for external outputs. Since this is a DP bridge I'd say no adjusting, just reject what doesn't fit. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/2] staging: wilc1000: adjust for management frame register API changes
On 28/04/20 1:44 pm, Johannes Berg wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > From: Johannes Berg > > Adjust to the API changes in cfg80211 for management frame registration. > > Fixes: 6cd536fe62ef ("cfg80211: change internal management frame registration > API") > Signed-off-by: Johannes Berg Acked-by: Ajay Singh This patch looks better to handle cfg80211 callback changes for frame registration compared to [1]. [1]. https://lore.kernel.org/linux-wireless/20200424212454.230080-1-geoma...@gmail.com/ > --- > drivers/staging/wilc1000/cfg80211.c | 36 ++--- > drivers/staging/wilc1000/cfg80211.h | 5 ++-- > drivers/staging/wilc1000/netdev.c | 21 - > drivers/staging/wilc1000/netdev.h | 9 +--- > 4 files changed, 30 insertions(+), 41 deletions(-) > > diff --git a/drivers/staging/wilc1000/cfg80211.c > b/drivers/staging/wilc1000/cfg80211.c > index 4bdcbc5fd2fd..b6065a0d660f 100644 > --- a/drivers/staging/wilc1000/cfg80211.c > +++ b/drivers/staging/wilc1000/cfg80211.c > @@ -1217,33 +1217,31 @@ static int mgmt_tx_cancel_wait(struct wiphy *wiphy, > return 0; > } > > -void wilc_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev, > - u16 frame_type, bool reg) > +void wilc_update_mgmt_frame_registrations(struct wiphy *wiphy, > + struct wireless_dev *wdev, > + struct mgmt_frame_regs *upd) > { > struct wilc *wl = wiphy_priv(wiphy); > struct wilc_vif *vif = netdev_priv(wdev->netdev); > + u32 presp_bit = BIT(IEEE80211_STYPE_PROBE_REQ >> 4); > + u32 action_bit = BIT(IEEE80211_STYPE_ACTION >> 4); > > - if (!frame_type) > - return; > + if (wl->initialized) { > + bool prev = vif->mgmt_reg_stypes & presp_bit; > + bool now = upd->interface_stypes & presp_bit; > > - switch (frame_type) { > - case IEEE80211_STYPE_PROBE_REQ: > - vif->frame_reg[0].type = frame_type; > - vif->frame_reg[0].reg = reg; > - break; > + if (now != prev) > + wilc_frame_register(vif, IEEE80211_STYPE_PROBE_REQ, > now); > > - case IEEE80211_STYPE_ACTION: > - vif->frame_reg[1].type = frame_type; > - vif->frame_reg[1].reg = reg; > - break; > + prev = vif->mgmt_reg_stypes & action_bit; > + now = upd->interface_stypes & action_bit; > > - default: > - break; > + if (now != prev) > + wilc_frame_register(vif, IEEE80211_STYPE_ACTION, now); > } > > - if (!wl->initialized) > - return; > - wilc_frame_register(vif, frame_type, reg); > + vif->mgmt_reg_stypes = > + upd->interface_stypes & (presp_bit | action_bit); > } > > static int set_cqm_rssi_config(struct wiphy *wiphy, struct net_device *dev, > @@ -1665,7 +1663,7 @@ static const struct cfg80211_ops wilc_cfg80211_ops = { > .cancel_remain_on_channel = cancel_remain_on_channel, > .mgmt_tx_cancel_wait = mgmt_tx_cancel_wait, > .mgmt_tx = mgmt_tx, > - .mgmt_frame_register = wilc_mgmt_frame_register, > + .update_mgmt_frame_registrations = > wilc_update_mgmt_frame_registrations, > .set_power_mgmt = set_power_mgmt, > .set_cqm_rssi_config = set_cqm_rssi_config, > > diff --git a/drivers/staging/wilc1000/cfg80211.h > b/drivers/staging/wilc1000/cfg80211.h > index 5e5d63f70df2..37b294cb3b37 100644 > --- a/drivers/staging/wilc1000/cfg80211.h > +++ b/drivers/staging/wilc1000/cfg80211.h > @@ -21,8 +21,9 @@ void wilc_wfi_deinit_mon_interface(struct wilc *wl, bool > rtnl_locked); > struct net_device *wilc_wfi_init_mon_interface(struct wilc *wl, >const char *name, >struct net_device *real_dev); > -void wilc_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev, > - u16 frame_type, bool reg); > +void wilc_update_mgmt_frame_registrations(struct wiphy *wiphy, > + struct wireless_dev *wdev, > + struct mgmt_frame_regs *upd); > struct wilc_vif *wilc_get_interface(struct wilc *wl); > struct wilc_vif *wilc_get_wl_to_vif(struct wilc *wl); > void wlan_deinit_locks(struct wilc *wilc); > diff --git a/drivers/staging/wilc1000/netdev.c > b/drivers/staging/wilc1000/netdev.c > index f94a17babd12..fda0ab97b02c 100644 > --- a/drivers/staging/wilc1000/netdev.c > +++ b/drivers/staging/wilc1000/netdev.c > @@ -571,6 +571,7 @@ static int wilc_mac_open(struct net_device *ndev) > struct wilc *wl = vif->wilc; > unsigned char mac_add[ETH_ALEN] = {0}; >
[PATCH] staging: iio: ad5933: rework probe to use devm_ function variants
This change cleans up the driver's probe function to use only devm_ function variants. This also gets rid of the remove function and moves the clock & regulator de-initializations to the 'ad5933_cleanup()' callback. Signed-off-by: Alexandru Ardelean --- .../staging/iio/impedance-analyzer/ad5933.c | 59 --- 1 file changed, 23 insertions(+), 36 deletions(-) diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c index af0bcf95ee8a..06a6dcd7883b 100644 --- a/drivers/staging/iio/impedance-analyzer/ad5933.c +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c @@ -602,11 +602,12 @@ static const struct iio_buffer_setup_ops ad5933_ring_setup_ops = { .postdisable = ad5933_ring_postdisable, }; -static int ad5933_register_ring_funcs_and_init(struct iio_dev *indio_dev) +static int ad5933_register_ring_funcs_and_init(struct device *dev, + struct iio_dev *indio_dev) { struct iio_buffer *buffer; - buffer = iio_kfifo_allocate(); + buffer = devm_iio_kfifo_allocate(dev); if (!buffer) return -ENOMEM; @@ -676,6 +677,14 @@ static void ad5933_work(struct work_struct *work) } } +static void ad5933_cleanup(void *data) +{ + struct ad5933_state *st = data; + + clk_disable_unprepare(st->mclk); + regulator_disable(st->reg); +} + static int ad5933_probe(struct i2c_client *client, const struct i2c_device_id *id) { @@ -703,23 +712,28 @@ static int ad5933_probe(struct i2c_client *client, dev_err(>dev, "Failed to enable specified VDD supply\n"); return ret; } + + ret = devm_add_action_or_reset(>dev, ad5933_cleanup, st); + if (ret) + return ret; + ret = regulator_get_voltage(st->reg); if (ret < 0) - goto error_disable_reg; + return ret; st->vref_mv = ret / 1000; st->mclk = devm_clk_get(>dev, "mclk"); if (IS_ERR(st->mclk) && PTR_ERR(st->mclk) != -ENOENT) { ret = PTR_ERR(st->mclk); - goto error_disable_reg; + return ret; } if (!IS_ERR(st->mclk)) { ret = clk_prepare_enable(st->mclk); if (ret < 0) - goto error_disable_reg; + return ret; ext_clk_hz = clk_get_rate(st->mclk); } @@ -742,41 +756,15 @@ static int ad5933_probe(struct i2c_client *client, indio_dev->channels = ad5933_channels; indio_dev->num_channels = ARRAY_SIZE(ad5933_channels); - ret = ad5933_register_ring_funcs_and_init(indio_dev); + ret = ad5933_register_ring_funcs_and_init(>dev, indio_dev); if (ret) - goto error_disable_mclk; + return ret; ret = ad5933_setup(st); if (ret) - goto error_unreg_ring; - - ret = iio_device_register(indio_dev); - if (ret) - goto error_unreg_ring; - - return 0; - -error_unreg_ring: - iio_kfifo_free(indio_dev->buffer); -error_disable_mclk: - clk_disable_unprepare(st->mclk); -error_disable_reg: - regulator_disable(st->reg); - - return ret; -} - -static int ad5933_remove(struct i2c_client *client) -{ - struct iio_dev *indio_dev = i2c_get_clientdata(client); - struct ad5933_state *st = iio_priv(indio_dev); - - iio_device_unregister(indio_dev); - iio_kfifo_free(indio_dev->buffer); - regulator_disable(st->reg); - clk_disable_unprepare(st->mclk); + return ret; - return 0; + return devm_iio_device_register(>dev, indio_dev); } static const struct i2c_device_id ad5933_id[] = { @@ -801,7 +789,6 @@ static struct i2c_driver ad5933_driver = { .of_match_table = ad5933_of_match, }, .probe = ad5933_probe, - .remove = ad5933_remove, .id_table = ad5933_id, }; module_i2c_driver(ad5933_driver); -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/2] staging: wilc1000: adjust for management frame register API changes
On Tue, Apr 28, 2020 at 10:14:03AM +0200, Johannes Berg wrote: > From: Johannes Berg > > Adjust to the API changes in cfg80211 for management frame registration. > > Fixes: 6cd536fe62ef ("cfg80211: change internal management frame registration > API") > Signed-off-by: Johannes Berg Acked-by: Greg Kroah-Hartman ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] staging: rtl8723bs: remove mgmt_frame_register method
On Tue, Apr 28, 2020 at 10:14:02AM +0200, Johannes Berg wrote: > From: Johannes Berg > > This was changed in cfg80211, so having it broke things, but > there's no need to adjust since it's an empty implementation. > Just remove it. > > Fixes: 6cd536fe62ef ("cfg80211: change internal management frame registration > API") > Signed-off-by: Johannes Berg > --- > .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 24 --- > 1 file changed, 24 deletions(-) Acked-by: Greg Kroah-Hartman ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] staging: rtl8723bs: remove mgmt_frame_register method
On Tue, Apr 28, 2020 at 10:16:57AM +0200, Johannes Berg wrote: > Greg, > > I'm going to take these through my tree because I broke the APIs there > (and wasn't paying attention to staging), but every bot around the world > is complaining now that my tree doesn't build ... :) No objection from me! ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/2] staging: wilc1000: adjust for management frame register API changes
> From: Johannes Berg > > Adjust to the API changes in cfg80211 for management frame registration. > > Fixes: 6cd536fe62ef ("cfg80211: change internal management frame registration > API") > Signed-off-by: Johannes Berg > --- > drivers/staging/wilc1000/cfg80211.c | 36 ++--- > drivers/staging/wilc1000/cfg80211.h | 5 ++-- > drivers/staging/wilc1000/netdev.c | 21 - > drivers/staging/wilc1000/netdev.h | 9 +--- > 4 files changed, 30 insertions(+), 41 deletions(-) Reviewed-by: Sergey Matyukevich Regards, Sergey ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] staging: rtl8723bs: remove mgmt_frame_register method
Greg, I'm going to take these through my tree because I broke the APIs there (and wasn't paying attention to staging), but every bot around the world is complaining now that my tree doesn't build ... :) johannes ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: rtl8723bs: remove mgmt_frame_register method
From: Johannes Berg This was changed in cfg80211, so having it broke things, but there's no need to adjust since it's an empty implementation. Just remove it. Fixes: 6cd536fe62ef ("cfg80211: change internal management frame registration API") Signed-off-by: Johannes Berg --- .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 24 --- 1 file changed, 24 deletions(-) diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c index 1ba85a43f05a..cd31ad2b8a7b 100644 --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c @@ -3163,29 +3163,6 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, return ret; } -static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, - struct wireless_dev *wdev, - u16 frame_type, bool reg) -{ - struct net_device *ndev = wdev_to_ndev(wdev); - struct adapter *adapter; - - if (ndev == NULL) - goto exit; - - adapter = (struct adapter *)rtw_netdev_priv(ndev); - -#ifdef DEBUG_CFG80211 - DBG_871X(FUNC_ADPT_FMT" frame_type:%x, reg:%d\n", FUNC_ADPT_ARG(adapter), - frame_type, reg); -#endif - - if (frame_type != (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_REQ)) - return; -exit: - return; -} - #if defined(CONFIG_PNO_SUPPORT) static int cfg80211_rtw_sched_scan_start(struct wiphy *wiphy, struct net_device *dev, @@ -3397,7 +3374,6 @@ static struct cfg80211_ops rtw_cfg80211_ops = { .change_bss = cfg80211_rtw_change_bss, .mgmt_tx = cfg80211_rtw_mgmt_tx, - .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, #if defined(CONFIG_PNO_SUPPORT) .sched_scan_start = cfg80211_rtw_sched_scan_start, -- 2.25.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: wilc1000: adjust for management frame register API changes
From: Johannes Berg Adjust to the API changes in cfg80211 for management frame registration. Fixes: 6cd536fe62ef ("cfg80211: change internal management frame registration API") Signed-off-by: Johannes Berg --- drivers/staging/wilc1000/cfg80211.c | 36 ++--- drivers/staging/wilc1000/cfg80211.h | 5 ++-- drivers/staging/wilc1000/netdev.c | 21 - drivers/staging/wilc1000/netdev.h | 9 +--- 4 files changed, 30 insertions(+), 41 deletions(-) diff --git a/drivers/staging/wilc1000/cfg80211.c b/drivers/staging/wilc1000/cfg80211.c index 4bdcbc5fd2fd..b6065a0d660f 100644 --- a/drivers/staging/wilc1000/cfg80211.c +++ b/drivers/staging/wilc1000/cfg80211.c @@ -1217,33 +1217,31 @@ static int mgmt_tx_cancel_wait(struct wiphy *wiphy, return 0; } -void wilc_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev, - u16 frame_type, bool reg) +void wilc_update_mgmt_frame_registrations(struct wiphy *wiphy, + struct wireless_dev *wdev, + struct mgmt_frame_regs *upd) { struct wilc *wl = wiphy_priv(wiphy); struct wilc_vif *vif = netdev_priv(wdev->netdev); + u32 presp_bit = BIT(IEEE80211_STYPE_PROBE_REQ >> 4); + u32 action_bit = BIT(IEEE80211_STYPE_ACTION >> 4); - if (!frame_type) - return; + if (wl->initialized) { + bool prev = vif->mgmt_reg_stypes & presp_bit; + bool now = upd->interface_stypes & presp_bit; - switch (frame_type) { - case IEEE80211_STYPE_PROBE_REQ: - vif->frame_reg[0].type = frame_type; - vif->frame_reg[0].reg = reg; - break; + if (now != prev) + wilc_frame_register(vif, IEEE80211_STYPE_PROBE_REQ, now); - case IEEE80211_STYPE_ACTION: - vif->frame_reg[1].type = frame_type; - vif->frame_reg[1].reg = reg; - break; + prev = vif->mgmt_reg_stypes & action_bit; + now = upd->interface_stypes & action_bit; - default: - break; + if (now != prev) + wilc_frame_register(vif, IEEE80211_STYPE_ACTION, now); } - if (!wl->initialized) - return; - wilc_frame_register(vif, frame_type, reg); + vif->mgmt_reg_stypes = + upd->interface_stypes & (presp_bit | action_bit); } static int set_cqm_rssi_config(struct wiphy *wiphy, struct net_device *dev, @@ -1665,7 +1663,7 @@ static const struct cfg80211_ops wilc_cfg80211_ops = { .cancel_remain_on_channel = cancel_remain_on_channel, .mgmt_tx_cancel_wait = mgmt_tx_cancel_wait, .mgmt_tx = mgmt_tx, - .mgmt_frame_register = wilc_mgmt_frame_register, + .update_mgmt_frame_registrations = wilc_update_mgmt_frame_registrations, .set_power_mgmt = set_power_mgmt, .set_cqm_rssi_config = set_cqm_rssi_config, diff --git a/drivers/staging/wilc1000/cfg80211.h b/drivers/staging/wilc1000/cfg80211.h index 5e5d63f70df2..37b294cb3b37 100644 --- a/drivers/staging/wilc1000/cfg80211.h +++ b/drivers/staging/wilc1000/cfg80211.h @@ -21,8 +21,9 @@ void wilc_wfi_deinit_mon_interface(struct wilc *wl, bool rtnl_locked); struct net_device *wilc_wfi_init_mon_interface(struct wilc *wl, const char *name, struct net_device *real_dev); -void wilc_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev, - u16 frame_type, bool reg); +void wilc_update_mgmt_frame_registrations(struct wiphy *wiphy, + struct wireless_dev *wdev, + struct mgmt_frame_regs *upd); struct wilc_vif *wilc_get_interface(struct wilc *wl); struct wilc_vif *wilc_get_wl_to_vif(struct wilc *wl); void wlan_deinit_locks(struct wilc *wilc); diff --git a/drivers/staging/wilc1000/netdev.c b/drivers/staging/wilc1000/netdev.c index f94a17babd12..fda0ab97b02c 100644 --- a/drivers/staging/wilc1000/netdev.c +++ b/drivers/staging/wilc1000/netdev.c @@ -571,6 +571,7 @@ static int wilc_mac_open(struct net_device *ndev) struct wilc *wl = vif->wilc; unsigned char mac_add[ETH_ALEN] = {0}; int ret = 0; + struct mgmt_frame_regs mgmt_regs = {}; if (!wl || !wl->dev) { netdev_err(ndev, "device not ready\n"); @@ -602,14 +603,12 @@ static int wilc_mac_open(struct net_device *ndev) return -EINVAL; } - wilc_mgmt_frame_register(vif->ndev->ieee80211_ptr->wiphy, -vif->ndev->ieee80211_ptr, -vif->frame_reg[0].type, -vif->frame_reg[0].reg); -
Re: exfat upcase table for code points above U+FFFF (Was: Re: [PATCH] staging: exfat: add exfat filesystem code to staging)
On Monday 27 April 2020 11:49:13 Sasha Levin wrote: > On Tue, Apr 21, 2020 at 11:30:45PM +0200, Pali Rohár wrote: > > On Thursday 13 February 2020 16:18:47 Sasha Levin wrote: > > > On Thu, Feb 13, 2020 at 01:06:56AM +0100, Pali Rohár wrote: > > > > In released exFAT specification is not written how are Unicode code > > > > points above U+ represented in exFAT upcase table. Normally in > > > > UTF-16 are Unicode code points above U+ represented by surrogate > > > > pairs but compression format of exFAT upcase table is not clear how to > > > > do it there. > > > > > > > > Are you able to send question about this problem to relevant MS people? > > > > > > > > New Linux implementation of exfat which is waiting on mailing list just > > > > do not support Unicode code points above U+ in exFAT upcase table. > > > > > > Sure, I'll forward this question on. I'll see if I can get someone from > > > their team who could be available to answer questions such as these in > > > the future - Microsoft is interested in maintaining compatiblity between > > > Linux and Windows exFAT implementations. > > > > Hello Sasha! Have you got any answer from exfat MS team about upcase > > table for Unicode code points above U+? > > Sorry for taking so long. This is my understanding from the Windows > folks: Windows filesystems just don't support variable encoding length, > and expect UCS-2 strings. Ok, so should I understand your answer as exFAT upcase table does not support representing Unicode code points above U+ and therefore exFAT implementation should expect that toupper(u) = u and tolower(u) = u for any Unicode code point u in range [U+1, U+10]? This is how current exfat linux driver behave. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel