From patchwork Mon Jun 19 09:44:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13284253 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DEA32EB64D9 for ; Mon, 19 Jun 2023 09:44:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B47D10E115; Mon, 19 Jun 2023 09:44:48 +0000 (UTC) Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6B93A10E115 for ; Mon, 19 Jun 2023 09:44:47 +0000 (UTC) Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-31272fcedf6so370490f8f.2 for ; Mon, 19 Jun 2023 02:44:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687167885; x=1689759885; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=NSP09R2WaLxxohUJ/p3vcrxW5xitvCM8OwtEijG+zc4=; b=W0R8EmNyXVsRacDc44gsxRQa/YhhdNa2z8F0AeJdc9qwWNwpB8l/vGm4FYTLev0TG+ yf8wcc9/vpvjK+roKvQq70CCXtwxKZgPA6+ynmbT3foP0+1kfN+FcQRMCRXZ5Ya+y+gD 1eHf58RK/F3f7jOrfVF5kmsxdA7xq4NU1vfDpzvKKux18PkgCsL89u6F8SauowS9DKyA XFdqUbwP4jrKaXlgMCWpOm32ycHGQyyOqybcoAPV4xHtq+a8KVxUnunkEPVAtI59gkgj O1+m++im3NrdIJt7/eSKk2DojWwZoVoC+s4nDSOajXwVyefMl+HktnjZ6zUKyoys+LIv 5rEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687167885; x=1689759885; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NSP09R2WaLxxohUJ/p3vcrxW5xitvCM8OwtEijG+zc4=; b=XHQpO16g8DJGTcq75H44PfhMa0qkAJPwZYg2aMC3Wb7OakOKdzJWv9BGVpLoZKDK9q lpx4YXH9tMMmwGnL+pu3ANnH2kHKJlwLkuXDYFeE1Rg7adTavU9RvEE9SBMZ+UWpO+wO OqmYtCIRPmw8AuZVE1elJYD0w0ytnRlFG8f7QydOoTQKiOMvUJ5A889VamAvw+Unh3lG Yo2GbFPnkpfl3UyVvXl6cM463NFtBLQrTkf+Qoy/zs7iK2XQHo/7TozXkVe8UGpr7MCF tALnaavB/fB//BNSoG8nA3lxJSteBmaVxBOsN7VQIEjcZztwqe2hGVeM9+wrFy2iAKoi Mg2Q== X-Gm-Message-State: AC+VfDw1M6MJwH99kET2OFbMhEMzTdObh23q8frmwzTGtFo+FrN1AKQy XiFYszRaQKz95ip8IkcWFNe+EQ== X-Google-Smtp-Source: ACHHUZ5Zg5Z8LszP8AT8/SbmuWuU1V/RGxNU9GmhxgyQY6KcTSaIYtGjr5UlnR6za/yLFaeXETkP0g== X-Received: by 2002:adf:ea90:0:b0:30f:c5b1:23ef with SMTP id s16-20020adfea90000000b0030fc5b123efmr6215351wrm.41.1687167885502; Mon, 19 Jun 2023 02:44:45 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id v18-20020a5d43d2000000b0030ae93bd196sm30902612wrr.21.2023.06.19.02.44.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 02:44:44 -0700 (PDT) Date: Mon, 19 Jun 2023 12:44:40 +0300 From: Dan Carpenter To: David Airlie Subject: [PATCH] drm/sprd: Remove unnecessary variable in calc_video_size_step() Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Baolin Wang , Jani Nikula , Chunyan Zhang , kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Alex Deucher , Orson Zhai , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The "video_size_step" variable is never used so it can be removed. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/sprd/sprd_dsi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/sprd/sprd_dsi.c b/drivers/gpu/drm/sprd/sprd_dsi.c index ab0e5cce7adb..adeff6b2fb4b 100644 --- a/drivers/gpu/drm/sprd/sprd_dsi.c +++ b/drivers/gpu/drm/sprd/sprd_dsi.c @@ -324,8 +324,6 @@ static u16 calc_bytes_per_pixel_x100(int coding) static u8 calc_video_size_step(int coding) { - u8 video_size_step; - switch (coding) { case COLOR_CODE_16BIT_CONFIG1: case COLOR_CODE_16BIT_CONFIG2: @@ -334,14 +332,14 @@ static u8 calc_video_size_step(int coding) case COLOR_CODE_18BIT_CONFIG2: case COLOR_CODE_24BIT: case COLOR_CODE_COMPRESSTION: - return video_size_step = 1; + return 1; case COLOR_CODE_20BIT_YCC422_LOOSELY: case COLOR_CODE_24BIT_YCC422: case COLOR_CODE_16BIT_YCC422: case COLOR_CODE_30BIT: case COLOR_CODE_36BIT: case COLOR_CODE_12BIT_YCC420: - return video_size_step = 2; + return 2; default: DRM_ERROR("invalid color coding"); return 0;