From nobody Sun Oct 5 01:52:30 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 0C4372D837F for ; Mon, 11 Aug 2025 12:48:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754916516; cv=none; b=cC/hrFjlbFjR6VLI38GRG0B6Cabg6X3m0aCh1ocxRJjPKVyLyAJBzzWcvXSpXagVWwYHSSEmUdtG5p9zQVmbkA9u3tPgI7DIjz8e4RGOHDK9kM8aJ0JasK9WaFWEI1cWR9q9My6O2ofP3CZ6gWZViZ8csbQkdOr+Y+nInbMJK6U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754916516; c=relaxed/simple; bh=Z/Z8aNwjy/UKmGQb7dk5/C7R8VIWNkrG3ytaz73rEYE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Qc88PZJIi7tPUxNRxzRbqPorhKZuiBvUpmGdLAGmJwQ5Cb9Vz2hBxm2yyshbTUbxFdGJiWivX/pSTxZf1nE2zubGSVyRubq6P25FPfe+uzWhbJWzfUsbAlxkDNVqgGTEO7PHFpe/TdHyoW+XTL4VgWgJV9X/Mk/n/qaIO0bBn5Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=cUebUoAW; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="cUebUoAW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754916513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BegFxwY4bB32r47TdTN8tAF4AdmY2JQsv44/XYcFCFo=; b=cUebUoAWr0mHr/zHYYFQCCwBX3bk9hu8cVIBRKsQYdwyqF8EbB5GUHup34ib0mx9ys6Lql IogW5KUTKJs8Ik5rMg/mzJkiwiLXwnJPIU3rl93W64pqHklBRwGffnQN4X6js3I5egHO5W R1QPUrYjuqkehWypjBu+vBTmDmtn+vM= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-668-TaLCI4YxP0q9u2ReFonWWg-1; Mon, 11 Aug 2025 08:48:31 -0400 X-MC-Unique: TaLCI4YxP0q9u2ReFonWWg-1 X-Mimecast-MFC-AGG-ID: TaLCI4YxP0q9u2ReFonWWg_1754916511 Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-4b08431923dso111655551cf.0 for ; Mon, 11 Aug 2025 05:48:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754916511; x=1755521311; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BegFxwY4bB32r47TdTN8tAF4AdmY2JQsv44/XYcFCFo=; b=HbLsCpvuDimhOYWeQsZ+ZKp2wiEMfaoZf85YhZKG+YkGqnicAxg/dfiY4kdpJ/UaQn c4I6YHmhIHzGLKYOqo58F2xqgxKfGke8UtKXmEfdSiXCVeL8K4LEozmi2iN5qTOsR3UB SA6t6x0emOzkzu5BKa+xvDjpBmde7pyfbTtDNgb4pLFAiNl+HDTJL4u8XfyNSjdb7IDA OxC9Y6RRM5aed+9CRUHlZspepULe889mtBT7+MTyX6b4922PMY6IX3s5mG60mkcQ1kal zs/TeeshWTA1c91l6GbFURXev8j8K6h5VDiAE2iwqcFcQ5/hqJmCPQx5oLw2ylMDASLQ f0/g== X-Forwarded-Encrypted: i=1; AJvYcCVqUft+UDk4bpzP7zmMx6+YalrJnYKUjnUYQwJWj4vogvAiTlfOb9M8JzYuiVUPQxtk9tjaUW1zkzYMc78=@vger.kernel.org X-Gm-Message-State: AOJu0YxfC4NPWGd0sow6ttLWMtoJT1aPg7sKE626mg+qhVWOUc/vfR+y JWR0IAFkZeK43F7ub2Nm7b1d2NKujl5WrsJHWCrRlzWfbJaGL3CwxjD1zgsj+g3hKXES54L8JDF MebtM5Pq90eLaJ8OcWOGy806gR1Y23+7TtRlxqNmO/b1NQnch6dUJ+AudnONdttpVaQ== X-Gm-Gg: ASbGncvQW/aDNNnju3K2CWUHz6KIeNrpyM5kHlA1//LUP7YuHnJyVTXuBp11me95lBM EMcGkXMTyZTEjxV6HVXB/znOMVFl5RlBtT4xLqQKrS7Wc+sCjsIlAfcFOz6NPvEKPyo3P/TY9Lz I3xAZdpK6Tpp031RHYSMI3/IH3Y6ounhpATBTe0VRzXUMkiYE1tMgnv0T0Wjhm1iyK2xB36XCsu fASn9N5HEc0h0Y2aBEbt9Nyq6QXnkbj1GFaBzxY/QJb/BKb9gRPLJiE1qOceual9SR7V7b59QqN bh9EPN1HTjb8bZ0XuOq7LTwm1FM4D5935qrIWxU/aTZtehh+Agcv4fRYGQRUFSMlLmXobDk6V4Z myNI= X-Received: by 2002:a05:622a:228b:b0:4b0:863b:f4e5 with SMTP id d75a77b69052e-4b0c97460f4mr78690731cf.33.1754916511121; Mon, 11 Aug 2025 05:48:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8iAqFt+pVv6B/yoMCzQxz/7Jr3wwJUx8Cr8upJaSFiLU1TK2hQD/TeVZHYoxHNpp07QBXag== X-Received: by 2002:a05:622a:228b:b0:4b0:863b:f4e5 with SMTP id d75a77b69052e-4b0c97460f4mr78690371cf.33.1754916510574; Mon, 11 Aug 2025 05:48:30 -0700 (PDT) Received: from [192.168.1.15] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4aef746b6efsm138724001cf.15.2025.08.11.05.48.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Aug 2025 05:48:28 -0700 (PDT) From: Brian Masney Date: Mon, 11 Aug 2025 08:48:07 -0400 Subject: [PATCH 2/7] clk: ti: dpll: change error return from ~0 to -EINVAL 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250811-b4-clk-ti-round-rate-v1-2-cc0840594a49@redhat.com> References: <20250811-b4-clk-ti-round-rate-v1-0-cc0840594a49@redhat.com> In-Reply-To: <20250811-b4-clk-ti-round-rate-v1-0-cc0840594a49@redhat.com> To: Tero Kristo , Michael Turquette , Stephen Boyd , Maxime Ripard Cc: linux-omap@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1754916502; l=1755; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=Z/Z8aNwjy/UKmGQb7dk5/C7R8VIWNkrG3ytaz73rEYE=; b=J9gUf0U1U5jq8sGZEfz6AEmIUDhkUmMSeIZZYSu0dbqaAVuS0vdyu5EjSZOZiuMAUcRlcCwZb Fe8jvzOxIOuDPrsHiJFffOGHuTTuNmlFlQ/8USEG6GDyc4rGrcWmgcn X-Developer-Key: i=bmasney@redhat.com; a=ed25519; pk=x20f2BQYftANnik+wvlm4HqLqAlNs/npfVcbhHPOK2U= When the requested rate cannot be achieved, omap2_dpll_round_rate() will return ~0. Let's change this to -EINVAL to make the code a little cleaner to read. This is no functional change. Signed-off-by: Brian Masney --- drivers/clk/ti/clkt_dpll.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/ti/clkt_dpll.c b/drivers/clk/ti/clkt_dpll.c index dfaa4d1f0b64b8e3606d928af7cef701be3fc677..a8c0fc20f791689c74868b98810= b1af2c78b18c8 100644 --- a/drivers/clk/ti/clkt_dpll.c +++ b/drivers/clk/ti/clkt_dpll.c @@ -277,8 +277,8 @@ unsigned long omap2_get_dpll_rate(struct clk_hw_omap *c= lk) * possible, programmable rate for this DPLL. Attempts to select the * minimum possible n. Stores the computed (m, n) in the DPLL's * dpll_data structure so set_rate() will not need to call this - * (expensive) function again. Returns ~0 if the target rate cannot - * be rounded, or the rounded rate upon success. + * (expensive) function again. Returns -EINVAL if the target rate + * cannot be rounded, or the rounded rate upon success. */ long omap2_dpll_round_rate(struct clk_hw *hw, unsigned long target_rate, unsigned long *parent_rate) @@ -295,7 +295,7 @@ long omap2_dpll_round_rate(struct clk_hw *hw, unsigned = long target_rate, const char *clk_name; =20 if (!clk || !clk->dpll_data) - return ~0; + return -EINVAL; =20 dd =3D clk->dpll_data; =20 @@ -360,7 +360,7 @@ long omap2_dpll_round_rate(struct clk_hw *hw, unsigned = long target_rate, if (prev_min_delta =3D=3D LONG_MAX) { pr_debug("clock: %s: cannot round to rate %lu\n", clk_name, target_rate); - return ~0; + return -EINVAL; } =20 dd->last_rounded_m =3D min_delta_m; --=20 2.50.1