Received: by 10.223.185.116 with SMTP id b49csp829911wrg; Sat, 10 Feb 2018 21:25:43 -0800 (PST) X-Google-Smtp-Source: AH8x226tPqGaKrNVnHdm8csnzwhgnG91tkNTfuKiLd/5Rc/nmyIDfF8R1UtS5MWMoHkzXSPVl1Hq X-Received: by 10.101.101.142 with SMTP id u14mr6636971pgv.429.1518326743312; Sat, 10 Feb 2018 21:25:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518326743; cv=none; d=google.com; s=arc-20160816; b=Hyapgqcv55TM2pCVik/gLnjcaIXM7CYlJN07Vd2GmuBYV/YSOonfWxD8VU5aZ1xO2/ XMbTbedt/TwMpUxWysf7iuRaZpanO51an2EJaWl2v07liHr8q2E2pSp6dSWV+9hQbmF7 6UgcjcGHcozg5uMmtMk3R4uQnzyI5xnqX2asxHglHqjfou3KeNDFsPxTrKcmf+gD1Ois nZrRNFD55gIsyT9345IVNdH9KpJ4eltyNL4+2L1fS7rjZaZttM74Ua7ITzz3ZywOk1lx kgrHvajyhSh7dEYew2LdBDg3x/D4S8pPJGntzrjmaX6eCS6BqGFobRLsv26pyKiLWSOT ObAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=9DLcXuT16yH2EIQWPqmMmet6f7slr4cNkbI5KJjT4tc=; b=fOXp5L397pV2wCRTHXYw9o/G93WJIv/ZBzNDsTkOfxdALeAwKpHVQxN4QRL8sqH6rD RkIY2qwzj4nohelwgroVSfFIFfR5DC18r+0ZblsY3fwnQAx2Jy3LQQfDr7E/VpLK/y4l +zih9qeIp4vIQ/dzAxajsjf7BzbLx81EE6dFeNe6lxLgDIjGJaQXmuYV6MMp7eCgErpN Msw5z6oAVehP9+59+3VRK5P6/vk8Jkc7j5T9n2BMSOWaEtXGGK/bk8rU0pYzGghUqdgQ 8Wr1EY7ekQ4xOvHd2i7ccUJEIQt2D+aPNv9pd1jnhrcjzXMXL0dw/EfX9vQG/VpkvR4P cODQ== 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 u4si4297701pfb.378.2018.02.10.21.25.29; Sat, 10 Feb 2018 21:25:43 -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 S1754173AbeBKFYK (ORCPT + 99 others); Sun, 11 Feb 2018 00:24:10 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:41315 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752442AbeBKEdk (ORCPT ); Sat, 10 Feb 2018 23:33:40 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ekjKc-0002hA-6Q; Sun, 11 Feb 2018 04:33:38 +0000 Received: from ben by deadeye with local (Exim 4.90) (envelope-from ) id 1ekjKW-0004RW-VL; Sun, 11 Feb 2018 04:33:32 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Arnd Bergmann" , "Dmitry Torokhov" Date: Sun, 11 Feb 2018 04:20:06 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.2 01/79] Input: adxl34x - do not treat FIFO_MODE() as boolean In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.2.99-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit 1dbc080c9ef6bcfba652ef0d6ae919b8c7c85a1d upstream. FIFO_MODE() is a macro expression with a '<<' operator, which gcc points out could be misread as a '<': drivers/input/misc/adxl34x.c: In function 'adxl34x_probe': drivers/input/misc/adxl34x.c:799:36: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] While utility of this warning is being disputed (Chief Penguin: "This warning is clearly pure garbage.") FIFO_MODE() extracts range of values, with 0 being FIFO_BYPASS, and not something that is logically boolean. This converts the test to an explicit comparison with FIFO_BYPASS, making it clearer to gcc and the reader what is intended. Fixes: e27c729219ad ("Input: add driver for ADXL345/346 Digital Accelerometers") Signed-off-by: Arnd Bergmann Signed-off-by: Dmitry Torokhov Signed-off-by: Ben Hutchings --- drivers/input/misc/adxl34x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/input/misc/adxl34x.c +++ b/drivers/input/misc/adxl34x.c @@ -797,7 +797,7 @@ struct adxl34x *adxl34x_probe(struct dev if (pdata->watermark) { ac->int_mask |= WATERMARK; - if (!FIFO_MODE(pdata->fifo_mode)) + if (FIFO_MODE(pdata->fifo_mode) == FIFO_BYPASS) ac->pdata.fifo_mode |= FIFO_STREAM; } else { ac->int_mask |= DATA_READY;