From patchwork Fri Jan 19 10:45:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13523591 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 19A84C47DB7 for ; Fri, 19 Jan 2024 10:47:03 +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:References:In-Reply-To: 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: List-Owner; bh=uC6degdqVKMEFN12Bk0oBMSbXeMwQcOUPOYb0CzoTh0=; b=NsF1p3QBBHcop+ dLa2MJELDVFVjB4rM32yMIQYPcvVIrz5felIHP1KtfeeDa4LyConOllAed/6SPOlWamIGPb6kiBj/ NkueAjnXDNVabpgTM8zLdOYLacLrL8DAiEyzvVbxo/E9eCbLudkWipET4G8Cor359GuXz5Kgwtwa/ ZTfGcpxefs93ekCeE51oiVZlT5q9RlxyI2I6WGxd4RiqMlSXBdJAugO1EwCL/PL/pxcpc00HjFD1N rOCaFaV2zAl+kcbt0Vm5eClIRr9T5cjOJnNbbz7xieUokqhUAq/3Arglgexd4P3YTfDL5Fhv+O2dQ ELM8+5/ajHWPSmxNS+nQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQmOT-00585m-32; Fri, 19 Jan 2024 10:46:37 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQmNj-0057PH-1U for linux-arm-kernel@lists.infradead.org; Fri, 19 Jan 2024 10:45:53 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40e490c2115so10454485e9.0 for ; Fri, 19 Jan 2024 02:45:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705661146; x=1706265946; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ecEUv9cB/C4rgpKZf48XubyCx93neS07LHrZaWe0W9s=; b=zmVmuCOYemrulfn4UsU/4d+2X1a2Zm0O1NvOc2zEl40NKbCPUhlTmtR1cOtN8TbrHC 3ygSxS6td+aK8XMxGmdGWxKRuWK8Esos0BoVGk8eyw0AsUalqgKXNcneXTSfVneYNGg0 8sjLUjrQtqy1uGEV9yWN6TOrvzKpqdPhc6NtY4C0Jiz0cfiLhSbijn8/V2dBFZuwfjW/ aVkRd7yNLva3C33guUILI/k3VY0kfj5Payw0OCKb7BJZtRTOZ+eQoum4DtVrfRSrbCxA i05lDVqk1RfgGh+8vjO1xlfT7deqFrN4+pAWy59Rvks7dmVAC10aqK0x5kRBIGBa0+3v KSGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705661146; x=1706265946; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ecEUv9cB/C4rgpKZf48XubyCx93neS07LHrZaWe0W9s=; b=NXad5qN4UVBfVY0a8hrflOpobAmqdg4pmjeChW3BdnIsA2VRTsQvric46XDbXiMR0d r3Y/E6gnPqigs0LBTdWskLhRWSQWCXqSedUagFjbJ9gRb0TzOZOKfiejqjA0J+pcyGKN gk9VyIOGKQRGETVD/alH6Lkhmhc4R363TqI12hLTsMIB24TsIdyjtWB3HWuNNSG/Dr6h Eg7/ubcQOPqbhnRu8VA/ko5/E0uo18BYyDQpTk0MmwljQOUnF6i2doSlsVt5esq8hyit ZWLruvTBukUNbJusytH66/Qq7smFFkKAf3t6RpVkb+qplyB7O859FUEPugIgKOWtl+aR eXbw== X-Gm-Message-State: AOJu0YwPlrmCoe3PBO1quQ5Ps4AGZr0n/ytjoqUlAdUqgh6DrcelxlPA WW8RYGGySu/Rj3+8sjpDbw11bWq/ky4Av17IQdOYOrSKx06eUSfPHHXPPfXujYg= X-Google-Smtp-Source: AGHT+IFYdU7YgMMRHC+DrUKA5MwlIsxGfbocGuG9y6jEGdz2VaUXMw579pgtjEfWCwn+GLZjJgGcDw== X-Received: by 2002:a05:600c:6b0e:b0:40e:4ad9:90df with SMTP id jn14-20020a05600c6b0e00b0040e4ad990dfmr428957wmb.158.1705661146233; Fri, 19 Jan 2024 02:45:46 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id fm16-20020a05600c0c1000b0040ea10178f3sm77470wmb.21.2024.01.19.02.45.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 02:45:45 -0800 (PST) From: Tudor Ambarus To: gregkh@linuxfoundation.org, jirislaby@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: alim.akhtar@samsung.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, andre.draszik@linaro.org, kernel-team@android.com, peter.griffin@linaro.org, semen.protsenko@linaro.org, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v2 18/19] tty: serial: samsung: change has_divslot type to bool Date: Fri, 19 Jan 2024 10:45:25 +0000 Message-ID: <20240119104526.1221243-19-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240119104526.1221243-1-tudor.ambarus@linaro.org> References: <20240119104526.1221243-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240119_024551_540715_FBA140F5 X-CRM114-Status: GOOD ( 12.21 ) 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 Since the driver was introduced the port features flags never extended. As we don't expect more flags soon that would bypass the first cacheline of ``struct s3c24xx_uart_info``, change the type of ``has_divslot`` to bool. Bitfields operations incur performance penalty when set or read as compared to direct types. Signed-off-by: Tudor Ambarus --- drivers/tty/serial/samsung_tty.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index c429029c0207..0a03df44211d 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -89,8 +89,7 @@ struct s3c24xx_uart_info { u8 iotype; /* uart port features */ - - unsigned int has_divslot:1; + bool has_divslot; }; struct s3c24xx_serial_drv_data { @@ -2400,7 +2399,7 @@ static const struct s3c24xx_serial_drv_data s3c6400_serial_drv_data = { .port_type = PORT_S3C6400, .iotype = UPIO_MEM, .fifosize = 64, - .has_divslot = 1, + .has_divslot = true, .rx_fifomask = S3C2440_UFSTAT_RXMASK, .rx_fifoshift = S3C2440_UFSTAT_RXSHIFT, .rx_fifofull = S3C2440_UFSTAT_RXFULL, @@ -2429,7 +2428,7 @@ static const struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = { .type = TYPE_S3C6400, .port_type = PORT_S3C6400, .iotype = UPIO_MEM, - .has_divslot = 1, + .has_divslot = true, .rx_fifomask = S5PV210_UFSTAT_RXMASK, .rx_fifoshift = S5PV210_UFSTAT_RXSHIFT, .rx_fifofull = S5PV210_UFSTAT_RXFULL, @@ -2459,7 +2458,7 @@ static const struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = { .type = TYPE_S3C6400, \ .port_type = PORT_S3C6400, \ .iotype = UPIO_MEM, \ - .has_divslot = 1, \ + .has_divslot = true, \ .rx_fifomask = S5PV210_UFSTAT_RXMASK, \ .rx_fifoshift = S5PV210_UFSTAT_RXSHIFT, \ .rx_fifofull = S5PV210_UFSTAT_RXFULL, \ @@ -2498,7 +2497,7 @@ static const struct s3c24xx_serial_drv_data gs101_serial_drv_data = { .type = TYPE_S3C6400, .port_type = PORT_S3C6400, .iotype = UPIO_MEM32, - .has_divslot = 1, + .has_divslot = true, .rx_fifomask = S5PV210_UFSTAT_RXMASK, .rx_fifoshift = S5PV210_UFSTAT_RXSHIFT, .rx_fifofull = S5PV210_UFSTAT_RXFULL, @@ -2569,7 +2568,7 @@ static const struct s3c24xx_serial_drv_data artpec8_serial_drv_data = { .port_type = PORT_S3C6400, .iotype = UPIO_MEM, .fifosize = 64, - .has_divslot = 1, + .has_divslot = true, .rx_fifomask = S5PV210_UFSTAT_RXMASK, .rx_fifoshift = S5PV210_UFSTAT_RXSHIFT, .rx_fifofull = S5PV210_UFSTAT_RXFULL,