From patchwork Fri Jul 14 20:17:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9841639 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A64A160393 for ; Fri, 14 Jul 2017 20:17:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98296287C2 for ; Fri, 14 Jul 2017 20:17:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C79B287CB; Fri, 14 Jul 2017 20:17:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 26024287C3 for ; Fri, 14 Jul 2017 20:17:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B98F16E7EE; Fri, 14 Jul 2017 20:17:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oi0-x243.google.com (mail-oi0-x243.google.com [IPv6:2607:f8b0:4003:c06::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4AB676E7EE for ; Fri, 14 Jul 2017 20:17:11 +0000 (UTC) Received: by mail-oi0-x243.google.com with SMTP id d77so11411800oig.1 for ; Fri, 14 Jul 2017 13:17:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=2w/GyUriUnJGlSYRaPW7P7eJTa7T1OywjX5jBnp1Ack=; b=RtG2kRGNjr0/NN+vyfsYIC+qJ6zOgfNglHiv9Qx4ZdooLTW52Xjs/eAMjFNnxXEcAR wnHGt8gbq3Sq+FWHEr4YbokMFihbvFPyKf9oi0AWkl+TiRSfKB1bGjAsHo0m2cFfSy0j Q599UKOwP+4rqTuvF74iLl6r41RoNC/0EZyQvm5sAxu1btlvlPTqijMSYcE8yTDEgALl OAtHfYy7vrMghJChvq0C73LQw7wyD+HTIkU9RBd8I0HVOBSN70N7T4XwuRmaS7qUGNwR 6Y7j8MVsbDkeCQHyBkSo4g192AGSy7Q1L7jlrnUnltVl+2ayHhBlEXcKfYdrBoPNPHob hrrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=2w/GyUriUnJGlSYRaPW7P7eJTa7T1OywjX5jBnp1Ack=; b=F8slSROB9d107mzwiUrX0Rns6HRqb+t1UHbQTxgDwA0eoHdzcJirHEjBjevTAaaaDX S55dSnCO8Tr76ChauW0SE3ll0NXbwCZQ5k6blG4e5xEk6KbzMXo2QRZ37XqFhw53kPdw zxIAtVwCIgZhhR6RhLUMFIZkGTyNfsL4freKfKfLEbWS2r8CruYJTDLtWxsPbRYjGqEl PxwuTlQd3Ju2n08EmFZ4LmWFwJJiZE3Zdjv8TuhMSbZcrmS1z31okN1/aGN9ZAXGgwCu 5/Lfab204ZKvR4vt2zDaAWWRgxt1QocMlUgWpCOSvdCu38zkckwDSxyRld4yP8DZ/Zd5 54RQ== X-Gm-Message-State: AIVw110iZffHH6ztsSzWlmrpj8Ky6NHRGFkETaBE8ROg1soMwPT0zfjl ODqdUIEYWQBB6aSwv4aAVeinY7s9ZQ== X-Received: by 10.202.105.147 with SMTP id e141mr6430576oic.66.1500063430600; Fri, 14 Jul 2017 13:17:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.80.170 with HTTP; Fri, 14 Jul 2017 13:17:10 -0700 (PDT) In-Reply-To: References: <20170714092540.1217397-1-arnd@arndb.de> <20170714092540.1217397-9-arnd@arndb.de> From: Arnd Bergmann Date: Fri, 14 Jul 2017 22:17:10 +0200 X-Google-Sender-Auth: vSzMQxOM_zIIQXFzaxCR4dzAML4 Message-ID: Subject: Re: [PATCH 08/14] Input: adxl34x - fix gcc-7 -Wint-in-bool-context warning To: Linus Torvalds Cc: Michael Hennerich , Greg Kroah-Hartman , Dmitry Torokhov , Linux Kernel Mailing List , DRI , IDE-ML , "linux-input@vger.kernel.org" , Tejun Heo , Andrew Morton , Guenter Roeck , Linux Media Mailing List X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Jul 14, 2017 at 9:24 PM, Linus Torvalds wrote: > On Fri, Jul 14, 2017 at 2:25 AM, Arnd Bergmann wrote: >> FIFO_MODE is an macro expression with a '<<' operator, which >> gcc points out could be misread as a '<': > > Yeah, no, NAK again. > > We don't make the code look worse just because gcc is being a f*cking > moron about things. > > This warning is clearly pure garbage. > I looked at this one again and found a better approach, matching the check that is done a few lines later. Unless you find something wrong with that one, I'd resubmit it with the fixup below. Arnd --- a/drivers/input/misc/adxl34x.c +++ b/drivers/input/misc/adxl34x.c @@ -789,21 +789,21 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq, __set_bit(pdata->ev_code_ff, input_dev->keybit); } if (pdata->ev_code_act_inactivity) __set_bit(pdata->ev_code_act_inactivity, input_dev->keybit); ac->int_mask |= ACTIVITY | INACTIVITY; if (pdata->watermark) { ac->int_mask |= WATERMARK; - if (FIFO_MODE(pdata->fifo_mode) == 0) + if (FIFO_MODE(pdata->fifo_mode) == FIFO_BYPASS) ac->pdata.fifo_mode |= FIFO_STREAM; } else { ac->int_mask |= DATA_READY; } if (pdata->tap_axis_control & (TAP_X_EN | TAP_Y_EN | TAP_Z_EN)) ac->int_mask |= SINGLE_TAP | DOUBLE_TAP; if (FIFO_MODE(pdata->fifo_mode) == FIFO_BYPASS) ac->fifo_delay = false;