Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3484163imj; Tue, 19 Feb 2019 04:26:26 -0800 (PST) X-Google-Smtp-Source: AHgI3IbaZdR/q+EIoubIWOTvflUAQHHcz7h63CwcFPhERLZ25eZvC+p0b8JPSbmmqyY2Ib1ZoQOK X-Received: by 2002:a63:2224:: with SMTP id i36mr6786851pgi.169.1550579186914; Tue, 19 Feb 2019 04:26:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550579186; cv=none; d=google.com; s=arc-20160816; b=zV9S8CchQBf27HRRXcNJYiQBtI1xjzywy6ItQeuiWok9wV6SN5dl7q+5SA+Yz8BuUY HUKDegkigkoUSSfhLASlhuHRkEhUypY+1wy1ZwLcF2LoQl5vDJSEHPJThbk5+DqfMKQn N3wuWMhuZaCa7/yMmyO4fwn7pTFlOSsqtMcoR1AOPMuZHY08gLW8sCQKrxPGjH+aI7fh L4M6kd3s2Ceoh69LuwP1PTU/rKF7sZ+MUUSGb0RGyxfkv8p4ba4qsamuNxhf6g4m1svv WGktxwv7uA+efi4doDgvouRbw8+xlZ1eU45+mMGLaKPKl1Jehn1TKp+xi6JukpKwxhXK mDmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=6Ll2dPRA08ub0+gZHG89ZCmDfS9HzKgkmtnnXwr5p58=; b=Vkqr0N0oezpIHWeZQVsuFBh0HBgrM21j9sg3Nt54K2Qy0RSSL2EYLCQ35YV0QAWUuf ii//dM+iVhiLBJbTyNHjb2yhS2zC0iNEtGifkImkrEU+2KWZlUtzykX074ZiColHOmDU VJEj2gPXAAFPf6iy3nbnVwLWMUEPgw+e3av0J12WhqCt82yBRDbU2cprG2TvT2+lUNY7 BCGUQJjeWsCz97++vsGRLN7Aht2NiGiKsJdvHSwG8YvrkvkzrVvugVxACxfJUlELpUt6 FTJIDraagFWW55rNUB6yvySMat3u3gFQC8fExXIDfX2avWLIUMtjXJFH9YKhT3Shxaez t/2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si15742167pgd.10.2019.02.19.04.26.10; Tue, 19 Feb 2019 04:26:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727877AbfBSMZm (ORCPT + 99 others); Tue, 19 Feb 2019 07:25:42 -0500 Received: from foss.arm.com ([217.140.101.70]:44500 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725772AbfBSMZm (ORCPT ); Tue, 19 Feb 2019 07:25:42 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 288A7EBD; Tue, 19 Feb 2019 04:25:40 -0800 (PST) Received: from why.wild-wind.fr.eu.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 251A13F720; Tue, 19 Feb 2019 04:25:37 -0800 (PST) Date: Tue, 19 Feb 2019 12:25:24 +0000 From: Marc Zyngier To: Bartosz Golaszewski Cc: Linus Walleij , Thomas Gleixner , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH v5 1/7] irq/irq_sim: add irq_set_type() callback Message-ID: <20190219122524.2e2b01db@why.wild-wind.fr.eu.org> In-Reply-To: <20190218164138.24921-2-brgl@bgdev.pl> References: <20190218164138.24921-1-brgl@bgdev.pl> <20190218164138.24921-2-brgl@bgdev.pl> Organization: ARM Ltd X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Feb 2019 17:41:32 +0100 Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Implement the irq_set_type() callback and call irqd_set_trigger_type() > internally so that users interested in the configured trigger type can > later retrieve it using irqd_get_trigger_type(). > > Signed-off-by: Bartosz Golaszewski > --- > kernel/irq/irq_sim.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/kernel/irq/irq_sim.c b/kernel/irq/irq_sim.c > index 98a20e1594ce..83ecc65d8be2 100644 > --- a/kernel/irq/irq_sim.c > +++ b/kernel/irq/irq_sim.c > @@ -25,10 +25,18 @@ static void irq_sim_irqunmask(struct irq_data *data) > irq_ctx->enabled = true; > } > > +static int irq_sim_set_type(struct irq_data *data, unsigned int type) > +{ > + irqd_set_trigger_type(data, type); > + > + return 0; You keep ignoring the requirement for sanitization of the trigger type. Frankly, I'm getting tired of fighting over 3 lines of incorrect code. I guess that despite all the noise, you don't really want this code in after all. M. -- Without deviation from the norm, progress is not possible.