Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp559564imm; Tue, 5 Jun 2018 00:10:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK2175UklaqCreQa4gYIUn/QgxEhyFAW5Hr1WAaF4TEAopCXgJuds9m1Y4/e8N9YD3dCrc7 X-Received: by 2002:a17:902:206:: with SMTP id 6-v6mr24731764plc.294.1528182653045; Tue, 05 Jun 2018 00:10:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528182653; cv=none; d=google.com; s=arc-20160816; b=qj3RqrlbrPlMIM+77vDRVQax3CfljR7UtiAYeV/G9H48LX2EU8kZc1+JxdlKWNnJdt NaMWSSHymbdrj4E61jlqSqgA1umPT/Hy39rAnfrNA79Y92Hu8oIprv6ewS9CEAzAWbOU yAjfnM6uOAh4eb4bfeo64N4FsffDxtfKaGfSnBzqD2y/virRBMaik/NbXeYi39V3cOdl hIbDzkvBwsq2/R+Ce1oW4VVmekvEimjEufKh6g3rvkwJTbed5JO+M1gIau1IkqkTm8NF BS3im/ZY7/uOJr+RCoJ1i4clGVzSvPr0GWuGc6jA8lGn5dem/dSNdz1gcf385NM9jXIA RiRw== 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:dkim-signature :arc-authentication-results; bh=V0JfrXkfl//+GGM4VyaqMWC9vTzfY7VIsH4ekymCYdg=; b=KAMpBUdheGIUGSZXuW5se8vLrdDroZAX/IQrq5GJHO+KD4KrHZfxF0ZUqbYPX7udFg n1ILeHHDXQTeJOzi/u6XEHZIG3skEU0jYITa/vhcZuX57hzeKncYIKpfcuBZsa8uLOAN q4/qoNXF/NopSmqhxqjYs1igLZ+1XBVH4QyQY0Lz5C5dnqdUqvPg5x4vI3KXW7S/b01O 5qlF4kR7psVQ6Ct5s6Ue/sNwJt45J8dS+N7fVmEkIihdeGfSaR10Q6SwYzOG2257b5ob HeiMYyTDp+xu/BxWJ1DZJYteD1cbMgkTyc4BcplWopXJ7Q3TPiHUUH2I7NfNUo0G8AFv 1J9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Am3oalJH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g63-v6si19514046pfk.74.2018.06.05.00.10.37; Tue, 05 Jun 2018 00:10:53 -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=pass header.i=@linaro.org header.s=google header.b=Am3oalJH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751748AbeFEHJS (ORCPT + 99 others); Tue, 5 Jun 2018 03:09:18 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:41629 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751497AbeFEHJQ (ORCPT ); Tue, 5 Jun 2018 03:09:16 -0400 Received: by mail-wr0-f195.google.com with SMTP id h10-v6so1119438wrq.8 for ; Tue, 05 Jun 2018 00:09:16 -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:content-transfer-encoding:in-reply-to :user-agent; bh=V0JfrXkfl//+GGM4VyaqMWC9vTzfY7VIsH4ekymCYdg=; b=Am3oalJHl9mVjWzec7ImGZ2IV5tCfTn735x3rtYjpBbT7wUdMc5Y8NAD9bqn+ATFwa Jb1GBLpM8aqJtuJ4DRNqN/rF93i+C+yqxSppWmemD2+fX8yjQ65kjXXEsCp/Z4BjvE3j HpThX0uteinY9W+kU4If2EtBajtXOJaWjliQI= 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:content-transfer-encoding :in-reply-to:user-agent; bh=V0JfrXkfl//+GGM4VyaqMWC9vTzfY7VIsH4ekymCYdg=; b=tDDETE4fiK8hHjoJzXmXpuW6pCcaCyUuSrO5zJ/ESUiOba/6ilIbXkHc3A79b0oLUT XA2bDCCB2D8redh9sJgFtneDGkUvKpFXc8Iwfjm+kNy7KJ/KznTD2RuLGTty1LJBzDTp OBCsvWb3lyARsGqbqz53w6C6ZmrIqaQUr/sjjX+a4Tk8dZCI7EM69OCiVUB2u7UnlMIT /s4wujaIjapXowb3kMD79wLQGuO7W5wFFDe76sthiWBtjzpzkFB1L9ZPrLsXw1gaWw/q TWzib1j1zHe+C2GocdskGBSU/ylCw/qPxagyxRKB/B1Mw2+Tamjxlot5JmKW8x68H0ZY c9SA== X-Gm-Message-State: APt69E38jMpK/PAE8HEyo7bhkPhEWgMqO3e7AeRE9HZKTdcSz2j5MBpj TNBs0eh1GxGtisVGxZKhWzxwbQ== X-Received: by 2002:adf:ae09:: with SMTP id x9-v6mr1574823wrc.19.1528182555511; Tue, 05 Jun 2018 00:09:15 -0700 (PDT) Received: from dell ([2.31.167.232]) by smtp.gmail.com with ESMTPSA id v31-v6sm72629159wrc.80.2018.06.05.00.09.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Jun 2018 00:09:14 -0700 (PDT) Date: Tue, 5 Jun 2018 08:09:13 +0100 From: Lee Jones To: Marek Vasut Cc: linux-kernel@vger.kernel.org, Marek Vasut , Geert Uytterhoeven , Mark Brown , Steve Twiss , Wolfram Sang , linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH v3 02/10] mfd: da9063: Use REGMAP_IRQ_REG Message-ID: <20180605070913.GH21163@dell> References: <20180602101155.26375-1-marek.vasut+renesas@gmail.com> <20180602101155.26375-2-marek.vasut+renesas@gmail.com> <20180604122624.GB21163@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 04 Jun 2018, Marek Vasut wrote: > On 06/04/2018 02:26 PM, Lee Jones wrote: > > On Sat, 02 Jun 2018, Marek Vasut wrote: > > > >> Convert the regmap_irq table to use REGMAP_IRQ_REG(). > >> > >> Signed-off-by: Marek Vasut > >> Cc: Geert Uytterhoeven > >> Cc: Lee Jones > >> Cc: Mark Brown > >> Cc: Steve Twiss > >> Cc: Wolfram Sang > >> Cc: linux-renesas-soc@vger.kernel.org > >> --- > >> V3: New patch > >> Note: A sed oneliner was used: > >> sed -i "/\[DA9063_IRQ_/ {N;N;N;s/\n//g;s/.*\[\(DA9063_IRQ_[^]]\+\)].*reg_offset = \([^,]\+\),.* = \([^,]\+\),.*/\tREGMAP_IRQ_REG(\1, \2, \3),/}" drivers/mfd/da9063-irq.c > >> --- > >> drivers/mfd/da9063-irq.c | 145 ++++++++++------------------------------------- > >> 1 file changed, 29 insertions(+), 116 deletions(-) > >> > >> diff --git a/drivers/mfd/da9063-irq.c b/drivers/mfd/da9063-irq.c > >> index 207bbfe55449..5b406ecfc14a 100644 > >> --- a/drivers/mfd/da9063-irq.c > >> +++ b/drivers/mfd/da9063-irq.c > >> @@ -28,125 +28,38 @@ > >> > >> static const struct regmap_irq da9063_irqs[] = { > >> /* DA9063 event A register */ > >> - [DA9063_IRQ_ONKEY] = { > >> - .reg_offset = DA9063_REG_EVENT_A_OFFSET, > >> - .mask = DA9063_M_ONKEY, > >> - }, > >> - [DA9063_IRQ_ALARM] = { > >> - .reg_offset = DA9063_REG_EVENT_A_OFFSET, > >> - .mask = DA9063_M_ALARM, > >> - }, > >> - [DA9063_IRQ_TICK] = { > >> - .reg_offset = DA9063_REG_EVENT_A_OFFSET, > >> - .mask = DA9063_M_TICK, > >> - }, > >> - [DA9063_IRQ_ADC_RDY] = { > >> - .reg_offset = DA9063_REG_EVENT_A_OFFSET, > >> - .mask = DA9063_M_ADC_RDY, > >> - }, > >> - [DA9063_IRQ_SEQ_RDY] = { > >> - .reg_offset = DA9063_REG_EVENT_A_OFFSET, > >> - .mask = DA9063_M_SEQ_RDY, > >> - }, > >> + REGMAP_IRQ_REG(DA9063_IRQ_ONKEY, DA9063_REG_EVENT_A_OFFSET, DA9063_M_ONKEY), > >> + REGMAP_IRQ_REG(DA9063_IRQ_ALARM, DA9063_REG_EVENT_A_OFFSET, DA9063_M_ALARM), > >> + REGMAP_IRQ_REG(DA9063_IRQ_TICK, DA9063_REG_EVENT_A_OFFSET, DA9063_M_TICK), > >> + REGMAP_IRQ_REG(DA9063_IRQ_ADC_RDY, DA9063_REG_EVENT_A_OFFSET, DA9063_M_ADC_RDY), > >> + REGMAP_IRQ_REG(DA9063_IRQ_SEQ_RDY, DA9063_REG_EVENT_A_OFFSET, DA9063_M_SEQ_RDY), > > > > Nice, but I think checkpatch.pl would complain. > > > > Better to break after the first argument I think. > > Doesn't really help the readability, but done. I don't make the rules. :) Personally /me is hoping that the 80 char limit is lifted to ~120 soon. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog