From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35D1EC433E2 for ; Sat, 12 Sep 2020 23:20:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E2D84207BB for ; Sat, 12 Sep 2020 23:20:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sPjUlD8D" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725929AbgILXUv (ORCPT ); Sat, 12 Sep 2020 19:20:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725908AbgILXUo (ORCPT ); Sat, 12 Sep 2020 19:20:44 -0400 Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40354C061573 for ; Sat, 12 Sep 2020 16:20:44 -0700 (PDT) Received: by mail-oi1-x241.google.com with SMTP id y6so13530401oie.5 for ; Sat, 12 Sep 2020 16:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=zAdeQW/2gbCpzXPZiCJyeby+oD0DdW73pGie0DjST8w=; b=sPjUlD8DnmedoAPjnVvmwZWp5/Z0rhjjN3FyIKLzRDYt5hscLhRTM3FFK+h//2F2h3 hBGMgBpKBj3/JwgoMeJKf0YEkQv2avhyFxL2gK6GMlTwHrFOAcr76ZJLzpOF3o6MMP8J w+Am3RHO//plo3Np1lMVfvuOxAHH6dKzoxD0Y4FmgpdNDQTCMxqQV9SQYp115VsjatMj Pxqfpf4JDoYRHMJfKggo80dtxxkyvp/bCDvkrTSHuNXYVDFKGZR+7yhp1PxhsP0sbGF0 8qZwraVq7RpBfv2RDchJr8hIeOKizCWxKyDTSyGvGf1LLAST4zC9+//Ch3sLyPmaMmmK PwGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=zAdeQW/2gbCpzXPZiCJyeby+oD0DdW73pGie0DjST8w=; b=QCF1J8q6exgepAgXtNPxKbULkzdLR7XHTbhofcd3nK3olYruEMfsbbVmt5Mgq04vDW 9HV/D3BZaLYf+bDuMk9Nv8yxssMo7skwrNi5HWsyuzIsmoahxzEH4MD2hgENyZuaDyYB jtJTQx6BlaaT8lplleGQlyiPXYtEJdiNQg/qbnlZW+DgCK/ANQvsqqS1hcQzDT29kMiC GzbxQczCpoF5nPNb9uQqOwzoFD026jWI2Ta2KUcPyciGYEQkYryGqwucp6y7aukv8GIc RhNnLBDtsax72Y4mzoN8MO9IQ5/u2IvM7i0Kq7TJEbqs5Eq3r5nIepmE+LCtMqAw6yxj vb4A== X-Gm-Message-State: AOAM530zym5u+e8iGqw7m50YyYadepwlDxGuhjSMHHOVBysEU4GLC9vk K0bU7aFUy7Ki2Pvjgz6lqO4N2A== X-Google-Smtp-Source: ABdhPJx015wTEgTJ2uNPmsme6fUXg9bS9MuuKkiYv7l/z1OJ+gqRkxk4aMY6E/IGkGR+Y7V+gImMBw== X-Received: by 2002:aca:f0e:: with SMTP id 14mr4937004oip.134.1599952843691; Sat, 12 Sep 2020 16:20:43 -0700 (PDT) Received: from yoga ([2605:6000:e5cb:c100:8898:14ff:fe6d:34e]) by smtp.gmail.com with ESMTPSA id l3sm1150354oom.18.2020.09.12.16.20.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 16:20:43 -0700 (PDT) Date: Sat, 12 Sep 2020 18:20:39 -0500 From: Bjorn Andersson To: Marc Zyngier Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Enric Balletbo i Serra , Frank Wunderlich , John Stultz , Saravana Kannan , Hanks Chen , Andy Gross , Matthias Brugger , Thomas Gleixner , Jason Cooper , Rob Herring , Frank Rowand , kernel-team@android.com Subject: Re: [PATCH 2/6] irqchip: Make IRQCHIP_MATCH() type safe Message-ID: <20200912232039.GF3715@yoga> References: <20200912125148.1271481-1-maz@kernel.org> <20200912125148.1271481-3-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200912125148.1271481-3-maz@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat 12 Sep 07:51 CDT 2020, Marc Zyngier wrote: > IRQCHIP_DECLARE() is backed by macros that perform some elementary > type checking on the probe function. Unfortunately, IRQCHIP_MATCH() > doesn't, risking difficult debugging sessions... > > Rewrite IRQCHIP_MATCH() in terms of _OF_DECLARE_ELMT() restore > the missing type safety. > Reviewed-by: Bjorn Andersson > Signed-off-by: Marc Zyngier > --- > include/linux/irqchip.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h > index 67351aac65ef..f8f25e9f8200 100644 > --- a/include/linux/irqchip.h > +++ b/include/linux/irqchip.h > @@ -33,7 +33,7 @@ extern int platform_irqchip_probe(struct platform_device *pdev); > #define IRQCHIP_PLATFORM_DRIVER_BEGIN(drv_name) \ > static const struct of_device_id drv_name##_irqchip_match_table[] = { > > -#define IRQCHIP_MATCH(compat, fn) { .compatible = compat, .data = fn }, > +#define IRQCHIP_MATCH(compat, fn) _OF_DECLARE_ELMT(compat, fn, of_init_fn_2) > > #define IRQCHIP_PLATFORM_DRIVER_END(drv_name) \ > {}, \ > -- > 2.28.0 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43B51C43461 for ; Sat, 12 Sep 2020 23:22:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C737521531 for ; Sat, 12 Sep 2020 23:22:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fHn21ONU"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sPjUlD8D" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C737521531 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=c+FYDKBDfN42MO7RbOHlnSJ/w9GilCuZilUpjjCUfuk=; b=fHn21ONU8sfdRaqcJyLcr+8s7 g1FoPhy1eW60gMVNMs0CtkBtnjZtj2zIwmxwKWJ/agkfukBLv27sEZznarw6k/XclzGq9yvj0pMeH GvNbJUhXrXvqJVhQydcbZ0fBBo2hYqmDT0g26OYFPtMp1fRXA4T/rR4q/fntMi5zkQUffMvZI01U1 GXMCpDabA9f3KiyekbwlH7zpz5kJqKMDmCA8kIGcDqWZEGdIqz0anCRKoNrmLEQr2KMQ2jvsRUBD3 7Okhly7tqyyhnSGbZAGj1aYmutIdtnGx6BcFNqeLjZUxCabX46vw4QEiQEdrcZ8rCOHkSKxk3AmZf 6GsJESrdw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHEp6-0004EF-MF; Sat, 12 Sep 2020 23:20:48 +0000 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHEp3-0004Dl-EO for linux-arm-kernel@lists.infradead.org; Sat, 12 Sep 2020 23:20:46 +0000 Received: by mail-oi1-x241.google.com with SMTP id d189so13481509oig.12 for ; Sat, 12 Sep 2020 16:20:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=zAdeQW/2gbCpzXPZiCJyeby+oD0DdW73pGie0DjST8w=; b=sPjUlD8DnmedoAPjnVvmwZWp5/Z0rhjjN3FyIKLzRDYt5hscLhRTM3FFK+h//2F2h3 hBGMgBpKBj3/JwgoMeJKf0YEkQv2avhyFxL2gK6GMlTwHrFOAcr76ZJLzpOF3o6MMP8J w+Am3RHO//plo3Np1lMVfvuOxAHH6dKzoxD0Y4FmgpdNDQTCMxqQV9SQYp115VsjatMj Pxqfpf4JDoYRHMJfKggo80dtxxkyvp/bCDvkrTSHuNXYVDFKGZR+7yhp1PxhsP0sbGF0 8qZwraVq7RpBfv2RDchJr8hIeOKizCWxKyDTSyGvGf1LLAST4zC9+//Ch3sLyPmaMmmK PwGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=zAdeQW/2gbCpzXPZiCJyeby+oD0DdW73pGie0DjST8w=; b=jKyDTrIqDABwXFvV1wyAzztaJP0cUhnFbiUwkFneRZVfjSyGh91+/T5uWgIuPHnqtS JQGL8/bSjAcQCJemNXKSrspyAIGDmjEWIVXLXoYuKfflxkYPTEBXQsn/JvbZqSBlWG9m LC1mTXX1oWHdyNZgyLflMh3QCSmflEGRWhPWJ4AzdHPUstHcEJMuUEwhuRYEVSBcCZa1 waWTvdoqMu3h40umTymqZZF4X3SeuGXWU/CIyIfiwrfizGkX+H2cj71aobp4uqToPiSB dqPZj+hODbVilGtxb6lJfCKIfLk5KFWrZ7IL/wWBjVWSsTQhYQ5Jsk/DKbVnGRUuT0+s JqTA== X-Gm-Message-State: AOAM533oupesQ12BN8Dsxr/B0A0QKb9v+pQ2IHF5xJPIArXmdVyYE8UE /hyWMddcUB54SVy7+mpTJc9mnQ== X-Google-Smtp-Source: ABdhPJx015wTEgTJ2uNPmsme6fUXg9bS9MuuKkiYv7l/z1OJ+gqRkxk4aMY6E/IGkGR+Y7V+gImMBw== X-Received: by 2002:aca:f0e:: with SMTP id 14mr4937004oip.134.1599952843691; Sat, 12 Sep 2020 16:20:43 -0700 (PDT) Received: from yoga ([2605:6000:e5cb:c100:8898:14ff:fe6d:34e]) by smtp.gmail.com with ESMTPSA id l3sm1150354oom.18.2020.09.12.16.20.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 16:20:43 -0700 (PDT) Date: Sat, 12 Sep 2020 18:20:39 -0500 From: Bjorn Andersson To: Marc Zyngier Subject: Re: [PATCH 2/6] irqchip: Make IRQCHIP_MATCH() type safe Message-ID: <20200912232039.GF3715@yoga> References: <20200912125148.1271481-1-maz@kernel.org> <20200912125148.1271481-3-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200912125148.1271481-3-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200912_192045_499283_34FD4C24 X-CRM114-Status: GOOD ( 18.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Jason Cooper , Saravana Kannan , kernel-team@android.com, Hanks Chen , linux-kernel@vger.kernel.org, Rob Herring , Matthias Brugger , Andy Gross , John Stultz , Enric Balletbo i Serra , Frank Wunderlich , Frank Rowand , Thomas Gleixner , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat 12 Sep 07:51 CDT 2020, Marc Zyngier wrote: > IRQCHIP_DECLARE() is backed by macros that perform some elementary > type checking on the probe function. Unfortunately, IRQCHIP_MATCH() > doesn't, risking difficult debugging sessions... > > Rewrite IRQCHIP_MATCH() in terms of _OF_DECLARE_ELMT() restore > the missing type safety. > Reviewed-by: Bjorn Andersson > Signed-off-by: Marc Zyngier > --- > include/linux/irqchip.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h > index 67351aac65ef..f8f25e9f8200 100644 > --- a/include/linux/irqchip.h > +++ b/include/linux/irqchip.h > @@ -33,7 +33,7 @@ extern int platform_irqchip_probe(struct platform_device *pdev); > #define IRQCHIP_PLATFORM_DRIVER_BEGIN(drv_name) \ > static const struct of_device_id drv_name##_irqchip_match_table[] = { > > -#define IRQCHIP_MATCH(compat, fn) { .compatible = compat, .data = fn }, > +#define IRQCHIP_MATCH(compat, fn) _OF_DECLARE_ELMT(compat, fn, of_init_fn_2) > > #define IRQCHIP_PLATFORM_DRIVER_END(drv_name) \ > {}, \ > -- > 2.28.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel