From patchwork Fri Oct 6 09:00:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13411156 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 3C271E92FF9 for ; Fri, 6 Oct 2023 09:01:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=m6hZ4XQ11iadtaUv5gm7gFKZke95NQA6hjmPTB4pml0=; b=jXsY0mwZzjOOHp q3PJaShSmlKCmRtuYwEY8mhI7UfSd3jwMf1MT6QWAEiwb2eFG/OkJT1dx7r53/mIMbzdLi++z7BZC h7E8ELWGragXikKqEISKM0yDzuaMSVGD6zzHN0yK5COXkkKSuR90y7deg5aZD3W6IXkfMRn0cfzP6 pwoHSrPmq6+REu5XeUTwIGgkuKcjIi6dhHjFJ8+Shs4fSbwWORbXTE2VKdFHKs/PLZggGZLjWYE1I 4sxHdKSbnJZafFbtcicI67WZcZF38nx04RPJijSMTgqN6ObUuGMRrIps7snu5UrctHfwZE7TS6Fwh e8chC+239DkVYLwJn5pw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qoghP-005LEc-2o; Fri, 06 Oct 2023 09:00:43 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qoghL-005LDf-1N for linux-arm-kernel@lists.infradead.org; Fri, 06 Oct 2023 09:00:42 +0000 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-9936b3d0286so344971066b.0 for ; Fri, 06 Oct 2023 02:00:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696582835; x=1697187635; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=XbYEmjwyN/rvXZtiiJmZRXloVKTHD6PfGRwin2k2z3I=; b=ykD4Q+94pKf8IOZH/xY+muPF8roIf6r79Q83fPa0D+rg16XQ8wWn1echFKeKvK4MQO F4y6HKbV/nlg3cdGriPh7+muujDi1ZQMirkeLTEXFOmGVx9Z5kEECa/BNNGcHeqaAgOz ec4eaIkONjYi698RjKL6JbP8yxMAUO0Lp8RCnFFo9Z/ih/5aVetm2+r0fTSuwQWZ/qoi 48SgA01SVfjD3ruU11MU2GxfHC8NcugxDIgEjB9sT7HCvJ/hJc7stOWYE/sa0ciAymev NCjLKQ8G6KsHmPZiW2H3aTK35VgVCmZ5X+SCi0wsaxWcdvI3aF3veIyuFOSmPuDNK4RG bq2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696582835; x=1697187635; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XbYEmjwyN/rvXZtiiJmZRXloVKTHD6PfGRwin2k2z3I=; b=JU2e9s8Y4gnB4mPqvW7FGT/msZlmHsA7QNH+Zl0705M/rlmZerzjHLQcFio42LIYUU NXJHGJmKVyVll3pP//6Jg9X5nelJpUclRJM5mVkHfiiB1WQNXOq3wZiyWxNjqOC1Sqge scEeyaE3avBHJ6IHbP3FhtzZSDuE60ZRqQHQC/kjVCzC4IoHq9ZhfVXexejbhsSLYeqU hKuZND8WrUXzNq5uhbm49GmRiUGkJkFO3YO1v47rMuEhjGqzpPP3wDdp8mAPRUWbAkIW HJJLhs4e/3UgGceV+ISHZkvM1E0XqH/KyO3K1ZJwMpYF5o7KT/k7p9So3TNHmrpQH8kc 6aXQ== X-Gm-Message-State: AOJu0YyZ2ReEcd6vs9bgywOgTdkxp+eWAF/5cyo+ON9vUdLFKFc0KWdV CBQoK3+bNj4PPE9Rawlv+rn1bw== X-Google-Smtp-Source: AGHT+IETTgEY5f/+/zJhn8TchC2peIdWtv6NFlBmU8Ykoojr6SlCgiwUJaSJhnmThCVVVgreb23ADQ== X-Received: by 2002:a17:906:5357:b0:9ae:7681:f62a with SMTP id j23-20020a170906535700b009ae7681f62amr7474264ejo.44.1696582835695; Fri, 06 Oct 2023 02:00:35 -0700 (PDT) Received: from tudordana.roam.corp.google.com ([79.115.63.123]) by smtp.gmail.com with ESMTPSA id l7-20020a170906a40700b009ae587ce133sm2521163ejz.188.2023.10.06.02.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 02:00:35 -0700 (PDT) From: Tudor Ambarus To: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, semen.protsenko@linaro.org, peter.griffin@linaro.org, Tudor Ambarus Subject: [PATCH] soc: samsung: usi: remove superfluous parameter Date: Fri, 6 Oct 2023 10:00:14 +0100 Message-ID: <20231006090014.277448-1-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.42.0.609.gbb76f46606-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231006_020039_537579_A3CAC268 X-CRM114-Status: GOOD ( 12.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org exynos_usi_set_sw_conf() has a single caller, exynos_usi_configure, which called it with exynos_usi_set_sw_conf(usi, usi->mode). Since the mode is already defined in struct exynos_usi, remove the superfluous pass of the mode parameter. While in exynos_usi_set_sw_conf(), remove the reinitialization of usi->mode with its same value. Signed-off-by: Tudor Ambarus --- drivers/soc/samsung/exynos-usi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/soc/samsung/exynos-usi.c b/drivers/soc/samsung/exynos-usi.c index 114352695ac2..269ed930c5a9 100644 --- a/drivers/soc/samsung/exynos-usi.c +++ b/drivers/soc/samsung/exynos-usi.c @@ -95,14 +95,14 @@ MODULE_DEVICE_TABLE(of, exynos_usi_dt_match); /** * exynos_usi_set_sw_conf - Set USI block configuration mode * @usi: USI driver object - * @mode: Mode index * * Select underlying serial protocol (UART/SPI/I2C) in USI IP-core. * * Return: 0 on success, or negative error code on failure. */ -static int exynos_usi_set_sw_conf(struct exynos_usi *usi, size_t mode) +static int exynos_usi_set_sw_conf(struct exynos_usi *usi) { + size_t mode = usi->mode; unsigned int val; int ret; @@ -115,8 +115,7 @@ static int exynos_usi_set_sw_conf(struct exynos_usi *usi, size_t mode) if (ret) return ret; - usi->mode = mode; - dev_dbg(usi->dev, "protocol: %s\n", exynos_usi_modes[usi->mode].name); + dev_dbg(usi->dev, "protocol: %s\n", exynos_usi_modes[mode].name); return 0; } @@ -164,7 +163,7 @@ static int exynos_usi_configure(struct exynos_usi *usi) { int ret; - ret = exynos_usi_set_sw_conf(usi, usi->mode); + ret = exynos_usi_set_sw_conf(usi); if (ret) return ret;