mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: "André Draszik" <andre.draszik@linaro.org>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Alim Akhtar" <alim.akhtar@samsung.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: Peter Griffin <peter.griffin@linaro.org>,
	Tudor Ambarus <tudor.ambarus@linaro.org>,
	Will McVicker <willmcvicker@google.com>,
	kernel-team@android.com, linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-serial@vger.kernel.org
Subject: Re: [PATCH v2 2/2] tty: serial: samsung_tty: cast the interrupt's void *id just once
Date: Thu, 8 Aug 2024 09:31:24 +0200	[thread overview]
Message-ID: <65ce2214-dad5-4a73-8806-07aab5404cf8@kernel.org> (raw)
In-Reply-To: <20240807-samsung-tty-cleanup-v2-2-1db5afc9d41b@linaro.org>

On 07. 08. 24, 13:58, André Draszik wrote:
> The interrupt handler routines and helpers are casting the 'void *'
> pointer to 'struct exynos_uart_port *' all over the place.
> 
> There is no need for that, we can do the casting once and keep passing
> the 'struct exynos_uart_port *', simplifying the code and saving a few
> lines of code.
> 
> No functional changes.
...
> @@ -944,17 +939,17 @@ static irqreturn_t s3c24xx_serial_tx_irq(void *id)
>   /* interrupt handler for s3c64xx and later SoC's.*/
>   static irqreturn_t s3c64xx_serial_handle_irq(int irq, void *id)
>   {
> -	const struct s3c24xx_uart_port *ourport = id;
> -	const struct uart_port *port = &ourport->port;
> +	struct s3c24xx_uart_port *ourport = id;
> +	struct uart_port *port = &ourport->port;
>   	u32 pend = rd_regl(port, S3C64XX_UINTP);
>   	irqreturn_t ret = IRQ_HANDLED;
>   
>   	if (pend & S3C64XX_UINTM_RXD_MSK) {
> -		ret = s3c24xx_serial_rx_irq(id);
> +		ret = s3c24xx_serial_rx_irq(ourport);
>   		wr_regl(port, S3C64XX_UINTP, S3C64XX_UINTM_RXD_MSK);
>   	}
>   	if (pend & S3C64XX_UINTM_TXD_MSK) {
> -		ret = s3c24xx_serial_tx_irq(id);
> +		ret = s3c24xx_serial_tx_irq(ourport);
>   		wr_regl(port, S3C64XX_UINTP, S3C64XX_UINTM_TXD_MSK);
>   	}
>   	return ret;
> @@ -963,19 +958,19 @@ static irqreturn_t s3c64xx_serial_handle_irq(int irq, void *id)
>   /* interrupt handler for Apple SoC's.*/
>   static irqreturn_t apple_serial_handle_irq(int irq, void *id)
>   {
> -	const struct s3c24xx_uart_port *ourport = id;
> -	const struct uart_port *port = &ourport->port;
> +	struct s3c24xx_uart_port *ourport = id;
> +	struct uart_port *port = &ourport->port;

No need to remove const from port here and above, right? (Only from 
ourport.)

Other than that, LGTM.

thanks,
-- 
js
suse labs


  reply	other threads:[~2024-08-08  7:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07 11:58 [PATCH v2 0/2] tty: serial: samsung_tty: simple cleanups André Draszik
2024-08-07 11:58 ` [PATCH v2 1/2] tty: serial: samsung_tty: drop unused argument to irq handlers André Draszik
2024-08-07 11:58 ` [PATCH v2 2/2] tty: serial: samsung_tty: cast the interrupt's void *id just once André Draszik
2024-08-08  7:31   ` Jiri Slaby [this message]
2024-08-08  8:11     ` André Draszik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65ce2214-dad5-4a73-8806-07aab5404cf8@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=alim.akhtar@samsung.com \
    --cc=andre.draszik@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-team@android.com \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=peter.griffin@linaro.org \
    --cc=tudor.ambarus@linaro.org \
    --cc=willmcvicker@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®