From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B8B17BB1A; Wed, 21 Feb 2024 13:45:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708523144; cv=none; b=Zz2BEKTSgytYGuqNgtHAhToY1vmsLHCPQQmFWJXRR43SPAM+FkCUTaJcwF60setOaE0Qvjpj+r1H4rYEuODR8Qeaa0LYd0xUuV6j/7IpblxqYSm0U3iBjx1AjsknNCM+3uCUV/amOZnqG6JntSzd8WgZjzvcCABkPStc5dE7m28= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708523144; c=relaxed/simple; bh=xRLW/W3Lf9LWgBnMDsS45lB8hvcMKabXY86QpfiN678=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DJtypmlXXKcCp5iVLvPvlpjnQK/zlPP+49ocj9Rvwd2+lDM9vGYo5r7NlSeqoZu7x0okB9nl3MQjW2nryWdZICzJ+kqlZWsZXjN1I3+gDexw5Ad5nj4nIstaSM9x57w9bGgRzIeGh5QL7xxlj3j3Zt+pMZkHzigdyFw5foj9mYk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zBgFz8na; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="zBgFz8na" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7028C43390; Wed, 21 Feb 2024 13:45:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708523144; bh=xRLW/W3Lf9LWgBnMDsS45lB8hvcMKabXY86QpfiN678=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zBgFz8namZrhnreeVy2Zj15gMUjHS8S1TALWEfs712KtA+hfUEG6W8C84AvkRWZ1P KXJXc7CyQdy+bUVbrhkDXqnzsFWw9J7IDu11oT/gKfTFBgm5uCGPlg63KHK+ZANwxx egUaJvxSdLZMxrfnPZ2PxtFdiNKfQtqdpl78E3QU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Mark Brown , Sasha Levin Subject: [PATCH 5.15 351/476] spi: ppc4xx: Drop write-only variable Date: Wed, 21 Feb 2024 14:06:42 +0100 Message-ID: <20240221130020.959154697@linuxfoundation.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240221130007.738356493@linuxfoundation.org> References: <20240221130007.738356493@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Uwe Kleine-König [ Upstream commit b3aa619a8b4706f35cb62f780c14e68796b37f3f ] Since commit 24778be20f87 ("spi: convert drivers to use bits_per_word_mask") the bits_per_word variable is only written to. The check that was there before isn't needed any more as the spi core ensures that only 8 bit transfers are used, so the variable can go away together with all assignments to it. Fixes: 24778be20f87 ("spi: convert drivers to use bits_per_word_mask") Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240210164006.208149-8-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-ppc4xx.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/spi/spi-ppc4xx.c b/drivers/spi/spi-ppc4xx.c index d65f047b6c82..1179a1115137 100644 --- a/drivers/spi/spi-ppc4xx.c +++ b/drivers/spi/spi-ppc4xx.c @@ -166,10 +166,8 @@ static int spi_ppc4xx_setupxfer(struct spi_device *spi, struct spi_transfer *t) int scr; u8 cdm = 0; u32 speed; - u8 bits_per_word; /* Start with the generic configuration for this device. */ - bits_per_word = spi->bits_per_word; speed = spi->max_speed_hz; /* @@ -177,9 +175,6 @@ static int spi_ppc4xx_setupxfer(struct spi_device *spi, struct spi_transfer *t) * the transfer to overwrite the generic configuration with zeros. */ if (t) { - if (t->bits_per_word) - bits_per_word = t->bits_per_word; - if (t->speed_hz) speed = min(t->speed_hz, spi->max_speed_hz); } -- 2.43.0