From patchwork Tue Apr 9 04:53:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 161961 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4506647jan; Mon, 8 Apr 2019 21:54:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzECRK4HEdSsWK/B8hlvUdH3uN3Gt02JAPOOUr8hwN/3OZpWlH2MMUFDoUygVGXcI6iFpJQ X-Received: by 2002:a17:902:a706:: with SMTP id w6mr34989011plq.91.1554785672168; Mon, 08 Apr 2019 21:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554785672; cv=none; d=google.com; s=arc-20160816; b=Oz9s7wRrdJ7UsD4WY1X6aWztCLrjOA+4cqpUV6W0G4AC8BY0FnzkEzNH8BqcYZ3oaa kBsetS9iocaprJYOZfHJnCOkwfaHkS/pE0UyIY0EamsHpQqKEyd0jvF7zMtnAdqbe035 V5p3NEw3YRqEzHrWwsz0Bcc8QaXuhiVNX925LA+IcLo/uGtVMhwTbUarexvkBmwLwKTJ id9PeFXTCIjJYjGqcy7J/gcVa/ByUTZ+/mC6T2fgqRiY4fKQHFUbNTOwz0tOQU+KFSb+ Kv23X/FfR8FSNDXzy8MB7xvPR0c+RnUGR6HPHg4IjGlnM66kbJL+KURNBXmq/i0gRZoV Dhuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:dkim-signature :dkim-filter:dkim-signature; bh=bInPsXgkBzDCtlnk83xGb6fNGvkLtVWXkprHko3mt9o=; b=i17zpXhDApdr2MPIWEARlDe2Oe5hXhx104K+5zNSDdvGV4vKCLBA/FAQvetph3MsF3 3vCtqv8yCdv4ZbWYfNh/Ei0pFgX+aIYkPt0sMi32O5a6BvdYdEuFPdicx6tBZERuHnb4 h9WgBFDi8l+apwzeX53sj7F5zKQ7LYyH2Ujv5sYb/HV0sLC8HCTebLNwp+9D7Dp2RDqO LPEXChPJHEbf4Wh4eWtRkCZYeA2nLPegwswmIxrtRU+V96Q7inpGofAOkziNmgDGIdRt N3thU5KjRY27BVSLxeR7bnjjjThKpMWQfqHxnLmUgDnpjxjE7XqMy84dpsXoB9iKbWSO QuBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=kKoBgywc; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=BjmSUlQ9; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id a18si27805663pgk.464.2019.04.08.21.54.32 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Apr 2019 21:54:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=kKoBgywc; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=BjmSUlQ9; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=bInPsXgkBzDCtlnk83xGb6fNGvkLtVWXkprHko3mt9o=; b=kKo BgywcfLlzsShCOKptQnidcV82+xWpf1SF2FnYq7iLKBDpEZh/50wxLO92LPoxr5W+JmGdDJDq9L/e 9faE+ctDhW/SXNFcef+rnJyZ48vzKbtebhC5IV7TnQ4k+obcnwG9nvkSOH/d2LetCb4XNhL44ff3u Oqvys7m/4MSCAPx+gUTWazuPRDB+zyBs8VxdHmdppMbufmUBu+LdrIha0jYoN6FvnDmQ9zS2LMIcB 82bxqUYfdY5zZfcyBeAr1alg1bo7GcywO2c2q3M9ZIN2oPlmJNnGRSl1rNIRyAmMyzO0ukUoDUl2+ ca/4WgjpybFtsCHO/t9xSsySk+K7bqw==; 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 1hDim3-00018N-Qs; Tue, 09 Apr 2019 04:54:19 +0000 Received: from conuserg-12.nifty.com ([210.131.2.79]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDim0-00017R-OX for linux-mtd@lists.infradead.org; Tue, 09 Apr 2019 04:54:18 +0000 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id x394rZ7R004013; Tue, 9 Apr 2019 13:53:35 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x394rZ7R004013 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1554785615; bh=I8W+MlJxuYZkV0iAaLmXEewdBUE8cuF0yeIZtO9GjRc=; h=From:To:Cc:Subject:Date:From; b=BjmSUlQ9NPP3MBhFboUUGmsWWwy+tRdTNOFO6oXJHzfZs0n25IMZBn6RMJ+teCq26 Tk4tr4g123wvcpjIlw9Y3IiAObLazt2Gj90fKALG7jTTZLtoZPNYZn5bdqL7kDU++h /9ne133HKo8X+wsgl5QsVtfeXucCQCfRZ2T83NntV8nkrQ3JJ6SO5Y5c3dZ0Bysc6p Sp5+IdzSdCpVRfXBv4VDm2wonqR7u26ndBIAVw9ExCCbDzJMICD++UUej58G+sPNxJ j05JXBN2m/C1WBjnR6AyNwMNpz6NmTuXa1zh3Fr43m3xy9O/ZL4N7M2oX3GqaSGJHZ eRkYwTZLGUyxg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org, Miquel Raynal Subject: [PATCH] mtd: rawnand: constify elements of NAND_OP_PARSER(_PATTERN) Date: Tue, 9 Apr 2019 13:53:32 +0900 Message-Id: <20190409045332.5452-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190408_215417_147062_F84AB787 X-CRM114-Status: GOOD ( 10.50 ) X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [210.131.2.79 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -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 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: Masahiro Yamada , Richard Weinberger , Boris Brezillon , linux-kernel@vger.kernel.org, Marek Vasut , Brian Norris , David Woodhouse MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org Currently, drivers are able to constify a nand_op_parser array, but not nand_op_parser_pattern and nand_op_parser_pattern_elem since they are instantiated by using the NAND_OP_PARSER(_PATTERN). Add 'const' to them in order to move more driver data from .data to .rodata section. Signed-off-by: Masahiro Yamada --- include/linux/mtd/rawnand.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h index b7445a44a814..ebde52088e4d 100644 --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h @@ -805,7 +805,7 @@ struct nand_op_parser_pattern { #define NAND_OP_PARSER_PATTERN(_exec, ...) \ { \ .exec = _exec, \ - .elems = (struct nand_op_parser_pattern_elem[]) { __VA_ARGS__ }, \ + .elems = (const struct nand_op_parser_pattern_elem[]) { __VA_ARGS__ }, \ .nelems = sizeof((struct nand_op_parser_pattern_elem[]) { __VA_ARGS__ }) / \ sizeof(struct nand_op_parser_pattern_elem), \ } @@ -831,7 +831,7 @@ struct nand_op_parser { #define NAND_OP_PARSER(...) \ { \ - .patterns = (struct nand_op_parser_pattern[]) { __VA_ARGS__ }, \ + .patterns = (const struct nand_op_parser_pattern[]) { __VA_ARGS__ }, \ .npatterns = sizeof((struct nand_op_parser_pattern[]) { __VA_ARGS__ }) / \ sizeof(struct nand_op_parser_pattern), \ }