From patchwork Fri Feb 14 13:17:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13974889 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87D10264A62 for ; Fri, 14 Feb 2025 13:18:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739539082; cv=none; b=oxq49dlRVE+bwiPT/mksdr5E7Df5o/FT5MIdYRdJeVEBW5LQwJzVeawkuO2AMAW6IH15ECSBWdoiSE8r8wM4rDDZqLf8oxXxfmZmougH+fhvanpco7PmMBSeFLa5X3nLZZSf3NW1nX6PzY25Lz9iPsgnlQXdIwxRoGt2FlcOtOg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739539082; c=relaxed/simple; bh=LPkeNjhgTgrfE3w0Cx2k5M/6N8eDWwbeGgVJuvK3gw4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BAjZ1/ekm5v3vMtyLxpguSJhvSpMHX/46vXoPPS9EauMm0NqFPYkxLbEM2gfRVvZ1ZVAzEihFjPWduMQQ9KrMX/+alD71xrtj07GFlMkvrX79R4Rk+pHlucpofrXGcLnY8IOz10/pWpiu0NT9Hw9wxvg3Ka55WTmyPPWwUWGKAI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=SvaYpStP; arc=none smtp.client-ip=209.85.221.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SvaYpStP" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-38da6a1a20bso257185f8f.1 for ; Fri, 14 Feb 2025 05:18:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739539079; x=1740143879; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=2NB0wCCnlmpUQ9jhsUGDr5ffuVFC1GqkwU8kAxjRGDY=; b=SvaYpStPxRXekunD4mItPW64NeP6lFBRd/qluFZnCWaqTGkOCPOA2gFPYlvR6r3cwX dMTSeA9bpAtyXrTtFT4P25QSnbfJRCV06luT0ewJzsTIff3cpi+LVUhygw51eGCskCu0 jMfoqdmS81cieSBqB8Vnwu75fnBc2SuMbAelngh1/Vl7eaqu1YqztcPbrZN5U/6hQzR+ C/u1zJp9aB+ipd9fsi2mHPd3IbJJGYv/wcYPpy069mA2hmxiHkj23TMbQO9aJaeuTc1U +uAbFUO5CvPLF5yGhTDmoeICrYq93l8RP0uYN4hVxZAD8elKxwj7rl/voPgZubikvSRT 5ACA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739539079; x=1740143879; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2NB0wCCnlmpUQ9jhsUGDr5ffuVFC1GqkwU8kAxjRGDY=; b=H4rhpiM2WfrPfKj9Z80T4sIeN0K8xcj5Qzpe4ajcyYDtrefr7An0d77stI46gtqSVd MCVOQR4n9Z5Y3kln8VXbsKry9xPPeh8hqcUfnwds+5DyRf783wBnxY1eAuNudDvj8wVt GMASOjVNnKuAov6iWRSRFR0YFG079Wkt7YBGV2yg/ReJzQbIDVYZ4gaTGAFwsuI1vOn5 CgT35mL6v3A42NxNLFjUa0az2QFk87wCISMmxXxhfLlnTAIFfr0pCNjbqhIyWGCf8HE4 SqdJdpd2DiwHwno/8hkf+0q58Y8jPI9qnTdViafuHv3X+OGYNPzGRa3FpurLNYTDTj0U 0l+w== X-Gm-Message-State: AOJu0YyyxT1YBaaM/SZEjMNz1H8a/oxCuDPmld0/Ii71JahNFqqFMhzP ofpgg6yvtd27zOJiNYbXZLhW10kANRsys5R0DEXZWzyALzXF+olnOoMxxSt6s/Y= X-Gm-Gg: ASbGncuGjDbI6vfpdndd9f6RvSP4aWqaYQnqAViRrILo0AgP4JDAWOSgFCrF8sxrLx3 uc7b1UotvBvp649+efi0ZahI/JaypMxZkm5gEEvf+ihYBrty/HPeuzcIoeLy+TJsHJ2TY8vc2C6 KXfw9ifsQgMYIDkNtcjyscFC5P2tdcyUID5as6TpOAxoVJuL4gvB/5ckv3E9JGz8PYzOEaEfM2m GQG4n+kQCjIAR/Mf7vzo6lZ/82qIl3+TgVfPaSl5BDCcmdDbALoPT5Ly0Zww7XYF0GqUlifdlP/ Wk9iZmTB7D38gWOZebFc2tiUdhO2HjQ= X-Google-Smtp-Source: AGHT+IF8ZnKnRDAen3JkbML52TX6uJAA3HnEdc/rv0itSdm1wPO0z++HDOBIO7lmH5u+PdSl8U/PYg== X-Received: by 2002:a05:6000:1a8f:b0:38f:23d0:fdaa with SMTP id ffacd0b85a97d-38f2c7e8b5emr1623911f8f.8.1739539078710; Fri, 14 Feb 2025 05:17:58 -0800 (PST) Received: from [127.0.1.1] ([178.197.218.144]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38f259d5655sm4607690f8f.77.2025.02.14.05.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2025 05:17:58 -0800 (PST) From: Krzysztof Kozlowski Date: Fri, 14 Feb 2025 14:17:44 +0100 Subject: [PATCH v2 1/4] drm/msm/dsi: Drop redundant NULL-ifying of clocks on error paths Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250214-drm-msm-cleanups-v2-1-1bec50f37dc1@linaro.org> References: <20250214-drm-msm-cleanups-v2-0-1bec50f37dc1@linaro.org> In-Reply-To: <20250214-drm-msm-cleanups-v2-0-1bec50f37dc1@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1666; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=LPkeNjhgTgrfE3w0Cx2k5M/6N8eDWwbeGgVJuvK3gw4=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBnr0J/cUZuSVvSZtf6PljGtni1J0rGlt4NnGK0S 5mv+KmYp1WJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZ69CfwAKCRDBN2bmhouD 1629EACTRdHHc8EpKem2FnQ3ucYUjrK23Tt6Su45uxptKsF51W9HnDFOcGqHdmlU65lg7ByccqA G1XMyAMBZlLqgg7oM33y/k6NR6zUo/1Wnf6cY1/zQwhs4CZ/VaLIZw4DVkdjXzxulLGGOLpyx5O 14mI6fLNfZNptj44gXDGOIjB060LxrhOVyfnhT6YW0ldvlo0ZZvSVGvLDbI+P1fHxur0ZXJTksG ERtk9CtWdgbZA2fbxXQUDbAZpuI934VpxiecQdiofbHrhoEAkO8XWh7uQUDkWrwKb4IBChIZAfa DGn7WLXADtFjENmQ3DtxfXUBQ+V2tY6rZSRH24+tq512zMU7O8lxB2eJFNpCirG7n9KVY8cbhu3 nHewXucKN4QzNLUgoRd4T3Ofa7j9bPtZoi7NKtZ4cdbZOPbmCSqVG+j49bmMM53b+R2/zuwuYOY sXul99MxJiG6cRoII0P1saODFouJRTb8UgdNDCqH9PQtpOdRg90BMxIVr2B2M4NsDl40PwmxMvX BlWbZQQreXuDNh5GVqV5T+JlpPfI05yPcfWDf2jYF/SEUOjUPHhSpmavvzPLcimMrOnMnzOJHT+ Zxe7zCghfP7/nAcHUM0x+Bc6TAzTcNOsfw7uTluJF2mWhiLrG9PLYniOH/M8If+eIVI8G3DHYUF po+1EidI/IGDpgA== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B dsi_clk_init(), which gets the clocks, is called only through platform driver probe and its failure is a failure of the probe. Therefore NULL-ifying specific clocks is pointless and redundant - the PTR_ERR value stored there won't be used/dereferenced afterwards. What's more, variant-specific clock init calls like dsi_clk_init_6g_v2() are not doing this cleanup. Dropping redundant code allows later to make this a bit simpler. Reviewed-by: Abhinav Kumar Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 007311c21fdaa0462b05d53cd8a2aad0269b1727..397c9f1f588558b2081d6400d2cbae746c900697 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -292,7 +292,6 @@ static int dsi_clk_init(struct msm_dsi_host *msm_host) ret = PTR_ERR(msm_host->byte_clk); pr_err("%s: can't find dsi_byte clock. ret=%d\n", __func__, ret); - msm_host->byte_clk = NULL; goto exit; } @@ -301,7 +300,6 @@ static int dsi_clk_init(struct msm_dsi_host *msm_host) ret = PTR_ERR(msm_host->pixel_clk); pr_err("%s: can't find dsi_pixel clock. ret=%d\n", __func__, ret); - msm_host->pixel_clk = NULL; goto exit; } @@ -310,7 +308,6 @@ static int dsi_clk_init(struct msm_dsi_host *msm_host) ret = PTR_ERR(msm_host->esc_clk); pr_err("%s: can't find dsi_esc clock. ret=%d\n", __func__, ret); - msm_host->esc_clk = NULL; goto exit; } From patchwork Fri Feb 14 13:17:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13974890 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3E52264A95 for ; Fri, 14 Feb 2025 13:18:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739539084; cv=none; b=B65uF0MISymmyWhaBdhep8LFVW9Q+T9c/wadXCeOz6xhwq33qWKaOhp6pgeT3EEC8hf7zcsJ0t5YvEHGsqyImZStuohXFZdjnYFpLMp3LxXWrU92jeRzsK2E29a/uEuhPE8Yh/Pohw9coIc8Kb2+2i+rquIRqT7fHKeXYxeYRVw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739539084; c=relaxed/simple; bh=LL1TogbS0I4oRjmhDntXeaINYx8bTjc/f2otEygS0h4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hnb+xp0J43LpF92PcnyDlHNj4w1rGaLS5EOpofralnyUDlpp2P6ZPO3P9RyWOnTjc2PlsNOYh1doH1R6dDaLkYm30hyyAatD2ZdRRGjT97wvCUdzYJ5d2dA4fUNDt/HEQZA5tDgBGIslNxfYl7JoYfXmZtVuBzlLyCMBdhfee0c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=CeloI0wv; arc=none smtp.client-ip=209.85.221.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CeloI0wv" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-38e1cad9e27so216900f8f.1 for ; Fri, 14 Feb 2025 05:18:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739539080; x=1740143880; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ER5spUPaUVlyGOWIrNvzoMizFEk7Lu+Morh7MgKfJEY=; b=CeloI0wvmoGdk2n+0kLtr5Q4rq8J32xKGoFxQShIwjO6xc1fjydB6PRhNF9vJiAL9D omZ6eWEaOUiwK0+YRg+9mNV9yve4qeWMhjJNsKyBO+VK32DaKy9AUgulG8QT6Rh3qe1i pHA7oyee+8kbAoSzA9mWuyZRimQBF4jyKThgQwvY/PTdNj1nbh3oTpszX7/Q9j2ih/Wl 93tB+oKKoTCW0jwcE6p33LZL4HQzZ5wP00KT9zAAz834VwwVe3VM9t+Y5pknyjRfABcQ FULRs5LHVcoVHhL7Fnt4kWrj39mzbBsitxghJCgxrXYrcqVnCNujkT4KjAPlUZLi5zuC 1RTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739539080; x=1740143880; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ER5spUPaUVlyGOWIrNvzoMizFEk7Lu+Morh7MgKfJEY=; b=BEcBrU4KLBLA5L88kHFFFfswVmQuNVBEN9Vm2iaEdiLv7uDLehn5NqVh/X5RsKjsMI +nYuT1u3+ko5cdo+09qpeQfeqv6NTQR3KX27j0IWijHAa8jjbVBtkrSTGGF3a/Qpy0eS 85ihfBB8dGFUCoSdrTDNlJjslgY7BhmrbUROJ5/iNosTV3oybPjOhtezsl7gbwmRWWm9 7MpPJsa04Wdap21rRjlv98z9hZn3/NqnBM+0nktiTSPCiJdaHc1ubehOCBY9DurAHSZ6 aRcYnRf8YzvRVfUCfJLLWSwNnewmilENumYLIpsyG2jvAJKTtt5Oa54K/Ue8POyup0eI ep0g== X-Gm-Message-State: AOJu0YwjRGMX5uZ3IoOEmX74jIaQKXuvjtTu8mOf42wxzmaXrvXdXbDD HJPKH0Gkn2R+h2XrPttMbFwBcQ0xf81GGllz0/k2uS/ZuWVMAyzGU+OaaTaPaXM= X-Gm-Gg: ASbGncuWgmmLLwoDnWwlIrzkssZmouZ6UF12T7L5kp1N/dR4WjEKd1izobkOpemz3iY LmANdkG4VD4CT/nWFesz3tu+GY0DJVxq/8HouhqDyb+vNNWJAFHJEbXvyQy9AAK93Tk3GNdQry7 15TaGU1w9X51evmnKliv8Qut/drf0OxKT9AQAo92XgQ+Qm7yFTyRJruXb+6y7ZG1pZtUYzuaa4D +CVK3yV3WEQwsZQd66OOVZAxWJQE2OFfB2AqtxNC8feEL4ImwJt4pgqibQ/fOMh4/pbJNvGpmB7 7ORcfh8HTRwlTcIf8+My91YmNp9LoOY= X-Google-Smtp-Source: AGHT+IGIlrTgLRsqyJPOqO+awGlXJBj4SLLn6Y0DaVIi6VSMJKuGPZgAAK52EZC+DFxC8B7CiMtSpg== X-Received: by 2002:a05:6000:2d0b:b0:38f:2e80:795 with SMTP id ffacd0b85a97d-38f2e80105fmr620552f8f.13.1739539080149; Fri, 14 Feb 2025 05:18:00 -0800 (PST) Received: from [127.0.1.1] ([178.197.218.144]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38f259d5655sm4607690f8f.77.2025.02.14.05.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2025 05:17:59 -0800 (PST) From: Krzysztof Kozlowski Date: Fri, 14 Feb 2025 14:17:45 +0100 Subject: [PATCH v2 2/4] drm/msm/dsi: Simplify with dev_err_probe() Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250214-drm-msm-cleanups-v2-2-1bec50f37dc1@linaro.org> References: <20250214-drm-msm-cleanups-v2-0-1bec50f37dc1@linaro.org> In-Reply-To: <20250214-drm-msm-cleanups-v2-0-1bec50f37dc1@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=6658; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=LL1TogbS0I4oRjmhDntXeaINYx8bTjc/f2otEygS0h4=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBnr0KAwAeYL3ltzf1YUQ4/nTZFCZJPiaeRiKKAL x/LdP+jkkyJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZ69CgAAKCRDBN2bmhouD 1+7WD/9b//ZURPl4U7Yr+s5hL3Wu8hFQO1WE+u0tnhn8D3Kl0IqH4hJD8JOSaNtUervQAoYxlUx nUUd34dtMfU6DVlpvTJ2Su4pXJRb0rE+ZkdP9E77a9CLtyAnoYAJXufiX/kTNEVMhBZ7z+uO0r9 OJN8Kf6XgaXDcbVlM8DnvdDxAmf+TNQlkUad2I6JK0L9cTb2z2OSLsA3FyuzDdkS09gkoebr8f/ hnhXPhJ2X7kRRHKh3J1iRpyhbhx+3BnppgtZDv5PRSdlQFY1mZ+ACrMEaoNHmtYQmJoDlcha7Sf L4bkdNXt93aCdPPzAX03a/bi8vWJKj6ibGCnGeUdXCCHJ1ny6GJ7SDIm54DMbS1BlWfXvaEQETr I29r6LNKsnmSkCRdnTsw9s6hr1V7+7zjXiuC48OxlAQEZaIrlTlOSQcYdJZAN4BRhhjP/f4PAJ7 CRpj09TJO9tcyqXHgDFH5jXdzJSJPsvxV2sqLkKbbpZ+uWYclvXmvyRitVuN27nHtTFa7FZgTpx 6HFfWgHIxsRoIzldk/DRjmHQxoEtvm03gqqVmgya482q8iULtis0owH7MSH/AlCiOIjxSg8toCB vXJPq3jei/hlmSUT7DBBmzm2g+50ZDv1rlI3ddZ4/PproomerYwQgfY14F+gNK98cCfRBfSL9Y9 v1JLEvMaI3B7rJQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B dsi_get_config(), dsi_clk_init() and msm_dsi_host_init() are called only from platform driver probe function, so using dev_err_probe() is both appropriate and beneficial: - Properly marks device deferred probe status, - Avoids dmesg flood on probe deferrals, - Already incorporates printing ERR value, - Shows device name (in contrast to pr_err()), - Makes code smaller and simpler. Reviewed-by: Abhinav Kumar Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov --- Changes in v2: 1. Update commit msg 2. Tags --- drivers/gpu/drm/msm/dsi/dsi_host.c | 100 +++++++++++++++---------------------- 1 file changed, 41 insertions(+), 59 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 397c9f1f588558b2081d6400d2cbae746c900697..8fc9f5486aebd3c08914409cd3c7824fa0b97515 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -200,7 +200,8 @@ static const struct msm_dsi_cfg_handler *dsi_get_config( ahb_clk = msm_clk_get(msm_host->pdev, "iface"); if (IS_ERR(ahb_clk)) { - pr_err("%s: cannot get interface clock\n", __func__); + dev_err_probe(dev, PTR_ERR(ahb_clk), "%s: cannot get interface clock\n", + __func__); goto exit; } @@ -208,13 +209,13 @@ static const struct msm_dsi_cfg_handler *dsi_get_config( ret = clk_prepare_enable(ahb_clk); if (ret) { - pr_err("%s: unable to enable ahb_clk\n", __func__); + dev_err_probe(dev, ret, "%s: unable to enable ahb_clk\n", __func__); goto runtime_put; } ret = dsi_get_version(msm_host->ctrl_base, &major, &minor); if (ret) { - pr_err("%s: Invalid version\n", __func__); + dev_err_probe(dev, ret, "%s: Invalid version\n", __func__); goto disable_clks; } @@ -281,39 +282,31 @@ static int dsi_clk_init(struct msm_dsi_host *msm_host) msm_host->num_bus_clks = cfg->num_bus_clks; ret = devm_clk_bulk_get(&pdev->dev, msm_host->num_bus_clks, msm_host->bus_clks); - if (ret < 0) { - dev_err(&pdev->dev, "Unable to get clocks, ret = %d\n", ret); - goto exit; - } + if (ret < 0) + return dev_err_probe(&pdev->dev, ret, "Unable to get clocks\n"); /* get link and source clocks */ msm_host->byte_clk = msm_clk_get(pdev, "byte"); - if (IS_ERR(msm_host->byte_clk)) { - ret = PTR_ERR(msm_host->byte_clk); - pr_err("%s: can't find dsi_byte clock. ret=%d\n", - __func__, ret); - goto exit; - } + if (IS_ERR(msm_host->byte_clk)) + return dev_err_probe(&pdev->dev, PTR_ERR(msm_host->byte_clk), + "%s: can't find dsi_byte clock\n", + __func__); msm_host->pixel_clk = msm_clk_get(pdev, "pixel"); - if (IS_ERR(msm_host->pixel_clk)) { - ret = PTR_ERR(msm_host->pixel_clk); - pr_err("%s: can't find dsi_pixel clock. ret=%d\n", - __func__, ret); - goto exit; - } + if (IS_ERR(msm_host->pixel_clk)) + return dev_err_probe(&pdev->dev, PTR_ERR(msm_host->pixel_clk), + "%s: can't find dsi_pixel clock\n", + __func__); msm_host->esc_clk = msm_clk_get(pdev, "core"); - if (IS_ERR(msm_host->esc_clk)) { - ret = PTR_ERR(msm_host->esc_clk); - pr_err("%s: can't find dsi_esc clock. ret=%d\n", - __func__, ret); - goto exit; - } + if (IS_ERR(msm_host->esc_clk)) + return dev_err_probe(&pdev->dev, PTR_ERR(msm_host->esc_clk), + "%s: can't find dsi_esc clock\n", + __func__); if (cfg_hnd->ops->clk_init_ver) ret = cfg_hnd->ops->clk_init_ver(msm_host); -exit: + return ret; } @@ -1879,31 +1872,28 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi) msm_dsi->host = &msm_host->base; ret = dsi_host_parse_dt(msm_host); - if (ret) { - pr_err("%s: failed to parse dt\n", __func__); - return ret; - } + if (ret) + return dev_err_probe(&pdev->dev, ret, "%s: failed to parse dt\n", + __func__); msm_host->ctrl_base = msm_ioremap_size(pdev, "dsi_ctrl", &msm_host->ctrl_size); - if (IS_ERR(msm_host->ctrl_base)) { - pr_err("%s: unable to map Dsi ctrl base\n", __func__); - return PTR_ERR(msm_host->ctrl_base); - } + if (IS_ERR(msm_host->ctrl_base)) + return dev_err_probe(&pdev->dev, PTR_ERR(msm_host->ctrl_base), + "%s: unable to map Dsi ctrl base\n", __func__); pm_runtime_enable(&pdev->dev); msm_host->cfg_hnd = dsi_get_config(msm_host); - if (!msm_host->cfg_hnd) { - pr_err("%s: get config failed\n", __func__); - return -EINVAL; - } + if (!msm_host->cfg_hnd) + return dev_err_probe(&pdev->dev, -EINVAL, + "%s: get config failed\n", __func__); cfg = msm_host->cfg_hnd->cfg; msm_host->id = dsi_host_get_id(msm_host); - if (msm_host->id < 0) { - pr_err("%s: unable to identify DSI host index\n", __func__); - return msm_host->id; - } + if (msm_host->id < 0) + return dev_err_probe(&pdev->dev, msm_host->id, + "%s: unable to identify DSI host index\n", + __func__); /* fixup base address by io offset */ msm_host->ctrl_base += cfg->io_offset; @@ -1915,10 +1905,8 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi) return ret; ret = dsi_clk_init(msm_host); - if (ret) { - pr_err("%s: unable to initialize dsi clks\n", __func__); - return ret; - } + if (ret) + return dev_err_probe(&pdev->dev, ret, "%s: unable to initialize dsi clks\n", __func__); msm_host->rx_buf = devm_kzalloc(&pdev->dev, SZ_4K, GFP_KERNEL); if (!msm_host->rx_buf) { @@ -1931,26 +1919,20 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi) return ret; /* OPP table is optional */ ret = devm_pm_opp_of_add_table(&pdev->dev); - if (ret && ret != -ENODEV) { - dev_err(&pdev->dev, "invalid OPP table in device tree\n"); - return ret; - } + if (ret && ret != -ENODEV) + return dev_err_probe(&pdev->dev, ret, "invalid OPP table in device tree\n"); msm_host->irq = irq_of_parse_and_map(pdev->dev.of_node, 0); - if (!msm_host->irq) { - dev_err(&pdev->dev, "failed to get irq\n"); - return -EINVAL; - } + if (!msm_host->irq) + return dev_err_probe(&pdev->dev, -EINVAL, "failed to get irq\n"); /* do not autoenable, will be enabled later */ ret = devm_request_irq(&pdev->dev, msm_host->irq, dsi_host_irq, IRQF_TRIGGER_HIGH | IRQF_NO_AUTOEN, "dsi_isr", msm_host); - if (ret < 0) { - dev_err(&pdev->dev, "failed to request IRQ%u: %d\n", - msm_host->irq, ret); - return ret; - } + if (ret < 0) + return dev_err_probe(&pdev->dev, ret, "failed to request IRQ%u\n", + msm_host->irq); init_completion(&msm_host->dma_comp); init_completion(&msm_host->video_comp); From patchwork Fri Feb 14 13:17:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13974891 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65964265CAA for ; Fri, 14 Feb 2025 13:18:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739539085; cv=none; b=dc7QRtFg7kv0yIMQwbKwrSBoCIL5xsADRE9kI3284botklzXod4+74she148zEzfJnBSlcap/jpXgBGZ2TYmO5uqWZx4uWb1HMgNOFfRE7WNJ3AVHCxIB6ebrPGybBsj4y2V38WUyWnzne4rsPAIbm6OU0BR3Pvys1/M9cmA6Ik= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739539085; c=relaxed/simple; bh=wrQ7FEvkfGwe1RgjRIh0czcnhsj69UfOzjSd6eJUfEs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Hf4QB2rdCIfAkLi2WMQxVlXqfFVTKjM92g9sJbK7vIWBKZEGaBm1efPORCI1+hQ/+h7GMdXzyVDpmR9tPQyEPazaaJTT9SL3FqDc2L0JI+o5uiNx91l/mvGBOpRXuy0hPq5Tv41pJ0sey64eILQwWrwkMRReKb+pEddZIdoMKvE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=cx3Dw1jk; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="cx3Dw1jk" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-38f240ec571so113870f8f.0 for ; Fri, 14 Feb 2025 05:18:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739539082; x=1740143882; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=4LE456UUhTzImlgmj9NPbG9NBfxzf+5xtSodgSen1s8=; b=cx3Dw1jkBr4brsojr40fDYdqNYNFVsud3FT3dYFd4ZmyB6NRhZIdSs9/nc5CsLuh40 +UXZD6HyVKiuSHc4qG5d4IbbfcxV590KUqbT4DO8Ii3Lh482/kfjP7ed7FQ2uQphfB0F EJDhlQ9kRJjjNFie55tJTzOkpi4kDarxF1uY9CCZgKAHITBMzLjUQApSvSfPn34JpMRZ In/mnpQipeCon9/ZJkFcFJiywaX1GelgM0scMDh9jbN09WkZYBxGhyCNXdSWjd2F/hfE yLoMJsAoLvAxOognhi1CovjKqAZWCQ4oXNCAAlmyecXhxHMLJ+F4PqUl3hgFOuiBLn/4 pA6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739539082; x=1740143882; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4LE456UUhTzImlgmj9NPbG9NBfxzf+5xtSodgSen1s8=; b=ksJ8945BE5Y6jnFZYr83iSMNchV5eGwcNk2QnipvOQWZqfHCNOXMOW2MWfMuOzxXtp 5J9PmzP1HHqpXT9uvp18r68fwJxCK+Tf2g7SXE0XXm8lc4kYDcijkdPlB6yJvgqcuFNA jHpLLtYxSxpDvf+UXNxYUud+VLJxsoM0cxMXBPUz0GkDQO3Yhw/Jn1zQ6KtvlfAmkDFY NSznWdutvlb5pJzVcv1+L9mpwBzUuerhb3wnsqenP2o9p8bpdKETJqsZ8o9+iG/YGbZs im2yhnpyJAP1PYRnpXul66MJddRIwm+FSLyFr1rrqsg0/lGX05W8+HvIvcnAWAzDxxDl twbg== X-Gm-Message-State: AOJu0YynTsahrv1w5uwAthfLqfXiipjS3TLFVcpVWvWKA1P66GXh/d3j L5XfC3AeumMVMCCWQeMFrvDRfZTUVeiMuFaTz2M9p+J9dhtUqyGLPXzxMLVlPMc= X-Gm-Gg: ASbGncswULcJe80gtpR0W37d6wlKcFfvJcuCXhax3dJasCy45ETNl92I8MQ2TVeVC8r BjWLqvh8K0kCXWeAOaOhTY/RIqAG1JPLQ9FoH+4trd4x5soHg78hfz9Rxwg3tUMC6yJc1l0B6fh Fz5FHe/iC5rXV2pDKAGilewe1SOnWPFrC2lTlYm2Ekh7Y+fMjUMRWSgAPLMjlkIE40A+K3cj+nn zbfGCRYBv/44/YAdxONH+zbjpPRZOkCK5AK8v7cCeHKb9/tknjZrsG54NWJU3ZkcBvIX+TJ5872 z/mvVcl5g3XBbHVpETyTPbxzJBXSD5A= X-Google-Smtp-Source: AGHT+IERsb8pyYVEmTlSzt9ruB1hZL+QbDlon6/7017auPvH48KZTGyTGNiDtGRYQSA7i3P3XQptBw== X-Received: by 2002:a05:6000:2104:b0:38d:daf3:be5a with SMTP id ffacd0b85a97d-38f2c777a53mr1413782f8f.7.1739539081555; Fri, 14 Feb 2025 05:18:01 -0800 (PST) Received: from [127.0.1.1] ([178.197.218.144]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38f259d5655sm4607690f8f.77.2025.02.14.05.18.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2025 05:18:01 -0800 (PST) From: Krzysztof Kozlowski Date: Fri, 14 Feb 2025 14:17:46 +0100 Subject: [PATCH v2 3/4] drm/msm/dsi: Minor whitespace and style cleanup Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250214-drm-msm-cleanups-v2-3-1bec50f37dc1@linaro.org> References: <20250214-drm-msm-cleanups-v2-0-1bec50f37dc1@linaro.org> In-Reply-To: <20250214-drm-msm-cleanups-v2-0-1bec50f37dc1@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=5028; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=wrQ7FEvkfGwe1RgjRIh0czcnhsj69UfOzjSd6eJUfEs=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBnr0KBNopLG/nMFbPRPRRezQK48CkRgIUqrVvGU /bI1eQlugiJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZ69CgQAKCRDBN2bmhouD 173sEACJr+2WUT8DaXnwjiufyWp84sk2wSRe2HDObjXTu9WK7LuVDYkXOFjAs9FmcKBXTFns+8G Z8qr4n8qQ8u5vK7XlonY/C5UWCgTDZy6P7LTH8z1PEWq2Q+Ld8Sw8Nesgew2V0jrhr7btKu/elH WNwaOPUUZLvQ+Lz+LHE6I2n1iuR/rY8yx3jfphh4fUlEQ0qJ1Hu8hDohVmwS+UBCEFWnqji9GSO T6/YPokGX/2sU2kTzfQ41/ykcmb5RfUE3djbJxz5LMQL/dUUv3PFgps1lmrjHdf0OHgVrmbgcQu tz44nF3BAl6CtaRBbpxqq7cfuq+kNh0c7XzDdnf/b86ohnwV4YPmb7f044GND9XUjZcRvoByOlM yzbjKOBhDbBtJ9MvKUMlFIEyBde7QgGe6o7hiLHGWmx129NtaWtya850nF/ddDM9HGU1f4Estnb oeUruJdIHDfgqNgUMJyjjGS/SaAfAp41+XmOWkwksgOYFioA95PI+uwwJaytHPzlcvlqtjbUJfq E9F910mNvtRSGVIyHbr8M4v7exsKitd0vo9VxLS/Fxwx90d+R7igmbsP5xv4JQzNjegKNxW5+bP ScnaAIntXwHjKmnI4GC5wANqKFQb1xS7iZr5yiEPVDwono8kmj5JNVu7CE/4sn3jRtHIrUc9xN6 TfOEjLa9cL4A2Yw== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Cleanup few obvious kernel coding style violations: missing or unnecessary braces in 'if-else', unnecessary break lines, incorrect breaking of long function declarations, unnecessary 'else' after a 'return'. No functional impact expected. Reviewed-by: Abhinav Kumar Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 51 +++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 8fc9f5486aebd3c08914409cd3c7824fa0b97515..051e26ae1b7f20d47969c3aff4e7fc6234f18d1a 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -179,18 +179,18 @@ struct msm_dsi_host { int irq; }; - static inline u32 dsi_read(struct msm_dsi_host *msm_host, u32 reg) { return readl(msm_host->ctrl_base + reg); } + static inline void dsi_write(struct msm_dsi_host *msm_host, u32 reg, u32 data) { writel(data, msm_host->ctrl_base + reg); } -static const struct msm_dsi_cfg_handler *dsi_get_config( - struct msm_dsi_host *msm_host) +static const struct msm_dsi_cfg_handler * +dsi_get_config(struct msm_dsi_host *msm_host) { const struct msm_dsi_cfg_handler *cfg_hnd = NULL; struct device *dev = &msm_host->pdev->dev; @@ -370,7 +370,6 @@ int dsi_link_clk_set_rate_6g(struct msm_dsi_host *msm_host) return 0; } - int dsi_link_clk_enable_6g(struct msm_dsi_host *msm_host) { int ret; @@ -588,7 +587,6 @@ static void dsi_calc_pclk(struct msm_dsi_host *msm_host, bool is_bonded_dsi) DBG("pclk=%lu, bclk=%lu", msm_host->pixel_clk_rate, msm_host->byte_clk_rate); - } int dsi_calc_clk_rate_6g(struct msm_dsi_host *msm_host, bool is_bonded_dsi) @@ -677,8 +675,8 @@ static inline enum dsi_traffic_mode dsi_get_traffic_mode(const u32 mode_flags) return NON_BURST_SYNCH_EVENT; } -static inline enum dsi_vid_dst_format dsi_get_vid_fmt( - const enum mipi_dsi_pixel_format mipi_fmt) +static inline enum dsi_vid_dst_format +dsi_get_vid_fmt(const enum mipi_dsi_pixel_format mipi_fmt) { switch (mipi_fmt) { case MIPI_DSI_FMT_RGB888: return VID_DST_FORMAT_RGB888; @@ -689,8 +687,8 @@ static inline enum dsi_vid_dst_format dsi_get_vid_fmt( } } -static inline enum dsi_cmd_dst_format dsi_get_cmd_fmt( - const enum mipi_dsi_pixel_format mipi_fmt) +static inline enum dsi_cmd_dst_format +dsi_get_cmd_fmt(const enum mipi_dsi_pixel_format mipi_fmt) { switch (mipi_fmt) { case MIPI_DSI_FMT_RGB888: return CMD_DST_FORMAT_RGB888; @@ -1282,14 +1280,15 @@ static int dsi_cmd_dma_add(struct msm_dsi_host *msm_host, static int dsi_short_read1_resp(u8 *buf, const struct mipi_dsi_msg *msg) { u8 *data = msg->rx_buf; + if (data && (msg->rx_len >= 1)) { *data = buf[1]; /* strip out dcs type */ return 1; - } else { - pr_err("%s: read data does not match with rx_buf len %zu\n", - __func__, msg->rx_len); - return -EINVAL; } + + pr_err("%s: read data does not match with rx_buf len %zu\n", + __func__, msg->rx_len); + return -EINVAL; } /* @@ -1298,15 +1297,16 @@ static int dsi_short_read1_resp(u8 *buf, const struct mipi_dsi_msg *msg) static int dsi_short_read2_resp(u8 *buf, const struct mipi_dsi_msg *msg) { u8 *data = msg->rx_buf; + if (data && (msg->rx_len >= 2)) { data[0] = buf[1]; /* strip out dcs type */ data[1] = buf[2]; return 2; - } else { - pr_err("%s: read data does not match with rx_buf len %zu\n", - __func__, msg->rx_len); - return -EINVAL; } + + pr_err("%s: read data does not match with rx_buf len %zu\n", + __func__, msg->rx_len); + return -EINVAL; } static int dsi_long_read_resp(u8 *buf, const struct mipi_dsi_msg *msg) @@ -1366,8 +1366,9 @@ static int dsi_cmd_dma_tx(struct msm_dsi_host *msm_host, int len) ret = -ETIMEDOUT; else ret = len; - } else + } else { ret = len; + } return ret; } @@ -1435,11 +1436,12 @@ static int dsi_cmds2buf_tx(struct msm_dsi_host *msm_host, return len; } - /* for video mode, do not send cmds more than - * one pixel line, since it only transmit it - * during BLLP. - */ - /* TODO: if the command is sent in LP mode, the bit rate is only + /* + * for video mode, do not send cmds more than + * one pixel line, since it only transmit it + * during BLLP. + * + * TODO: if the command is sent in LP mode, the bit rate is only * half of esc clk rate. In this case, if the video is already * actively streaming, we need to check more carefully if the * command can be fit into one BLLP. @@ -1864,9 +1866,8 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi) int ret; msm_host = devm_kzalloc(&pdev->dev, sizeof(*msm_host), GFP_KERNEL); - if (!msm_host) { + if (!msm_host) return -ENOMEM; - } msm_host->pdev = pdev; msm_dsi->host = &msm_host->base; From patchwork Fri Feb 14 13:17:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13974892 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2FE9265CCF for ; Fri, 14 Feb 2025 13:18:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739539086; cv=none; b=uRVlhjGyN2ZI8FJ3YRGL6ISKZbsT2xbA4KpjOa199zQ3scGjQmOb1+DYFgFrOF7mKKFg3Jil56MiS6Ejh0oCHBieWJxgkAfW3fc3PwTJua3HjcqQeN172Tz7j9joOWu22/9zYZ31T2wOAWbMB/LkbToQvuGKFHffxR+Jt/3DV2c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739539086; c=relaxed/simple; bh=d16enuUHr2tsjXZlT4oW1ZXn1HEuh8ApCU8a6MrU7bs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QoaEcz+JDGiynUyFEi/dpjVj/QMdj46o85NH7DkEKH9LRt71HAIPNi2PyzpxaUy6kXlVCdXkKo/con88AxJjo00aRa5R6rVlifIlZg92rZ52813Om53INM4NPmBlGUzUpBxHvXKiJ2FK+POxHq482IYa0qBLBLyi2w9chDK+usk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ymAM7X1x; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ymAM7X1x" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-38bec08834dso109619f8f.3 for ; Fri, 14 Feb 2025 05:18:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739539083; x=1740143883; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WI6/TNYNauOLLkWpwha0LbPDDPCCxmIwr+Pcoxb9Ezo=; b=ymAM7X1xvxcY73UAQRU/rT8BRyPGmJ5i8g8zM6mAe39eOpyChE1ZPOHS6pt17swi8g JyXhMC6ye+df8b/8ihZzkYlpqtZnDzpFzCUWdyvYQrO+rM2D8Qy723uNrpZYw1P/oPZ7 raiu8PScXzY8swtJZa5RMhUkYThEPyEwT9lvG2V90KqggqDjOUmwHYXcdqwQCpilUwTo RjxYfcgroR+1yUOOGCwCmnuuxGKDwgBYAsmsn6mI3WnV3Sy2Zl7anDSMwJKUNtVZ5irx bEw2W1I6Ut+w1elOIDBDCxW6K7ccyvWWx5vRXUEZP4BnNpD3yrKS8wXLWbFDXNXUsukC kNkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739539083; x=1740143883; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WI6/TNYNauOLLkWpwha0LbPDDPCCxmIwr+Pcoxb9Ezo=; b=tkdqNkegRKtGINIBEiB5ahQg5VA+wBSU+cxiDd3I2YIuuopDIFsGwehK+xIPssFBE5 +lyo7bQ665ALFtEdQ1PuUZLvFi8+j25ILaORQNfQVsUsVZC7pXsTiEWbN3YxwVsKQU0t QL9H7MLBDcsgwOeBpeQn5hmstnNz6RU+bBc/N28kp/XHH/o3GmKFY6TCkj7V4X9chQTz ebSMMw/SASPnBuRtFTDkFPpm0DYoBp+NQMm5GWqBkLsPzkmKkzyaYo6eGh56m2YwZlFL p7ebSxDgTFtRjIUEALkdWehpwOqqxG7glWwaito0s3FzZrTDV4LsFVb6Dd5y0czdtyOy Sx5A== X-Gm-Message-State: AOJu0YyVCSIwIMy+KdkeEOXgOhpGnwjzmvZf3Faq1CSngEWyFoxzuERu 9vNOlStY6mC4h9z6ea7qzXJFShkT9NuBqY9GkKqbIUOIUonGiXl/papdbDu3BMc= X-Gm-Gg: ASbGncsp74V01qg0kQ1msOWKsICi/+UvTkdGnHJzwEFj9/F09Og15PSzBMeLKdhIyQI JQZa0i8foSxGvpopniOsBi2YVB+zO4GBL6nvRzC0U+afykr2Sco36e+Tctc+KjiQqic/iTomgWK 34h9HdnluLbCq1jwlfz9gmoopO2ziCVGyzRsAQdishLsaPlyU1JNN7CLTdLZfHyjzmdXgmtaBwj zzpGqAR5H0z/yu/q752f+zjFZtTIFWVQH4sm8hzVgOLN+WzMnirNZrTSPxnBigoOerYRHaTQjl8 RCUIIqjwRrvtv8/40go/3KaI9V19BsI= X-Google-Smtp-Source: AGHT+IFL1PyC7Gr+eB+jAKZETUep7XKaMZD3nNdLMQxR8ZPDBgf5ouh3/XF1rDv2ZuwsE2CUo4Jr1A== X-Received: by 2002:a5d:6484:0:b0:38f:2685:8457 with SMTP id ffacd0b85a97d-38f2c5e60e5mr1589269f8f.0.1739539082916; Fri, 14 Feb 2025 05:18:02 -0800 (PST) Received: from [127.0.1.1] ([178.197.218.144]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38f259d5655sm4607690f8f.77.2025.02.14.05.18.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2025 05:18:02 -0800 (PST) From: Krzysztof Kozlowski Date: Fri, 14 Feb 2025 14:17:47 +0100 Subject: [PATCH v2 4/4] drm/msm/dsi: Drop unnecessary -ENOMEM message Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250214-drm-msm-cleanups-v2-4-1bec50f37dc1@linaro.org> References: <20250214-drm-msm-cleanups-v2-0-1bec50f37dc1@linaro.org> In-Reply-To: <20250214-drm-msm-cleanups-v2-0-1bec50f37dc1@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1080; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=d16enuUHr2tsjXZlT4oW1ZXn1HEuh8ApCU8a6MrU7bs=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBnr0KCwJWc8DDG4UnvVS1DRfS8YoAu1sErX0eRq 9XLMHspTXeJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZ69CggAKCRDBN2bmhouD 1wymD/0XLt6GJCvc0hRmyqQAQeQ2Xl6T5oInv1r89dudN+E6TGz+0kVkW66XvIlulKZ5QbZZeZt XLP1rhSZTNo5C4hsYZJ1FXXS6vFbrpiJHMfXtrDAFebnrfp0oGDCaoPfj+2JuCPPh3EId3Fo2pV zgKF6maGiUM1mfNUQ/TzH/wRuMKhVM7d/efMHMf/lAtZcRkra4lSoH4slPLQF/iBN1dHa3cIQaJ R6pJwOQ501mGT9ovA26GCWVN3a68CfGlgO8q+NQv7ZTcP3/cMEIGmoI5RUUnhfUlf4G886LbPaT nLlZUg6neWgVaCkcAYry6hPxjx74KuWlJ+7QIVeumlWICWwCRDNAoMMK2Hx56xG7z/z1RvxSPF/ ECVYAUoz6x8S8yp4tfSsxN1/o4FQqH1rYX8L/AslqjaUxcog0B+PdIuRmPRrCTBWir2DSJr+IUM oVPxb25Dc8eZV+jjjkmXjbkitDNLYwGdEbst4YLnf9vo3u1CphW80Em4SF7Lsgh+rQ57IgWnsRm Siweuta9/F+p9n0frosueEF0hVXodaPwyq3iQ7EHaARqq1qDrSFFalI45hxFiMpdq5GlmZPKARq fD4AZ1bLjVVQ43zSmqGTq8a5F5AWnRsKF8ZVcyQS2Ym0bQY9b48rsBFMXfBQSTN7bQBuTMITJzV P4QTwq+mvFuP70Q== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Kernel core already prints detailed report about memory allocation failures, so drivers should not have their own error messages. Reviewed-by: Abhinav Kumar Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 051e26ae1b7f20d47969c3aff4e7fc6234f18d1a..2218d4f0c5130a0b13f428e89aa30ba2921da572 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -1910,10 +1910,8 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi) return dev_err_probe(&pdev->dev, ret, "%s: unable to initialize dsi clks\n", __func__); msm_host->rx_buf = devm_kzalloc(&pdev->dev, SZ_4K, GFP_KERNEL); - if (!msm_host->rx_buf) { - pr_err("%s: alloc rx temp buf failed\n", __func__); + if (!msm_host->rx_buf) return -ENOMEM; - } ret = devm_pm_opp_set_clkname(&pdev->dev, "byte"); if (ret)