From nobody Sat Nov 30 03:45:22 2024 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 27A471C2437 for ; Thu, 12 Sep 2024 23:59:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726185573; cv=none; b=Cp10NjWPEZud4x84VFb4d8IBXK6po+8BWZymyxoX+E4d11ua47HR67xEaYiklM7/f9uGoxPVcK84k6wyI65r//438nBdvz4PeisTynR8Y3KiCRHYEYwX7G9GG+R+fPx8zbVFeTBe96OePPZHFmFL3CEBg1CPCLEIrqfoIBd5X6Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726185573; c=relaxed/simple; bh=XM26KY04ontlPzRH6lr5nNeJEXahsYuW2BFBiWDXduA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BUCzS0r87otY19Xfn6IMasUHtOBqkMvPdNxdNH5yLu66qardCYwbmH0jfJDM8/6VZ2/MzrRrQf9rgQmtF41tfXtNS0d0NR4QhFC6aQ7AK1NqAWc1jfyoW3XO3Ghediejgovr5kFA2j8SwvrWoCOvWZfrwKFvzj02cfvEmmAXZr4= 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=axfbLoFL; arc=none smtp.client-ip=209.85.128.54 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="axfbLoFL" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-42cbb08a1a5so14552255e9.3 for ; Thu, 12 Sep 2024 16:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726185570; x=1726790370; 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=3tE0HBhgO7TYhcl7Kky6Fq8pKd+iF5PibST+mAJygZU=; b=axfbLoFLWaav67UqSu54YUh5mh9Gl6YtLvey/jNvFPCuQ8OM5TTTNEE/gztlEbX3Ov OHtQafAR4iPiWZmQEdQGkTcIgaYiZTz7wXCliK+O0e3gBRyCSMgGSO8/1BVyC/PVo7y6 dcUI0LMfIgehp+JXqKacFGrCjuWPyAJvDkkObjYIvzPl6W0e5pHTPzC7I2GLhqq/r5gO wqqcomJ2etx9zRg6P2//fVx4Z0QAR3EQxXQb4yGokVaS94Kfu4+08YSWFZ15FGq4EMTW VsDqruTIaP7dl7XLNALl4WxdSSFlmAZOehdxLg+pwqHztqDgXw9K8Mz+dNMYBGsfOBL2 J5og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726185570; x=1726790370; 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=3tE0HBhgO7TYhcl7Kky6Fq8pKd+iF5PibST+mAJygZU=; b=tj7tlPy+E+101It61OHJZ+KSMnDgyNh1pztBCtfJ5znih7yq1V8jYc7c7ocJ1qEWi8 Tax3sVKBpjsncHkfEeVFcAsroQVOxCiRihmYatzUeEnDW10WwcETwACeXO+MuhhFyM3X M+DXdAf91245K4OdEMzZCeveYSZMu+VhhpnwEDHoj0Wn6noVdIG9pf2AsAQ332boh4Qt ca2mM5DQKLTKsMqzv7y+x03xhJ2Ag6i9Z8iFoKICdCAYnr9zZtBZ4UsVTvtbxOTRbNXH pBgUiutzNgZLhNDEqWSDfa0zUqqTQZgL2/vnD6x5qNZIJSPhIUxFJdEHYsldU9QxmAIi Itjg== X-Gm-Message-State: AOJu0YxiAahAmbJYNceIv+jVkCGPquJn63wZbB795VWxRwRvOW4ixqRt ayh73xC3zqjN0YfdVL0MO+kroNy6dhWNiRjLnZBkwmzTGnp7dt0MxmGsmg== X-Google-Smtp-Source: AGHT+IG8/eOyaI60P5sNZBMnbGJZP5T8A6n4do+AVNu7Mg+dpDP6xcJpxplk2Efv2Uxor4tjXfwbhQ== X-Received: by 2002:a05:600c:1c9d:b0:42c:b52b:4335 with SMTP id 5b1f17b1804b1-42cdb538dacmr37471785e9.10.1726185570238; Thu, 12 Sep 2024 16:59:30 -0700 (PDT) Received: from localhost.localdomain ([2a04:ee41:82:7577:85e4:cf41:16db:65d5]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42d9b054f97sm6025175e9.4.2024.09.12.16.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 16:59:29 -0700 (PDT) From: Vasileios Amoiridis To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, andriy.shevchenko@linux.intel.com, Vasileios Amoiridis Subject: [PATCH v1 1/2] uio: uio_dmem_genirq: Make use of irq_get_trigger_type() Date: Fri, 13 Sep 2024 01:59:24 +0200 Message-Id: <20240912235925.54465-2-vassilisamir@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240912235925.54465-1-vassilisamir@gmail.com> References: <20240912235925.54465-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 the following case: struct irq_data *irq_data =3D irq_get_irq_data(irq); if (irq_data && irqd_get_trigger_type(irq_data) ... ) { ... } to the simpler: if (irq_get_trigger_type(irq) ... ) { ... } by using the irq_get_trigger_type() function. Suggested-by: Andy Shevchenko Signed-off-by: Vasileios Amoiridis Reviewed-by: Andy Shevchenko --- drivers/uio/uio_dmem_genirq.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/uio/uio_dmem_genirq.c b/drivers/uio/uio_dmem_genirq.c index 13cc35ab5d29..c70dd81bfc61 100644 --- a/drivers/uio/uio_dmem_genirq.c +++ b/drivers/uio/uio_dmem_genirq.c @@ -210,8 +210,6 @@ static int uio_dmem_genirq_probe(struct platform_device= *pdev) } =20 if (uioinfo->irq) { - struct irq_data *irq_data =3D irq_get_irq_data(uioinfo->irq); - /* * If a level interrupt, dont do lazy disable. Otherwise the * irq will fire again since clearing of the actual cause, on @@ -219,8 +217,7 @@ static int uio_dmem_genirq_probe(struct platform_device= *pdev) * irqd_is_level_type() isn't used since isn't valid until * irq is configured. */ - if (irq_data && - irqd_get_trigger_type(irq_data) & IRQ_TYPE_LEVEL_MASK) { + if (irq_get_trigger_type(uioinfo->irq) & IRQ_TYPE_LEVEL_MASK) { dev_dbg(&pdev->dev, "disable lazy unmask\n"); irq_set_status_flags(uioinfo->irq, IRQ_DISABLE_UNLAZY); } base-commit: 57f962b956f1d116cd64d5c406776c4975de549d --=20 2.25.1 From nobody Sat Nov 30 03:45:22 2024 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 A84E6191F8F for ; Thu, 12 Sep 2024 23:59:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726185574; cv=none; b=LFkHKNDFYjBeBEAEkpIL8xpeCv8Ai1LAkHOGYvf6VqLAk/GXdgeHeFHz5K/a8e5LGZS9syM+AE6qEeu/B/QVjnkGwRAf8tp7CmRW/Pz1oy8xszSAiFpYOhJA4QBVwf3Wyc8VHIm2axKz7fvlDBZG6Ag9xFblY55BchtF7xtRj60= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726185574; c=relaxed/simple; bh=Uz4OnRttDvhzBzZk/QxnnlfpqcWYDtNHnm6F0HsXFbM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YOjqrf5EfizLZdusK7chg03hgvqrC8MaRJ/vU9Fff8BL/BlQC13VedR8XnPBlZI753FosbJsLHO/0JTwLDq8MpRUQewLVN12V/DaTWE8XfcXWEjrcH1cZ5D3/QfTM05g7k6rLOxNZ6BvlYRE1xyVSfwOBJS+UX9tSTRhfPE6z2M= 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=Uxxotc9k; arc=none smtp.client-ip=209.85.128.54 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="Uxxotc9k" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-42cafda818aso14402095e9.2 for ; Thu, 12 Sep 2024 16:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726185571; x=1726790371; 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=G/lTQ7rZqFMn2EztlgqbzRX/ndyTuFKOTLsZIF22LaY=; b=Uxxotc9kJYz6bILoEZYZ5ux3k/XKy5bqx5BC6wD3ihXdGEj5xjYxjJbZDceu77+/O/ 2lqzpOe1n+7Qm8EtyxkeC3Cs7DjL+wix4shEASEdptu+EBr4KAlTp/pTKnvWAbp6VJ4G vfwzHWwPBuKy+sXhqgpLPdsrJPcWyE1xqUwt9TMAyQ8NTa6kYrsEDbYVekg0CQi5QRuS ZwGJQhHFYHX5iNX9pd2OcsrveyyYsXz2X+nXpEPL0iNTblxZ8L2RSZ5+cS/jitcxBp0H 3S7cCwoilaJrBVK1ojx07Vn6Q62KEQF+60gzPGr8uotzFYnVrL/ARiUOnJKANsgk7bZT 733A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726185571; x=1726790371; 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=G/lTQ7rZqFMn2EztlgqbzRX/ndyTuFKOTLsZIF22LaY=; b=wXFbyDZSGSEzGSs1cqKELK2H8iO/Hw38xjwfqhZaaP6VjkD29abKueb3UetxM4NJ6G 7ydg0IpVw1PhI1KF1w5r46VnrB3/wnnPk0zqH678TGTAl6ADMi9iAiA5w+R+sZFuAGD7 1s/VDMwsDTu9t5OH8cfDjc91DWC5i2fDREQ9cWfkXkjQf5zsYjWxv1MEkjILCa88JNHb FZxkFTjMeZjNUrrKB/cRTC18f6UGpxRA7JyTeMxqRiY0z/A6j7PXbKFCFnhWirdyQP6e fr9t26W8X0ll8u59BL3xx5xwoYZpP0KjYCYskOdSdcKE4gLwIUBNUxIsgn7+8fvUFvYl BUMg== X-Gm-Message-State: AOJu0Yz/4tP2brIs9mGRpwYN9KyAIavLcU4XatWcL2pJv+LzW8rSKAXF VsSy+QzNPJPyCNiSqs7uEYiJXj+sWS7u8DwIbZAstucTqQzn51NCEPnjjg== X-Google-Smtp-Source: AGHT+IG071/PqqdTENxulYYhvsYlH6vCJSzJ76evQcAjt+YhZCxg+fXnXqCcg86abhSnOANsR1ZooQ== X-Received: by 2002:a05:600c:4fc2:b0:42c:af2a:dcf4 with SMTP id 5b1f17b1804b1-42cdb56ae3dmr33300245e9.27.1726185570921; Thu, 12 Sep 2024 16:59:30 -0700 (PDT) Received: from localhost.localdomain ([2a04:ee41:82:7577:85e4:cf41:16db:65d5]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42d9b054f97sm6025175e9.4.2024.09.12.16.59.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 16:59:30 -0700 (PDT) From: Vasileios Amoiridis To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, andriy.shevchenko@linux.intel.com, Vasileios Amoiridis Subject: [PATCH v1 2/2] uio: uio_pdrv_genirq: Make use of irq_get_trigger_type() Date: Fri, 13 Sep 2024 01:59:25 +0200 Message-Id: <20240912235925.54465-3-vassilisamir@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240912235925.54465-1-vassilisamir@gmail.com> References: <20240912235925.54465-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 the following case: struct irq_data *irq_data =3D irq_get_irq_data(irq); if (irq_data && irqd_get_trigger_type(irq_data) ... ) { ... } to the simpler: if (irq_get_trigger_type(irq) ... ) { ... } by using the irq_get_trigger_type() function. Suggested-by: Andy Shevchenko Signed-off-by: Vasileios Amoiridis Reviewed-by: Andy Shevchenko --- drivers/uio/uio_pdrv_genirq.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c index 796f5be0a086..2ec7d25e8264 100644 --- a/drivers/uio/uio_pdrv_genirq.c +++ b/drivers/uio/uio_pdrv_genirq.c @@ -173,8 +173,6 @@ static int uio_pdrv_genirq_probe(struct platform_device= *pdev) } =20 if (uioinfo->irq) { - struct irq_data *irq_data =3D irq_get_irq_data(uioinfo->irq); - /* * If a level interrupt, dont do lazy disable. Otherwise the * irq will fire again since clearing of the actual cause, on @@ -182,8 +180,7 @@ static int uio_pdrv_genirq_probe(struct platform_device= *pdev) * irqd_is_level_type() isn't used since isn't valid until * irq is configured. */ - if (irq_data && - irqd_get_trigger_type(irq_data) & IRQ_TYPE_LEVEL_MASK) { + if (irq_get_trigger_type(uioinfo->irq) & IRQ_TYPE_LEVEL_MASK) { dev_dbg(&pdev->dev, "disable lazy unmask\n"); irq_set_status_flags(uioinfo->irq, IRQ_DISABLE_UNLAZY); } --=20 2.25.1