From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 DFF5E1D63C7 for ; Wed, 15 Jan 2025 19:12:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736968364; cv=none; b=eaRx2pIQiqAqX6JbEjnyV9Agbn4sFJw45r3RERP1E+N6kvwFWeLjBWuEN4pwRtCKnNvPx7DoKhEc62ooVHWbSYikmqVyhq+YLjrG34VWfKhItXR3P4bd3ICfCscMFXVny9np0jnYS/AJkfkId/VpGdHGoayx2xRWdB6onoHSpOU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736968364; c=relaxed/simple; bh=B/gzOdGkeGxzAG0y8FfSoGbbohfBxqKo7MqsY7zNrDw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Z3Pv2KTWaTbwDYmO4XNQTCYmYSqlngoqLHCllBQpiSgXtI4GDqUDux9jJQAVNJo9kMPdO6oTpCL0xJ6rRDn6gJ+SBMiHl5NjcirFDvliHtRKk5AjB7tCg8TTzX3P4ZQMft+o0McxxyJSAcSTCORxZ9iFrvldMrorUrKG0pC0jGk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=gfdBYs0x; arc=none smtp.client-ip=209.85.160.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="gfdBYs0x" Received: by mail-qt1-f173.google.com with SMTP id d75a77b69052e-467a6781bc8so1187831cf.2 for ; Wed, 15 Jan 2025 11:12:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1736968362; x=1737573162; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=/4oGFxCwPaJgAdqTBVjzj8myjSC006R3VVcxomH2jWc=; b=gfdBYs0x0eRYmWwFdkh20bxa+DzFKs1hD0JK8VlzR3DHXi9Flcd09OX3ULFJSP6GUF tE4U3UUiP81YWoNnbCKlmQ3wFsiT30BJ3RweOprLCduE5YpYYEE7Yte9RyZbmb0nMoNT ifAPe1VvqyokkTY7Ap5PStAwMhZXEkd3glbrNG8ScDlVe3KuOT1DbAruKCGA74bkatMY LTfioIIkKLI0/hn/KNtUo/v79/cPGF7EMce9RfkBysMXmNqh7ecKUuJvCTi1YPY/iA4/ XHbIDiOVByhPiBsAlytC3s2S7Eb0Wkn8oFoT7DssLqd03M5B8YUqEtg4v/0Yv/bvn9Xt YTQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736968362; x=1737573162; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/4oGFxCwPaJgAdqTBVjzj8myjSC006R3VVcxomH2jWc=; b=TYs46OW1Q4OViW5h1EgQoKBKwR37jb80bua2oze1AmU6JSrhky5az6+Av/hliSSusm p9iGfciGw3qr3kzHV1nyyT0UzyqcS5j8zSe+LP4UUEz5t353rk0UHRIwfknqRUNjtTDr 2fC4nrSVymaC4Meru+0zxW2pb+ByvrUacFHvzMbMEABQ9kDr8sqt1JBGFZpwJ/mNFzHo NR0kFJe7z8BVV3e9ZH7WUvyftyX77U5zKXhsHPZwxtaM6pd2LgWatqY+P9Djc3TLTkUx 7Sgtt6Qm0JLu90Tr0MNB0Bc7D6RBeuw3k/vXMA+7T/YzoL/W3t+E3Cr/zw+t0H9reVZj rz8Q== X-Forwarded-Encrypted: i=1; AJvYcCXyJDgflZYsxlzF6H4R+eutDBagbpJ3vUx5gqCgdLD9XfEd55bM+oxfrESv1xVb8VsvLTyZTXT4FXXWfak=@vger.kernel.org X-Gm-Message-State: AOJu0YxxaZnMbHe1dOwdOgWQiD7Ofn5rc0A9YddA73MN4jkIcdh3j3C1 BTha3XJw2Xg4PMPDXAFJZHi0HV2Bsr7MNrIsyIjp3bOGmwZR1xO48c0n5Z2TqCmac4R3ss/rsNg G X-Gm-Gg: ASbGncv2oszyCoKPyNVs7G2BGok/VWz7VVewhFpsj+bX/FkVzVrlQM3bb+1KudOCsux W0G986l6TqBHUxEDf8YCzGPNl0ruY13T8etTBLptziJpGkR73txMGyuQaD8PbKMCNmDiWmlSzFZ Zq4YPaIKjOAZKolG9WefuQpJUH7zyzdIIy8AAlBIqXu/3ABXy/Amb7N+XAbMrTpTSUwbSoaRrcL mftRTs4RCLN23XXeMWEbIqYpq/yFPDPbgrpjEI7mODytDGoT9S6tiLgaVi6Ow+oc75lv2EvPpSJ MRjKv1APBfbgIh9v4rPQzYEkr2NOQQ== X-Google-Smtp-Source: AGHT+IGLgsr87VLlZ/6vxEgew2f6ev8/p69ziLEOON6TEwqWnOVVTirBJBkB/bFj8Dm/enP76kSGnA== X-Received: by 2002:a05:622a:1a96:b0:462:ea22:33bb with SMTP id d75a77b69052e-46c7107aa17mr104417681cf.38.1736968361749; Wed, 15 Jan 2025 11:12:41 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-68-128-5.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.128.5]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-46c873de559sm67648981cf.78.2025.01.15.11.12.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2025 11:12:41 -0800 (PST) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1tY8oi-00000002pPE-1jhH; Wed, 15 Jan 2025 15:12:40 -0400 Date: Wed, 15 Jan 2025 15:12:40 -0400 From: Jason Gunthorpe To: Krzysztof Kozlowski Cc: Will Deacon , Robin Murphy , Joerg Roedel , Yong Wu , Matthias Brugger , AngeloGioacchino Del Regno , Heiko Stuebner , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: Re: [PATCH] iommu: Use str_enable_disable-like helpers Message-ID: <20250115191240.GA650389@ziepe.ca> References: <20250114192642.912331-1-krzysztof.kozlowski@linaro.org> 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: <20250114192642.912331-1-krzysztof.kozlowski@linaro.org> On Tue, Jan 14, 2025 at 08:26:42PM +0100, Krzysztof Kozlowski wrote: > Replace ternary (condition ? "enable" : "disable") syntax with helpers > from string_choices.h because: > 1. Simple function call with one argument is easier to read. Ternary > operator has three arguments and with wrapping might lead to quite > long code. > 2. Is slightly shorter thus also easier to read. > 3. It brings uniformity in the text - same string. > 4. Allows deduping by the linker, which results in a smaller binary > file. > > Signed-off-by: Krzysztof Kozlowski > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 3 ++- > drivers/iommu/arm/arm-smmu/arm-smmu.c | 3 ++- > drivers/iommu/mtk_iommu.c | 9 +++++---- > drivers/iommu/mtk_iommu_v1.c | 3 ++- > drivers/iommu/rockchip-iommu.c | 3 ++- > 5 files changed, 13 insertions(+), 8 deletions(-) Reviewed-by: Jason Gunthorpe Jason