From nobody Mon Dec 15 21:47:16 2025 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 2E7611FF5E9 for ; Tue, 14 Jan 2025 20:36:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736887013; cv=none; b=QIMGZP3kiY5fKK/xInDoUtA5SzopnGbqQH4Q8n56eavDLbwilfLBvcz3/agx7yQMIBWq6qW4lUB1p2RysgoO670KDACPQeRAN38G8vrNevJorahFMlq3wjsimMY5KEdme5pT3QEMCrY4YIRfHZ7HQ3rNwVQFISh7xX3TcZn1/94= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736887013; c=relaxed/simple; bh=DBlRzvTLswFCm+rfKv4D6k8mA3vi3W2vtOEjVI5j0pQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LK2FMBvGGTZSzHsw4k0OHgHa4r/DLl+y2BmrCNTTkSpPhGSMuhJKvJhh53xiSlQNS3csZixgIITo5qdteB0D3sVVV0dWNUExqNd1HNbFS/9sugO8wOwXWNlM3ClRbJdFF6sAcehzsdp/wzGkecpQK+QIXfstSp5dHWweemFhAg8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=GjwFKVoe; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GjwFKVoe" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-43620a5f81bso6465125e9.0 for ; Tue, 14 Jan 2025 12:36:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736887009; x=1737491809; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=bAvYGyeFu8e281JGlOSAn04kCJpvUAp6RFPN2J5Vh0w=; b=GjwFKVoeJtBuo8Y5ezIltmOwKNlLtw0CgqEsDYT9AbJewJULGMcSkvvs7/GDCp5I1V GICOq1jbp426O2xi4QCyVyEj4TYE18GmaMV0Ee+mahLYsUFwAO5YIvrXunTH5RBaULIg zsxjknWVsIaOJh0ycP5M6ryN9BEU0k74JZruh0fAKZ+zFspzvGOwZ2PSIhExBkPJgXag QjWWIwM6VOXzO4cC3SVemy0hE46YMIuC3t1eL2CSUdBBWgg4zQ/IolhA0uWvSkVZLbij mOfZLd1OyXXBrIc5j5kjUJ/NaDZa9PO02exIKaIzPCG9lhfonbL1L0GcOVf1XerTZmUr aEag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736887009; x=1737491809; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bAvYGyeFu8e281JGlOSAn04kCJpvUAp6RFPN2J5Vh0w=; b=ITWkgYotyUIIyYkj7bqUBSoTba1MDPzJk/WlBZzA7pvFNv/t4ZCRPdtZfP8kon98nZ nXfs6eECu60MKLUqopOFo/+2V8CiWVt4fuRRdeKCUIWeT+sdLAg/TmaEoKOviaMAlB2a E89TVq6w8pTL+H5QHhGYFpLAqi2/+r6R9kawXByAQX63xSnZnr8KHsWOALxg2CZZhZJD gAJi9DwpFIORWkcIiTFKyJGGvYA3pTZZAIR8A1reZpyJ7hSWFy5KxQDIw0ZEm+l2O9BU Ekzvv50b7FAWk6a4ikyOfqa04TMIokXngb+/Wo3P5p/V7obNyLiN6t4g3jbuxkwuHeEe gvwA== X-Forwarded-Encrypted: i=1; AJvYcCX4wcAxNzP5igNC3QzOmyta8fNRwDMacAs1R15huqiFo8+OrhtT6KOecHDbSOZIyoXdE7atCrOyXJ9/KVU=@vger.kernel.org X-Gm-Message-State: AOJu0Yx7OwbHOav6sGlzaB9z2I/fps7LAV8okC/a7QKfDd/a/3Q30MWV +j7vdpwhzWg3Y+B6Mk1zbREQ0BVfsigFTx2GokLW33V3RYJYgmnefM06vbm64fgen8nj4PQhbeX F X-Gm-Gg: ASbGncvnugAQmomSiDRxooOallu/NS2mQE0UzQAN99WoL+2OoMdBugmmM2UPjCPPxiF rdD/BwnuTC284Jsva4RFYdsa8vBVewhSXllQOVUU6x4jODs5dSMJfPS57uDjLBL2mxttrjuOhQW cYM6++V+sgw2H1xGTmp2rYQ1zzbhXlrpZ5PzlgOpeAcVUYAIyw0/LComJ9w7obVgAuNTvmB5vy/ GWSn+cAAjvkgijlSdfP3jZp4n9+r2efpjRnBqljqDS6DRz4DDyaoux99sB6vHIP9NgZRRI= X-Google-Smtp-Source: AGHT+IH1AxZZel/rWX6XENrksgjORmTMJ53M+8w7vOj2GMgiRPx3qqebgaoXnrxaxEjhON+gKlNHHw== X-Received: by 2002:a05:600c:3d06:b0:434:9cb7:7321 with SMTP id 5b1f17b1804b1-436e2691021mr106914705e9.1.1736887009595; Tue, 14 Jan 2025 12:36:49 -0800 (PST) Received: from krzk-bin.. ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e9e37d69sm185953105e9.30.2025.01.14.12.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2025 12:36:49 -0800 (PST) From: Krzysztof Kozlowski To: Bjorn Andersson , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH] soc: qcom: Use str_enable_disable-like helpers Date: Tue, 14 Jan 2025 21:36:46 +0100 Message-ID: <20250114203646.1013708-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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/soc/qcom/qcom_aoss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/qcom_aoss.c b/drivers/soc/qcom/qcom_aoss.c index 0320ad3b9148..a543ab9bee6c 100644 --- a/drivers/soc/qcom/qcom_aoss.c +++ b/drivers/soc/qcom/qcom_aoss.c @@ -12,6 +12,7 @@ #include #include #include +#include #include =20 #define CREATE_TRACE_POINTS @@ -358,7 +359,7 @@ static int qmp_cdev_set_cur_state(struct thermal_coolin= g_device *cdev, return 0; =20 ret =3D qmp_send(qmp_cdev->qmp, "{class: volt_flr, event:zero_temp, res:%= s, value:%s}", - qmp_cdev->name, cdev_state ? "on" : "off"); + qmp_cdev->name, str_on_off(cdev_state)); if (!ret) qmp_cdev->state =3D cdev_state; =20 --=20 2.43.0