Received: by 10.223.185.116 with SMTP id b49csp4728248wrg; Tue, 6 Mar 2018 23:16:16 -0800 (PST) X-Google-Smtp-Source: AG47ELvw80X9gfHaXaKa+UFLgye6TR7JfCiWwzRkzlUq2YxPidR/7aSTsTonaElNz8utyVXPnqfH X-Received: by 10.98.18.70 with SMTP id a67mr21637862pfj.213.1520406976205; Tue, 06 Mar 2018 23:16:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520406976; cv=none; d=google.com; s=arc-20160816; b=U1xznUABa3g3CVMfAWvWdoKIsoTtxD+1lnqOfi2cYtxL+5Bx0ePGbaKMLbzDmDOreE amRfHvRHmrfDETEacBDle0wDAyRKmY9eXiGYomjyo7H7nyEqliS1XWLKBr2EPYAMktXV O75ErdrNSSbLStk6q8LWxPen7mjI+YMw/6hr022YxzHSyIpUjwUUkki8ziHEDjO7T/x3 /lKCCiYOEBjbr9Lr5RmHpWhsWgKnlnOm7R0iFjAHyHnA1dSrYGi2qyccqG6SLXoPTPFc 0NqOE4LqroK4F0gwvC6pq7z1RkiMV6HKwMqFQxmtDKzZ/8LPdfREVAr5E/ScoPJUG3LS lFAg== 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 :arc-authentication-results; bh=NAUSc5UPJjDf14owqZQiIM19bdscREC5H1sVHnI4WQ0=; b=Ucoz3hwnL7no3c6VTFjNmU+jEpWYXtFQOdRZ7hy+3NcyXU9jWXdqgTY9jAKYS7d269 olXy1IqVuFWcNPwtZOTRBzMPaJqURyaFkRLZp7wfIGanbp/xYd5d9g9f3kuOCOD6UOpv K5+J9ZkGCTq+iFHyas23M4D1HvAmDHM81X6Rhy8hfVM840z6gGGq/t0vvAUXX14SJpk7 7pcL8xgHJwxO2lpj2UpucAg1N+YSUiSxPbkrZgUSnIigVBoUHZE9V1cEC2s2SFImkMlS O49HvvM9XlapOXbir5FlEJgYDkd09x8UQjAgf02pDsMzg2usT9b5/dCu8OeMxE0F3zyf xAEw== 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 z188si13389262pfz.172.2018.03.06.23.15.56; Tue, 06 Mar 2018 23:16:16 -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 S1751183AbeCGHPE convert rfc822-to-8bit (ORCPT + 99 others); Wed, 7 Mar 2018 02:15:04 -0500 Received: from mail.bootlin.com ([62.4.15.54]:56277 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750989AbeCGHPB (ORCPT ); Wed, 7 Mar 2018 02:15:01 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 027652075C; Wed, 7 Mar 2018 08:14:59 +0100 (CET) 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, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (unknown [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id 92918206A6; Wed, 7 Mar 2018 08:14:58 +0100 (CET) Date: Wed, 7 Mar 2018 08:14:58 +0100 From: Boris Brezillon To: Ben Hutchings Cc: Arnd Bergmann , Richard Weinberger , Boris Brezillon , stable@vger.kernel.org, Greg Kroah-Hartman , LKML Subject: Re: [PATCH 4.4 054/108] mtd: cfi: convert inline functions to macros Message-ID: <20180307081458.4f311a45@bbrezillon> In-Reply-To: <1520216572.2786.64.camel@codethink.co.uk> References: <20180215151222.267507937@linuxfoundation.org> <20180215151229.973271532@linuxfoundation.org> <1520216572.2786.64.camel@codethink.co.uk> 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, 05 Mar 2018 02:22:52 +0000 Ben Hutchings wrote: > On Thu, 2018-02-15 at 16:16 +0100, Greg Kroah-Hartman wrote: > > 4.4-stable review patch.  If anyone has any objections, please let me know. > > > > ------------------ > > > > From: Arnd Bergmann > > > > commit 9e343e87d2c4c707ef8fae2844864d4dde3a2d13 upstream. > [...] > > -static inline int map_word_andequal(struct map_info *map, map_word val1, map_word val2, map_word val3) > > -{ > > - int i; > > - > > - for (i = 0; i < map_words(map); i++) { > > - if ((val1.x[i] & val2.x[i]) != val3.x[i]) > > - return 0; > > - } > > - > > - return 1; > > -} > [...] > > +#define map_word_andequal(map, val1, val2, val3) \ > > +({ \ > > + int i, ret = 1; \ > > + for (i = 0; i < map_words(map); i++) { \ > > + if (((val1).x[i] & (val2).x[i]) != (val2).x[i]) { \ > [...] > > The right-hand side of this comparison is now using val2 instead of > val3. (This bug seems to be unfixed upstream.) Indeed. This being said, it's not buggy since all users of map_word_andequal() pass the same value to val2 and val3. Maybe we should just patch the macro and all call-sites to remove val3. > > Ben. > -- Boris Brezillon, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com