Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1770288pxp; Mon, 7 Mar 2022 01:54:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwEB+LbaHm4MvPDlyb7Yi7TInxBk82Nc+umWUUIoFEzIOc4JCDQRjWjgNCLKYYNrX3lpipk X-Received: by 2002:a05:6402:11c8:b0:416:4828:9242 with SMTP id j8-20020a05640211c800b0041648289242mr3839550edw.405.1646646889409; Mon, 07 Mar 2022 01:54:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646646889; cv=none; d=google.com; s=arc-20160816; b=NyaxAkDwn8S0398cMIyJoH95k7bkdjVC3MwJplAq2rfBI3o9Xc5kKYMKRdENFfbNao Y4303bFtUKQxemjbUXaiQXpftItbHSct+qR2cdv6oy9xEJeFZ8bgbW7KQ0bETxWpJaNd trIlXeXy0wzGwB8b5s6mP1nA68onHcBqzGTP4i83gk0b8cNFbPQjL1+Wp8os6LJPXola LBYwTndDzYEn+R10SOJKsC8UoPRDUE5caIB1fA84hxajK164EEK1cjL71LG2Z2y4kZWY bd8vHz/tHRRx9zVsGuSG1eK/W+I7pPaRVqks74lQl6Ey0KfPxLQxkNoUKOFk6ejeow5s a54g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=MkSPdnyAeUKxX0kM80MyNU9CvUXu90j87BnnjXBHqBY=; b=kaEWLzr5EqWtP3rsud3N3iRiLoLTI0GSl6IlpK7WC8Un9kxU8y4TWmhcAXqgfLV0sv IwKXlNKk9O4uxXd/ldhdoJ5p2db2nIHqvuoICJ8/hX8NSXLDWr+ym2I3Htp2SvDlrhwC a5TIwW5ztO6GftAEqKduliecDPNkGBQw+qUmQHG9mE/8km3eTXtACvMmVVhLilShUEAy Bx4M7eRsCn4QHxhl19lZkJ38ywQaD46PVrXHdx/CWgdDpkaGJZGI4+Z65fTDI4YYqfWN CK6JW4sMvYsFPT/e1H2MaddO7vSYSuh1m46b4A9WLx7vGKzD1xVyS+0+CYDP9gMwxTfw xesw== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h11-20020a056402280b00b0041655c8ac32si782171ede.411.2022.03.07.01.54.26; Mon, 07 Mar 2022 01:54:49 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235562AbiCGGbT (ORCPT + 99 others); Mon, 7 Mar 2022 01:31:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235519AbiCGGbT (ORCPT ); Mon, 7 Mar 2022 01:31:19 -0500 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEAC113CC0; Sun, 6 Mar 2022 22:30:24 -0800 (PST) Received: by mail-ej1-f51.google.com with SMTP id qx21so29551570ejb.13; Sun, 06 Mar 2022 22:30:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=MkSPdnyAeUKxX0kM80MyNU9CvUXu90j87BnnjXBHqBY=; b=uxI5VuDv90Cd9DiAIlMZGx9gfvD2XA3p5stoZYpviGmhDFC5pJ+u+GGxY3o4FnSM/X KWN4Wod13sLtTYxTx0IJdu62NDRb9k5I8m4mk67054sWsQO8q2JjsXzhsFWFMcwtlcKj MwyuFo496loLoEZTIeoghEjxM+QPkLnVO9ZxeApka4RkFKwumD8uOR3sU0V+mQF8k8Ld 3sv7/8uQa++YsRCGNnuRzEjur0CTeqmDgY/LuU6uku7gYfGAO4NseUFd7/PJouyRQuRO GZsY/5HsiFJEzso1DXI2CmHYgIReTkiJnnlRZH8Zn0l14QM85AMnmyNESf6I2DRKzK1p Os7A== X-Gm-Message-State: AOAM532Jo8ttnJFzsktnKZMoi7ENY5b7xJMTCi4BWtotCSY5kY2Ct1Zb fwARfQYlPtU3odBQo6T1IoUbJA6NvL4= X-Received: by 2002:a17:907:3da9:b0:6db:f3f:33c2 with SMTP id he41-20020a1709073da900b006db0f3f33c2mr4406449ejc.735.1646634623024; Sun, 06 Mar 2022 22:30:23 -0800 (PST) Received: from ?IPV6:2a0b:e7c0:0:107::49? ([2a0b:e7c0:0:107::49]) by smtp.gmail.com with ESMTPSA id z11-20020a50e68b000000b00412ec8b2180sm5739486edm.90.2022.03.06.22.30.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 06 Mar 2022 22:30:22 -0800 (PST) Message-ID: Date: Mon, 7 Mar 2022 07:30:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH 1/7] tty: serial: samsung: embed s3c24xx_uart_info in parent structure Content-Language: en-US To: Krzysztof Kozlowski , Alim Akhtar , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220304080348.218581-1-krzysztof.kozlowski@canonical.com> From: Jiri Slaby In-Reply-To: <20220304080348.218581-1-krzysztof.kozlowski@canonical.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 On 04. 03. 22, 9:03, Krzysztof Kozlowski wrote: > 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 Reviewed-by: Jiri Slaby > --- > 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, -- js suse labs