Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp168346rdb; Wed, 21 Feb 2024 22:58:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXUUfqPG6A4haWXPxe+2H3FMlxN9mKuhfVE/Yuh3JA2HfC5EDOOA7CMRxEy8YwL9/Dfe0nSI5h3UDD4KLdIubSbg8hqb0xbLtiOXab55Q== X-Google-Smtp-Source: AGHT+IGewg3FaPJOxbvR/4JyzZ0TLQBCLJk126j4hZXAwzUvxo96Kj5B5h2G6//PHR8P8Ktr9ldZ X-Received: by 2002:aa7:c6c3:0:b0:565:1049:c009 with SMTP id b3-20020aa7c6c3000000b005651049c009mr2060634eds.28.1708585128467; Wed, 21 Feb 2024 22:58:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708585128; cv=pass; d=google.com; s=arc-20160816; b=Six7J7WMzjZ+IivIZZ2cpeUz0sCB+JtsoXH4R/9uellS25qq5qzSJ3YBcjWbLm3ZZS Uu3utTOSCmUth9VKDWR328n2zg8Ic8XVdRqNZ3Wik6oi6B3ViKhoWFxlG70JmC7yqBIZ 6I9dprruXxNhjqZRWz9CThgJdp63Fn4tb49wpKw3tkgBnm94cnvPjaTnO96ln7NNl3mJ croJbS7nkYAcH8iHmF6aEntGhttoLC3i/rpBG3OKzLyzA9swe3bVeuiCa9EALGD+RaLI DfasZM7EE8H1lkPNw/HUqSGOU7ooU7YjSa7onuAigGPWQWlHwizy7OUAchbJbSY23eU8 lzXQ== 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=7ZncrEUsUC9sjkZ2Qw0MyfZjlW0xqX3HQAFV3fa9mKE=; fh=jNajfHL6rSegLK9h46OcLX+3ypbG5/VhljdELSBNIyc=; b=kuG26lozdo7/rNKaOlb3FXKfi5MQztoHYJJ0HOS+4XyvwQI2fby6hhvwf+g2y4QyMz Uq8FQK/Va0zSf6do7vZ857rojtzTMT3y64lcOcvBV9X61OG1uLb1l0QWOHRActSr1ffC /9dI6uWVphNAsiRtK0yA9La/0dLuWZk9dBgJxjGKaZg6QhRylw+YnWy5Cdml1aPFOYWp sxD7dFhmMEJgRcIFrAfTMf2VOt6w9MRpRQ2K1IcjfoXDpSD37Av7jT/CAKiFMxMG98ta IoMdE+YOAG3cUgZaNcFcUwOd6Tt7lSGcmfwTg81jhcK0jn6w5AJmp9bT9Dj9oOeiItGm 5r1g==; dara=google.com 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-75991-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75991-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. [147.75.80.249]) by mx.google.com with ESMTPS id h3-20020a056402280300b00564b90ae27dsi2611370ede.538.2024.02.21.22.58.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 22:58:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75991-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-75991-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75991-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 135B21F22238 for ; Thu, 22 Feb 2024 06:58:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 607B617752; Thu, 22 Feb 2024 06:58:39 +0000 (UTC) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 1AAA3101C2; Thu, 22 Feb 2024 06:58:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708585118; cv=none; b=T7TILLORkVgVD1Rz3HxNJA1vkGZ93J1Q158ucR/RFr49m11LTGtPvCgXQpad4z2qzctjQw//KIMd1+XBImnq+CXo82dDrNXFPPflQrGb3eqYuSfy3Uh3bnOK0Fg6tMLndVRmQ5Smyzz1F1UPuGOYKrzNiDFECvMmZ/LgK5dWWMc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708585118; c=relaxed/simple; bh=8jNUR1QUpSx19cQNGXxmdSHKqS3IlVyUM8XQh6VBHWw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=R9rgrKiGu3f2q5j2pGyeb3fHtfNrBFAODrpI4zFuIc4vtKAR/MI309bu/NlzVbK/ofOnBBNmxJwqjWcfwvcz50x2yYnHIdoR3oVF9nJXRB+qqo8EhyYYyvCGTKAzBLQHpsRAg09fSiBwRtbflHHtU3cI1yUB/j+1aWZGBDezQdw= 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.221.43 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-wr1-f43.google.com with SMTP id ffacd0b85a97d-33d2b354c72so3577552f8f.1; Wed, 21 Feb 2024 22:58:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708585115; x=1709189915; 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=7ZncrEUsUC9sjkZ2Qw0MyfZjlW0xqX3HQAFV3fa9mKE=; b=URP23pg35BhTFTY6LLWarqZzqmObH0jmVmIXfqs1IENusdpYVvcWxDKDl+jCgMP1jz tKlVMN6lrDxCWcCDPjwL3Rg+QeLSV2O4UF0/5BxVmu0ixdf9PAyzVlW4soOpEgRD1Rjv G8Ozxn61NiAnJ8xT9Neuud92k0ITn3eDZV0+kkgQOvslJ9M3WWBt/m0xVAv+8wuBz9HL j6hVx9d7TRV9ZpNJcE1Ovo15bB3ZN9Pmi3bqw0OFZReVp8oo/olWJE6JxX1bKBedT/JX BV4TFIp0HjoaUIS8hUrBxscxJJ71IuTfe7mil/qfY8QE0rAGZykO/Gz6/Z9RaOW4s5RI ujlQ== X-Forwarded-Encrypted: i=1; AJvYcCX8ruGmRAUSLhCyL4PG7naRzcTvA8igPz7XNdBj1SNkWOZlyZkDekX7Xqm68mxEF6ehGAksQd+iHunmm5ar+En2EPZe9bibMGhrsGJRxKrKRMFvdz2OIsyUlbgn7mMkC4WR9aBBi+CMJcqh36q6uDgByvGfgTIdW4TfYBUJelWjSEpBC6whT3yAhj6Wfgbl3qtarMSc+wnFp9gVGeQeVKCuJDvu X-Gm-Message-State: AOJu0Yza0VoVqrc3Ywe2eR0YcJmsx47OSpNi1foYdjYaP+39S1FS9XNT CWo2aa5CdSDbEzYj2GjyEC8+Fd/dfejk4kEhbSVgvDC+ea+neGMN X-Received: by 2002:a5d:68cc:0:b0:33d:209a:ecf3 with SMTP id p12-20020a5d68cc000000b0033d209aecf3mr11854918wrw.20.1708585115176; Wed, 21 Feb 2024 22:58:35 -0800 (PST) Received: from ?IPV6:2a0b:e7c0:0:107::aaaa:59? ([2a0b:e7c0:0:107::aaaa:59]) by smtp.gmail.com with ESMTPSA id ay3-20020a5d6f03000000b0033d1b760125sm19954711wrb.92.2024.02.21.22.58.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Feb 2024 22:58:34 -0800 (PST) Message-ID: <5aeee02f-45a6-48e5-a6f4-e55b76d4b959@kernel.org> Date: Thu, 22 Feb 2024 07:58:32 +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 v1 02/14] serial: core: Add UPIO_UNSET constant for unset port type Content-Language: en-US To: Andy Shevchenko , Greg Kroah-Hartman , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-rpi-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Joel Stanley , Andrew Jeffery , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Al Cooper , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , Paul Cercueil , Vladimir Zapolskiy , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu References: <20240221183442.4124354-1-andriy.shevchenko@linux.intel.com> <20240221183442.4124354-3-andriy.shevchenko@linux.intel.com> From: Jiri Slaby Autocrypt: addr=jirislaby@kernel.org; keydata= xsFNBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wdKraekbNE0b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Pk2D53Ww39VNI/J9ABEBAAHCwV8EGAECAAkFAk6S 54YCGwwACgkQvSWxBAa0cEk3tRAAgO+DFpbyIa4RlnfpcW17AfnpZi9VR5+zr496n2jH/1ld wRO/S+QNSA8qdABqMb9WI4BNaoANgcg0AS429Mq0taaWKkAjkkGAT7mD1Q5PiLr06Y/+Kzdr 90eUVneqM2TUQQbK+Kh7JwmGVrRGNqQrDk+gRNvKnGwFNeTkTKtJ0P8jYd7P1gZb9Fwj9YLx jhn/sVIhNmEBLBoI7PL+9fbILqJPHgAwW35rpnq4f/EYTykbk1sa13Tav6btJ+4QOgbcezWI wZ5w/JVfEJW9JXp3BFAVzRQ5nVrrLDAJZ8Y5ioWcm99JtSIIxXxt9FJaGc1Bgsi5K/+dyTKL wLMJgiBzbVx8G+fCJJ9YtlNOPWhbKPlrQ8+AY52Aagi9WNhe6XfJdh5g6ptiOILm330mkR4g W6nEgZVyIyTq3ekOuruftWL99qpP5zi+eNrMmLRQx9iecDNgFr342R9bTDlb1TLuRb+/tJ98 f/bIWIr0cqQmqQ33FgRhrG1+Xml6UXyJ2jExmlO8JljuOGeXYh6ZkIEyzqzffzBLXZCujlYQ DFXpyMNVJ2ZwPmX2mWEoYuaBU0JN7wM+/zWgOf2zRwhEuD3A2cO2PxoiIfyUEfB9SSmffaK/ S4xXoB6wvGENZ85Hg37C7WDNdaAt6Xh2uQIly5grkgvWppkNy4ZHxE+jeNsU7tg= In-Reply-To: <20240221183442.4124354-3-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 21. 02. 24, 19:31, Andy Shevchenko wrote: > In some APIs we would like to assign the special value to iotype > and compare against it in another places. Introduce UPIO_UNSET > for this purpose. > > Note, we can't use 0, because it's a valid value for IO port access. > > Signed-off-by: Andy Shevchenko > --- > include/linux/serial_core.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h > index 2d2ec99eca93..2b0526ae1fac 100644 > --- a/include/linux/serial_core.h > +++ b/include/linux/serial_core.h > @@ -470,6 +470,7 @@ struct uart_port { > > unsigned char iotype; /* io access style */ > > +#define UPIO_UNSET ((unsigned char)~0U) /* UCHAR_MAX */ Perhaps making the var u8 and this U8_MAX then? It would make more sense to me. > #define UPIO_PORT (SERIAL_IO_PORT) /* 8b I/O port access */ > #define UPIO_HUB6 (SERIAL_IO_HUB6) /* Hub6 ISA card */ > #define UPIO_MEM (SERIAL_IO_MEM) /* driver-specific */ thanks, -- js suse labs