Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1705837imm; Wed, 6 Jun 2018 22:15:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIHTzOQNg/Qtki8KcUN14T14NUV0YAtXOFrwarOGuxrssr+8dxOmmA5eg203g/CcgW20Sdh X-Received: by 2002:a62:a38d:: with SMTP id q13-v6mr418923pfl.49.1528348552685; Wed, 06 Jun 2018 22:15:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528348552; cv=none; d=google.com; s=arc-20160816; b=Jxp6Vx9KK5WsB3IMknzqSorkWgF7cbgT90cGmJtU+Avjeyjzfk2bHclNTKvV7GdrIL gxz/y5WeyzDEukb9/NgYaGhaH1Z7xuotcUJ++nZHQVcU/8eQbyx8M/EQ1bCA8OPLzdCb eht21aaiwU065GMr9bJE1937w7HKolkWUSaXsIZhxXVcHnK//ZFioQGGhQGwh84FAlTm bKfUdhJW7dCGdPs/Crx6AL3LSGXngMO62RYw4yBayCo5hhDmr7I82c0lMAW3ZHvvPJVG s9RW0F6TRECdFiLsFR3HdPcFe5R5l3wNVkZVUox9avObA3cS3wKgqVG2k843RQcT0Nrw NtiQ== 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=6eek0NZ9krX3TcMn4gpkdDpYErmiVYLX/PLdJHJigqI=; b=H06islGqN4xBAZxw/2loDZ2vBQn9xasf3MXWT/6ZUq56wG87Xlr1pccnWzYY7P+nqZ oYKEtPFnXvumnCmxv6Ci+Qvx+IFqBTzdLk8PLXAVMgKVCF7KDarhz0A99F9Shv1JejWs LFl5rFP2XVNveIrf5TLJ/KbdkBVW9KvHPzQJ/OzN2q/4Skp52hq/oIZwe78QTk2Vag02 LEQSluJ01sbMbxlFCpJ2lx4eueHBtFucX2mPkoalPEAnGUOvsIyXP+tB3ZCI1gIApZw0 uPExo7oZIgYDJ3qa0dGDpWgeAi1RzWpENBoqtP9kxB3pv3lfvdF0xFllEEdH8WS1XELc qNNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FyMJ99Dm; 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 x20-v6si23755422pge.395.2018.06.06.22.15.38; Wed, 06 Jun 2018 22:15:52 -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=FyMJ99Dm; 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 S1751681AbeFGFER (ORCPT + 99 others); Thu, 7 Jun 2018 01:04:17 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:40635 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751310AbeFGFEP (ORCPT ); Thu, 7 Jun 2018 01:04:15 -0400 Received: by mail-wm0-f68.google.com with SMTP id n5-v6so16016804wmc.5 for ; Wed, 06 Jun 2018 22:04:14 -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=6eek0NZ9krX3TcMn4gpkdDpYErmiVYLX/PLdJHJigqI=; b=FyMJ99Dm9fQN/Y09dabfMRq7+KT5qV1Z0xPctTZPHszM/AjmS3/wrhj3nzdBveXQMi jIkL9XWnq1UG9wybLVBwuxL1WHwkzlBH71Z4tvKNXre4pEwn3oui94uoZyIT/0UGZp6e 8FRJHbRWqGjM7rKZAIXulA5CwrjzGwIaPoCJk= 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=6eek0NZ9krX3TcMn4gpkdDpYErmiVYLX/PLdJHJigqI=; b=c3U9GO9D3na89b3SAOwHJsTlVbDznciWWtOyi7/IJ3RELBvzVHWbxxAJztpaBUUXe4 VMGEmcZMy3UPoiK5iWdfDd2qdfZbl+P6aTf7c4JRN+bDGNKZJ5E0xmiAL/HRMm7B2Bfi 8B89TxQWqiCstRNBaix8NGr8E3tybul5Dt5H9oW1QXTlly7b/VXnFFwkeGBK7gGgvleP HBR4yURxGgFQD3kgnTCzovzKIugjN02w8MHuoEZj/LAwmEppE4K7KlHOEfif3av48AHN pKcUUTGpneZKjTV2J6bqq494Ly3V+T+mamc8ckb1yYKGEIy3fZCvzLfrj4MQU1ILty0Q 0GWA== X-Gm-Message-State: APt69E2nhbDgmXGG56iLEg3wKasAYdVfKsg49ecRWluYZI8LnlUtC3x4 YApDQ3z+53JCT7k3L/QZs50aCg== X-Received: by 2002:a1c:9b04:: with SMTP id d4-v6mr426390wme.8.1528347853772; Wed, 06 Jun 2018 22:04:13 -0700 (PDT) Received: from dell ([2.31.163.53]) by smtp.gmail.com with ESMTPSA id q81-v6sm670560wmd.14.2018.06.06.22.04.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Jun 2018 22:04:12 -0700 (PDT) Date: Thu, 7 Jun 2018 06:04:11 +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 08/10] mfd: da9063: Register RTC only on DA9063L Message-ID: <20180607050411.GB21163@dell> References: <20180602101155.26375-1-marek.vasut+renesas@gmail.com> <20180602101155.26375-8-marek.vasut+renesas@gmail.com> <20180605075321.GM21163@dell> <20180606061623.GT21163@dell> <69893894-899f-54cd-2610-96653ec246c0@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <69893894-899f-54cd-2610-96653ec246c0@gmail.com> 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 Wed, 06 Jun 2018, Marek Vasut wrote: > On 06/06/2018 08:16 AM, Lee Jones wrote: > > On Tue, 05 Jun 2018, Marek Vasut wrote: > > [...] > > >>>> -static const struct mfd_cell da9063_devs[] = { > >>>> +static const struct mfd_cell da9063_common_devs[] = { > >>>> { > >>>> .name = DA9063_DRVNAME_REGULATORS, > >>> > >>> Appreciate that these are historical, but these device name defines > >>> make me shudder. They only serve to act as an obfuscation layer when > >>> debugging at platform level. Please consider getting rid of them. > >> > >> The macro can be shared between the core and the drivers, so the names > >> never run out of sync. > > > > Platform driver name changes are vary rare. Even if they are changed, > > even light testing would uncover the fact that child drivers do not > > .probe(). > > Sure, while if the macro is used, this problem is avoided altogether. > > > Due to the current obfuscation, I currently have no idea > > what this device's name is. > > I'm sure ctags or git grep can easily help. I'm aware how to get around the 'issue', but it's an additional step which is avoidable. For me personally it comes from doing *a lot* of platform level work and being irritated by the extra grepping. Macros for driver names does not sit right with me at all. There are even worse examples of people defining the MACROs *inside* the driver, which doesn't even benefit from the small redeeming feature you mention above. Anyway, I'm happy with you not wanting to change it. Just leave them as they are for now. > >>>> + { > >>>> + .name = DA9063_DRVNAME_VIBRATION, > >>>> + }, > >>> > >>> Place this on a single line please. > >> > >> This would only make the style inconsistent with the ie. LEDs entry. > >> > >>> { .name = DA9063_DRVNAME_VIBRATION }, > > > > If that is a one line entry spaced over multiple lines, then that > > should also be changed. > > > > Maybe I will go through and stylise this driver a bit after all (but > > as time is short at the moment, maybe not!) :) > > You'd end up with two entries which look different then the rest, which > triggers my OCD. OCD or not, it's never okay to waste lines. If ordering it not important (which it should not be -- it's fragile to rely on device ordering in MFD cells), the multi-line entries go at the top, followed by the single line entries. If done right, it looks the opposite of bad/out of place. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog