From patchwork Sun Oct 6 17:19:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 175294 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3305500ill; Sun, 6 Oct 2019 10:39:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvTeNyUp+R8lVp/OmUYDkxcCKFSZwlBzDM1CLwAE2fo25z2ShNk3FBFMG9r1yzdJfsQtEi X-Received: by 2002:a17:907:205b:: with SMTP id pg27mr20346423ejb.135.1570383587299; Sun, 06 Oct 2019 10:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570383587; cv=none; d=google.com; s=arc-20160816; b=c5NG3+Z7TNGJT1EAxuAH8hsXDikr5c0XTNtrnojkpLprV1tqkeViiouqp2C3/dgt69 H3GcSYin+qmClCE2A3SWcvrILuGrZHS3zh8Skguw9L/S//SjhJFrFwoKrT0cm0ur5Lgg 36x492TsWjOTPUSvqcEhDrZOwB1pB+5/L44dmhu48Mw5EbdKUW8Fo0DujHEtXIVdB9ZG PVMOkpkSlz1uqC2yp7RQbuNIVucys0845ZUvhtePAOIcrZX7mvtG1YhyHzVPmAlrTNMk WKq+BGBhXHhfP4vM/TNE+f22j9detRJcqc5KOFEXAkHjKsUDTPGcMGuSZfhtH7cRhyxN b7kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hmWSX0zBKuSyTQ8BDHoqyoMZvAsZ9/Qt35o4Ay8OkU8=; b=UnBJx23bG5Hk2ycUxiD5hxzG8uOBHO4lAdje1SDHR712PXmL3wZ2QJFRtjAE6swpAt Xqrph/CvpzmEokqM1yHxBnKIH2EN2grAf54fS0YGKde7W/F6i8rbaIR78S6SUTUItl9G iqDFxM8zgiGdFbTKNvj/gktd2YgGqJ0Js2OPaoXtI7lmz4fPyBWOg12812l0zABy5icq 1y9Oe811c0WcvlBJiMGmi3CeIiGqoiebbjB0LqBUQPf0R+87Ca0rSimnyKgk3YvFlJlu DhKA/9Sp74h72wJCwQG1UXRzUYeXcPmiwhvnfTLc/tSqYyTH/U15NZoERP6KxWUzo2kG vCMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Xv7a+4y8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g21si7468207edg.339.2019.10.06.10.39.46; Sun, 06 Oct 2019 10:39:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Xv7a+4y8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730836AbfJFRjo (ORCPT + 27 others); Sun, 6 Oct 2019 13:39:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:39170 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730829AbfJFRjm (ORCPT ); Sun, 6 Oct 2019 13:39:42 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 14F132080F; Sun, 6 Oct 2019 17:39:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570383581; bh=JJiAr0U+y5fK3GJTz/G2EY+1qfyIBZP/h1D8Vy3Euz4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xv7a+4y8peWBwCQ6mIRjKp5ihLBeSXt5ivc6T9LTKwMiXCaFmXibpy76Mw5nTDsff /tt4MPtlxA/pn43bTa8Na0KjQU0F6s3oH2Bjo2XKILIQxVcwTVg7pXJY9nRANuuLdP BQsVvg4zO624fmuhT46znQ6NSzA18p7Ie0r0RJgw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Linus Walleij , Sasha Levin Subject: [PATCH 5.3 002/166] drm/mcde: Fix uninitialized variable Date: Sun, 6 Oct 2019 19:19:28 +0200 Message-Id: <20191006171213.003375227@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006171212.850660298@linuxfoundation.org> References: <20191006171212.850660298@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Walleij [ Upstream commit ca5be902a87ddccc88144f2dea21b5f0814391ef ] We need to handle the case when of_drm_find_bridge() returns NULL. Reported-by: Dan Carpenter Acked-by: Dan Carpenter Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20190618115245.13915-1-linus.walleij@linaro.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/mcde/mcde_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c index baf63fb6850a4..a810568c76df7 100644 --- a/drivers/gpu/drm/mcde/mcde_drv.c +++ b/drivers/gpu/drm/mcde/mcde_drv.c @@ -319,7 +319,7 @@ static int mcde_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct drm_device *drm; struct mcde *mcde; - struct component_match *match; + struct component_match *match = NULL; struct resource *res; u32 pid; u32 val; @@ -485,6 +485,10 @@ static int mcde_probe(struct platform_device *pdev) } put_device(p); } + if (!match) { + dev_err(dev, "no matching components\n"); + return -ENODEV; + } if (IS_ERR(match)) { dev_err(dev, "could not create component match\n"); ret = PTR_ERR(match); From patchwork Sun Oct 6 17:20:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 175295 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3307273ill; Sun, 6 Oct 2019 10:42:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqz0oEYz2hMCdvTTpTmoFEwNk+tIuOgwmAQJLNn4uoEqx1De0tZco5315uqLUX3jBllK3vl/ X-Received: by 2002:a17:906:1152:: with SMTP id i18mr20753342eja.113.1570383727309; Sun, 06 Oct 2019 10:42:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570383727; cv=none; d=google.com; s=arc-20160816; b=nZzMB/wY8fqBMmeATazuqeE3WGAxwseWhLbRkZZo4WECihphOKj+tjx01Lpn7QXpND +2gSVxG7iO5DArHWV4DmlUWUzzEXiGUB2v8RlovE4wPxH2FR5ki1+kB5cvtyucJIXAtm rpoKJ/DrDqFmOx0qeT5WVCXh6ZLWdnKzS/KaQUhlQW2fub0JguZ/wa010uCOuxaXeQF1 qeZ3LlzmQBirftTaplhYetPS90Bi1kFM/7o+Vf+KhdtIfnR6kl/WFB+dxWl0UYvWmilg asK0ywncJQvkn39hhpDpAXcmRs59yQiX+FFp77LnOyLPUskIy8Kf8K4Bv4OTYytWCEk8 L0Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=B0TT0lrvsXSmkfPiW6IQ7hVHNK5RQU7jUGQEHnIE1bA=; b=uVC56sCwXY6g6RGiqndIYGy/wURr61AUL4Iv+N/k/x0+21uWKNr6jCVt34c6NJiauw NFjGBQzfLZfAV76ANaZ+OruPNJlhXfzpul2IkAoyT0u3C0nUUddg8+R9jvhCNp6Es4tM PelGke0p38DK3ZydqsoOq26mIyXB2ygTeT3Q9Za8McgQHbMtRiZyd/8LZrSOGwDrIMI4 uVf6VY7jFkxqGkLEElE4eSdwSLj79Xmgt5EPn+S61mk9mIzh1Vjoa41rYslcsFXHuNf+ TUP/50nKn0NxrBl3R/vsIcjB6TIlsNsh8FgoQx4o9NoPufgMMlg7jYUvP04y0RzjNfJD c91A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=u4cVwoFE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c26si7518233edx.353.2019.10.06.10.42.06; Sun, 06 Oct 2019 10:42:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=u4cVwoFE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730906AbfJFRmC (ORCPT + 27 others); Sun, 6 Oct 2019 13:42:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:41704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730882AbfJFRmA (ORCPT ); Sun, 6 Oct 2019 13:42:00 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 07FFC20700; Sun, 6 Oct 2019 17:41:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570383719; bh=oZ/CdR4pk54TSdx6nW2duEampafCF/90uNe4q3GZa9I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u4cVwoFEe7dqN2L4qq1ne4ePPgRb99YYoW0xOOg/MIbu8ltHB/GYfdyGnbkMPQ9F7 IY5ikJY8thQ+ZqsoYigAL7zPnADtMYUZHkdVDQhN9kyvI/6D44OpUaxyHgLhVvlsox Mujk4oyX9jXKI8r1072LRHUreW5xaJOUYlVZNJ1k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Brown , Linus Walleij , Arnd Bergmann , Sasha Levin Subject: [PATCH 5.3 069/166] ARM: dts: dir685: Drop spi-cpol from the display Date: Sun, 6 Oct 2019 19:20:35 +0200 Message-Id: <20191006171219.185398266@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006171212.850660298@linuxfoundation.org> References: <20191006171212.850660298@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Walleij [ Upstream commit 2a7326caab479ca257c4b9bd67db42d1d49079bf ] The D-Link DIR-685 had its clock polarity set as active low using the special SPI "spi-cpol" property. This is not correct: the datasheet clearly states: "Fix SCL to GND level when not in use" which is indicative that this line is active high. After a recent fix making the GPIO-based SPI driver force the clock line de-asserted at the beginning of each SPI transaction this reared its ugly head: now de-asserted was taken to mean the line should be driven high, but it should be driven low. Fix this up in the DTS file and the display works again. Link: https://lore.kernel.org/r/20190915135444.11066-1-linus.walleij@linaro.org Cc: Mark Brown Fixes: 2922d1cc1696 ("spi: gpio: Add SPI_MASTER_GPIO_SS flag") Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- arch/arm/boot/dts/gemini-dlink-dir-685.dts | 1 - 1 file changed, 1 deletion(-) -- 2.20.1 diff --git a/arch/arm/boot/dts/gemini-dlink-dir-685.dts b/arch/arm/boot/dts/gemini-dlink-dir-685.dts index bfaa2de63a100..e2030ba16512f 100644 --- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts +++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts @@ -72,7 +72,6 @@ reg = <0>; /* 50 ns min period = 20 MHz */ spi-max-frequency = <20000000>; - spi-cpol; /* Clock active low */ vcc-supply = <&vdisp>; iovcc-supply = <&vdisp>; vci-supply = <&vdisp>; From patchwork Sun Oct 6 17:20:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 175300 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3313118ill; Sun, 6 Oct 2019 10:49:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxa8oPiZ2VxlbQ+A1zNCeARxVbDGpfhwjgLoFSmtSd+5Cr/FOukTGeJNF/cjEZyeNsS1BN8 X-Received: by 2002:a50:b0c5:: with SMTP id j63mr25744464edd.90.1570384170174; Sun, 06 Oct 2019 10:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570384170; cv=none; d=google.com; s=arc-20160816; b=lzzaDkK9TdXmu1uBF5nRCV/l2VwRA1FP2hEJ5uVx7mo3E3fLXyv53+/IoeHc4s2EJU 33ZOIEme4syYr6gRY/GMR9JLdPaAz+66YSWkamhEqiElnskN1i50u72a0H7B/YSUYN+p Ve9BrZH2yaTBdJuVh9ommeKka1xNunGeiYbRYllolD4trSDofR3ej5F9qEKiq+tUcNgM 8v+j5VaIT1bOcWGzLhNqfipbCnGK358OJvETHsEiDT083SfQQojZfyoT/BPRKQ7v13GH oMzKq/g0vabWpu5EiT1OOt2jjTxINGzd9BeD/Rw4Pcqe8vaTNlBR6xm7bxdGphwcRADA W1xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Wm8do8uUkgpxPUlaWaQ3vx1rSMZzH4JTTST8FZ541WU=; b=o63ingmTSQgLdugM37caDbV0UCtlHiFCJNufemW8rMunmTgMmtglj3YeFvgaUmeoLc zlK4xLBDl/yilnMPxcpnnWT3NirnYoHQZf2K9kuifreFaFzSJxW0yQ+EElyCYnX0nAoi jm4SKEuZFrXk+afQ6LjKE79mFnWIBY25jpRv/jdLHitG2QiYRRwlDLZPupXXy6foLgfM ijcQhYSrUzOfhTO6nZ/GQ1kVz/B/lTInBJf735ke77s9skvNVC5NTK8+sY1dbpFE/c1y T+poMqiHDENTf+fwG5mfPCqX6lpYyZQhL8dg1kgLTC5xwCa1h6U3EzS0+iMQoRhJV7UV g+Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D29NobGm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h26si5968266ejx.177.2019.10.06.10.49.29; Sun, 06 Oct 2019 10:49:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D29NobGm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730932AbfJFRmG (ORCPT + 27 others); Sun, 6 Oct 2019 13:42:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:41768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730902AbfJFRmD (ORCPT ); Sun, 6 Oct 2019 13:42:03 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B81482080F; Sun, 6 Oct 2019 17:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570383722; bh=OykuoBvG7eWAabm6JjGpW/J91pGbkUxRh6yTEZjST08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D29NobGm5re8ei1L7ORz2E9fyMRHiKCOyeEvPk7tNYgNowDiXXAr5cgbiwKIzYrVr +wylP/ZB7eftBKVFHE4A8YrFEaxZxvmHzb4Wi8RFlREPpoMzxWTo5XZ3H/PQxD5k88 QUr057NRhd/D1Lmv60OjQamMDwhquR3TtjfS3a1Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nick Desaulniers , Nathan Chancellor , Andrew Murray , Arnd Bergmann , Will Deacon , Sasha Levin Subject: [PATCH 5.3 070/166] arm64: fix unreachable code issue with cmpxchg Date: Sun, 6 Oct 2019 19:20:36 +0200 Message-Id: <20191006171219.278323490@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006171212.850660298@linuxfoundation.org> References: <20191006171212.850660298@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 920fdab7b3ce98c14c840261e364f490f3679a62 ] On arm64 build with clang, sometimes the __cmpxchg_mb is not inlined when CONFIG_OPTIMIZE_INLINING is set. Clang then fails a compile-time assertion, because it cannot tell at compile time what the size of the argument is: mm/memcontrol.o: In function `__cmpxchg_mb': memcontrol.c:(.text+0x1a4c): undefined reference to `__compiletime_assert_175' memcontrol.c:(.text+0x1a4c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `__compiletime_assert_175' Mark all of the cmpxchg() style functions as __always_inline to ensure that the compiler can see the result. Acked-by: Nick Desaulniers Reported-by: Nathan Chancellor Link: https://github.com/ClangBuiltLinux/linux/issues/648 Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Reviewed-by: Andrew Murray Tested-by: Andrew Murray Signed-off-by: Arnd Bergmann Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/include/asm/cmpxchg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/arch/arm64/include/asm/cmpxchg.h b/arch/arm64/include/asm/cmpxchg.h index 7a299a20f6dcc..7a8b8bc69e8d1 100644 --- a/arch/arm64/include/asm/cmpxchg.h +++ b/arch/arm64/include/asm/cmpxchg.h @@ -63,7 +63,7 @@ __XCHG_CASE( , , mb_, 64, dmb ish, nop, , a, l, "memory") #undef __XCHG_CASE #define __XCHG_GEN(sfx) \ -static inline unsigned long __xchg##sfx(unsigned long x, \ +static __always_inline unsigned long __xchg##sfx(unsigned long x, \ volatile void *ptr, \ int size) \ { \ @@ -105,7 +105,7 @@ __XCHG_GEN(_mb) #define arch_xchg(...) __xchg_wrapper( _mb, __VA_ARGS__) #define __CMPXCHG_GEN(sfx) \ -static inline unsigned long __cmpxchg##sfx(volatile void *ptr, \ +static __always_inline unsigned long __cmpxchg##sfx(volatile void *ptr, \ unsigned long old, \ unsigned long new, \ int size) \ @@ -212,7 +212,7 @@ __CMPWAIT_CASE( , , 64); #undef __CMPWAIT_CASE #define __CMPWAIT_GEN(sfx) \ -static inline void __cmpwait##sfx(volatile void *ptr, \ +static __always_inline void __cmpwait##sfx(volatile void *ptr, \ unsigned long val, \ int size) \ { \ From patchwork Sun Oct 6 17:20:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 175296 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3307382ill; Sun, 6 Oct 2019 10:42:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDrVihmjCpE0DWkrRLLFrg4vxhwXufflwDXFBDC1w4xtD8VjqpMFz7jAb+aMTNnCwVL5o9 X-Received: by 2002:a50:9fce:: with SMTP id c72mr25956488edf.166.1570383736416; Sun, 06 Oct 2019 10:42:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570383736; cv=none; d=google.com; s=arc-20160816; b=mFcxyfKkMuW7u3dRRqlqGsVBuE35/i6i20C176wCTiV2BeidcrPqgtLNOWLPmG7u71 ziT6WyRyMly4XLg5sPYJvAVVJmm20GIoyT31ozTqf6zuTrrEQhKsiQGYmWTq1qyW0Tp2 X8FTTxLsY9gxDOU9u9Do9c8FLUClh8ebcA1Fe9UEwKjCVDr939Iyx83y0yoIM6JudhK/ lyydTCN55RME2uafXtlyk3OZOKTowy2o9aritLyOBJkPyeCwLYmCj5FlhqCBxHpQWUBr b+5/uhh4GjqD+oH9wzZcdEdT30LoTiFgEABymcRxDXCMPmGLJFzYopYk+e1zS0Fw4iWy L0kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9q/QhvSxlOQBgtgkWSiifKTjIpKnhmPDUh3hZpZm9gU=; b=Lmr8Zs8HuiNQbOmOtr2Zcd8sVXHZjSldxMFpqgPdFVEb8MZDf0e4mEja5FSJ1xTxf3 jet0l2y3m8wDKM7KLb+KknVW2CUz8iBFunft3GYz+eaTDVSxDyx/zDfRjnd2oHlQ5+vI MllKZ5qd/HiJhaR21kt0dPEN8iRuWPlo2RjTbt1oKG1kimx6NJ6ddsuFMQvP1scqYU00 MWcLABKf59JJi3qeuJWzom9GtBpJcg6nF/s0UEYpoHNGWIrmI7Nb1dsN3GgVBPeQsuVH 47TbpkHZ8VqsjtTrubi18EN0fIx81GWY04+GvIQKCK3z5GPvgqhyGCNRtcTS2Pr4y1ha C9ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m8exilOf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c26si7518233edx.353.2019.10.06.10.42.16; Sun, 06 Oct 2019 10:42:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m8exilOf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731287AbfJFRmP (ORCPT + 27 others); Sun, 6 Oct 2019 13:42:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:41976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730351AbfJFRmN (ORCPT ); Sun, 6 Oct 2019 13:42:13 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6A28F20700; Sun, 6 Oct 2019 17:42:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570383732; bh=NpxL+WCCtdslumQX2yqO+h1199gm+NJi3hIXzXiutNM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m8exilOfkITt/tTO4SX+3VaSXlM9ma/LRoGnor/wB5Ca/qSAqTZuE8YCH0MtWBtiP LbHr0NEujkWmRxtuE2hK3VFueri7StFZMO+GFKvph+J5qT3y8B2Sq07Ydgz6CncgJV xYTynWlGeXXZlsMq6+n+0SP2ZIxFFSF+ooC4I3Ig= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dong Aisheng , Jordan Crouse , Bjorn Andersson , Stephen Boyd , Sasha Levin Subject: [PATCH 5.3 074/166] clk: Make clk_bulk_get_all() return a valid "id" Date: Sun, 6 Oct 2019 19:20:40 +0200 Message-Id: <20191006171219.660307134@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006171212.850660298@linuxfoundation.org> References: <20191006171212.850660298@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bjorn Andersson [ Upstream commit 7f81c2426587b34bf73e643c1a6d080dfa14cf8a ] The adreno driver expects the "id" field of the returned clk_bulk_data to be filled in with strings from the clock-names property. But due to the use of kmalloc_array() in of_clk_bulk_get_all() it receives a list of bogus pointers instead. Zero-initialize the "id" field and attempt to populate with strings from the clock-names property to resolve both these issues. Fixes: 616e45df7c4a ("clk: add new APIs to operate on all available clocks") Fixes: 8e3e791d20d2 ("drm/msm: Use generic bulk clock function") Cc: Dong Aisheng Cc: Jordan Crouse Signed-off-by: Bjorn Andersson Link: https://lkml.kernel.org/r/20190913024029.2640-1-bjorn.andersson@linaro.org Reviewed-by: Jordan Crouse Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/clk-bulk.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/clk/clk-bulk.c b/drivers/clk/clk-bulk.c index 524bf9a530985..e9e16425c739c 100644 --- a/drivers/clk/clk-bulk.c +++ b/drivers/clk/clk-bulk.c @@ -18,10 +18,13 @@ static int __must_check of_clk_bulk_get(struct device_node *np, int num_clks, int ret; int i; - for (i = 0; i < num_clks; i++) + for (i = 0; i < num_clks; i++) { + clks[i].id = NULL; clks[i].clk = NULL; + } for (i = 0; i < num_clks; i++) { + of_property_read_string_index(np, "clock-names", i, &clks[i].id); clks[i].clk = of_clk_get(np, i); if (IS_ERR(clks[i].clk)) { ret = PTR_ERR(clks[i].clk);