Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7793428rdb; Thu, 4 Jan 2024 07:56:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLWvFWO63BNPXiiG0WBCg1kJQzN6dhY3oiTiH/wv6zfgf/QEHzPllRkJrfkbMxZO6lch9J X-Received: by 2002:a05:6a20:5586:b0:196:c5f:bd0f with SMTP id kk6-20020a056a20558600b001960c5fbd0fmr415690pzb.21.1704383805459; Thu, 04 Jan 2024 07:56:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704383805; cv=none; d=google.com; s=arc-20160816; b=IyQaX0m2AXK9DOOWddLUQ2KmgLlKi1da9IYtHiPDoHZ8WrRnXSK5WnLIXWZhZJ66Hu +S9u2/NQRMnJNibxdfacG9l1otYZfLZuICxp3dgLI5cGBmme9oPrpy3hpaptNYiKLlXQ UD2QbBdL5Uh2e8bgCN7ApyJzyWHq4sgg59ts6ul/htJ1kg4kyMyk8HRmenv1uxG0VGJO PX9u2+Cu0oa8PzFujGHNGMkbrqKAG86OBwGJQmga/R8+ymzUA2mtC1tVkoiB5xZ2PZSa GSMKV3HjgOokRqnYJk6OnpwF6IhUscP/ef2PEFUCE4GFCojKVbXC3XZqWClbxpuQFWI6 vrXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nJpokG9JgKBqkrH2cF8hoptBdUO7/w2tmBPLcVE3WHc=; fh=7urAG1FMTyNFs1A74Qb8HImjuyLV4vCLOhwBU2KIuTk=; b=a2fI1vLid5OU73+qx/H8PGzehHzqkrnAmcTGChgS0op8RV5wCyLS+SycX++77ahWCJ k8Vl/qV6bYC6kubTUgg1CRoVcaBGkAvOTglWgvRyKnlF9Hkt6zyXFsQQmFQcCye9AZKo /hwptTJegsdXMcM3BnUJKtzR/zI+domT6WzMZ2zMTkBVejg9OEricvZMjg7VPI2ElEOG lRZYrPxPnW8t6cRd32yYnrVDDWkDHCNNfGkxurybIo2ZyvAikIaODjD88rjCcycyqjjA 8F39qZ4GAxViQElLtA5USG24Aly0ZaJCPQmXL7KL2NxjdzsBdwHRxgCucll48V/0RTmJ NidQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VYm7NWQH; spf=pass (google.com: domain of linux-kernel+bounces-16891-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16891-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w12-20020a65410c000000b005c658c16acesi23616383pgp.232.2024.01.04.07.56.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 07:56:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16891-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VYm7NWQH; spf=pass (google.com: domain of linux-kernel+bounces-16891-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16891-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1EFC3286055 for ; Thu, 4 Jan 2024 15:56:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 700F624A0D; Thu, 4 Jan 2024 15:56:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="VYm7NWQH" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C8FD249F9; Thu, 4 Jan 2024 15:56:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47D65C433C7; Thu, 4 Jan 2024 15:56:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1704383791; bh=tQ2xGVztCOGERqBGQC3sZSgIZHy0WBG63Eyy/oqqK5o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VYm7NWQHeSJTLlYxDfvefYiyhsrSrrguHmZ7Ex8ulp4rxKmhF0DqPijDwGz81qVQf f4iW4/kO00i1xHwbs0tPV8RT7yeOPPkWN9UJ+9M0yt7iJJs1oW4n8vu5cbQI4tm9Yr GxAvQ1cKZrq6lxpI8yeyo7iYMlrK4/ogZ3EEnzeM= Date: Thu, 4 Jan 2024 16:56:24 +0100 From: Greg KH To: Tudor Ambarus Cc: peter.griffin@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, conor+dt@kernel.org, andi.shyti@kernel.org, alim.akhtar@samsung.com, jirislaby@kernel.org, s.nawrocki@samsung.com, tomasz.figa@gmail.com, cw00.choi@samsung.com, arnd@arndb.de, semen.protsenko@linaro.org, andre.draszik@linaro.org, saravanak@google.com, willmcvicker@google.com, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-serial@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v2 04/12] tty: serial: samsung: prepare for different IO types Message-ID: <2024010450-heritage-variety-d72d@gregkh> References: <20231228125805.661725-1-tudor.ambarus@linaro.org> <20231228125805.661725-5-tudor.ambarus@linaro.org> <2024010432-taco-moneyless-53e2@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jan 04, 2024 at 03:41:28PM +0000, Tudor Ambarus wrote: > > > On 1/4/24 15:32, Greg KH wrote: > > On Thu, Dec 28, 2023 at 12:57:57PM +0000, Tudor Ambarus wrote: > >> GS101's Connectivity Peripheral blocks (peric0/1 blocks) which > >> include the I3C and USI (I2C, SPI, UART) only allow 32-bit > >> register accesses. If using 8-bit register accesses, a SError > >> Interrupt is raised causing the system unusable. > >> > >> Instead of specifying the reg-io-width = 4 everywhere, for each node, > >> the requirement should be deduced from the compatible. > >> > >> Prepare the samsung tty driver to allow IO types different than > >> UPIO_MEM. ``struct uart_port::iotype`` is an unsigned char where all > >> its 8 bits are exposed to uapi. We can't make NULL checks on it to > >> verify if it's set, thus always set it from the driver's data. > >> > >> Signed-off-by: Tudor Ambarus > >> --- > >> v2: new patch > >> > >> drivers/tty/serial/samsung_tty.c | 9 ++++++++- > >> 1 file changed, 8 insertions(+), 1 deletion(-) > >> > >> diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c > >> index 66bd6c090ace..97ce4b2424af 100644 > >> --- a/drivers/tty/serial/samsung_tty.c > >> +++ b/drivers/tty/serial/samsung_tty.c > >> @@ -72,6 +72,7 @@ struct s3c24xx_uart_info { > >> const char *name; > >> enum s3c24xx_port_type type; > >> unsigned int port_type; > >> + unsigned char iotype; > >> unsigned int fifosize; > >> unsigned long rx_fifomask; > >> unsigned long rx_fifoshift; > > > > Is there a reason you are trying to add unused memory spaces to this > > structure for no valid reason? I don't think you could have picked a > > more incorrect place in there to add this :) > > > > Please fix. > > > > Will put it after "const char *name". If you do, spend some time with the tool, pahole, and see if that's really the best place for it or not. Might be, might not be, but you should verify it please. thanks, greg k-h