Received: by 10.223.185.116 with SMTP id b49csp1975856wrg; Sun, 4 Mar 2018 14:51:22 -0800 (PST) X-Google-Smtp-Source: AG47ELs8GY18yQQSXkyojTAmMtjWv05rxV8VGc53A8ZIq/KqelGQWU+tJDQ9N+alXUOLw/yzeRU9 X-Received: by 10.99.110.137 with SMTP id j131mr10591463pgc.85.1520203881933; Sun, 04 Mar 2018 14:51:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520203881; cv=none; d=google.com; s=arc-20160816; b=Qzgic7DHPD+L63XLdQIVFwoL0bfIbDD2W9CpNKEM5QgvtyueNnPrYRO1Z8nZrnHpX2 e+ETrCYv2nZLH4kF85DjQyuuIolox1YOgJFQBJeAkUjHqHSkJ0rppRD2MthhaQ65VhnW M0cK092PCHL0Q8g6s9wYejO1kZOfFhSuoMv+9RXuQEQLrGBriTDZwV3IEeZGGmEOLGsp q8mNLnr0Fybqp9oUtYA7MdYr2hYH75ehTfsnHDv0LO9WCjb9N+Nx8nYvcpngB0rvnMHT Rda9m6Ve98ahzb8XrkmrbrGLGiv1k6DBLTF2rcUZ9ojZN6nYSBSAgGtVrJxJnwxxU3Pr zdlA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=3xkx5aRs+oX2Gnzv/JmlZj9C/vkK++ypCWBYMjzBaAA=; b=QOL1WS/quiUWLIy0pn6a2s3Rkq7MT1HF2UBQfOwT4q/V3L0cN0QUyrG7kfdbyYSt9O YboFmfd9RxcQioldhWWDBQK2KcxbydHeleKb7bQJjiUZIBcCshoUyzZVWzyZiejIAitE Qp3JsRdJaj3zV0DBBhI2JA1hJGyiQzl8uYaCcsPhXYcsThLJ90C7V6Xg97w4ihmdDWBX 2RmuXpEF4CQ41MCcz+c2xGWPmCCmQPp+o7++3KmdVXcwst3YHpbcq9HFaQXdrQmagnlW TWEBNetNWPn5Ub93AiTvyVCA9QhQlrzU8PfMyvRC5uxAM8GXLAZt0WG+/dp0Ag4PDEfZ CO5Q== 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 r7si7434603pgq.645.2018.03.04.14.51.06; Sun, 04 Mar 2018 14:51:21 -0800 (PST) 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 S932470AbeCDWuG (ORCPT + 99 others); Sun, 4 Mar 2018 17:50:06 -0500 Received: from server.atrad.com.au ([150.101.241.2]:49106 "EHLO server.atrad.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932118AbeCDWuE (ORCPT ); Sun, 4 Mar 2018 17:50:04 -0500 Received: from marvin.atrad.com.au (IDENT:1008@marvin.atrad.com.au [192.168.0.2]) by server.atrad.com.au (8.15.2/8.14.9) with ESMTPS id w24MnO0i017878 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 5 Mar 2018 09:19:29 +1030 Date: Mon, 5 Mar 2018 09:19:24 +1030 From: Jonathan Woithe To: Micha?? K??pie?? Cc: Andy Shevchenko , Darren Hart , Andy Shevchenko , Platform Driver , Linux Kernel Mailing List Subject: Re: [PATCH 1/7] platform/x86: fujitsu-laptop: Define constants for FUNC operations Message-ID: <20180304224924.GA29081@marvin.atrad.com.au> References: <20180227211539.5708-1-kernel@kempniu.pl> <20180227211539.5708-2-kernel@kempniu.pl> <20180304050813.GA3129@marvin.atrad.com.au> <20180304194426.GA1428@kmp-mobile.hq.kempniu.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180304194426.GA1428@kmp-mobile.hq.kempniu.pl> User-Agent: Mutt/1.6.1 (2016-04-27) X-MIMEDefang-action: accept X-Scanned-By: MIMEDefang 2.79 on 192.168.0.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 04, 2018 at 08:44:26PM +0100, Micha?? K??pie?? wrote: > > On Wed, Feb 28, 2018 at 06:08:52PM +0200, Andy Shevchenko wrote: > > > And plain 0 doesn't look right in this concept (something like (0 << > > > 0) would probably do it). > > > > Given that all other definitions are in terms of BIT(), to my eye "(0 << 0)" > > looks as much out of place as plain "0". However, if the convention in this > > case would be to use the former then I have no objections. I presume the > > "(0 << 0)" idea comes from the fact that BIT() ultimately expands to some > > form of shift. > > Yes, I would guess so. The syntax suggested by Andy looked odd and > superfluous to me at first, but grepping the tree for this construct > seems to suggest that it is a pretty common thing. So no problem, I > will tweak this in v2. I understand I should apply the same concept in > these cases: > > +/* Constants related to FUNC_BACKLIGHT */ > +#define FEAT_BACKLIGHT_POWER BIT(2) > +#define STATE_BACKLIGHT_OFF (BIT(0) | BIT(1)) > +#define STATE_BACKLIGHT_ON 0 > > +#define FEAT_RADIO_LED BIT(5) > +#define STATE_RADIO_LED_OFF 0 > +#define STATE_RADIO_LED_ON BIT(5) > > Right? I suspect so. Regards jonathan