Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3845816imm; Mon, 1 Oct 2018 05:34:19 -0700 (PDT) X-Google-Smtp-Source: ACcGV634k76HW5y5VR3q2/HdgNtjsZnsSLmAFAXpS9coZ7uqjJoXTtAhxwQBYpNnovBlDy6s+err X-Received: by 2002:a65:5508:: with SMTP id f8-v6mr1427193pgr.240.1538397259143; Mon, 01 Oct 2018 05:34:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538397259; cv=none; d=google.com; s=arc-20160816; b=x3O53mzeAFNUpy1iJWM+Ue0NCL4Kx12EhuBI+YUOUYuxWAG6kYjut9AdNNyQLrfCfW iRrdmHBX55g3ru434Kd1hqLM5POr0wpLkQlXlyKWQgWHFugCBPT0Q70djR4A+0G0xBBG Azjm/nqLOIen4scmwMk2e6FaJw6wV05zFUV+cBK7E8V6husXkzMrF0moywOHp/wyO3if 15M641bkmHH0lsCnbZUEcA8IMVD/UVsf99Jp0AU8hOW8uqooWxHZNO0hFh+0BRAXGNG3 gZO/A7DyqBZfBjQMRrlTafb/BMaOhE8TbWN2qL5CwitOQ4LmgRZXUiTSiuexzwor3hlP n5sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=uaHW/nKu3MkaBffnG+d9DWjiNwCfob/GVwrJgBiQYp0=; b=SBxka1NKQp9F+TrcLZ7QX1Zl/ijkg05DnEfE8X+lqOTnIrCkc0TQz5DC4M9kh+uBIK y22Nj6VwVuFFseQruJftKMLt97gtJ1VFeG8rozLZ0pb7DLSNk2n51O8u/zUOrn2ALJLR 5fhRNfHO2zKUUEypFqd2ufGs6tG45d7ckAJZnPxoa9wEcEhKyWShnifCiKBnj9OfDt05 4nc+Sm312OuUf0X9ASG7Kp3bgzXFyaZeFWBL3Lxn36Brrd1EqbYu7gCl2Se4OMwy/icn UC+wWbgXVfyT3S3/Rzd1esEe/o6/yablYo+9k4v+ph4Q67iuL3ZNcMm6Hdk0t/Nt9RcC L40Q== 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 m3-v6si10327734plb.478.2018.10.01.05.34.04; Mon, 01 Oct 2018 05:34:19 -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; 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 S1729478AbeJATKG convert rfc822-to-8bit (ORCPT + 99 others); Mon, 1 Oct 2018 15:10:06 -0400 Received: from mail.bootlin.com ([62.4.15.54]:55634 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729444AbeJATKG (ORCPT ); Mon, 1 Oct 2018 15:10:06 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id DCCB2207EB; Mon, 1 Oct 2018 14:32:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (AAubervilliers-681-1-24-95.w90-88.abo.wanadoo.fr [90.88.144.95]) by mail.bootlin.com (Postfix) with ESMTPSA id 9AA4820AB9; Mon, 1 Oct 2018 14:32:18 +0200 (CEST) Date: Mon, 1 Oct 2018 14:32:19 +0200 From: Boris Brezillon To: Ricardo Ribalda Delgado Cc: David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , linux-mtd@lists.infradead.org, LKML Subject: Re: [PATCH v2 5/8] mtd: maps: gpio-addr-flash: Replace array with an integer Message-ID: <20181001143219.59423ad3@bbrezillon> In-Reply-To: References: <20180905143643.9871-1-ricardo.ribalda@gmail.com> <20180905143643.9871-6-ricardo.ribalda@gmail.com> <20180927134216.1952f668@bbrezillon> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 1 Oct 2018 14:10:03 +0200 Ricardo Ribalda Delgado wrote: > > > + return; > > > + > > > + for (i = 0; i < state->gpio_count; i++) { > > > + if ((ofs & BIT(i)) == (state->gpio_values & BIT(i))) > > > > Parens around the xx & BIT(i) operations are unneeded. > > If I remove it: > > > ricardo@neopili:~/curro/kernel-upstream$ make drivers/mtd/maps/gpio-addr-flash.o > CALL scripts/checksyscalls.sh > DESCEND objtool > CC drivers/mtd/maps/gpio-addr-flash.o > drivers/mtd/maps/gpio-addr-flash.c: In function ‘gf_set_gpios’: > drivers/mtd/maps/gpio-addr-flash.c:70:20: warning: suggest parentheses > around comparison in operand of ‘&’ [-Wparentheses] > if (ofs & BIT(i) == (state->gpio_values & BIT(i))) Hm, okay. I remember having a similar discussion on one of my patch and people suggesting to drop it because of the == precedence on x & a. Anyway, let's just keep it like that.