Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3963303ybi; Tue, 18 Jun 2019 09:18:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQXwKhDM2FR7xZHouktPZQjOylC+60D1Ke32c8avh+g+NWL9WyM8Irzq1aOEr5GG+7rENa X-Received: by 2002:a63:f817:: with SMTP id n23mr3436684pgh.35.1560874705813; Tue, 18 Jun 2019 09:18:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560874705; cv=none; d=google.com; s=arc-20160816; b=fCSeiokmL0cWE7pkhhX59aRouRhIdAeBOh86KMF7GbshM9fIekx4DdOIIY3zslq80c +MySIW1mYsKh52ggJsbc/Sjc9wBMbY+nWkj32C1ggCUijuV4Uic05wrhiR4bHl5cbGYe 99hzjMKEK8BdRIhsrKJffb7Au+O4mkVGpBSv9hxr3aanXIdkWIymaZO9M+Uuk042tIM7 8AKIYaeS78493TkpEGcTrq7aFvqFkADJclZNICa0HPkhXUJkQbIBVFP6sPBkQcWhgPky ZiH8avBVUGddLnkoQzU6E939In6wEjgaGRVMZjc6IW/My432kWAQ6urpiHYOcN6TBvHs VdPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=f+ZR1oURWB2QuKt9JyfRbTpGYOLlPcclLJxinxwOtJA=; b=fS0BVfljVcnd9VxcXyhO0sZVSarBrRv9bwLcEVMWXn0hVPJ24rT/8F9+u5UG+0J8FC EudU4Zq9UOgyv25KsL7W5dqVCzbpJEYz27SLJGNBFDAIJ8/+dfepD1C+AVKg0rtTmczy FWs0sELnxqO3Jux/xkAMa4asLXKwO4GBAHw7vqdChYqxWJcIj688tcU7wAvRf3wl1MSX 90z3YAU0wPZSyLdCRU34LunLKEUqyfsSAHwdt9IRT1FkTKzRYwiJZLPbeS+f7knWAEfq aL/CJdsnrhLH8dyNQSvq1k6NqkT99w31QiOGPhFSvtetAM5hnEWa783/v+Rs1WZmpF35 q0WA== 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 t10si555259pgg.221.2019.06.18.09.18.10; Tue, 18 Jun 2019 09:18:25 -0700 (PDT) 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 S1729858AbfFRQRu (ORCPT + 99 others); Tue, 18 Jun 2019 12:17:50 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:43911 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729423AbfFRQRu (ORCPT ); Tue, 18 Jun 2019 12:17:50 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hdGns-0000w4-7C; Tue, 18 Jun 2019 18:17:48 +0200 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1hdGnr-0008Mt-Ge; Tue, 18 Jun 2019 18:17:47 +0200 Date: Tue, 18 Jun 2019 18:17:47 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: "Enrico Weigelt, metux IT consult" Cc: linux-kernel@vger.kernel.org, bgolaszewski@baylibre.com, linus.walleij@linaro.org, kernel@pengutronix.de, linux-gpio@vger.kernel.org, t.scherer@eckelmann.de Subject: Re: [PATCH v2 1/2] include: linux: siox: more for declaring siox drivers Message-ID: <20190618161747.65y52fqr6toavdtb@pengutronix.de> References: <1560854427-27537-1-git-send-email-info@metux.net> <1560854427-27537-2-git-send-email-info@metux.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1560854427-27537-2-git-send-email-info@metux.net> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Cc: += Thorsten Scherer On Tue, Jun 18, 2019 at 12:40:26PM +0200, Enrico Weigelt, metux IT consult wrote: > From: Enrico Weigelt > > Add more helper macros for trivial driver init cases, similar to the > already existing module_platform_driver() or module_i2c_driver(). > > This helps to reduce driver init boilerplate. > > Signed-off-by: Enrico Weigelt I like the change. Just noticed that the Subject line is a bit strange though. if "more for" is proper English then it's news to me. I'd write: siox: add helper macro to simplify driver registration > --- > include/linux/siox.h | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/include/linux/siox.h b/include/linux/siox.h > index d79624e..d53b2b2 100644 > --- a/include/linux/siox.h > +++ b/include/linux/siox.h > @@ -75,3 +75,12 @@ static inline void siox_driver_unregister(struct siox_driver *sdriver) > { > return driver_unregister(&sdriver->driver); > } > + > +/* module_siox_driver() - Helper macro for drivers that don't do I'd prefer /* on a separate line as documented in Documentation/process/coding-style.rst (for non-net code). > + * anything special in module init/exit. This eliminates a lot of > + * boilerplate. Each module may only use this macro once, and > + * calling it replaces module_init() and module_exit() > + */ > +#define module_siox_driver(__siox_driver) \ > + module_driver(__siox_driver, siox_driver_register, \ > + siox_driver_unregister) > -- Sorry I didn't notice these two things in the first round already. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |