From patchwork Thu Mar 14 08:37:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 1056397 X-Patchwork-Delegate: richard@nod.at Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jqa93Os7"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="rTku9ekx"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44KhtZ07tWz9s5c for ; Thu, 14 Mar 2019 19:38:14 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=rMQvSZEMdNm4ulvpT2leAzO4S1E0D3UCtdPzVt2iNTE=; b=jqa93Os7LfWQtk +bqTLq1v4JMin7siVGVVAf6vDPvPXOegkMfnLZySzqYjQai71y5tot8UG/Jy56Aw0fQSJN3/WJWGP pfLfco9uDK39YFY0cDFXuk4+Ajihnza6N5+Ep31D2UezjX2ZZ9hX+luW7kZroSvkRfrRgp9aldMw6 QhDBUb/S8e3Q+GxfIi1K/e0nUL4uQeJ1wKCeTcBrswkKNF1lwacTYrF49Ww/pcxoAmJxOq13XYkA1 RYpDK97v/redH6cCpFZXhVwc7ghngjgpi25wfZhP1A3foWTBbIJBXCk7SOcPtWFjF7jTJ+6mUmzRf TAWbRWsjmLZ57QmQRM1A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4LsP-0005EG-0v; Thu, 14 Mar 2019 08:38:09 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4LsL-0005D1-5M for linux-mtd@lists.infradead.org; Thu, 14 Mar 2019 08:38:06 +0000 Received: by mail-pf1-x444.google.com with SMTP id r15so586970pfn.9 for ; Thu, 14 Mar 2019 01:38:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=30vebO2M7s86h+bgRozKToa38rLhn+5TImed8PXHvkA=; b=rTku9ekxRqeOqpFkpVZDslv9tFwbpQhuc71cG7VkVF4/FTWDXBGYLy20CpYUk61o25 qYLUePdfe0AwTST86gRzsAgLGul6u8ZadKZO3JNxpudPg9A+i89qIdcC+6/zSlnglMKQ jsI2JjLC7rJ12jgG43AUDSXPjtYsNMDQDCr8pR3ZpxrN0WsKOiKdH2o3YklQgtZeT41E 600DnOFkg2H7zDfbd9rEWP5eYxvABGpODAqBoT4oQqZ3nUdeTF/8B52flh+8pGJ4ytwZ 54jx4gWcOuY9Wqmw+7eGu0gW9of6L6mXj7rRqz2mjGB5EjdAowgzErehONEV7UAr//2Z StQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=30vebO2M7s86h+bgRozKToa38rLhn+5TImed8PXHvkA=; b=nav60GJlT6haQ1AmXW8Tx9Cp0Vs5VJgYLrjsnTHQvejBT73EmkSs7gyXeoiKyk2Kgo n/GgZ2XL/7WEp1W35C1rB8LWiKh0IF8hf4E8opmyQx/PdvtheUmFsQHc+AlpBJU3yd+b FOLSxgTg+gwbF8drjxvCEd9uPcCHJzuzfWSI2GR0JxLf6qz/bWNcDnTwDiwH/+PmVfei 7m/Ed4otJTsGddg1dIZ7ls3bR809ditQsTvnTirSKFzSAi8zi50QfAeRXJL+iduh1EWL RD3+jZqK+0t3ojD6p9BHaAaxypO+NoKMOuK4kyrfmhsIaPJ03jaDZKcyQslgHU2+Jpl7 AH8w== X-Gm-Message-State: APjAAAUVvcJ60+mUPmdkLHPTNaXJIaV2oxB+ZSuEfWfe3y/SNQjTVXZC UpBlxlcDhyeRfUxLc2lh4Z4= X-Google-Smtp-Source: APXvYqz6L6mEkSM9vos0uXnnWgupOgEVWWz8y1Pyy7Od8UEIi7Vka7RAYKD0H0rSFh+Hp/+M9XMCnA== X-Received: by 2002:a63:4650:: with SMTP id v16mr16281311pgk.329.1552552684200; Thu, 14 Mar 2019 01:38:04 -0700 (PDT) Received: from localhost.localdomain ([175.223.23.218]) by smtp.gmail.com with ESMTPSA id g3sm20830999pfo.125.2019.03.14.01.38.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 01:38:03 -0700 (PDT) From: Sergey Senozhatsky X-Google-Original-From: Sergey Senozhatsky To: David Woodhouse Subject: [PATCH] jffs2: do not use __constant_cpu_to_xx Date: Thu, 14 Mar 2019 17:37:57 +0900 Message-Id: <20190314083757.25039-1-sergey.senozhatsky@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190314_013805_246980_D9097922 X-CRM114-Status: UNSURE ( 9.78 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:444 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (sergey.senozhatsky.work[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sergey Senozhatsky , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org A trivial patch. cpu_to_XX() functions are smart enough to detect and handle __builtin_constant_p() at compile time. So we can use cpu_to_XX() instead of __constant_cpu_to_XX(). Signed-off-by: Sergey Senozhatsky --- fs/jffs2/nodelist.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h index 0637271f3770..b1de897b3408 100644 --- a/fs/jffs2/nodelist.h +++ b/fs/jffs2/nodelist.h @@ -48,8 +48,8 @@ #define cpu_to_je32(x) ((jint32_t){cpu_to_be32(x)}) #define cpu_to_jemode(x) ((jmode_t){cpu_to_be32(os_to_jffs2_mode(x))}) -#define constant_cpu_to_je16(x) ((jint16_t){__constant_cpu_to_be16(x)}) -#define constant_cpu_to_je32(x) ((jint32_t){__constant_cpu_to_be32(x)}) +#define constant_cpu_to_je16(x) ((jint16_t){cpu_to_be16(x)}) +#define constant_cpu_to_je32(x) ((jint32_t){cpu_to_be32(x)}) #define je16_to_cpu(x) (be16_to_cpu(x.v16)) #define je32_to_cpu(x) (be32_to_cpu(x.v32)) @@ -59,8 +59,8 @@ #define cpu_to_je32(x) ((jint32_t){cpu_to_le32(x)}) #define cpu_to_jemode(x) ((jmode_t){cpu_to_le32(os_to_jffs2_mode(x))}) -#define constant_cpu_to_je16(x) ((jint16_t){__constant_cpu_to_le16(x)}) -#define constant_cpu_to_je32(x) ((jint32_t){__constant_cpu_to_le32(x)}) +#define constant_cpu_to_je16(x) ((jint16_t){cpu_to_le16(x)}) +#define constant_cpu_to_je32(x) ((jint32_t){cpu_to_le32(x)}) #define je16_to_cpu(x) (le16_to_cpu(x.v16)) #define je32_to_cpu(x) (le32_to_cpu(x.v32))