Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4216437imd; Mon, 29 Oct 2018 20:53:28 -0700 (PDT) X-Google-Smtp-Source: AJdET5c3KBoom2rJr+MDtvS6n688oq9JVCX6LSnrkJlGHn9QHeNC066N5i08e1NLHCRwrj2Y3M5y X-Received: by 2002:a65:4646:: with SMTP id k6mr16192047pgr.153.1540871608333; Mon, 29 Oct 2018 20:53:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540871608; cv=none; d=google.com; s=arc-20160816; b=OY0z93HmHmqI5eZU1PiSWzp5mhAgQlkNbGk8Oi64QdQx6A7mDcnc6mxjVOIEZUWSEe IvtHetOsEH2r7XSTZKHAjQSynIDvoJXmUWzHKj2tEUuWDo1hfgDoedPWnhenxfBUufyo 9LqVPPXRnY64Cpa1xdLHX47UY/oPjPNjWLqtPYMWNrwfL4Yb0YWScfKM3JHDNU8UXX9F pYbVyVPN+DrdOFdpzLqvODy/T31VjKVYSbZW3T8j2OXV4DJioNZC7Ls3IQTyBRqbu9b9 1BhN7yH5r3C+nAnJgtEXo0gBYJKBlyUQxcxfZsTdYpcJBjRhmW/8haUKJPi1UHbW0N7y 4Fhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:importance:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:dkim-signature; bh=BEgiISacGBCIrmbEEWjTFnue6l8ZC4GZMmnBlkG7Icc=; b=d/vnjzDrcmnzzsEYlJARBhklEX6gFntWb8/d86/1RD+BuT208EwODMq20sjCaBBHfU BdLs+YMEZeD1KrMHfdqfd7jWppcyM2vCLrQNBd1PRyp0VVUyEEglG5KjHjgcL0Wts1+q 6B0HGQz+BJFaPoEyaQzLLP+sMpajQCz0Nh1mUm3W/8pjA4ooswfo4NiFrpayaSQJnYpd HI2r1fzwgl05tcI+IyCj/omfzYu1UjcWGnA4WIRdwQynfGhp0Ht4GeOvNI/jtSNXg2p2 3nAwgsreenuXjpSgwK5eoog+S70QDHoa2aICCbb1160P3sHaMhwtpCrGVajJvBFzLknF OKGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@fpond.eu header.s=strato-dkim-0002 header.b=Akt2Di3s; 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 x8-v6si22800583pge.545.2018.10.29.20.53.12; Mon, 29 Oct 2018 20:53:28 -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; dkim=fail header.i=@fpond.eu header.s=strato-dkim-0002 header.b=Akt2Di3s; 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 S1726523AbeJ3MoM (ORCPT + 99 others); Tue, 30 Oct 2018 08:44:12 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.50]:35439 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726016AbeJ3MoM (ORCPT ); Tue, 30 Oct 2018 08:44:12 -0400 X-Greylist: delayed 351 seconds by postgrey-1.27 at vger.kernel.org; Tue, 30 Oct 2018 08:44:10 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1540871546; s=strato-dkim-0002; d=fpond.eu; h=Subject:References:In-Reply-To:Message-ID:Cc:To:From:Date: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=BEgiISacGBCIrmbEEWjTFnue6l8ZC4GZMmnBlkG7Icc=; b=Akt2Di3saE/h+U5XzgzeezqYoX9/HhajdZHVMlKyiqcHzxR0braIEbYAlIczhPhXH1 0jzdhypKWq1Zra+6vlfp+V4poorDFQjzjPcwSFya4y90MuCjmMsF1nd1FfFc3BcEiGFm 2ILKiEziuuU/knU2mmZCtov6UPIW7IyYCEdyV1AhPzhFhLn6aM/VRkY//tV/jh0XnPYY BZQUcW8PmVU7+JUX8rb0gNRX91iOfJOThhY/+vn1f1Ll4LZB8RsY51XlnBmWFKQAH3jY lON23ryYBigkPpEFD+Sx0PGXtPX8gX3eZsvGAF+yUUzniXcM2eJk3kp6ZIAjMlE3pctl s1Qw== X-RZG-AUTH: ":OWANVUa4dPFUgKR/3dpvnYP0Np73amq+g13rqGzmt2bYDnKIKaws6YXTsc4=" X-RZG-CLASS-ID: mo00 Received: from null by smtp-ox.front (RZmta 44.3 AUTH) with ESMTPSA id 20819cu9U3kRxs5 (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Tue, 30 Oct 2018 04:46:27 +0100 (CET) Date: Tue, 30 Oct 2018 04:46:26 +0100 (CET) From: Ulrich Hecht To: Jacopo Mondi , geert+renesas@glider.be, laurent.pinchart@ideasonboard.com, horms@verge.net.au Cc: linus.walleij@linaro.org, linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <1822236810.335136.1540871186977@webmail.strato.com> In-Reply-To: <1540836824-4636-2-git-send-email-jacopo+renesas@jmondi.org> References: <1540836824-4636-1-git-send-email-jacopo+renesas@jmondi.org> <1540836824-4636-2-git-send-email-jacopo+renesas@jmondi.org> Subject: Re: [PATCH 1/2] pinctrl: sh-pfc: Introduce VIN_DATA_PIN_GROUP_VER MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.4-Rev45 X-Originating-Client: open-xchange-appsuite Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On October 29, 2018 at 7:13 PM Jacopo Mondi wrote: > > > VIN data groups may appear on different sets of pins, usually named > "vinX_data_[a|b]". The existing VIN_DATA_PIN_GROUP() does not support appending > the 'a' or 'b' suffix, leading to the definition of groups names not consistent > with the ones defined using SH_PFC_PIN_GROUP() macro. > > Fix this by adding a macro that supports appending suffixes when required. > > Signed-off-by: Jacopo Mondi > --- > drivers/pinctrl/sh-pfc/sh_pfc.h | 20 +++++++++++++++----- > 1 file changed, 15 insertions(+), 5 deletions(-) > > diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h > index 458ae0a..2930e9a 100644 > --- a/drivers/pinctrl/sh-pfc/sh_pfc.h > +++ b/drivers/pinctrl/sh-pfc/sh_pfc.h > @@ -54,17 +54,27 @@ struct sh_pfc_pin_group { > > /* > * Using union vin_data saves memory occupied by the VIN data pins. > - * VIN_DATA_PIN_GROUP() is a macro used to describe the VIN pin groups > - * in this case. > + * > + * VIN_DATA_PIN_GROUP() is a macro used to describe the VIN pin groups, Maybe fix the odd spacing, while you're at it? > + * while VIN_DATA_PIN_GROUP_VER() is used when the same pin group can appear > + * on different sets of pins. > */ > -#define VIN_DATA_PIN_GROUP(n, s) \ > - { \ > - .name = #n#s, \ > +#define __VIN_DATA_PIN_GROUP(n, s) \ > .pins = n##_pins.data##s, \ > .mux = n##_mux.data##s, \ > .nr_pins = ARRAY_SIZE(n##_pins.data##s), \ > } > > +#define VIN_DATA_PIN_GROUP(n, s) \ > + { \ > + .name = #n#s, \ > + __VIN_DATA_PIN_GROUP(n, s) > + > +#define VIN_DATA_PIN_GROUP_VER(n, v, s) \ > + { \ > + .name = #n#s"_"#v, \ > + __VIN_DATA_PIN_GROUP(n##_##v, s) > + > union vin_data { > unsigned int data24[24]; > unsigned int data20[20]; > -- > 2.7.4 > With or without the whitespace fix: Reviewed-by: Ulrich Hecht CU Uli