drm/sti: do not remove the drm_bridge that was never added
Subsystems (12)
Sasha Levin
maintainerPATCH 2/251 drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()
In reply to Sasha LevinFrom: Dan Carpenter <[email protected]>
[ Upstream commit 09c4b49457434fa74749ad6194ef28464d9f5df9 ]
This doesn't affect runtime because in the current code "idx" is always valid.
First, we read from "vgdev->capsets[idx].max_size" before checking whether "idx" is within bounds. And secondly the bounds check is off by one so we could end up reading one element beyond the end of the vgdev->capsets[] array.
--- drivers/gpu/drm/virtio/virtgpu_vq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/virtio/virtgpu_vq.c +3 -2
@@ -681,11 +681,11 @@ int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev, {struct virtio_gpu_get_capset *cmd_p;struct virtio_gpu_vbuffer *vbuf; -int max_size = vgdev->capsets[idx].max_size; +int max_size;struct virtio_gpu_drv_cap_cache *cache_ent;void *resp_buf; -if (idx > vgdev->num_capsets) +if (idx >= vgdev->num_capsets)return -EINVAL ;if (version > vgdev->capsets[idx].max_version)
@@ -695,6 +695,7 @@ int virtio_gpu_cmd_get_capset(struct virtio_gpu_device *vgdev,if (!cache_ent)return -ENOMEM ; + max_size = vgdev->capsets[idx].max_size; cache_ent->caps_cache =kmalloc (max_size,GFP_KERNEL );if (!cache_ent->caps_cache) {kfree (cache_ent);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 8/251 pwm: lpss: Release runtime-pm reference from the driver's remove callback
In reply to Sasha LevinFrom: Hans de Goede <[email protected]>
[ Upstream commit 42885551cedb45961879d2fc3dc3c4dc545cc23e ]
For each pwm output which gets enabled through pwm_lpss_apply(), we do a pm_runtime_get_sync().
This commit adds pm_runtime_put() calls to pwm_lpss_remove() to balance these when the driver gets removed with some of the outputs still enabled.
--- drivers/pwm/pwm-lpss.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/pwm/pwm-lpss.c +6 -0
@@ -205,6 +205,12 @@ EXPORT_SYMBOL_GPL(pwm_lpss_probe);int pwm_lpss_remove (struct pwm_lpss_chip *lpwm) { +int i; + +for (i =0 ; i < lpwm->info->npwm; i++) { +if (pwm_is_enabled (&lpwm->chip.pwms[i])) +pm_runtime_put (lpwm->chip.dev); + }return pwmchip_remove (&lpwm->chip); }EXPORT_SYMBOL_GPL (pwm_lpss_remove);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 1/251 drm/sti: do not remove the drm_bridge that was never added
From: Peter Rosin <[email protected]>
[ Upstream commit 66e31a72dc38543b2d9d1ce267dc78ba9beebcfd ]
Removing the drm_bridge_remove call should avoid a NULL dereference during list processing in drm_bridge_remove if the error path is ever taken.
The more natural approach would perhaps be to add a drm_bridge_add, but there are several other bridges that never call drm_bridge_add. Just removing the drm_bridge_remove is the easier fix.
--- drivers/gpu/drm/sti/sti_hda.c | 1 - drivers/gpu/drm/sti/sti_hdmi.c | 1 - 2 files changed, 2 deletions(-)
drivers/gpu/drm/sti/sti_hda.c +0 -1
@@ -740,7 +740,6 @@ static int sti_hda_bind(struct device *dev, struct device *master, void *data)return 0 ; err_sysfs: -drm_bridge_remove (bridge);return -EINVAL ; }
drivers/gpu/drm/sti/sti_hdmi.c +0 -1
@@ -1352,7 +1352,6 @@ static int sti_hdmi_bind(struct device *dev, struct device *master, void *data)return 0 ; err_sysfs: -drm_bridge_remove (bridge); hdmi->drm_connector =NULL ;return -EINVAL ; }
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Sasha Levin
maintainerPATCH 6/251 ALSA: usb-audio: update quirk for B&W PX to remove microphone
From: Nicolas Huaman <[email protected]>
[ Upstream commit c369c8db15d51fa175d2ba85928f79d16af6b562 ]
A quirk in snd-usb-audio was added to automate setting sample rate to 4800k and remove the previously exposed nonfunctional microphone for the Bowers & Wilkins PX:
commit 240a8af929c7c57dcde28682725b29cf8474e8e5
https://lore.kernel.org/patchwork/patch/919689/
However the headphones where updated shortly after that to remove the unintentional microphone functionality. I guess because of this the headphones now crash when connecting them via USB while the quirk is active. Dmesg:
snd-usb-audio: probe of 2-3:1.0 failed with error -22 usb 2-3: 2:1: cannot get min/max values for control 2 (id 2)
This patch removes the microfone and allows the headphones to connect and work out of the box. It is based on the current mainline kernel
and successfully applied an tested on my machine (4.18.10.arch1-1).
--- sound/usb/quirks-table.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
sound/usb/quirks-table.h +2 -7
@@ -3293,19 +3293,14 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"), .ifnum = 0, .type = QUIRK_AUDIO_STANDARD_MIXER, }, - /* Capture */ - { - .ifnum = 1, - .type = QUIRK_IGNORE_INTERFACE, - },/* Playback */ { - .ifnum = 2, + .ifnum = 1, .type = QUIRK_AUDIO_FIXED_ENDPOINT, .data = &(const struct audioformat) { .formats = SNDRV_PCM_FMTBIT_S16_LE, .channels = 2, - .iface = 2, + .iface = 1, .altsetting = 1, .altset_idx = 1, .attributes = UAC_EP_CS_ATTR_FILL_MAX |
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 7/251 staging: comedi: ni_mio_common: protect register write overflow
In reply to Sasha LevinFrom: "Spencer E. Olson" <[email protected]>
[ Upstream commit 1cbca5852d6c16e85a21487a15d211195aacd4a1 ]
Fixes two problems introduced as early as
commit 03aef4b6dc12 ("Staging: comedi: add ni_mio_common code"):
(1) Ensures that the last four bits of NISTC_RTSI_TRIGB_OUT_REG register is not unduly overwritten on e-series devices. On e-series devices, the first three of the last four bits are reserved. The last bit defines the output selection of the RGOUT0 pin, otherwise known as RTSI_Sub_Selection. For m-series devices, these last four bits are indeed used as the output selection of the RTSI7 pin (and the RTSI_Sub_Selection bit for the RGOUT0 pin is moved to the RTSI_Trig_Direction register.
(2) Allows all 4 RTSI_BRD lines to be treated as valid sources for RTSI lines.
This patch also cleans up the ni_get_rtsi_routing command for readability.
--- .../staging/comedi/drivers/ni_mio_common.c | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-)
drivers/staging/comedi/drivers/ni_mio_common.c +17 -7
@@ -4945,7 +4945,10 @@ static int ni_valid_rtsi_output_source(struct comedi_device *dev,case NI_RTSI_OUTPUT_G_SRC0 :case NI_RTSI_OUTPUT_G_GATE0 :case NI_RTSI_OUTPUT_RGOUT0 : -case NI_RTSI_OUTPUT_RTSI_BRD_0 : +case NI_RTSI_OUTPUT_RTSI_BRD (0 ): +case NI_RTSI_OUTPUT_RTSI_BRD (1 ): +case NI_RTSI_OUTPUT_RTSI_BRD (2 ): +case NI_RTSI_OUTPUT_RTSI_BRD (3 ):return 1 ;case NI_RTSI_OUTPUT_RTSI_OSC :return (devpriv->is_m_series) ?1 :0 ;
@@ -4966,11 +4969,18 @@ static int ni_set_rtsi_routing(struct comedi_device *dev, devpriv->rtsi_trig_a_output_reg |=NISTC_RTSI_TRIG (chan, src);ni_stc_writew (dev, devpriv->rtsi_trig_a_output_reg,NISTC_RTSI_TRIGA_OUT_REG ); - }else if (chan <8 ) { + }else if (chan <NISTC_RTSI_TRIG_NUM_CHAN (devpriv->is_m_series)) { devpriv->rtsi_trig_b_output_reg &= ~NISTC_RTSI_TRIG_MASK (chan); devpriv->rtsi_trig_b_output_reg |=NISTC_RTSI_TRIG (chan, src);ni_stc_writew (dev, devpriv->rtsi_trig_b_output_reg,NISTC_RTSI_TRIGB_OUT_REG ); + }else if (chan !=NISTC_RTSI_TRIG_OLD_CLK_CHAN ) { +/* probably should never reach this, since the +* ni_valid_rtsi_output_source above errors out if chan is too +* high +*/ +dev_err (dev->class_dev,"%s: unknown rtsi channel\n" , __func__); +return -EINVAL ; }return 2 ; }
@@ -4986,12 +4996,12 @@ static unsigned int ni_get_rtsi_routing(struct comedi_device *dev, }else if (chan <NISTC_RTSI_TRIG_NUM_CHAN (devpriv->is_m_series)) {return NISTC_RTSI_TRIG_TO_SRC (chan, devpriv->rtsi_trig_b_output_reg); - }else { -if (chan ==NISTC_RTSI_TRIG_OLD_CLK_CHAN ) -return NI_RTSI_OUTPUT_RTSI_OSC ; -dev_err (dev->class_dev,"bug! should never get here?\n" ); -return 0 ; + }else if (chan ==NISTC_RTSI_TRIG_OLD_CLK_CHAN ) { +return NI_RTSI_OUTPUT_RTSI_OSC ; } + +dev_err (dev->class_dev,"%s: unknown rtsi channel\n" , __func__); +return -EINVAL ; } static int ni_rtsi_insn_config(struct comedi_device *dev,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 12/251 drm/dp_mst: Skip validating ports during destruction, just ref
In reply to Sasha LevinFrom: Lyude Paul <[email protected]>
[ Upstream commit c54c7374ff44de5e609506aca7c0deae4703b6d1 ]
Jerry Zuo pointed out a rather obscure hotplugging issue that it seems I accidentally introduced into DRM two years ago.
Pretend we have a topology like this:
|- DP-1: mst_primary
|- DP-4: active display
|- DP-5: disconnected
|- DP-6: active hub
|- DP-7: active display
|- DP-8: disconnected
|- DP-9: disconnectedIf we unplug DP-6, the topology starting at DP-7 will be destroyed but it's payloads will live on in DP-1's VCPI allocations and thus require removal. However, this removal currently fails because drm_dp_update_payload_part1() will (rightly so) try to validate the port before accessing it, fail then abort. If we keep going, eventually we run the MST hub out of bandwidth and all new allocations will start to fail (or in my case; all new displays just start flickering a ton).
We could just teach drm_dp_update_payload_part1() not to drop the port ref in this case, but then we also need to teach drm_dp_destroy_payload_step1() to do the same thing, then hope no one ever adds anything to the that requires a validated port reference in drm_dp_destroy_connector_work(). Kind of sketchy.
So let's go with a more clever solution: any port that drm_dp_destroy_connector_work() interacts with is guaranteed to still exist in memory until we say so. While said port might not be valid we don't really care: that's the whole reason we're destroying it in the first place! So, teach drm_dp_get_validated_port_ref() to use the all mighty current_work() function to avoid attempting to validate ports from the context of mgr->destroy_connector_work. I can't see any situation where this wouldn't be safe, and this avoids having to play whack-a-mole in the future of trying to work around port validation.
--- drivers/gpu/drm/drm_dp_mst_topology.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_dp_mst_topology.c +13 -2
@@ -980,9 +980,20 @@ static struct drm_dp_mst_port *drm_dp_mst_get_port_ref_locked(struct drm_dp_mst_static struct drm_dp_mst_port *drm_dp_get_validated_port_ref (struct drm_dp_mst_topology_mgr *mgr,struct drm_dp_mst_port *port) {struct drm_dp_mst_port *rport =NULL ; +mutex_lock (&mgr->lock); -if (mgr->mst_primary) - rport =drm_dp_mst_get_port_ref_locked (mgr->mst_primary, port); +/* +* Port may or may not be 'valid' but we don't care about that when +* destroying the port and we are guaranteed that the port pointer +* will be valid until we've finished +*/ +if (current_work () == &mgr->destroy_connector_work) { +kref_get (&port->kref); + rport = port; + }else if (mgr->mst_primary) { + rport =drm_dp_mst_get_port_ref_locked (mgr->mst_primary, + port); + }mutex_unlock (&mgr->lock);return rport; }
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Sasha Levin
maintainerPATCH 14/251 pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 1ebc589a7786f17f97b9e87b44e0fb4d0290d8f8 ]
The gether_gmii_mux[] array contains the REF125CK pin mark, but the gether_gmii_pins[] array lacks the corresponding pin number.
--- drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-r8a7740.c +1 -1
@@ -1982,7 +1982,7 @@ static const unsigned int gether_gmii_pins[] = {*/ 185 ,186 ,187 ,188 ,189 ,190 ,191 ,192 ,174 ,161 ,204 ,171 ,170 ,169 ,168 ,167 ,166 ,173 ,172 ,176 ,184 ,183 ,203 , - 205, 163, 206, 207, + 205, 163, 206, 207, 158, };static const unsigned int gether_gmii_mux[] = { ET_ERXD0_MARK, ET_ERXD1_MARK, ET_ERXD2_MARK, ET_ERXD3_MARK,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 15/251 pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 96bb2a6ab4eca10e5b6490b3f0738e9f7ec22c2b ]
The lcd0_data24_1_pins[] array contains the LCD0 D1[2-5] pin numbers, but the lcd0_data24_1_mux[] array lacks the corresponding pin marks.
--- drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 1 + 1 file changed, 1 insertion(+)
drivers/pinctrl/sh-pfc/pfc-r8a7740.c +1 -0
@@ -2154,6 +2154,7 @@ static const unsigned int lcd0_data24_1_mux[] = {LCD0_D0_MARK ,LCD0_D1_MARK ,LCD0_D2_MARK ,LCD0_D3_MARK ,LCD0_D4_MARK ,LCD0_D5_MARK ,LCD0_D6_MARK ,LCD0_D7_MARK ,LCD0_D8_MARK ,LCD0_D9_MARK ,LCD0_D10_MARK ,LCD0_D11_MARK , +LCD0_D12_MARK ,LCD0_D13_MARK ,LCD0_D14_MARK ,LCD0_D15_MARK ,LCD0_D16_MARK ,LCD0_D17_MARK ,LCD0_D18_PORT163_MARK ,LCD0_D19_PORT162_MARK ,LCD0_D20_PORT161_MARK ,LCD0_D21_PORT158_MARK , LCD0_D22_PORT160_MARK, LCD0_D23_PORT159_MARK,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 20/251 pinctrl: sh-pfc: sh7734: Add missing IPSR11 field
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 94482af7055e1ffa211c1135256b85590ebcac99 ]
The Peripheral Function Select Register 11 contains 3 reserved bits and 15 variable-width fields, but the variable field descriptor does not contain the 3-bit field IP11[25:23].
--- drivers/pinctrl/sh-pfc/pfc-sh7734.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-sh7734.c +1 -1
@@ -2237,7 +2237,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { FN_LCD_DATA15_B, 0, 0, 0 } }, {PINMUX_CFG_REG_VAR ("IPSR11" ,0xFFFC0048 ,32 , - 3, 1, 2, 2, 2, 3, 3, 1, 2, 3, 3, 1, 1, 1, 1) { + 3, 1, 2, 3, 2, 2, 3, 3, 1, 2, 3, 3, 1, 1, 1, 1) {/* IP11_31_29 [3] */ 0, 0, 0, 0, 0, 0, 0, 0,/* IP11_28 [1] */
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 21/251 pinctrl: sh-pfc: sh7269: Add missing PCIOR0 field
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 9540cbdfcd861caf67a6f0e4bb7f46d41c4aad86 ]
The Port C I/O Register 0 contains 7 reserved bits, but the descriptor contains only dummy configuration values for 6 reserved bits, thus breaking the configuration of all subsequent fields in the register.
Fix this by adding the two missing configuration values.
--- drivers/pinctrl/sh-pfc/pfc-sh7269.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-sh7269.c +1 -1
@@ -2119,7 +2119,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { }, { PINMUX_CFG_REG("PCIOR0", 0xfffe3852, 16, 1) { -0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,PC8_IN ,PC8_OUT ,PC7_IN ,PC7_OUT , PC6_IN, PC6_OUT,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 24/251 clk: highbank: fix refcount leak in hb_clk_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit 5eb8ba90958de1285120dae5d3a5d2b1a360b3b4 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/clk-highbank.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/clk-highbank.c +1 -0
@@ -293,6 +293,7 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk/* Map system registers */ srnp =of_find_compatible_node (NULL ,NULL ,"calxeda,hb-sregs" ); hb_clk->reg =of_iomap (srnp,0 ); +of_node_put (srnp);BUG_ON (!hb_clk->reg); hb_clk->reg += reg;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 26/251 clk: socfpga: fix refcount leak
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit 7f9705beeb3759e69165e7aff588f6488ff6c1ac ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/socfpga/clk-pll-a10.c | 1 + drivers/clk/socfpga/clk-pll.c | 1 + 2 files changed, 2 insertions(+)
drivers/clk/socfpga/clk-pll-a10.c +1 -0
@@ -95,6 +95,7 @@ static struct clk * __init __socfpga_pll_init(struct device_node *node, clkmgr_np =of_find_compatible_node (NULL ,NULL ,"altr,clk-mgr" ); clk_mgr_a10_base_addr =of_iomap (clkmgr_np,0 ); +of_node_put (clkmgr_np);BUG_ON (!clk_mgr_a10_base_addr); pll_clk->hw.reg = clk_mgr_a10_base_addr + reg;
drivers/clk/socfpga/clk-pll.c +1 -0
@@ -100,6 +100,7 @@ static __init struct clk *__socfpga_pll_init(struct device_node *node, clkmgr_np =of_find_compatible_node (NULL ,NULL ,"altr,clk-mgr" ); clk_mgr_base_addr =of_iomap (clkmgr_np,0 ); +of_node_put (clkmgr_np);BUG_ON (!clk_mgr_base_addr); pll_clk->hw.reg = clk_mgr_base_addr + reg;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 27/251 clk: samsung: exynos4: fix refcount leak in exynos4_get_xom()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit cee82eb9532090cd1dc953e845d71f9b1445c84e ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/samsung/clk-exynos4.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/samsung/clk-exynos4.c +1 -0
@@ -1225,6 +1225,7 @@ static unsigned long __init exynos4_get_xom(void) xom =readl (chipid_base +8 );iounmap (chipid_base); +of_node_put (np); }return xom;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 25/251 clk: qoriq: fix refcount leak in clockgen_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit 70af6c5b5270e8101f318c4b69cc98a726edfab9 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/clk-qoriq.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/clk-qoriq.c +1 -0
@@ -1245,6 +1245,7 @@ static void __init clockgen_init(struct device_node *np)pr_err ("%s: Couldn't map %s regs\n" , __func__, guts->full_name); } +of_node_put (guts); } }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 32/251 clk: armada-370: fix refcount leak in a370_clk_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit a3c24050bdf70c958a8d98c2823b66ea761e6a31 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/mvebu/armada-370.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clk/mvebu/armada-370.c +3 -1
@@ -177,8 +177,10 @@ static void __init a370_clk_init(struct device_node *np)mvebu_coreclk_setup (np, &a370_coreclks); -if (cgnp) +if (cgnp) {mvebu_clk_gating_setup (cgnp, a370_gating_desc); +of_node_put (cgnp); + } }CLK_OF_DECLARE (a370_clk,"marvell,armada-370-core-clock" , a370_clk_init);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 23/251 Input: nomadik-ske-keypad - fix a loop timeout test
In reply to Sasha LevinFrom: Dan Carpenter <[email protected]>
[ Upstream commit 4d8f727b83bcd6702c2d210330872c9122d2d360 ]
The loop exits with "timeout" set to -1 not to 0.
--- drivers/input/keyboard/nomadik-ske-keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/nomadik-ske-keypad.c +1 -1
@@ -100,7 +100,7 @@ static int __init ske_keypad_chip_init(struct ske_keypad *keypad)while ((readl (keypad->reg_base +SKE_RIS ) !=0x00000000 ) && timeout--)cpu_relax (); -if (!timeout) +if (timeout ==-1 )return -EINVAL ;/*
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 34/251 clk: armada-xp: fix refcount leak in axp_clk_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit db20a90a4b6745dad62753f8bd2f66afdd5abc84 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/mvebu/armada-xp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clk/mvebu/armada-xp.c +3 -1
@@ -202,7 +202,9 @@ static void __init axp_clk_init(struct device_node *np)mvebu_coreclk_setup (np, &axp_coreclks); -if (cgnp) +if (cgnp) {mvebu_clk_gating_setup (cgnp, axp_gating_desc); +of_node_put (cgnp); + } }CLK_OF_DECLARE (axp_clk,"marvell,armada-xp-core-clock" , axp_clk_init);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 36/251 IB/usnic: Fix out of bounds index check in query pkey
In reply to Sasha LevinFrom: Gal Pressman <[email protected]>
[ Upstream commit 4959d5da5737dd804255c75b8cea0a2929ce279a ]
The pkey table size is one element, index should be tested for > 0 instead of > 1.
--- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/usnic/usnic_ib_verbs.c +1 -1
@@ -425,7 +425,7 @@ int usnic_ib_query_gid(struct ib_device *ibdev, u8 port, int index,int usnic_ib_query_pkey (struct ib_device *ibdev,u8 port,u16 index,u16 *pkey) { -if (index >1 ) +if (index >0 )return -EINVAL ; *pkey =0xffff ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 39/251 arm64: dts: apq8016-sbc: Increase load on l11 for SDCARD
In reply to Sasha LevinFrom: Loic Poulain <[email protected]>
[ Upstream commit af61bef513ba179559e56908b8c465e587bc3890 ]
In the same way as for msm8974-hammerhead, l11 load, used for SDCARD VMMC, needs to be increased in order to prevent any voltage drop issues (due to limited current) happening with some SDCARDS or during specific operations (e.g. write).
Tested on Dragonboard-410c and DART-SD410 boards.
--- arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +2 -0
@@ -355,6 +355,8 @@ l11 { regulator-min-microvolt = <1750000>; regulator-max-microvolt = <3337000>; + regulator-allow-set-load; + regulator-system-load = <200000>; }; l12 {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 38/251 RDMA/qedr: Fix out of bounds index check in query pkey
In reply to Sasha LevinFrom: Gal Pressman <[email protected]>
[ Upstream commit dbe30dae487e1a232158c24b432d45281c2805b7 ]
The pkey table size is QEDR_ROCE_PKEY_TABLE_LEN, index should be tested for >= QEDR_ROCE_PKEY_TABLE_LEN instead of > QEDR_ROCE_PKEY_TABLE_LEN.
--- drivers/infiniband/hw/qedr/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/qedr/verbs.c +1 -1
@@ -54,7 +54,7 @@int qedr_query_pkey (struct ib_device *ibdev,u8 port,u16 index,u16 *pkey) { -if (index >QEDR_ROCE_PKEY_TABLE_LEN ) +if (index >=QEDR_ROCE_PKEY_TABLE_LEN )return -EINVAL ; *pkey =QEDR_ROCE_PKEY_DEFAULT ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 37/251 RDMA/ocrdma: Fix out of bounds index check in query pkey
In reply to Sasha LevinFrom: Gal Pressman <[email protected]>
[ Upstream commit b188940796c7be31c1b8c25a9a0e0842c2e7a49e ]
The pkey table size is one element, index should be tested for > 0 instead of > 1.
--- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1 -1
@@ -55,7 +55,7 @@int ocrdma_query_pkey (struct ib_device *ibdev,u8 port,u16 index,u16 *pkey) { -if (index >1 ) +if (index >0 )return -EINVAL ; *pkey =0xffff ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 28/251 clk: imx6q: fix refcount leak in imx6q_clocks_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit c9ec1d8fef31b5fc9e90e99f9bd685db5caa7c5e ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/imx/clk-imx6q.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imx6q.c +1 -0
@@ -174,6 +174,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) np =of_find_compatible_node (NULL ,NULL ,"fsl,imx6q-anatop" ); base =of_iomap (np,0 );WARN_ON (!base); +of_node_put (np);/* Audio/video PLL post dividers do not work on i.MX6q revision 1.0 */ if (clk_on_imx6q () &&imx_get_soc_revision () ==IMX_CHIP_REVISION_1_0 ) {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 35/251 clk: dove: fix refcount leak in dove_clk_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit 8d726c5128298386b907963033be93407b0c4275 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/mvebu/dove.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/clk/mvebu/dove.c +6 -2
@@ -190,10 +190,14 @@ static void __init dove_clk_init(struct device_node *np)mvebu_coreclk_setup (np, &dove_coreclks); -if (ddnp) +if (ddnp) {dove_divider_clk_init (ddnp); +of_node_put (ddnp); + } -if (cgnp) +if (cgnp) {mvebu_clk_gating_setup (cgnp, dove_gating_desc); +of_node_put (cgnp); + } }CLK_OF_DECLARE (dove_clk,"marvell,dove-core-clock" , dove_clk_init);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 22/251 pinctrl: sh-pfc: sh7734: Remove bogus IPSR10 value
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 4d374bacd7c9665179f9752a52d5d602c45d8190 ]
The IP10[5:3] field in Peripheral Function Select Register 10 has a width of 3 bits, i.e. it allows programming one out of 8 different configurations.
However, 9 values are provided instead of 8, overflowing into the subsequent field in the register, and thus breaking the configuration of the latter.
Fix this by dropping a bogus zero value.
--- drivers/pinctrl/sh-pfc/pfc-sh7734.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-sh7734.c +1 -1
@@ -2231,7 +2231,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {FN_LCD_CL1_B ,0 ,0 ,/* IP10_5_3 [3] */ FN_SSI_WS23 ,FN_VI1_5_B ,FN_TX1_D ,FN_HSCK0_C ,FN_FALE_B , -FN_LCD_DON_B ,0 ,0 ,0 , +FN_LCD_DON_B ,0 ,0 ,/* IP10_2_0 [3] */ FN_SSI_SCK23 ,FN_VI1_4_B ,FN_RX1_D ,FN_FCLE_B , FN_LCD_DATA15_B, 0, 0, 0 }
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 17/251 pinctrl: sh-pfc: r8a7791: Remove bogus marks from vin1_b_data18 group
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 0d6256cb880166a4111bebce35790019e56b6e1b ]
The vin1_b_data18_mux[] arrays contains pin marks for the 2 LSB bits of the color components. The vin1_b_data18_pins[] array rightfully does not include the corresponding pin numbers, as RGB18 is subset of RGB24, containing only the 6 MSB bits of each component.
--- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 3 --- 1 file changed, 3 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +0 -3
@@ -4264,17 +4264,14 @@ static const unsigned int vin1_b_data18_pins[] = { };static const unsigned int vin1_b_data18_mux[] = {/* B */ -VI1_DATA0_B_MARK ,VI1_DATA1_B_MARK ,VI1_DATA2_B_MARK ,VI1_DATA3_B_MARK ,VI1_DATA4_B_MARK ,VI1_DATA5_B_MARK ,VI1_DATA6_B_MARK ,VI1_DATA7_B_MARK ,/* G */ -VI1_G0_B_MARK ,VI1_G1_B_MARK ,VI1_G2_B_MARK ,VI1_G3_B_MARK ,VI1_G4_B_MARK ,VI1_G5_B_MARK ,VI1_G6_B_MARK ,VI1_G7_B_MARK ,/* R */ -VI1_R0_B_MARK ,VI1_R1_B_MARK ,VI1_R2_B_MARK ,VI1_R3_B_MARK ,VI1_R4_B_MARK ,VI1_R5_B_MARK ,VI1_R6_B_MARK ,VI1_R7_B_MARK ,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 18/251 pinctrl: sh-pfc: sh73a0: Add missing TO pin to tpu4_to3 group
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 124cde98f856b6206b804acbdec3b7c80f8c3427 ]
The tpu4_to3_mux[] array contains the TPU4TO3 pin mark, but the tpu4_to3_pins[] array lacks the corresponding pin number.
Add the missing pin number, for non-GPIO pin F26.
--- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 1 + 1 file changed, 1 insertion(+)
drivers/pinctrl/sh-pfc/pfc-sh73a0.c +1 -0
@@ -3086,6 +3086,7 @@ static const unsigned int tpu4_to2_mux[] = { };static const unsigned int tpu4_to3_pins[] = {/* TO */ +PIN_NUMBER (6 ,26 ), };static const unsigned int tpu4_to3_mux[] = {TPU4TO3_MARK ,
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 19/251 pinctrl: sh-pfc: r8a7794: Remove bogus IPSR9 field
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 6a6c195d98a1a5e70faa87f594d7564af1dd1bed ]
The Peripheral Function Select Register 9 contains 12 fields, but the variable field descriptor contains a 13th bogus field of 3 bits.
--- drivers/pinctrl/sh-pfc/pfc-r8a7794.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-r8a7794.c +1 -1
@@ -4826,7 +4826,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { FN_AVB_MDC, FN_SSI_SDATA6_B, 0, 0, } }, { PINMUX_CFG_REG_VAR("IPSR9", 0xE6060044, 32, - 1, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3) { + 1, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3) {/* IP9_31 [1] */ 0, 0,/* IP9_30_28 [3] */
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 3/251 ALSA: hda: fix unused variable warning
In reply to Sasha LevinFrom: Anders Roxell <[email protected]>
[ Upstream commit 5b03006d5c58ddd31caf542eef4d0269bcf265b3 ]
When CONFIG_X86=n function azx_snoop doesn't use the variable chip it only returns true.
sound/pci/hda/hda_intel.c: In function ‘dma_alloc_pages’:sound/pci/hda/hda_intel.c:2002:14: warning: unused variable ‘chip’ [-Wunused-variable]
struct azx *chip = bus_to_azx(bus);
^~~~Create a inline function of azx_snoop.
--- sound/pci/hda/hda_controller.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
sound/pci/hda/hda_controller.h +4 -5
@@ -171,11 +171,10 @@ struct azx {#define azx_bus (chip) (&(chip)->bus.core)#define bus_to_azx (_bus) container_of(_bus, struct azx, bus.core) -#ifdef CONFIG_X86 -#define azx_snoop (chip) ((chip)->snoop) -#else -#define azx_snoop (chip) true -#endif +static inline bool azx_snoop (struct azx *chip) +{ +return !IS_ENABLED (CONFIG_X86 ) || chip->snoop; +}/* * macros for easy use
Signature · 6 lines
2.20.1 _______________________________________________ Alsa-devel mailing list [email protected] https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Sasha Levin
maintainerPATCH 29/251 clk: imx6sx: fix refcount leak in imx6sx_clocks_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit 1731e14fb30212dd8c1e9f8fc1af061e56498c55 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/imx/clk-imx6sx.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imx6sx.c +1 -0
@@ -164,6 +164,7 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node) np =of_find_compatible_node (NULL ,NULL ,"fsl,imx6sx-anatop" ); base =of_iomap (np,0 );WARN_ON (!base); +of_node_put (np); clks[IMX6SX_PLL1_BYPASS_SRC ] =imx_clk_mux ("pll1_bypass_src" , base +0x00 ,14 ,1 , pll_bypass_src_sels,ARRAY_SIZE (pll_bypass_src_sels)); clks[IMX6SX_PLL2_BYPASS_SRC ] =imx_clk_mux ("pll2_bypass_src" , base +0x30 ,14 ,1 , pll_bypass_src_sels,ARRAY_SIZE (pll_bypass_src_sels));
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 30/251 clk: imx7d: fix refcount leak in imx7d_clocks_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit 5f8c183a996b76bb09748073c856e4246fd4ce95 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/imx/clk-imx7d.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-imx7d.c +1 -0
@@ -415,6 +415,7 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node) np =of_find_compatible_node (NULL ,NULL ,"fsl,imx7d-anatop" ); base =of_iomap (np,0 );WARN_ON (!base); +of_node_put (np); clks[IMX7D_PLL_ARM_MAIN_SRC ] =imx_clk_mux ("pll_arm_main_src" , base +0x60 ,14 ,2 , pll_bypass_src_sel,ARRAY_SIZE (pll_bypass_src_sel)); clks[IMX7D_PLL_DRAM_MAIN_SRC ] =imx_clk_mux ("pll_dram_main_src" , base +0x70 ,14 ,2 , pll_bypass_src_sel,ARRAY_SIZE (pll_bypass_src_sel));
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 31/251 clk: vf610: fix refcount leak in vf610_clocks_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit 567177024e0313e4f0dcba7ba10c0732e50e655d ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/imx/clk-vf610.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/imx/clk-vf610.c +1 -0
@@ -203,6 +203,7 @@ static void __init vf610_clocks_init(struct device_node *ccm_node) np =of_find_compatible_node (NULL ,NULL ,"fsl,vf610-anatop" ); anatop_base =of_iomap (np,0 );BUG_ON (!anatop_base); +of_node_put (np); np = ccm_node; ccm_base =of_iomap (np,0 );
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 33/251 clk: kirkwood: fix refcount leak in kirkwood_clk_init()
In reply to Sasha LevinFrom: Yangtao Li <[email protected]>
[ Upstream commit e7beeab9c61591cd0e690d8733d534c3f4278ff8 ]
The of_find_compatible_node() returns a node pointer with refcount incremented, but there is the lack of use of the of_node_put() when done. Add the missing of_node_put() to release the refcount.
--- drivers/clk/mvebu/kirkwood.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clk/mvebu/kirkwood.c +2 -0
@@ -333,6 +333,8 @@ static void __init kirkwood_clk_init(struct device_node *np)if (cgnp) {mvebu_clk_gating_setup (cgnp, kirkwood_gating_desc);kirkwood_clk_muxing_setup (cgnp, kirkwood_mux_desc); + +of_node_put (cgnp); } } CLK_OF_DECLARE(kirkwood_clk, "marvell,kirkwood-core-clock",
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 16/251 pinctrl: sh-pfc: r8a7791: Remove bogus ctrl marks from qspi_data4_b group
In reply to Sasha LevinFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 884fa25fb6e5e63ab970d612a628313bb68f37cc ]
The qspi_data4_b_mux[] array contains pin marks for the clock and chip select pins. The qspi_data4_b_pins[] array rightfully does not contain the corresponding pin numbers, as the control pins are provided by a separate group (qspi_ctrl_b).
--- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +1 -2
@@ -3136,8 +3136,7 @@ static const unsigned int qspi_data4_b_pins[] = { RCAR_GP_PIN(6, 4), };static const unsigned int qspi_data4_b_mux[] = { -SPCLK_B_MARK ,MOSI_IO0_B_MARK ,MISO_IO1_B_MARK , -IO2_B_MARK ,IO3_B_MARK ,SSL_B_MARK , +MOSI_IO0_B_MARK ,MISO_IO1_B_MARK ,IO2_B_MARK ,IO3_B_MARK , };/* - SCIF0 ------------------------------------------------------------------ */ static const unsigned int scif0_data_pins[] = {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 10/251 pcrypt: use format specifier in kobject_add
In reply to Sasha LevinFrom: Colin Ian King <[email protected]>
[ Upstream commit b1e3874c75ab15288f573b3532e507c37e8e7656 ]
Passing string 'name' as the format specifier is potentially hazardous because name could (although very unlikely to) have a format specifier embedded in it causing issues when parsing the non-existent arguments to these. Follow best practice by using the "%s" format string for the string 'name'.
Cleans up clang warning:crypto/pcrypt.c:397:40: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
--- crypto/pcrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/pcrypt.c +1 -1
@@ -394,7 +394,7 @@ static int pcrypt_sysfs_add(struct padata_instance *pinst, const char *name)int ret; pinst->kobj.kset = pcrypt_kset; - ret =kobject_add (&pinst->kobj,NULL , name); + ret =kobject_add (&pinst->kobj,NULL ,"%s" , name);if (!ret)kobject_uevent (&pinst->kobj,KOBJ_ADD );
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 13/251 net: phy: Fix not to call phy_resume() if PHY is not attached
In reply to Sasha LevinFrom: Yoshihiro Shimoda <[email protected]>
[ Upstream commit ef1b5bf506b1f0ee3edc98533e1f3ecb105eb46a ]
This patch fixes an issue that mdio_bus_phy_resume() doesn't call phy_resume() if the PHY is not attached.
--- drivers/net/phy/phy_device.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/net/phy/phy_device.c +6 -5
@@ -80,7 +80,7 @@ static LIST_HEAD(phy_fixup_list);static DEFINE_MUTEX (phy_fixup_lock);#ifdef CONFIG_PM -static bool mdio_bus_phy_may_suspend (struct phy_device *phydev) +static bool mdio_bus_phy_may_suspend (struct phy_device *phydev,bool suspend) {struct device_driver *drv = phydev->mdio.dev.driver;struct phy_driver *phydrv =to_phy_driver (drv);
@@ -92,10 +92,11 @@ static bool mdio_bus_phy_may_suspend(struct phy_device *phydev)/* PHY not attached? May suspend if the PHY has not already been * suspended as part of a prior call to phy_disconnect() -> * phy_detach() -> phy_suspend() because the parent netdev might be the -* MDIO bus driver and clock gated at this point. +* MDIO bus driver and clock gated at this point. Also may resume if +* PHY is not attached. */ if (!netdev) -return !phydev->suspended; +return suspend ? !phydev->suspended : phydev->suspended;/* Don't suspend PHY if the attached netdev parent may wakeup. * The parent may point to a PCI device, as in tg3 driver.
@@ -125,7 +126,7 @@ static int mdio_bus_phy_suspend(struct device *dev)if (phydev->attached_dev && phydev->adjust_link)phy_stop_machine (phydev); -if (!mdio_bus_phy_may_suspend (phydev)) +if (!mdio_bus_phy_may_suspend (phydev, true))return 0 ;return phy_suspend (phydev);
@@ -136,7 +137,7 @@ static int mdio_bus_phy_resume(struct device *dev)struct phy_device *phydev =to_phy_device (dev);int ret; -if (!mdio_bus_phy_may_suspend (phydev)) +if (!mdio_bus_phy_may_suspend (phydev, false)) goto no_resume; ret =phy_resume (phydev);
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 11/251 exportfs: fix 'passing zero to ERR_PTR()' warning
In reply to Sasha LevinFrom: YueHaibing <[email protected]>
[ Upstream commit 909e22e05353a783c526829427e9a8de122fba9c ]
Fix a static code checker warning:
fs/exportfs/expfs.c:171 reconnect_one() warn: passing zero to 'ERR_PTR'
The error path for lookup_one_len_unlocked failure should set err to PTR_ERR.
--- fs/exportfs/expfs.c | 1 + 1 file changed, 1 insertion(+)
fs/exportfs/expfs.c +1 -0
@@ -146,6 +146,7 @@ static struct dentry *reconnect_one(struct vfsmount *mnt, tmp =lookup_one_len_unlocked (nbuf, parent,strlen (nbuf));if (IS_ERR (tmp)) {dprintk ("%s: lookup failed: %d\n" , __func__,PTR_ERR (tmp)); + err =PTR_ERR (tmp); goto out_err; }if (tmp != dentry) {
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 5/251 regulator: fixed: Default enable high on DT regulators
In reply to Sasha LevinFrom: Linus Walleij <[email protected]>
[ Upstream commit 28be5f15df2ee6882b0a122693159c96a28203c7 ]
commit efdfeb079cc3
("regulator: fixed: Convert to use GPIO descriptor only") switched to use gpiod_get() to look up the regulator from the gpiolib core whether that is device tree or boardfile.
This meant that we activate the code ina603a2b8d86e ("gpio: of: Add special quirk to parse regulator flags") which means the descriptors coming from the device tree already have the right inversion and open drain semantics set up from the gpiolib core.
As the fixed regulator was inspected again we got the inverted inversion and things broke.
Fix it by ignoring the config in the device tree for now: the later patches in the series will push all inversion handling over to the gpiolib core and set it up properly in the boardfiles for legacy devices, but I did not finish that for this kernel cycle.
--- drivers/regulator/fixed.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/regulator/fixed.c +8 -3
@@ -84,9 +84,14 @@ of_get_fixed_voltage_config(struct device *dev,of_property_read_u32 (np,"startup-delay-us" , &config->startup_delay); - config->enable_high =of_property_read_bool (np,"enable-active-high" ); - config->gpio_is_open_drain =of_property_read_bool (np, -"gpio-open-drain" ); +/* +* FIXME: we pulled active low/high and open drain handling into +* gpiolib so it will be handled there. Delete this in the second +* step when we also remove the custom inversion handling for all +* legacy boardfiles. +*/ + config->enable_high =1 ; + config->gpio_is_open_drain =0 ;if (of_find_property (np,"vin-supply" ,NULL )) config->input_supply ="vin" ;
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 9/251 mlxsw: reg: QEEC: Add minimum shaper fields
In reply to Sasha LevinFrom: Petr Machata <[email protected]>
[ Upstream commit 8b931821aa04823e2e5df0ae93937baabbd23286 ]
Add QEEC.mise (minimum shaper enable) and QEEC.min_shaper_rate to enable configuration of minimum shaper.
Increase the QEEC length to 0x20 as well: that's the length that the register has had for a long time now, but with the configurations that mlxsw typically exercises, the firmware tolerated 0x1C-sized packets. With mise=true however, FW rejects packets unless they have the full required length.
--- drivers/net/ethernet/mellanox/mlxsw/reg.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxsw/reg.h +21 -1
@@ -1873,7 +1873,7 @@ static inline void mlxsw_reg_qtct_pack(char *payload, u8 local_port,* Configures the ETS elements. */ #define MLXSW_REG_QEEC_ID 0x400D -#define MLXSW_REG_QEEC_LEN 0x1C +#define MLXSW_REG_QEEC_LEN 0x20static const struct mlxsw_reg_info mlxsw_reg_qeec = { .id =MLXSW_REG_QEEC_ID ,
@@ -1918,6 +1918,15 @@ MLXSW_ITEM32(reg, qeec, element_index, 0x04, 0, 8);*/ MLXSW_ITEM32 (reg, qeec, next_element_index,0x08 ,0 ,8 ); +/* reg_qeec_mise +* Min shaper configuration enable. Enables configuration of the min +* shaper on this ETS element +* 0 - Disable +* 1 - Enable +* Access: RW +*/ +MLXSW_ITEM32 (reg, qeec, mise,0x0C ,31 ,1 ); +enum {MLXSW_REG_QEEC_BYTES_MODE ,MLXSW_REG_QEEC_PACKETS_MODE ,
@@ -1934,6 +1943,17 @@ enum {*/ MLXSW_ITEM32 (reg, qeec, pb,0x0C ,28 ,1 ); +/* The smallest permitted min shaper rate. */ +#define MLXSW_REG_QEEC_MIS_MIN 200000/* Kbps */ + +/* reg_qeec_min_shaper_rate +* Min shaper information rate. +* For CPU port, can only be configured for port hierarchy. +* When in bytes mode, value is specified in units of 1000bps. +* Access: RW +*/ +MLXSW_ITEM32 (reg, qeec, min_shaper_rate,0x0C ,0 ,28 ); +/* reg_qeec_mase * Max shaper configuration enable. Enables configuration of the max * shaper on this ETS element.
Signature · 1 line
2.20.1
Sasha Levin
maintainerPATCH 4/251 IB/rxe: replace kvfree with vfree
In reply to Sasha LevinFrom: Zhu Yanjun <[email protected]>
[ Upstream commit 721ad7e643f7002efa398838693f90284ea216d1 ]
The buf is allocated by vmalloc_user in the function rxe_queue_init. So it is better to free it by vfree.
--- drivers/infiniband/sw/rxe/rxe_cq.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_qp.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/infiniband/sw/rxe/rxe_cq.c +2 -2
@@ -30,7 +30,7 @@* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - +#include <linux/vmalloc.h> #include "rxe.h" #include "rxe_loc.h" #include "rxe_queue.h"
@@ -89,7 +89,7 @@ int rxe_cq_from_init(struct rxe_dev *rxe, struct rxe_cq *cq, int cqe, err =do_mmap_info (rxe, udata, false, context, cq->queue->buf, cq->queue->buf_size, &cq->queue->ip);if (err) { -kvfree (cq->queue->buf); +vfree (cq->queue->buf);kfree (cq->queue);return err; }
drivers/infiniband/sw/rxe/rxe_qp.c +3 -2
@@ -34,6 +34,7 @@#include <linux/skbuff.h> #include <linux/delay.h> #include <linux/sched.h> +#include <linux/vmalloc.h> #include "rxe.h" #include "rxe_loc.h"
@@ -255,7 +256,7 @@ static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, qp->sq.queue->buf_size, &qp->sq.queue->ip);if (err) { -kvfree (qp->sq.queue->buf); +vfree (qp->sq.queue->buf);kfree (qp->sq.queue);return err; }
@@ -312,7 +313,7 @@ static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, qp->rq.queue->buf_size, &qp->rq.queue->ip);if (err) { -kvfree (qp->rq.queue->buf); +vfree (qp->rq.queue->buf);kfree (qp->rq.queue);return err; }
Signature · 1 line
2.20.1