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 D568C3FB21; Wed, 21 Feb 2024 13:20:41 +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=1708521641; cv=none; b=hw6QCEMumeoU5b/ZfCDHd0fQenX1sYsn2p3oB+YLHVB0AY0s7mWPQXjYDPaS9bkjwpJ0lMnxGyV+4BjmyZ5xNnQkLYLKeMjusvHPby/6ji5X6M4uCCXcnY+hT9kaKZlqzTRWIviNRqr/ZCMUBzsxo6O3x9wmL+pZN2bRR6J+ATA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708521641; c=relaxed/simple; bh=h0Ov+Ar4Mv00ICjvIcpJ5zWPmB5HFYRNhQcxZ9/0uTs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=f/QhhWwU9m+49Xxug2xjYldgp9+IzHPaCqECOtHYp0I5+PV7d+EuS1S0MGqopZAbgtfgCBZdJ85R8RYJgmRRE6KONWgzqrLIJknqQlG3OGzcfzaGkJWilEmhqF7FmNvHyKiDgbgqgqEEvUjuz94J5kjHaMw6gSzSWA1vFVG+vcA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KUgAUVlk; 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="KUgAUVlk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46BA1C433F1; Wed, 21 Feb 2024 13:20:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708521641; bh=h0Ov+Ar4Mv00ICjvIcpJ5zWPmB5HFYRNhQcxZ9/0uTs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KUgAUVlkqjVt5PkxGC6u9jGyE2rMQR+UzDqVlE5Fsl/d5SQHLghWAcIKZMwqouh2S Hy6ioLuhBAJu6ECw6nBVtIGuC+AxpODLmbIWoZNko/y2cD0yCrhucL58J2Z/FYV3gm 5Cc9nDlPXuK3PYxOEf6/7dqULaLTs9lP2TBTinoY= 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 4.19 167/202] spi: ppc4xx: Drop write-only variable Date: Wed, 21 Feb 2024 14:07:48 +0100 Message-ID: <20240221125937.152124622@linuxfoundation.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240221125931.742034354@linuxfoundation.org> References: <20240221125931.742034354@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 4.19-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 967d94844b30..58765a62fc15 100644 --- a/drivers/spi/spi-ppc4xx.c +++ b/drivers/spi/spi-ppc4xx.c @@ -173,10 +173,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; /* @@ -184,9 +182,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