From nobody Sat Nov 30 03:49:09 2024 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (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 12D28192B73; Thu, 12 Sep 2024 22:17:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726179436; cv=none; b=CnL5/ZmltHp4c53jaGb3ogn9JKDQdwkDUKF/Env6FdQxmo7t38QmcoB6ex50GdtyR6cPPFs6dS8TYIbt07YGbogrV4WZ1nMxP1SG895RJ53YwEZd/+PC9IMeFS2xLTiPvTe/vEWb4l8w4pLCSwF77z+zwtDW5UU7SXTLvrD8CZQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726179436; c=relaxed/simple; bh=Bij5/YhURVVDCaKqUBDPkxrf248AzybvHLaiNQ5X3pw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=axaMgIJ7hzlulsOtbsS7TYGAiQJCAdui/NjvxMWmB8GYNd5IFSaEBexHcWv77kTdjJXsHNElbrL+0of+P+2ak96iKGVw1K4CzYQ+lV6RCuDUQWNbwq8XxAcyzTt2Ao1/NMbxQAUM/CYDyEUHitnQGfGRvS/v7Ks7e0GmpNUQ9eQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iIL+Mu8e; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iIL+Mu8e" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a9018103214so205604666b.3; Thu, 12 Sep 2024 15:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726179433; x=1726784233; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KHvYLzv1YYt/E3AO0hUXv6+oKZv7r4AbD6O8nGGAPr8=; b=iIL+Mu8ep2Vu+VbynjbqDSoajlXM26up1if3HfAQ4Q9QiBWnKiRkDZvuwYZtZt/ViR 6BzUDCMFLZctVf67/sy2wDZr8A1K05ep7QuUeGoUpDS2fY6H7dayQmA8VDsRa6t5PKFb CShe3ULrjdw+I4BUmnqzqD0/i45irxcY4z/IcR/I2TRpdkSi/sddGQP85pNGJ0hZYYBc tPWoowKg3EzlhtNQpB77JXIbEcvxkR4TiG/61N+8/EQp05hXypdDRARxAwJp4uO13d6M sWzN/FInv1Ou6/pm5tHJof1G0Lhw0Oc2ZdZRtE2jiSQeZoKC770vQpb68aTSea1S4Oa+ a/Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726179433; x=1726784233; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KHvYLzv1YYt/E3AO0hUXv6+oKZv7r4AbD6O8nGGAPr8=; b=bLQCpEvibeC1/sJg/RY1hNATOGhEBiX9oODPX9E9mNlVSlwenSUd03EwjSQR2AIJl+ eGpRV2QIlgnJ/QSvSebmmxKvfU4ySTUm38MD3zcTsTf4v1qpQLe2g3sBj7x6mCo/BA96 lylke1BVujGvfm08MjPOPERRxp47+oH+WRd9pjFxfTJZ9QLzag3D4oAS6LvF4wlc1VjE gfhVE2KUoMXA7ngEJkrDoo/xXyK5BUOhG2KKAKxye6EnPKCZRcFkhJDRqjmpsSbpjmmV YpBwc0SmUavYMbDCtwOHi07T7hKRoleNLjtLyNIFyI/eZ9D044Q4PBY+inhClLzvBLN1 uM9A== X-Forwarded-Encrypted: i=1; AJvYcCV+GqLcy/tnzb/FS2zSMqLzdBtCKh1ksHYcOyOtU7v3AhFNVuf/O41Kd0lj7KWo2QFBaM/mD5IjvWgZ@vger.kernel.org, AJvYcCWybAM3xXrBu+LeJsekYcHcOnFjvW8qNmYpdZQMkwuCJrh4DzWGgt5g9t6DDp5o+hdk4uIcJ6dGbOVZRVMr@vger.kernel.org X-Gm-Message-State: AOJu0Yyo76apXmYbZq3Kim4mBVw8lc34p9cwo04AStLbYIb3uwn2q7XS tksqiAdnKX8DwCnvc3GA0RomCp1uOQKQXDivyWHT3aIXQGDKKZNk X-Google-Smtp-Source: AGHT+IHYsb6nZJSW+yUye7pU19s6likRvHKq1P+J4ytwPXabDlMcIieFPgak75d1IeC3LVi9mtFucQ== X-Received: by 2002:a17:907:7ea1:b0:a86:ae95:eba3 with SMTP id a640c23a62f3a-a9029690d69mr357904266b.62.1726179432387; Thu, 12 Sep 2024 15:17:12 -0700 (PDT) Received: from localhost.localdomain ([2a04:ee41:82:7577:85e4:cf41:16db:65d5]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25d5491asm792195066b.198.2024.09.12.15.17.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 15:17:12 -0700 (PDT) From: Vasileios Amoiridis To: robh@kernel.org, saravanak@google.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: andriy.shevchenko@linux.intel.com, Vasileios Amoiridis , Krzysztof Kozlowski Subject: [PATCH v4 1/2] of/irq: Make use of irq_get_trigger_type() Date: Fri, 13 Sep 2024 00:16:04 +0200 Message-Id: <20240912221605.27089-2-vassilisamir@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240912221605.27089-1-vassilisamir@gmail.com> References: <20240912221605.27089-1-vassilisamir@gmail.com> 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" Convert irqd_get_trigger_type(irq_get_irq_data(irq)) cases to the more simple irq_get_trigger_type(irq). Suggested-by: Andy Shevchenko Reviewed-by: Krzysztof Kozlowski Signed-off-by: Vasileios Amoiridis Reviewed-by: Andy Shevchenko --- drivers/of/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 36351ad6115e..5d27b20634d3 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c @@ -430,7 +430,7 @@ int of_irq_to_resource(struct device_node *dev, int ind= ex, struct resource *r) &name); =20 r->start =3D r->end =3D irq; - r->flags =3D IORESOURCE_IRQ | irqd_get_trigger_type(irq_get_irq_data(irq= )); + r->flags =3D IORESOURCE_IRQ | irq_get_trigger_type(irq); r->name =3D name ? name : of_node_full_name(dev); } =20 base-commit: 32ffa5373540a8d1c06619f52d019c6cdc948bb4 --=20 2.25.1 From nobody Sat Nov 30 03:49:09 2024 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (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 453A218EFED; Thu, 12 Sep 2024 22:17:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726179436; cv=none; b=GdGbPsnPAX5n6T1JG3YDAF4nNKjYAvtPhqYz5dnMNuC81FcpGhlCaa1XgbnoQKIYTZhQSXg0yKZbOE6XTUxHSQgh/jPZP+eSWTBogzpmktUV2cnyjNGWaCj6YBE2p75foKANQvVDPVxkNSs0FVc80zz43x86mC1LBL/t0u+opAk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726179436; c=relaxed/simple; bh=0yvTbsVdvaWVX8wtGlFVHBYRY8ev+j9H3/xlChpDAtU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NDVemSVXta/e00ksGPqV5oDOQsAUJqbaCOY6LXnzVR8chq//sTjELgay6uLd6wGNSymfn8IajLP6ZWxAVKM946UMwZKlEAa3wWa/mPkcqBVee3dv1l1Etcs70eTVZ5G+06kv1efnV/SUJ80GlvD0ANM8sKGgZX9FNoUPH9uwNdw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PPdu5Z63; arc=none smtp.client-ip=209.85.208.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PPdu5Z63" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-5c412cab25cso313047a12.2; Thu, 12 Sep 2024 15:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726179433; x=1726784233; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SOHkC93q2/NcMMXdoPu8Crd8ScZInZREuK/Q8pIEDkE=; b=PPdu5Z638JmcJOcBNlsX9d63YbnPBQtLbmF8FadnZvo4R5N50lL9z3jLzCfZvDgJiI XZaQLvRqqFtkl7jzYOTEtW0n8VNkttECP68z7LLc+WsNrDXkb6xLNONMyJfqmf1eARO4 1CpgtixWnsa5tMNAu4//BrQsY8LoRG1DlAXhAvIRCkQJQtnLG/DssqXzhGh2r5j6aI4i j6vgv8OFupVgQgyYH11iKDXVISLCz8hnWnVOuw7L0nxANKIj1yYwezjyqpmQQ/d6KOee ZrJOW473OXMHzwHFhWsHqycvdnM5sRVhAIyFK4uGkAqw9mEItTm2NuMKFsgenD7eBuSr 7Tcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726179433; x=1726784233; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SOHkC93q2/NcMMXdoPu8Crd8ScZInZREuK/Q8pIEDkE=; b=hhk9SFb8VdXOIXRv43pg8pjCEUiRXYrSoGXwp9p31XctjbwmXodAjV9UIqoZnwGyVL KnmjEoJSxghARzAoM0mjO7reI6yeoeYItYZoGyVD1BpbgmTTvPo2FPJY06hS8YVElZY5 00jJ9+R/+caE0v5GMWjtNtb1IQGlFeZd8w4tKPfqRbMVcflfNDkt9LUADnEmE+S86eOy YrVgJg62xJIyr6evVagsXcG4ekZ6diqKuno+/sm1HqGmJejin2KuPpsqRwb0gcqr6HcK yjAWdXR9KykmGnxy5zTVduEmgT7qjPKTwT63TgZUv1LNd28nP52PiPKEgrI0rI1cJgOu 48gQ== X-Forwarded-Encrypted: i=1; AJvYcCVDYC6Ig0n6Wbb10nxKt+gDPnkhHmQ6tW/d3oDGLqUMLDh+o9L8pwKLh8VKPK8ZkHtjCPHoKs/R9DJv@vger.kernel.org, AJvYcCW1ikktAhCJNKDyV3KZ82zzbpo5eVlmA6bFtCPQ+9Wz+yndXFkMdQEBUhge6YyZMFbZlpEeIIgydj9p3BXc@vger.kernel.org X-Gm-Message-State: AOJu0Yzyy7ZBKJZrEh28sPzVMGOILWtm7dm9ZykoizIUceyB1Z7D/HRU vfWX3FpMav6USjv+HourF9aw3u+qtI3uX5MoC9CjeVOOx/WoflqJ2aoZfA== X-Google-Smtp-Source: AGHT+IEApnZRs6c/INDckzmQatK/rOMP+3oRv3q4dBE2lP/zo1NUdP2AwD0tkaBIxaCZuQTh3jkK/w== X-Received: by 2002:a17:906:d7e2:b0:a86:af10:6a47 with SMTP id a640c23a62f3a-a90480ce6eamr46506966b.60.1726179433312; Thu, 12 Sep 2024 15:17:13 -0700 (PDT) Received: from localhost.localdomain ([2a04:ee41:82:7577:85e4:cf41:16db:65d5]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25d5491asm792195066b.198.2024.09.12.15.17.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 15:17:12 -0700 (PDT) From: Vasileios Amoiridis To: robh@kernel.org, saravanak@google.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: andriy.shevchenko@linux.intel.com, Vasileios Amoiridis Subject: [PATCH v4 2/2] of/irq: Use helper to define resources Date: Fri, 13 Sep 2024 00:16:05 +0200 Message-Id: <20240912221605.27089-3-vassilisamir@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240912221605.27089-1-vassilisamir@gmail.com> References: <20240912221605.27089-1-vassilisamir@gmail.com> 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" Resources definition can become simpler and more organised by using the dedicated helpers. Suggested-by: Andy Shevchenko Signed-off-by: Vasileios Amoiridis Reviewed-by: Andy Shevchenko --- drivers/of/irq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 5d27b20634d3..a494f56a0d0e 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c @@ -429,9 +429,8 @@ int of_irq_to_resource(struct device_node *dev, int ind= ex, struct resource *r) of_property_read_string_index(dev, "interrupt-names", index, &name); =20 - r->start =3D r->end =3D irq; - r->flags =3D IORESOURCE_IRQ | irq_get_trigger_type(irq); - r->name =3D name ? name : of_node_full_name(dev); + *r =3D DEFINE_RES_IRQ_NAMED(irq, name ?: of_node_full_name(dev)); + r->flags |=3D irq_get_trigger_type(irq); } =20 return irq; --=20 2.25.1