Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2032253pxm; Fri, 4 Mar 2022 08:10:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzm1WZdQK2wMbC6cYP6ARgcfg7OQSX8ydeMPKMeQU2akNe6pEb12Ue4q5uTBQALKKvuBdOI X-Received: by 2002:a05:6402:c12:b0:415:c5cb:f06c with SMTP id co18-20020a0564020c1200b00415c5cbf06cmr11841293edb.92.1646410219653; Fri, 04 Mar 2022 08:10:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646410219; cv=none; d=google.com; s=arc-20160816; b=g6IVsYfV90SiMt5XIWBkUkPPAiHF5QNj4YP1I+U63qD9ZXcN/id1kbtigIdfy8nNm5 CTIpolHY6cLqv297DdIknK+ndS5ZqKIGdclTIn5mWw0NzmGu6U48nOyeZ5a4L8dVxtKU vvpe7Gra4iVCZONheUALLJw4A5vCvxnEqTXUL6EPxzPNvyaUj8YjYvkBHGJBO/F0n8ZC TuV1S1k3WonUctdzF1YfgHx0qQJgZNkHGZbQnt3L0RkURvgPgyRvNZCGyITR7OZvsWX3 OuCHwpuZKF8kOCpsfJNrxrLujK9X2xx4Qqu8zZKEcw6ImDyMQ1USI2oOhHa+176b8Hiw MXBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=HoXAShC7EBsK4KdfVtpMogYLZUITR5x/YL0IUbkIHfM=; b=DEp0R3zyLhSApjoaW78RQe5Um6Nx86ckc/psFBMoCPfRAqsiFpFJ/Ty3x17Q+ATHB2 usOKMvuK3J6ghE5YhjoIuyjZN5hmNwBK3+YZ6mJY5zgBWh7USh3y/eZ9FLKDgiwwmJZp xQ2TbTWat6Ew5VLFIZKEZYalIfNCv+2wa10jaSSvo/ykIcFjqDWMfmdYkAxeogUng4fO 64B0mAv7OigUPUuYOvUH8XAmIKUEl9A6ZJFrnXCpdrCpou0t0Fbqpl07pXvw2q9KmxPJ cac85rdoYvIDEc/YBBWrZdhdbs0U63Ilw+/E6SlbI/SrN8NerqnXHQow1V62xj682bVK x2Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=VrhWRmCR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y17-20020a056402271100b00415cef4b4a4si3903078edd.581.2022.03.04.08.09.49; Fri, 04 Mar 2022 08:10:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=VrhWRmCR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230490AbiCDIEt (ORCPT + 99 others); Fri, 4 Mar 2022 03:04:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229935AbiCDIEr (ORCPT ); Fri, 4 Mar 2022 03:04:47 -0500 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88609B12E7 for ; Fri, 4 Mar 2022 00:04:00 -0800 (PST) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 552473F5F5 for ; Fri, 4 Mar 2022 08:03:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1646381039; bh=HoXAShC7EBsK4KdfVtpMogYLZUITR5x/YL0IUbkIHfM=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=VrhWRmCRE/QVBHW75Y3d+85aXbktwpGLZDRIzeVCOkHQmgSlOvCrN9omPWHfiYCIJ tsqZskCbWM4YFXmtNlBm4xCmJCBQSM0adZ1K3OFiwWfd+AN2zRdE0QMhTxbWSxfNPq H0b3HxXVgjz8ematiUqLkTp/SJ88ToNnxaIFxtlQxh88Tez8hihxCbBBtnZGZ8ZKmE OS13d8dhy8U5FDm9m6lqdOtoxNAZnFqC/e0KSyCpxVuhE+uhqYmLv7jbL3ef4kQmmE vP1bNKqv+prZqNG5xWhHxY/SiOGFY/IBpq+KI03rUhhzP+ydhnEjCl6Lt20Wd8yUqR OHT9oWFKntirw== Received: by mail-ed1-f70.google.com with SMTP id n11-20020a50cc4b000000b00415e939bf9eso2037055edi.22 for ; Fri, 04 Mar 2022 00:03:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=HoXAShC7EBsK4KdfVtpMogYLZUITR5x/YL0IUbkIHfM=; b=mIIn6ZlhSiMJ70E8010s1CUFV4RfoI+aeq6BYcrkwwNwbr4jSGOqG4NyKvunfiyhE/ xnaJYM5g5LwgoJoFddIoelpT/+mR17Hn2bSQodk2xJ+b4JxppsnA+rvOKGIwXl5wDhBa dv7Iop19hnifrJ43ljHgPj6seqK6THYMBQCKT+UJA4TDMYFsGSotl0IMUUok+ZQK1uZz 1Nuom61s9TF0Rbjk1Z6TRYgftPdv4hH4beLgq/rJDJqlPCO2kuJuUL31kAqVkfAAqnvH JxBNd/LmdJqfWwPw1Q8VhaIsuqGcW1q8TWkoO+Q0D0iuih1eD0IVOZaDqWOE2YmgZ8qD a1AA== X-Gm-Message-State: AOAM531WwawTiVUQ0oZsGBZPBxIeVLV8XvCBRdzAqKfqDJgOVdVdMQcB 3SFZX/m9SyqVju0VzbOxY/0VMpS4bCwo6dMg3FDJJc8WfEALpGIq5C9YL+G46aXFocXMzhHDmhr VgbFlLknTzlEuOv0E27dmFORvKfFbN4Y56xLCIL7p6w== X-Received: by 2002:a17:906:5011:b0:6cf:82ff:f1bf with SMTP id s17-20020a170906501100b006cf82fff1bfmr30210289ejj.69.1646381037902; Fri, 04 Mar 2022 00:03:57 -0800 (PST) X-Received: by 2002:a17:906:5011:b0:6cf:82ff:f1bf with SMTP id s17-20020a170906501100b006cf82fff1bfmr30210272ejj.69.1646381037705; Fri, 04 Mar 2022 00:03:57 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-181-108.adslplus.ch. [188.155.181.108]) by smtp.gmail.com with ESMTPSA id rv11-20020a17090710cb00b006d5c0cd5e0dsm1481465ejb.82.2022.03.04.00.03.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 00:03:57 -0800 (PST) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Alim Akhtar , Greg Kroah-Hartman , Jiri Slaby , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/7] tty: serial: samsung: embed s3c24xx_uart_info in parent structure Date: Fri, 4 Mar 2022 09:03:42 +0100 Message-Id: <20220304080348.218581-1-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Embed "struct s3c24xx_uart_info" directly as a member of "struct s3c24xx_serial_drv_data" instead of keeping it as a pointer. This makes the code clearer (obvious ownership of "struct s3c24xx_serial_drv_data") and saves one pointer. Signed-off-by: Krzysztof Kozlowski --- drivers/tty/serial/samsung_tty.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index d002a4e48ed9..aa5678d03704 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -85,7 +85,7 @@ struct s3c24xx_uart_info { }; struct s3c24xx_serial_drv_data { - struct s3c24xx_uart_info *info; + struct s3c24xx_uart_info info; struct s3c2410_uartcfg *def_cfg; unsigned int fifosize[CONFIG_SERIAL_SAMSUNG_UARTS]; }; @@ -2197,7 +2197,7 @@ static int s3c24xx_serial_probe(struct platform_device *pdev) } ourport->baudclk = ERR_PTR(-EINVAL); - ourport->info = ourport->drv_data->info; + ourport->info = &ourport->drv_data->info; ourport->cfg = (dev_get_platdata(&pdev->dev)) ? dev_get_platdata(&pdev->dev) : ourport->drv_data->def_cfg; @@ -2616,7 +2616,7 @@ static struct console s3c24xx_serial_console = { #ifdef CONFIG_CPU_S3C2410 static struct s3c24xx_serial_drv_data s3c2410_serial_drv_data = { - .info = &(struct s3c24xx_uart_info) { + .info = { .name = "Samsung S3C2410 UART", .type = TYPE_S3C24XX, .port_type = PORT_S3C2410, @@ -2644,7 +2644,7 @@ static struct s3c24xx_serial_drv_data s3c2410_serial_drv_data = { #ifdef CONFIG_CPU_S3C2412 static struct s3c24xx_serial_drv_data s3c2412_serial_drv_data = { - .info = &(struct s3c24xx_uart_info) { + .info = { .name = "Samsung S3C2412 UART", .type = TYPE_S3C24XX, .port_type = PORT_S3C2412, @@ -2674,7 +2674,7 @@ static struct s3c24xx_serial_drv_data s3c2412_serial_drv_data = { #if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2416) || \ defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2442) static struct s3c24xx_serial_drv_data s3c2440_serial_drv_data = { - .info = &(struct s3c24xx_uart_info) { + .info = { .name = "Samsung S3C2440 UART", .type = TYPE_S3C24XX, .port_type = PORT_S3C2440, @@ -2704,7 +2704,7 @@ static struct s3c24xx_serial_drv_data s3c2440_serial_drv_data = { #if defined(CONFIG_CPU_S3C6400) || defined(CONFIG_CPU_S3C6410) static struct s3c24xx_serial_drv_data s3c6400_serial_drv_data = { - .info = &(struct s3c24xx_uart_info) { + .info = { .name = "Samsung S3C6400 UART", .type = TYPE_S3C6400, .port_type = PORT_S3C6400, @@ -2733,7 +2733,7 @@ static struct s3c24xx_serial_drv_data s3c6400_serial_drv_data = { #ifdef CONFIG_CPU_S5PV210 static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = { - .info = &(struct s3c24xx_uart_info) { + .info = { .name = "Samsung S5PV210 UART", .type = TYPE_S3C6400, .port_type = PORT_S3C6400, @@ -2762,7 +2762,7 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = { #if defined(CONFIG_ARCH_EXYNOS) #define EXYNOS_COMMON_SERIAL_DRV_DATA() \ - .info = &(struct s3c24xx_uart_info) { \ + .info = { \ .name = "Samsung Exynos UART", \ .type = TYPE_S3C6400, \ .port_type = PORT_S3C6400, \ @@ -2811,7 +2811,7 @@ static struct s3c24xx_serial_drv_data exynos850_serial_drv_data = { #ifdef CONFIG_ARCH_APPLE static struct s3c24xx_serial_drv_data s5l_serial_drv_data = { - .info = &(struct s3c24xx_uart_info) { + .info = { .name = "Apple S5L UART", .type = TYPE_APPLE_S5L, .port_type = PORT_8250, -- 2.32.0