Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp872788rdb; Fri, 19 Jan 2024 01:08:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IERbF6dgxVZFRAJEcg6znUC0/khaSfYaunBIY04NWdNwgneqPueNTjCM5eqWqnn5kpUbxgM X-Received: by 2002:a05:6402:6d8:b0:559:2ddd:a256 with SMTP id n24-20020a05640206d800b005592ddda256mr745453edy.2.1705655303154; Fri, 19 Jan 2024 01:08:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705655303; cv=pass; d=google.com; s=arc-20160816; b=NVu6g+3Jv+R7ADEtjIMRr4CvPQQdVZDxsM1k1IPLcWjkwkM42L17cVXwHVpG4pluXi SnPkLN1HyY/jxNBAALtPyyc9oYX6eUGEZlMnWyPE+0aHXfA13ReNeko9J+im2wZqovoD 3tfQF7BfA50qPzuT4K95FYE3P6OC6iWIfgrnfEbe4eCScKzvjCKCHI1r22yT6fmFTOzh gBwW4QEH96XQMvcJJ1vL1zXMmGwqUfn2Un0q3DdypI+X5QLpPkM+fD645r5IvHo2Xa6U 63QmmJ9lOi+hiGoGu9tM6TRah0nahagHPNaeKNV4hMOqDW064WbT+NV5Uy44e3ConE5A 3QKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id; bh=GoYThNNS5MoAsIIGpVFVtHuX2O5JRpT/wTmVa+X2uAo=; fh=wyG6QX4ccZ2/sOuSgPbL6ulCeOw6+k3f63RT60y2g2U=; b=fj/Ik4x+ilXK7HN6pIS5YHV3wEoEqtKXcP15HXdZ49NHEx/WcfM55zU0Cnt9+Vo4lO hpJoK+lGG4C93724nLEOevK0WAm43Y4p0KIPHdOf61OHzQfC9CEV/G1GEzHG11b4r+bA nfqzh2cjPVlH1sPkaGa6vq67Zvv46OY838J33YEafbKPm7DNPQVhCaL8swdVuAusSF6V GTN9rcu+gUuNfftES4SYKZBe5WqHKCnYvKhPFWX/E5uNtowFNvWK0XhM3Wk9n4aOUOAP 9LqGDOyx6v80MpUG9ioFDedoUkUeCApDp6ajh8N5gbmDDcFXqEy9QcbFJBgrNB/0+xLU Xxkg== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-30938-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30938-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z9-20020a50eb49000000b005590dddac24si5514899edp.658.2024.01.19.01.08.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 01:08:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30938-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-30938-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30938-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 95B151F218FE for ; Fri, 19 Jan 2024 09:08:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A2E0124B34; Fri, 19 Jan 2024 09:07:07 +0000 (UTC) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7308023748; Fri, 19 Jan 2024 09:07:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655227; cv=none; b=s4G8NALHM88prmaAIoZgj72nqZpTdak57q6Z5I+ppXyD0SokaYBcfKP94M6QL1DxuhmIfVSmFP6wfoxQOkTBcqwy/WkgPx1s5EZ9Gogq7hnyp8WQMqN491M7Qzg7gPka30XSz1TiY/aPFJJ8K2RSJxPeyz8iZdee5npjoM6Lk5A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705655227; c=relaxed/simple; bh=Slv8d7eQKvV+eggMm4UFOE19AueLbGSZmiXhxrd9QK4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gonBhCw7eALs4/dcERGezThlzfm0DzNUYdZqxphTahgMuMg3H0/l6MV8HW461e6lTsfIa2eCieTObvDcGXaM9/gWr90X0I9Y+/QLg9q90ZJIXa2/lRrSz+jLx+nvfUlk2V69D5Vu0MPdoCgXqc7mkWSGIcktYRYLthFoeLNXgIo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-40e9ef9853bso1344095e9.1; Fri, 19 Jan 2024 01:07:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705655224; x=1706260024; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GoYThNNS5MoAsIIGpVFVtHuX2O5JRpT/wTmVa+X2uAo=; b=AcliPhbTipJinxepqeCJgzCU7EJBfJPB5iMZud0TQxl3ztLA7uH7cVgLozhwTvASBw gz3KnuiqeYykXemKeFDybGS08HQ9xwB5yLknK0ZC8r6bPG0pq95ao5vPMHwCdlSdE+Ku CVBGp7tQ4A8jLeoBHwHrCsRnmb5nFWAKpElZ2CCl36QEYfJEVnP0nyAIvzPPercxntET LrjDFLq9SPgKB+elU5BDHcrN9m51zwhS8ZPcoR0UuC5bA6YgF+0DPjANPklZmW5yhDp7 TpQNzl6EC38uzSI765gN5Z06KJuwhIHQODsviEI2VDz84ACjP/DNJWzg0KnjuFACQGhD 2DTg== X-Gm-Message-State: AOJu0Yxtwm6S5I+677zA4XsWjNoeMzCDoMBDPfA/4cw9WG0jF2cUigk8 LjmLGKwVNRgGkFQAu87sDBpmJJuHScSH4S3a+KzwGWBk2lQNHL/A X-Received: by 2002:a1c:7507:0:b0:40e:437a:1b56 with SMTP id o7-20020a1c7507000000b0040e437a1b56mr330587wmc.143.1705655223557; Fri, 19 Jan 2024 01:07:03 -0800 (PST) Received: from ?IPV6:2a0b:e7c0:0:107::aaaa:59? ([2a0b:e7c0:0:107::aaaa:59]) by smtp.gmail.com with ESMTPSA id i7-20020a5d6307000000b00337d71bb3c0sm2223128wru.46.2024.01.19.01.07.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Jan 2024 01:07:03 -0800 (PST) Message-ID: <8f3f85d0-866e-4e5a-8177-05c26c08b278@kernel.org> Date: Fri, 19 Jan 2024 10:07:01 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 17/18] tty: serial: samsung: shrink port feature flags to u8 Content-Language: en-US To: Tudor Ambarus , Sam Protsenko Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com References: <20240110102102.61587-1-tudor.ambarus@linaro.org> <20240110102102.61587-18-tudor.ambarus@linaro.org> <76e1dc42-cabe-4925-8aa1-c8f733fb36a2@linaro.org> From: Jiri Slaby Autocrypt: addr=jirislaby@kernel.org; keydata= xsFNBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wdKraekbNE0bC4zV+ryvH4j rrcDwGs6tFVrAHvdHeIdI07s1iIx5R/ndcHwt4fvI8CL5PzPmn5J+h0WERR5rFprRh6axhOk rSD5CwQl19fm4AJCS6A9GJtOoiLpWn2/IbogPc71jQVrupZYYx51rAaHZ0D2KYK/uhfc6neJ i0WqPlbtIlIrpvWxckucNu6ZwXjFY0f3qIRg3Vqh5QxPkojGsq9tXVFVLEkSVz6FoqCHrUTx wr+aw6qqQVgvT/McQtsI0S66uIkQjzPUrgAEtWUv76rM4ekqL9stHyvTGw0Fjsualwb0Gwdx ReTZzMgheAyoy/umIOKrSEpWouVoBt5FFSZUyjuDdlPPYyPav+hpI6ggmCTld3u2hyiHji2H cDpcLM2LMhlHBipu80s9anNeZhCANDhbC5E+NZmuwgzHBcan8WC7xsPXPaiZSIm7TKaVoOcL 9tE5aN3jQmIlrT7ZUX52Ff/hSdx/JKDP3YMNtt4B0cH6ejIjtqTd+Ge8sSttsnN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99qpP5zi+eNrMmLRQx9iecDNgFr342R9bTDlb1TLuRb+/tJ98 f/bIWIr0cqQmqQ33FgRhrG1+Xml6UXyJ2jExmlO8JljuOGeXYh6ZkIEyzqzffzBLXZCujlYQ DFXpyMNVJ2ZwPmX2mWEoYuaBU0JN7wM+/zWgOf2zRwhEuD3A2cO2PxoiIfyUEfB9SSmffaK/ S4xXoB6wvGENZ85Hg37C7WDNdaAt6Xh2uQIly5grkgvWppkNy4ZHxE+jeNsU7tg= In-Reply-To: <76e1dc42-cabe-4925-8aa1-c8f733fb36a2@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 19. 01. 24, 9:56, Tudor Ambarus wrote: > > > On 1/16/24 19:03, Sam Protsenko wrote: >> On Wed, Jan 10, 2024 at 4:25 AM Tudor Ambarus wrote: >>> >>> There's a single flag defined as of now. Shrink the feature flags to u8 >>> and aim for a better memory footprint for ``struct s3c24xx_uart_info``. >>> >>> Signed-off-by: Tudor Ambarus >>> --- >>> drivers/tty/serial/samsung_tty.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c >>> index 5df2bcebf9fb..598d9fe7a492 100644 >>> --- a/drivers/tty/serial/samsung_tty.c >>> +++ b/drivers/tty/serial/samsung_tty.c >>> @@ -90,7 +90,7 @@ struct s3c24xx_uart_info { >>> >>> /* uart port features */ >>> >>> - unsigned int has_divslot:1; >>> + u8 has_divslot:1; >> >> But that's already a bit field. Why does it matter which type it is? >> > > If using unsigned int the bitfied is combined with the previous u8 > fields, whereas if using u8 the bitfield will be independently defined. > So no benefit in terms of memory footprint, it's just a cosmetic change > to align the bitfield with the previous u8 fields. Allowing u32 for just > a bit can be misleading as one would ask itself where are the other > bits. Between a u32 bitfield and a bool a u8 bitfield seems like a good > compromise. Why? What's wrong with bool? bitfields have terrible semantics wrt atomic writes for example. -- js suse labs